Fluid-Object Interaction

RealFlow | Cinema 4D's fluids are capable of interacting with Cinema 4D's objects. This way it is possible to fill glasses and water tanks, create splashes through collision, guide particles through tubes or riverbeds, and so on. The main task with fluid-object interaction is to prevent the particles from going through the objects. The following object types are supported:

  • Parametric and editable objects.
  • Objects with animation keys and baked dynamics data.
  • Objects with a changing number of vertices and polygons.
  • Objects with PLA.
  • Objects, influenced by deformers.

In order to make an object visible to RealFlow | Cinema 4D a "Collider" tag has to be attached:

  • Right-click on the appropriate object and choose RealFlow Tags > Collider.
  • Each object requires its own tag. 
  • It is possible to group several objects and attach the "Collider" tag to the group.

Collider Tag Settings

There are three main parameters and options for controlling the quality of the fluid-object interaction. You should also activate Collider tag > Display > Show Collision Geometry to see the effect of your settings (it might be necessary to reset the scene in order to see the collision mesh).

 

 

Volume Mode

This parameter is used to determine how an object is treated by RealFlow | Cinema 4D. By default, the plugin detects whether an object is solid, hollow, or surrounded by a thin, invisible shell. There are cases where the automatic detection is problematic, e.g. when an object is very complex, has convex and concave polygons, or holes. Here it is advised to uncheck the "Auto" option and choose the "Volume Mode" manually:

  • "Solid Inside". The object is considered as a solid block. Particles will only interact with the object's outside.
  • "Solid Outside". The object is closed and hollow. Particles will only interact with the object's inside. Great for filling logos.
  • "Shell". The object is single-walled and/or partially open, e.g. a glass, a vase, or a plane. The plugin creates a thin shell (thickness = Cell Size * 3) around the object. As a consequence there will always be a gap between particles and object.

If you can see leaking particles in conjunction with thin or single-walled objects please consider enabling the tag's → "Continuous Collision Detection" option under "Collision".

Cell Size

With "Auto" turned on, RealFlow | Cinema 4D uses your selection from the "Collision Geometry Detail" menu to calculate "Cell Size". By default, the value is calculated automatically based on your → "Collision Geometry Detail" settings. Be aware that small "Cell Size" settings will increase simulation times. Instead of using very small "Cell Size" values you should think about changing "Surface Offset" (see below).

"Cell size" can be animated. This allows you to refine collision detection over time and speed up the simulation.

Surface Offset

Instead of using very small "Cell Size" values you should think about changing "Surface Offset":

  • Positive values inflate the object internally to improve collision detection.
  • Negative values shrink the object internally and they should be used if there is a clearly visible gap between particles and object.

Animated Objects

Only objects with animation keys and PLA can be used in conjunction with RealFlow | Cinema 4D's particles. Dynamic objects like rigid and soft bodies, or cloth have to be baked:

  • RealFlow | Cinema 4D calculates an animated object's velocity and takes it into account for the interaction with the fluid. To make this velocity visible go to Collider tag > Display > Show Collision Velocity.
  • If an animated object's number of polygons and vertices is changing over time its velocity is 0.
  • Velocity is also considered with the "Object" emitter's "Parent Velocity" parameter.

Fast Moving Particles

Improvements in conjunction with fast particles can also be achieved by increasing the number of simulation steps (aka known as substeps). The final number of substeps depends on the used fluid type (Fluid > Fluid > Type > Liquid - PBD or Liquid - SPH):

 

 

  • With "Liquid - SPH" you will hardly see leaking particles, because here the number substeps is very high by default.
  • With "Liquid - PBD", the default number of "MAX Substeps" is just 2. Try values between 5 and 15 for better results.

If possible reduce the particles' speed by decreasing Emitter > Emission > Speed.