Thursday, October 18, 2007

A Maya Fluid Dynamics Quicksheet

Even though this was written for Maya 7, it should still apply to current versions of Maya. The pictures were originally much larger, but Blogger seemed to shrink them unmercifully (even in the largest picture upload setting). I'll try to host these pictures elsewhere in their full resolution and update this post.

Quick Links

Fluid Overview:

  • Fluids are emitted into containers. When a fluid is emitted, it moves as if it were dye in a mass of liquid (which is, in a sense, what it is doing).
  • A container is divided up into voxels, which are compartments of the container that store values for fluid dynamics. The visible parts of the fluid have a Density greater than 0. Nothing actually moves around in a fluid container, the voxels merely change their stored attribute values according to the simulation.
  • A fluid can be 2D, 3D or just texture.

Things to keep in mind:

  • Fluid emitters don't really emit fluid. They emit properties. The fluid is already in the container. Heat and density are properties that can either be emitted by emitters or hand painted with the Paint Fluids tool.
  • Fields should only be used for 2 or 3 frames before being keyed off. They can cause the fluid to behave erratically after that.
  • Voxels should always be square or the fluid will look weird.
  • To keep the fluid from moving after emission, set Density to Static Grid or set Velocity to either Off(zero) or Static Grid.
  • Maya 7.0 will use all available processors/cores to solve fluid dynamics, so spring for a multicore system.
  • To improve renders, read this.
  • Smoke has a sharp Opacity falloff, so make sure to adjust the Shading | Opacity curve and set Input Bias to around 0.5!
  • Do not render fluids with Production Quality! It will take forever. Instead, set that Render Globals option to Preview Quality and adjust the fluid's render quality with Shading Quality | Quality. It will go much quicker with about the same results.
  • For texturing clouds and explosions, set Textures | Texture Type to Perlin Noise and check Textures | Inflection. This is a good place to start.
  • When scaling up fluidEmitters, reduce Fluid Attributes | Fluid Dropoff. When scaling them down, increase Fluid Dropoff. Apparently, Fluid Dropoff doesn't scale well.
  • If the fluidEmitter has been scaled in one or two axes and the fluid is only emitting from the center (instead of from the whole volume), then reduce Fluid Attributes | Fluid Dropoff until the fluid emits from the entire volume.
  • For a puff of smoke or dust effect (at the footsteps of a character, for example), key fluidEmitter | Fluid Attributes | Density/Voxel/Sec and Heat/Voxel/Sec to 0, then 20 for a few frames, then 0 again.

fluidShape Attributes

Where applicable, recommended attribute settings are specified in red. Nodes will be in bold italics. Attribute categories will be in bold. Attributes will be in italics (unless they are being defined in which case they are bold). Attribute values will be in fixed width. Heirarchies will use | (i.e. pipes) to separate parent and child (for example, fluidShape | Container Properties | Boundary X).

Container Properties

  • Resolution - the higher this value is, the more detail and motion will be present in the fluid. Resolution is represented by values for x and y for a 2D fluid and x, y and z for a 3D fluid. This does not mean that a render will be low-res if Resolution is set low, but it does mean that its motion will be more general. A higher resolution allows for small eddies and more articulate motion.
  • Size - controls the size of the fluid container. It is represented by x, y and z values. To keep voxels square, make sure that Size is in the same proportions as Resolution. If Resolution is <<80,40,0>> then Size should be <<20,10,0>> or <<10,5,0>>, etc.
  • Boundary - if the value of Boundary X, Boundary Y or Boundary Z is Both Sides, then the fluid will collide and interact with the borders of the container in that direction. If, for instance, the value of Boundary X is -X Side then the fluid will only interact with the container boundary in the -x direction. If the value of Boundary X, Boundary Y or Boundary Z is None (or the opposite side is specified as a boundary), then the fluid will simply cease at the border. If the value of Boundary X, Boundary Y or Boundary Z is Wrapping, then the fluid will wrap around to the opposite side.

Examples of boundaries and their effect on fluids.

Contents Method

  • Density - the visible part of the fluid. Essentially, it is the "particles" of the fluid.
    • Off(zero) - the fluid is turned off (invisible).
    • Static Grid - the fluid emits, but does not move after emission. No fluid calculations occur.
    • Dynamic Grid - the fluid moves after emission. Fluid calculations occur.
    • Gradient - fills up the entire container with fluid with the falloff determined by Density Gradient and Shading attributes. This is for non-dynamic applications. Fluid will not move after it is set.
  • Density Gradient - controls in which direction the gradient is applied.
Examples of (from left to right) Constant, X Gradient, Y Gradient, Z Gradient, and Center Gradient.
  • Velocity - pushes the fluid around the container.
    • Off(zero) - fluid dynamics are not calculated.
    • Static Grid - the fluid emits, but does not move after emission. No fluid calculations occur.
    • Dynamic Grid - the fluid moves after emission. Fluid calculations occur.
    • Gradient - moves the fluid in the direction specified by Velocity Gradient.
    • Velocity Gradient - specifies the direction in which Velocity will occur. Only recommended for non-dynamic simulations.

  • Temperature - moves the visible fluid around based on temperature. This attribute also affects color (the hotter a fluid is, the more incandescent it becomes).
    • Off(zero) - Temperature is not calculated.
    • Static Grid - the temperature does not get pushed around between voxels. If heat is being emitted, it will remain confined to the emitter and not spread to fluid in any other area.
    • Dynamic Grid - the temperature changes over the course of the simulation and will affect the fluid's color. Useful for showing hot spots in smoke or simulating fire.
    • Gradient - the temperature is static but has a falloff.
  • Temperature Gradient - specifies the direction of the falloff of the temperature. It also controls in which direction the fluid will flow (if this value is X Gradient, then in a 2D fluid the fluid will flow towards -x since that's where the X Gradient would start).

  • Fuel - determines the visibility and color of the fluid by controlling its "fuel source". It requires a non-zero value in Temperature to show results.
    • Off(zero) - there is no fuel.
    • Dynamic Grid - fuel will be emitted. This works with Temperature to determine if and when the fluid catches on fire (or changes color).
    • Gradient - controls how the fuel is dispersed throughout the fluidShape. This would be useful to make sure that a fuel source does not move and ignite the rest of the fluid but still has a smooth falloff.
  • Fuel Gradient - specifies the direction of the falloff of the fuel.

  • Color Method - controls how the fluid is shaded.
    • Use Shading Color - the fluid is colored according to Shading | Color.
    • Static Grid - not sure, yet.
    • Dynamic Grid - the fluid will emit color according to the fluidEmitter | Fluid Attributes | Fluid Color value.
  • Falloff Method - When set to Static Grid, this attribute acts as a mask for the visibility of the fluid. The Paint Fluids Tool can be used to paint the areas in which fluid will be visible in the fluid container. New to Maya 7.0. For more info (if you have the Maya Help docs), go here.

Display

  • Shaded Display - determines how the fluid appears in the viewports.
    • Off - no fluid is visible.
    • As Render - fluid is shown as an approximation to how it will render.
    • Density - the Density values of the fluid are shown as clear (for no density) and white (for full density).
    • Temperature - the Temperature values of the fluid are shown as clear (for no heat) and white (for full heat).
    • Fuel - the Fuel values of the fluid are shown as clear (for no fuel) and white (for fuel presence).
    • Collision - white represents where a fluid is colliding with an object.
    • Density And Color - shows Density and the unmodified static or dynamic color.
    • Density And Temp - shows Density and Temp as RGB values where yellow represents the hottest areas within the density and blue represents the coolest areas.
    • Density And Fuel - shows Density and Fuel as RGB values where yellow represents the highest concentration of fuel within the density and blue represents the lowest concentration.
    • Density And Collision - shows Density and collisions as RGB values where yellow represents a collision within the density and blue represents no collision.
  • Opacity Preview Gain - allows easier viewing of whichever attribute is being shown in Shaded Display. Turning this value higher turns up the opacity of the displayed attribute.
  • Slices per Voxel - Determines how many planes are used per voxel in the viewport. A good value is 2.
  • Voxel Quality - controls how the voxels appear in the viewport
    • Better - better appearance, lower performance
    • Faster - better performance, lesser appearance

  • Boundary Draw - changes the way the fluid container is displayed. The displayed grid will have a number of divisions equal to the container's resolution.
    • Bottom - displays only the grid on the bottom of the container
    • Reduced - displays a frontface-culled grid. Recommended while editing the resolution of the container.
    • Outline - displays a grid on all sides of the container
    • Full - displays a cube for each voxel
    • Bounding Box - displays only a cube for the container. Recommended once resolution is set.
    • None - displays no container. Recommended for playblasts. Makes the fluid harder to select.
  • Numeric Display - displays numeric values per voxel for various values.
    • None - displays no numbers
    • Density - displays the fluid's density values
    • Temperature - displays the fluid's temperature values
    • Fuel - displays the fluid's fuel values
  • Wireframe Display - changes the way the fluid appears in Wireframe Mode
    • Off - no fluid is shown
    • Rectangles - displays each voxel as a rectangle. The lower the density, the smaller the rectangle.
    • Particles - displays each voxel as a particle point.

  • Velocity Draw - if checked, lines are displayed showing the direction in which the fluid is moving.
  • Draw Arrowheads - if checked, arrowheads are drawn on the velocity lines.
  • Velocity Draw Skip - a higher value here lowers the number of velocity lines drawn.
  • Draw Length - controls the length of the velocity lines.

Dynamic Simulation

  • Gravity - sets the gravity for the fluid. Should be kept at 9.8 for regular gravity (if basic unit is in meters) or 981 (if basic unit is in centimeters).
  • Viscosity - sets the thickness of the fluid. 0 is like water and 1 is like tar.
  • Friction - a value of one will significantly slow down any fluid that is colliding with an object. This will only work if Grid Interpolator is set to hermite. It seems to have very little effect on the simulation, however.
  • Damp - lessens the effect of dynamics on the fluid. It is similar to Conserve in particles. A value of 1 will completely stop the fluid. Typically set to 0.005.

  • Solver - determines the algorithm used to simulate fluid dynamics
    • none - no simulation
    • Navier-Stokes - simulates underwater movement (eddies, etc.)
    • Spring Mesh - good for surface water deformation (ripples, etc.)
  • High Detail Solve - used to keep the fluid from diffusing too much during a simulation. Setting this to anything but Off is useful for explosions, rolling clouds, and billowing smoke. New to Maya 7.0.
    • Off - fluid will diffuse as normal
    • All Grids Except Velocity - similar to All Grids (see below) except velocity is unaffected by High Detail Solve. This is useful to retain most of the benefits of the extra fluid cohesiveness without much of a higher calculation time. Do not set Grid Interpolator to _hermite if this is enabled.
    • Velocity Only - enables extra cohesiveness for Velocity only. This is useful if there are artifacts due to high detail density solving with either the All Grids Except Velocity or All Grids solving methods. Setting Grid Interpolator to hermite is recommended for highly detailed results, albeit at the cost of a longer simulation.
    • All Grids - enables the fluid to stay more cohesive over the course of a simulation. This will provide the most realistic and detailed fluid simulation if enabled. It will take twice as long to simulate than if High Detail Solve is set to Off. Do not set Grid Interpolator to hermite if this is enabled.
  • Solver Quality - controls how fine-tuned the solver is, I guess. New to Maya 7.0.
  • Grid Interpolator - determines how the value changes of each voxel are interpolated (imagine a curve with each calculation as a keyframe). Linear is quicker to calculate, but it's less exact. Hermite will produce more swirls in the simulation but is much slower than Linear.
  • Start Frame - the frame in which the simulation will begin. If Start Frame is set to a value lower than your playback range's first frame, then the simulation will continue to run once it has run beyond the playback range's last frame (instead of returning to the beginning of the playback range and restarting the simulation). Another point to keep in mind is that even if the fluidEmitter is keyed to begin at a particular frame, the scene will still solve for the fluid as long as the current frame is past the Start Frame. This means the scene will run slow even if nothing is apparently happening in the fluid.
  • Simulation Rate Scale - controls how fast the simulation plays out. The higher this value, the faster the simulation goes. This is useful for creating roiling smoke or explosions. It is recommended to start working with the fluid with a Simulation Rate Scale of 1 or 2, and step it up as needed. Explosions tend to use a value from 8 to 12. Values higher than 16 may produce unpredictable results.
  • Disable Evaluation - checking this will disable the simulation.

  • Conserve Mass - doesn't do much anymore. Ignore it if you wish.
  • Use Collisions - toggles fluid collisions with objects.
  • Use Emission - toggles the emitter on and off.
  • Use Fields - toggles whether fields will affect the fluid or not.

Contents Details

  • Density
    • Density Scale - scales the initial density value that is placed in each voxel. While this controls the apparent transparency of the fluid, it is best left at 0.5. The transparency should be driven by the Shading | Transparency attribute instead.
    • Buoyancy - determines whether the fluid is more buoyant and floats upward or is less buoyant on settles downward. A value higher than one will speed up the vertical movement. Negative values cause the fluid to move downward.
    • Dissipation - causes the fluid to disappear at a point where it is most likely to dissolve into the surrounding fluid. It works a bit like Lifespan works in particles.
    • Diffusion - causes the fluid to spread out into the surround fluid and soften at the edges.

  • Velocity
    • Velocity Scale - scales the strength of the velocity in x, y, and z. If, for instance, the y value is changed to 0.5, then the fluid will move upwards half as fast as it would otherwise. This value should generally be between 0.8 and 2.0 for acceptable results.
    • Swirl - causes the fluid to swirl. A higher value means more swirling. This is useful for roiling clouds or explosions.

  • Turbulence
    • Strength - brings more turbulence into the fluid. Note that this is built into the fluid. It can be used alongside the Turbulence field.
    • Frequency - changes the size of the turbulent waves. A lower values produces larger waves than higher values. The default setting of 0.2 tends to create a large swirling motion that fills the entire fluid container.
    • Speed - higher values speed up the turbulence calculations. This doesn't mean, however, that the fluid will move faster; it just means that there will be different points along the turbulence wave by which the fluid will be affected. Consider it more of a seed.

  • Temperature
    • Temperature Scale - scales the heat of each voxel.
    • Buoyancy - similar to *Density*|_Buoyancy_, except it affects the temperature.
    • Dissipation - similar to *Density*|_Dissipation_, except it affects the temperature.
    • Diffusion - similar to *Density*|_Diffusion_, except it affects the temperature.
    • Turbulence - applies a turbulence to the area an emitting fluid occupies and not to the entire fluid container (as Turbulence does). Useful for explosions and fires.

  • Fuel
    • Fuel Scale - scales the fuel value of each voxel.
    • Reaction Speed - a lower value will cause the fuel to ignite much slower. Up this value for faster-burning fuels.
    • Ignition Temperature - controls the point at which the temperature is hot enough to ignite the fuel (i.e., cause the incandescence colors to kick in).
    • Max Temperature - affects how hot the fuel will burn, and, in turn, affects the color of the fluid. Lowering this value will keep the fluid from reaching the higher end of the incandescence ramp.
    • Heat Released - controls how much heat is released from the fluid. It affects the color of the fluid.
    • Light Released - controls how much light is released from the fluid. It affects the incandescence of the fluid.
    • Light Color - sets the incandescent color that Light Released affects.

  • Color
    • Color Dissipation - this is enabled only when *Contents Method*|_Fuel_ is set to Dynamic Grid. It controls how quickly the color goes to black.
    • Color Diffusion - this is enabled only when *Contents Method*|_Fuel_ is set to Dynamic Grid. It determines how much the fluid color blurs at its edges.

Grids Cache

These options control which values get cached. To cache Fluids, go to Fluid Effects > Create Cache. These same options are in the Create Cache option window. The attributes are self-explanatory.

Surface

  • Volume Render/Surface Render - if Volume Render is on, then the fluid will render out with a falloff. If Surface Render is on, then the fluid will render as a solid mass with no falloff. Surface Render is very slow, even when editing attributes. Its best to enable this after all settings have been finalized.
  • Hard Surface/Soft Surface - only enabled if Surface Render is on. If Hard Surface is on, then it will render the way it appears on screen. If Soft Surface is on, then it will render like the Hard Surface, except with a falloff around the outside edges.
  • Surface Threshold - only enabled if Surface Render is on. This determines where the fluid's surface will appear within its volume. Higher values shrink the visible fluid.
  • Surface Tolerance - only enabled if Surface Render is on. It doesn't seem to do much. Supposedly, a lower setting will render better, while a higher setting will render faster.
  • Specular Color - only enabled if Surface Render is on. This affects the surface in much the same way that a Blinn shader would.
  • Cosine Power - only enabled if Surface Render is on. This affects the surface in much the same way that a Blinn shader would.


From left to right, the following renders use Volume Render, Surface Render with Hard Surface, and Surface Render with Soft Surface.

Environment

Creates an environment map for Surface | Specular Color.
  • Refractive Index - controls how "wet" the surface looks. Lower levels (less than 1.0) make the surface look like water. Supposedly.

Shading

Shading and Texturing will ultimately determine how the fluid will render out.
  • Transparency - controls the transparency of each voxel of the fluid. A value of all black means no transparency. A value of all white means full transparency. This should not be confused with Opacity, which affects the fluid as a whole, and not each individual voxel.
  • Glow Intensity - works the same as Glow Intensity for shaders (i.e., it's a post-process effect). This effect can be controlled by the Shader Glow shader.
  • Dropoff Shape - the shape within the fluid container beyond which the fluid disappears. For example, if Dropoff Shape is Cube, then the visibility falloff is in the shape of a cube. If it is Sphere, then the falloff is in the shape of a sphere (centered in the middle of the container). This is useful for fading out a fluid before it reaches the edges/sides of its container. Dropoff Shape will not affect any edge or side that is set with a boundary of None or Wrapping
  • Edge Dropoff - controls how far from the edge or side that the falloff begins.

  • Color - determines the base color of the fluid. The darker this color is, the more effect Incandescence will have on the color of the fluid.
    • Selected Position - the position of the currently selected color point in the color ramp to the right. The left side of the ramp is 0 (coloring voxels with a value of 0 from Color Input) and the right side of the ramp is 1 (coloring voxels with a value of 1 from Color Input).
    • Selected Color - the currently selected color point's value.
    • Interpolation - the type of smoothing that occurs from one color point to another. These are similar to tangent settings for keyframes on an animation curve.
    • Color Input - determines which value or attribute drives the color of the fluid.
    • Input Bias - shifts the values provided in Color Input by the given amount. For example, the color ramp is red on the left side and green on the right, and the Color Input is Density. With an Input Bias of 0, all voxels whose Density is 0 would be red (at least they would be if they weren't invisible) and all voxels whose Density is 1 would be green; any values in between are interpolated. Now, if Input Bias were 0.5, then all Color Input values (which in this case is driven by Density) would be adjusted by 0.5 (values above 1 would be clamped at 1). All voxels whose Density is 0 would have a Density of 0.5 (but only for the purposes of determining the color!). Voxels with a Density greater than 1 would be clamped at 1. That means that all other Color values will be mapped between 0.5 and 1.0= on the color ramp. In this case, the least dense areas will be colored red-green (0.5 on the color ramp) and the most dense areas will be colored green (1.0 on the color ramp).

  • Incandescence - brightens Color using color values from the Incandescence ramp. This is most useful when Color is a dark value.
    • Incandescence Input - determines which value or attribute drives the incandescence of the fluid. For explosions and fire, it is recommended to keep this at Temperature.
    • Input Bias - this attribute is comparable to Color | Input Bias, except it adjusts the incandescence of the fluid.

  • Opacity - controls the opacity of the fluid as a whole using a falloff curve. To better visualize how the falloff graph works, imagine that the dark gray part is the visible fluid and the light gray part is the invisible fluid. The left side of the graph would represent the falloff of the visible fluid's opacity. In the example below, the left image has a linear falloff while the right image has a more rounded falloff (which is why the outer edges of the fluid look thicker).
Displayed is how Opacity affects the fluid. The insets are the Opacity falloff graph.
    • Opacity Input - the attribute or value used to determine how opaque voxels are. The recommended setting is Opacity.
    • Input Bias - this attribute is comparable to Color | Input Bias, except it adjusts the opacity of the fluid.

Shading Quality

If the fluid renders with artifacts, try adjusting these values to fix it.
  • Quality - controls the quality of the aliasing in the fluid's render. It is recommended to use this attribute to improve the fluid render and not the Anti-Aliasing Quality attributes in Render Globals. Upping Quality will get rid of some of the aliasing artifacts that appear in fluid renders.
  • Contrast Tolerance - this is supposed to weight the render towards better contrast or faster rendering, but it appears to cause no noticeable differences.
  • Sample Method - the method used to sample color ranges for rendering.
    • Uniform - even sampling throughout the image.
    • Jittered - gets rid of banding, but applies more noise.
    • Adaptive - gets rid of noise, but applies more banding.
    • AdaptiveJittered - combines the best traits of Adaptive and Jittered.
  • Render Interpolator - if this is set to linear and the fluid renders out with sharp contrasts, then set this to smooth.

Textures

This is where most of the visible changes in the look of the fluid is made. Do not underestimate the power of textures!

  • Texture Color - places a texture on the fluid's color (Shading | Color).
  • Texture Incandescence - places a texture on the fluid's incandescence (Shading | Incandescence).
  • Texture Opacity - places a texture on the fluid's opacity (Shading | Opacity).
  • Texture Type - defines which algorithm is used to texture the fluid. Examples of the options are provided in the image below.
  • Coordinate Method - not sure what this does.
  • Coordinate Speed - nor this one. But if I had to guess, I think it would control UV texture scrolling.

Examples of fluids textured with various texture types.

  • Color Tex Gain - controls to what degree the texture will affect the color. A value of 0 means that the texture will have no influence over the color. Any value above one will increase the effect of the texture on the color.
  • Incand Tex Gain - similar to Color Tex Gain except it applies to Incandescence.
  • Opacity Tex Gain - similar to Color Tex Gain except it applies to Opacity.

  • Threshold - raises each value in the texture by the specified amount, clamping at 1.0, and re-interpolating the values in-between. Visually, it raises the floor of the texture so black becomes shades of gray.
  • Amplitude - acts as a multiplier to the max height and depth of the texture. Raising this value will increase the distance between the lowest values and highest values. When creating smoke, treat this value as ambient occlusion. Raising it will heighten the effect as well as increase the fluid density.
  • Ratio - seems to add more relief to the texture. It's effect is similar to that of Amplitude.
  • Frequency Ratio - this attribute will repeat the texture dynamically and fit it to the fluid container. It acts much like increasing the Repeat UV value of a Texture 2D node except the pattern isn't repeated in quite the same way.
  • Depth Max - increases the amount of relief in the texture. More pits will be added (i.e., subtractive values).
  • Invert Texture - reverses the value of the texture color (black becomes white and white becomes black).
  • Inflection - adds an uneven aliasing over texture edges. It also changes the texture in some other manner. Examples of the differences between Inflection on and Inflection off are in the image above.

  • Texture Time - used to animate the texture or make positional adjustments. To animate the texture, key this attribute over time. The animation that occurs depends on the value of Texture Type.
  • Frequency - this is similar to Frequency Ratio, but it doesn't change the relief of the texture, it just fits more of the texture in the same amount of space while proportionately re-scaling it. When the value is increased, the texture appears to shrink. When Texture Scale is changed, Frequency should be changed proportionately (unless getting the texture to look very different was the point of the change).
  • Texture Scale - scales the texture according to the given values.
  • Texture Origin - moves the origin from the center of the container by the given coordinates. This value will be relative to the center of the fluid container. Animating this in a particular direction can make the fluid appear to move (if Texture Opacity is checked).

  • Implode - when this is a positive value, the center is shrunk and the outer edges are pulled outward.
  • Implode Center - the center of the Implode effect relative to the center of the fluid container.

  • Billow Density - only available if Texture Type is Billow. This attribute changes the Billow texture from mere bumps to rolling hills. The only valid range is from 0 to 1.
  • Spottyness - only available if Texture Type is Billow. It slightly alters the texture by some unknown method.
  • Size Rand - only available if Texture Type is Billow. Raising this value will decrease the size of the "hills" and remove much of their overlapping.
  • Randomness - only available if Texture Type is Billow. Setting this to 0 will display a repeated pattern. Setting this to any other value up to 1 will increase the randomness of the pattern. Values greater than 1 and less than 2 seems to have a similar effect to Size Rand.
  • Falloff - only available if Texture Type is Billow.
    • Linear - standard setting.
    • Smooth - this setting smooths out the texture.
    • Fast - increases the texture detail.
    • Bubble - turns the texture into a mass of ridges.

  • Number of Waves - only available if Texture Type is Volume Wave or SpaceTime. When Texture Type is Volume Wave, raising this value will smooth out the texture while attempting to keep the minimum and maximum values. There seems to be no effect when Texture Type is SpaceTime.

Lighting

  • Self Shadow - check this so that the fluid will cast shadows on itself. Renders with this option will take about 33% longer.
  • Hardware Shadow - check this so that the self-shadowing is visible in the viewport.
  • Shadow Opacity - a value of 0 causes transparent shadows and a value of 1 causes fully opaque shadows.

  • Real Lights - check this to use the scene lights to render the fluid
  • Directional Light - if Real Lights is unchecked, then the fluid will render with a default directional light. This attribute assigns a directional vector to that light.

fluidEmitter/wakeEmitter Attributes

Where applicable, recommended attribute settings are specified in red. Nodes will be in bold italics. Attribute categories will be in bold. Attributes will be in italics (unless they are the being defined in which case they are bold). Attribute values will be in fixed width. Heirarchies will use | (i.e. pipes) to separate parent and child (for example, fluidShape | Container Properties | Boundary X).

Basic Emitter Attributes

These are much like particleEmitter basic attributes.

  • Emitter Type - the method by which the fluid will be emitted.
    • Omni - fluid is emitted in all directions.
    • Surface - fluid properties are randomly distributed onto a NURBS surface.
    • Curve - fluid properties are emitted onto a curve.
    • Volume - fluid is emitted from a primitive volume.
  • Cycle Interval - restarts the random number of streams after a given frametime
    • None (timeRandom off) - no restart occurs
    • Frame (timeRandom On) - randomization streams restart after the given number of frames. This will most likely not be a seamless transition.
  • Min Distance / Max Distance - enabled when Emitter Type is Omni. These attributes provide the start and end distance from which the fluid will emit.

Fluid Attributes

  • Density/Voxel/Sec - the density of the emitted fluid. Requires fluidShape | Contents Method | Density to be Dynamic.
  • Heat/Voxel/Sec - the temperature of the emitted fluid. Requires fluidShape | Contents Method | Temperature to be Dynamic.
  • Fuel/Voxel/Sec - the fuel of the emitted fluid. Requires fluidShape | Contents Method | Fuel to be Dynamic.
  • Fluid Dropoff - determines how much the density of the emitted fluid fades as it is emitted near the outer surface of the volume emitter. Note that this attribute does not scale when the fluid container is scaled. It will have to be manually adjusted to maintain the same falloff ratio.
  • Emit Fluid Color - check this to allow the fluid to emit the fluid's color. This requires fluidShape | Container Method | Color Method to be set to Dynamic Grid.
  • Fluid Color - the color of the emitted fluid (if Emit Fluid Color is checked). This value should probably be keyed or mapped if the intention is to use dynamic color. Most coloring effects can be accomplished easier if fluidShape | Container Method | Color Method is set to Use Shading Method.
  • Jitter - not sure what this does. Probably jitters or something.

Fluid Emission Turbulence

  • Turbulence Type - the options are Gradient and Random, but there seems to be no real difference between them.
  • Turbulence - increases the randomness of the turbulence.
  • Turbulence Speed - affects how often the turbulence will change over 1.0 / Turbulence Speed seconds.
  • Turbulence Freq - determines how smooth the turbulence is. Values around 0 will really smooth the turbulence out, whereas higher values seem to have very little effect.
  • Turbulence Offset - translates the turbulence. This can be keyframed for a blowing turbulent wind effect.
  • Detail Turbulence - adds a second layer of turbulence to the surface of the pond. Its value is the intensity of that secondary turbulence (which will always be faster and more frequent than the primary turbulence). For more control, set this attribute to 0 and create a second emitter for secondary turbulence.

The Fluid Effects Menu

Some of the options are self-evident, so those won't be covered.
  • Add/Edit Contents
    • Emitter - adds an emitter to the currently selected fluidShape.
    • Emit from Object - creates a surface emitter for the currently selected fluidShape from the concurrently selected object.
    • Gradients - replaces the values of fluidShape attributes with the various gradients.
    • Paint Fluids Tool - allows painting in fluids. This is useful for painting in a general fluid shape for an initial state or for painting in a falloff map.
    • With Curve - turns a curve into a paint stroke (like Paint Effects) for the specified fluidShape attributes.
    • Initial States... - this isn't all too useful. The current fluid's resolution can be set to match that of an example file or vice-versa.

  • Get Fluid Example.../Get Ocean Pond Example... - his will open up sample Maya files of pre-created fluid effects.

  • Ocean - does ocean stuff. Not covered, yet.

  • Pond - does pond stuff. Not covered, yet.

  • Extend Fluid - changes the size of the fluid container by adding and subtracting voxels. This means that the size of the container and the resolution are being changed in proportion to each other.
  • Edit Fluid Resolution - only useful when it is necessary to rebuild the resolution of the initial state (since changing the resolution within the fluidShape node will delete the initial state).
  • Make Collide - allows fluids to collide with an object. Select the object, then select the fluidShape and run this command to create collision objects.
  • Make Motion Field - creates a field that will push fluids in its motion path away. It may also work with particles (though it is unavailable form the Particles menu).

  • Set Initial State - sets the value of each voxel at the start of the simulation to the current state.
  • Clear Initial State - clear the above state.
  • Save State As... - save the current state as a MEL file. To bring that state back, import the MEL file using File > Import... If the state saved was an initial state, then it will import as an initial state (as opposed to disappearing if you go back to the start of the simulation).
  • Create Cache - store the fluid calculations so they don't have to be re-calculated next time the sim is run. The option box allows the caching of certain attributes to be turned off.
    • Cache File Format - choose Single File if your cache is under 2GB, and choose On File per Frame if your file would be 2GB or over.
    • Sampling Rate - higher values allow fast-moving fluids to render less spotty.
  • Append to Cache - if a cache is already created, the cache must be appended to.
  • Replace Cache Frame - replace the current frame's cache with the current frame's value.
  • Truncate Cache - cuts the cache down to whichever frames were cached before the current frame.
  • Delete Cache - supposedly deletes the cache file. Sometimes an error may show up during render that more than one cache file is present. This may be due to the cache file not being physically deleted by Windows. Instead of using Delete Cache to get rid of a cache that will be replaced, use Truncate Cache to truncate it on the first frame.

27 comments:

J.D. said...

Dale -- thanks for the great overview of Maya fluids.

You do a much better job than the technical writers who produced the manual!

Cheers,
-JD

Dale said...

Thanks, J.D.! You are likely the only other person to read this. Congratulations! Also, it's been awhile since I've delved into fluids, so you probably know more than me at this point.

Angie Nguyen said...

This is great! You should add on info about how to render the fluids out as a separate render layer.

Sharad said...

Thanks a lot for your effort. It will be a too much help for us to understand fluids in maya better.

So:ren said...

Great writing Dale!
I have been working with fluids for some time now but still find some of the stuff confusing. So this "Quicksheet" will from now on be on my top reference list.

You write plain and simple making it really easy to digest. You really should write more on the topic.

Thanks!

/So:ren GiMMiCK vfx

Anonymous said...

I go to college for VisualFX and my class never talked about these attributes in detail. I am pretty sure your blog is the ONLY resource freely available for this info.

Thanks a lot. You made my day. Really.

Anonymous said...

Hey awesome overview of fluids! really learned a lot about stuff i never really understood. Thanks again!

-Morgan S.

n8skow said...

an excellent resource! thank you for taking the time and effort to put this together.

Brent said...

Hey Dale - I make FX for TV - lets be friends!

Anonymous said...

Thanks for the fluids overview, really really helpful

Anonymous said...

Just wanted to let you know that your article is read over and over as well as referenced numerous times when working with fluids. It's extremely helpful, thank you!

Lafs1984 said...

Very useful post i thank thee o unmasker of things :P

Amber Schueler said...

Still pretty useful in Maya 2012! Very helpful and easy to read and understand. Thanks for the great overview!

Anonymous said...

Very nice. Now. How can you transfer attributes from one fluid shape node to another? Does anybody have a script for this?

Oliver Fortades said...

hi! i'm new to maya dynamics and this helped me a lot!thank you very much!great work!

Harsh Vishwakarma...... said...

HI, i need a solution for dissipation of fluid in maya 3d containers,
density dissipates so quickly and unevenly when we try higher values of emission...........
do u know any solutions for that ?

Teachvc said...

This is still an awesome resource site. Now using 2012 and it mostly holds true.

Sadegh Mirzaee said...

It is really very very helpful.Thank you so so much.I never seen any overview like this before.please add new attributes in maya 12.
and thanks again :-)

Alan said...

Thank you very much! Really helpful!!

Anonymous said...

Thanks...............

Ryan Harrington said...

Just wanted to say that this is a really well structured study, It's good. I regularly point people at it.

I'd be interested to find out how dynamics work transposes to into real-time game engines.

Thanks for sharing,
R

Unknown said...

This is the most useful resource on fluids I have found in months of searching, even better than paid resources like Lynda, Digital Tutors, and books. Your explanations are quick, simple, and clear and you explain how settings affect other settings when it's not obvious from within the software. I can't even explain how grateful I am to you for this. I have already used my new understanding of these settings to achieve an appropriate look for a waterfall that I've been stuck on for weeks. Thank you!

cuman gitu said...

this is great thanks for sharing this .. here is my fluid tutuorial if u wanna see

http://videotutorialmaya.blogspot.com/search/label/fluid

airless spray gun said...


Your blog has given me that thing which I never expect to get from all over the websites. Nice post guys!

Bernhard van der horst said...

Agree with the others - thanks so much for this clear guide.

riversidedrew said...

Thank you so much for this Dale. There are so many options in the fluid container to play with it's nice to know what they do before running a sim. Huge time saver THANKS!

brian chan said...

Thank you so much .. this is very informative.
More detaio than the offical manu ...