Particle tips HoudiniSimulationCaches
|! IMPORTANT ! This is a PopcornFX v1 page. PopcornFX v2 documentation can be found here|
For PK-Fx Editor version : 1.11.0 and above
Main page: Particle tutorials
Particle layers can now be driven from an offline simulation cache, generated from Houdini for example. This page will explain the export and import process from Houdini.
It is important to understand not every simulation can be exported from Houdini, only point based ones. Keeping that in mind, you can benefit from Houdini's powerful offline solvers and import those point simulations to be played back in realtime.
Any point can theorically be exported as long as it matches those requirements:
- Those points have a P attribute representing their position
- They are not removed/deleted across the sim
- They have a unique id attribute to identify them in order to enable interpolation in PopcornFX
POP solvers only need to have Reap Particles disabled. You can manually kill particles using the dead attribute in realtime.
Always make sure before exporting that all attributes are consistent across frames by using the geometry spreadsheet.
Some point attributes are often missing on the first frame:
They will be by default ignored at import time.
FLIP Fluid solvers
FLIP Solvers need to have:
- Add ID attribute checked if you want to enable interpolation
- Kill Outside Volume Limits disabled otherwise points would be removed
- Reseed Particles disabled otherwise points would be removed/added dynamically
If you discover cool new use cases, let us know !
Exporting is possible by using the ROP Output Driver SOP with the data to export as input. All frames should be exported in the .json file format and should follow this naming convention: YourFrameNames.$F.json
The DOP I/O SOP node has a compression tab that you can use to remove attributes before feeding all data inside the ROP Output Driver SOP node. This will make exported json files lighter and export time shorter.
You can also use the Attribute Delete SOP node to remove point attributes
To import an offline simulation, right click in PopcornFX's content brower and select 'Import Offline Simulation', then select the folder containing all .json frames
All point attributes present within the simulation will be displayed inside the import dialog. You can select the ones you want to keep:
Budgets can be defined within the project settings under Assets -> Import Some fields will be hidden / removed by default from the simulation. You can add/remove points inside the project settings.
If no errors were encountered, you can now use this simulation cache, see Particle Spawner for more detail.