HySF - Displace Foam Particles
“Displace Foam Particles” is used to reposition the particles to make them sit on top of a → domain's ocean statistical spectrum waves. The tool requires an existing simulation of a secondary foam-type emitter ("Foam", "Splash & Foam", "Bubbles & Foam", "Waterline", "Wet & Foam"). The domain, on the other hand, doesn't require any cached particle data – only the “Ocean Statistical Spectrum” feature has to be active, because this information is used to displace the particles.
Here is how to use this tool:
- Select one domain node, and all the foam-type emitters you want to process.
- Click on the icon in the “Hybrido” shelf.
- The tool will create an appropriate number of emitter nodes with a “_Displaced” suffix, e.g. “HY_Foam01_Displaced”.
- You will recognize that the new emitters have different settings than their parent nodes, but as they are only used to collect the displaced particles, it does not make any difference.
Now, the tool will go through the particle sequences and process them. The progress can be monitored in the “Messages” window:
Executed "Displace Foam Particles Tool" for frame 18 in 0 hour(s), 0 minute(s) and 0.2500 second(s).
If you are not happy with the results, for example when you changed the ocean statistical spectrum, and want to repeat this process then the already existing “_Displacement” nodes will be reused, but their data will be overwritten. The original simulation files will be kept though.
Using "Displace Foam Particles" with RealFlow's Command Line Version
With a few preparations this tool can be used with the Command Line version and RealFlow Nodes. Create an empty text file and enter the following lines of Python code:
scene.load(path_to_project_file/project.flw)
scene.reset()
scene.command(430915453)
Save the file and assign a name, e.g. foam_displacement.rfs. To use the script with the command line version, open a terminal application (Command Prompt, Terminal, Bash, etc.) and type in:
realflow -nogui -script path_to_scrip_file/foam_displacement.rfs
With a RealFlow Node it is very similar:
realflownode -script path_to_scrip_file/foam_displacement.rfs