Painting Fuel and Density into a container

In Fluid Effects, Fuel defines the state of a reaction (unreacted, completely reacted, and states in between). Density represents the substance that is reacting, while Temperature causes the reaction. Combining Density with Fuel defines a situation in which you can see a reaction. You add Temperature to this situation to start the reaction. As the reaction takes place, Density values become smaller and the Fuel values get smaller to represent how much of the reaction has yet to take place. The reaction also creates more Temperature, and it creates light.

In the following steps you’ll paint Fuel and Density values in the container. To paint in a 3D container you actually paint in two dimensions on “slices” of the container. A slice is a plane in X, Y, or Z that represents where you paint. (You could think of a slice as a 2D canvas.) You paint each slice individually, but the accumulative effect of adjacent slices is a 3D fluid.

To paint Fuel and Density into a container

  1. With the container still selected, choose Fluid Effects > Add/Edit Contents > Paint Fluids Tool > .

    The Tool Settings window opens and a slice displays at the origin of the fluid container. The slice is represented by a plane with dotted edges and fluid subvolume manipulators at one corner. When you move the pointer over the slice the pointer changes to a brush indicating that you can paint.

  2. At the top of the Tool Settings window, click Reset Tool to set the Paint Fluids Tool settings to the default values.
  3. Select the fluid properties you want to paint. In the Paint Attributes section of the Tool Settings window, beside Paintable Attributes, select Density and Fuel. You will paint both these properties at the same time.

    You could paint each property separately, but for this example, the values you paint will be the same for both. It is more efficient to paint them both at the same time.

    A message appears prompting you to set the fluid’s Fuel method to Dynamic Grid. By setting the Fuel method to Dynamic Grid, the fuel values you place in the container grid (in this case, by painting them) are recalculated by the fluid dynamics solver and changed during simulation. The Density method is defined as Dynamic Grid by default.

  4. Click Set to Dynamic.
  5. Tumble the scene and look at the slice and manipulators.

    The orientation of the slice changes relative to your view. The slice is perpendicular to the axis with the manipulators. The color of the manipulators corresponds with the color of the axis in the View or Origin axes.

    Painting properties relative to different axes is good practice to ensure there are no gaps between slices when the fluid is viewed from different angles.

  6. Tumble so that the slice is perpendicular to the Y axis and then click the open lock icon to lock the slice axis.

    The lock closes. Now when you tumble, the slice remains perpendicular to Y. It does not switch to the other axes. This allows you to change the view in any way and still be able to paint on the same slice.

  7. Drag the top move arrow down along the axis to the first slice at the bottom of the container. The number of slices along each axis corresponds with the resolution of the fluid container. The numbering starts at 0 at the intersection of the axes. For this container the resolution is 10 10 10, so the slices are numbered from 0 to 9.

    The help line displays the location of the selected slice.

    Fluid Slice Location: 0.000

  8. In the Paint Attributes section of the Tool Settings window, ensure that Value is set to 1. A Fuel value of 1 represents a totally unreacted state while a Fuel value of 0 represents a completely reacted state. A Density value of 1 is totally opaque while a Density value of 0 is completely transparent.
  9. Drag the brush on the slice to paint values. Paint until the entire slice is filled with values.

    The values display as yellow because you are painting two properties at the same time. Density values are represented by the opacity of the shaded values, while Fuel values are represented by color. The range of Fuel values corresponds with a ramp of colors from blue (values of 0) to yellow (values of 1).

    To make the fluid deeper, you could move the slice to Fluid Slice Position 1, paint, move the slice to Fluid Slice Position 2, paint, and so on. But a quicker way is to resize the slice to make it thicker and then flood the entire slice with values.

  10. Resize the paint slice, making it thicker:
    • Click the target icon once to switch to the subvolume scaling mode.

    The slice becomes thicker and the manipulator changes to include scaling boxes at the ends of the move arrows.

    • Click the top scaling box and read the help line to determine that the Fluid Slice Thickness is 3.00. You could drag the scaling boxes to change the thickness of the slice, but the slice is thick enough for the lesson.
  11. In the Tool Settings window, click the Flood button.

    Flooding filled each voxel in the subvolume with Fuel and Density values of 1.

    Notice that the values display as shaded planes rather than as a solid mass. This is an interactive display feature for shaded display mode. Displaying more shaded planes (slices) produces more detail but reduces the speed of the screen draw. You can change this display feature (Slices Per Voxel) and others in the Display section of the Attribute Editor.

    Now that the container has Density and Fuel in it, you are ready to start a reaction by adding Temperature. You could think of this as putting a lit match into a container of gasoline.