Defining the contents of a fluid container

 
 
 

There are two ways you can define a fluid property for a fluid container:

Preset gradients

You can set the property values of a fluid container as predefined gradients. Predefined gradients are sets of values in the form of gradients that are provided with Maya. Predefined gradient property values stay constant over time and they require no calculations at render time; making them render more quickly than dynamic grid fluid properties. You can not change preset gradient values, but you can scale the values for the entire container.

The following example of a 3D fluid in shaded display mode shows Density defined as a Y gradient. The effect looks like ground fog, with Density values gradually getting smaller along the Y axis. By applying a texture to it, you can give it a more realistic look. By animating (keyframing) the texture, you can make the fog appear to move without using dynamics.

You can also produce some interesting effects by applying textures to gradients and then animating the textures. See Texturing fluids.

Grids

When you define a fluid property as a grid, you can place different property values in each individual grid unit called a voxel (volume pixel). Grids give you precise control over what the values are in the container. There are two types of grids: dynamic and static.

You place values in a grid by emitting them (similar to emitting particles), painting them, or by adding a predefined initial state cache. See Add properties to fluid containers.

The following example of a 2D fluid shows Density in a grid. The image on the left shows the image in shaded display mode. The image on the right shows what the actual Density values are in each voxel.

Increasing the number of voxels that comprise a fluid container increases the quality of the rendered fluid image, but also increases the time it takes to render. Ensuring that the voxels in your fluid are square (2D container) or cubic (3D containers), also increases the quality of the rendered fluid image.

Dynamic Grids

You use dynamic grids to simulate dynamic fluid behavior. At each step or substep of the simulation, Maya recalculates the values in each voxel using the fluid dynamics solver and replaces the values with the newly calculated ones. This is what creates the dynamic motion of the fluid.

For dynamic fluid simulations, Density must be set to Dynamic Grid. Also, you can not turn off Velocity because it moves the property values around inside the grid.

Static Grids

You use static grids to define specific values in the grid. Once you place values in a static grid, the values cannot be changed by the result of the solve. Static grids are useful when you want control over values in specific areas of the container, but you do not want those values to change over time.

Paint fluid properties into grids

You can use the Paint Fluids Tool to place values in precise locations in a fluid grid, and with each brush stroke you can edit existing values by scaling, smoothing, replacing, or adding to existing values. The Paint Fluids Tool is an Maya® Artisan brush tool and therefore works like the other Artisan tools. For more information on Artisan Brush Tools, see How Artisan brush tools work in the Artisan guide.