Adding Foam in Post-Processing

edited August 2017 in DualSPHysics_v4.0
Hi everyone,

I was wondering if someone had any experience with adding foam to a simulation performed in DualSphysics. Is the fame added in the post-processing stage or during the simulation?

I really hope someone can help me with this:)

Gr Yous


  • You can add foam in Blender Cycles. There are good YouTube tutorials on this subject. As far as getting the DualSPHysics results into Blender Cycles, refer to the "Visualization" tab at the top of this page.
  • I use visualsphyics for getting the isosurfaces into Blender. I can add materials to create a water look, but I can't find a tutorial on adding foam in fluid that are performed using an external sph code (and not the the internal blender one). Could you help me with this:)

    Gr Yous
  • Sorry, that's beyond the scope of my understanding. I've only used Blender Cycles and not any external codes. Good luck!
  • Thanks for the reply:) Do you have any references or guidelines on how to do this in Blender, so:

    -Simulate fluid using DualSphyiscs
    -Import Simulation into Blender, using VisualSphysics
    -Add Foam in Blender Cycles (how to do this step!)

    I tried to find a good tutorial for adding foam in Blender, but the once I found don't import the fluid simulation from DualSphysics (or any other SPH code).
  • I don't see a need for tutorials which import fluids from DualSPHysics because once you import the Surface VTKs using VisualSPHysics, you treat them just like any other object in Blender Cycles, and Blender Cycles is where you can add the foam. Maybe you could make a tutorial if you feel it would be helpful to others. I recommend combining the knowledge you get from reading / watching these materials:

    1.) The DualSPHysics_v4.0 guide
    2.) Pages 47-52 of Alex's excellent Advanced Visualization presentation at the 2nd DualSPHysics Users Workshop (
    3.) The VisualSPHysics wiki (
    4.) The "Creating an Ocean with Foam in Cycles" video series on the "Blender HD" YouTube channel.

    Good luck!
  • falfal
    edited September 2017
    I can't understand the process of adding foam in blender, too.

    If the modifier "Ocean" with displace is applied to the surface of fluid, it affects the height and wave shape of the object,
    like this.

    Then, foam is generated at unintended positions.
    How can I generate foam without changing the wave shape of VTKs?


    "DualSPHysics foam simulation" posted on this PDF p30 is not displayed on my Blender.

    Is this option implemented in VisualSPHysics?
    If so, I can understand why the tutorial is unnecessary.
    It's just a matter of my use environment.
  • Same comment as above, can't have access to the "DualSPHysics foam simulation" menu on blender... Which seems to be the key in adding foam in a user-friendly way :/
    Anyone found a workaround?
  • edited September 2017
    You could ask Orlando, but my best guess is that it's an option that is in-development and isn't included in the current VisualSPHysics release. It's common to see DualSPHysics features (inlet conditions, multi-GPU, etc.) in papers and presentations created by the developers, but it takes a while for those features to trickle down to a stable release. I suspect it's the same with the "DualSPHysics foam simulation" menu in VisualSPHysics.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!