Animating Instances Through a CFD Velocity Field

You can animate instances of an object on splines advected through the velocity field of a CFD simulation. For example, you can create arrows moving through a simulation.

  1. Create an object to instantiate.
  2. Import a Simulation CFD file as described here.
  3. Create a shape with multiple splines as described here.
  4. On the Create panel, select the Geometry category and then select CFD.
  5. Click CFDInterpOnSpline, and then click in a viewport.

    A CFDInterpOnSpline object is created in the scene, but it initially has no geometry.

  6. Move the CFDSplineNode object to the world origin. In addition, make sure that it is aligned with the world and not scaled.
  7. On the Modify panel, click the splines button in the Parameter rollout and then select the spline object in the scene.
  8. Click the Instance Node button and then select the object to instantiate.

    Once both input objects are connected, the instances appear on the splines.

  9. Change and animate Path % to move the instances along the splines.
  10. To view the speed as colors in the viewport:
    1. Right-click on the CFDInterpOnSpline object.
    2. Select Object Properties.
    3. Turn on Vertex Channel Display in the Display Properties group on the General tab.

    Adjust Red Amount% on the Modify panel to control the color gradient from blue (slowest), through cyan, green, yellow, orange, and red (fastest). Values above 100 shift the slower arrows toward red, and values below 100 shift the faster arrows toward blue.

  11. To render the speed as color, apply a material that uses the vertex color. For example, you can use a Standard material with a Vertex Color map plugged into the Diffuse Color and Self-Illumination ports.

  12. Note that for motion blur with the mental ray renderer, you must also set a key on the CFDInterpOnSpline object's transform.