Project 3b: Fluids

Goal Learn the basics of fluids.

When you think of the word fluids, you probably imagine an effect that creates the splashing of water. In Maya Fluids refers to fluid dynamics, which deals with the interaction of fluids of similar density such as fire and air, smoke and air, or ink and water. Fluids can create very convincing effects, but as always, there is a performance tradeoff. Fluids are expensive to set up and expensive to render. In this project we will walk you through creating a simple fire.

  1. Use Fluid Effects → Create 3D Container With Emitter (Options) to set up a new fluid. Set the X, Y, and Z Resolution to 20. Unlike particles, fluids are contained in boxes which they cannot escape. The insides of these boxes are divided into a set of "voxels" — points in space at which the various properties of the fluid are calculated. Increasing the resolution results in a higher fidelity image, but also takes longer to calculate and consumes more memory.

    Set the Emitter type to Volume and the Volume shape to Cylinder. Scale and rotate the emitter to create a log shape as you did with the particle emitter. If you are shaded mode (6) and you hit Play, the emitter should create a white fog that fills up the box.

  2. We will attempt to make the fluid act more like fire by tweaking some of its attributes. Under the Container Properties of the fluidShape, set Boundary X, Y, and Z to None. This will allow the fluid to act like it can escape the box, even though it will not be rendered. Under Contends Method, change Temperature and Fuel to Dynamic Grid. Under Contents Details - Density, set Buoyancy to 3.5. Under Velocity, set Swirl to 20. Under Turbulence, set Strength to 0.01. Under Fuel, set Fuel Scale to 1.85 and Reaction Speed to 1.
  3. In the Shading section, adjust the settings until they resemble the image below. You can spend hours tweaking the appearance of fluids to get them perfect, but just aim for something decent in this project.
  4. Your final fluid flame should look something like the image below. Once you import your spark particles you are almost ready to render. You may have noticed that it takes a while for the effects to start up and get to a steady state. Generally you are not interested in rendering this start up phase. To avoid this you can play the effect to a point where it is stable and then set the current frame as the initial state. You can do this for particles by using Solvers → Initial State → Set for Selected. For fluids use Fluid Effects → Set Initial State.

    Rendering effects is a bit tricky because you have to cache out the effect first. Normally Maya determines the next state of an effect based on the current frame. When you cache it, Maya calculates everything up front. This allows you to scrub through your effects much faster and avoids a class of render problems.

    The first step when caching is to set a new project (File → Project → New). This will give Maya a place to save its computations. It goes without saying that this should be on the network. To cache particles, use Solvers → Create Particle Disk Cache. To cache fluids, use Fluid Effects → Create Cache. Once you have cached your effects, render out 5 seconds of your combined fire effect. Rendering on the render farm should work, but you may have to fall back on batch rendering if the render farm doesn't feel up to it.

Turn In You will be graded on the following: Turn in the following: