Texturing the contents of a fluid container

 
 
 

So far the container is filled with solid white Density. To create the cloud effect, you texture the Density so that some areas are transparent and some areas are opaque.

To texture the density of a fluid

  1. Turn on hardware texturing display so you can see the effect of the textures on the fluid without rendering by selecting Shading > Hardware Texturing from the scene view menu.
    NoteYou must turn on Shading > Smooth Shade All before selecting Hardware Texturing.
  2. Open the Textures section in the Attribute Editor.
  3. Turn on Texture Opacity to apply the current texture to Opacity values. The current texture is Perlin Noise, defined by Texture Type.

    Notice that the Density now has a slightly blotchy look to it, with areas that are more opaque and areas that are more transparent. This texture provides the standard 3D noise used in the 3D Solid Fractal texture included with Maya.

  4. Change Texture Type to Billow for a fluffy, cloud-like effect.

    The Billow texture is computationally intensive and therefore slower than the other texture types.

  5. Change the look of the texture by setting the following texture attributes:
    • Amplitude: 0.5
    • Depth Max: 4

    Decreasing the Amplitude makes the areas with low Density more transparent and the areas with high Density more opaque.

    Increasing Depth Max adds detail. Increasing it will also increase render time.

  6. Stretch the texture in the X direction by changing the X, Y, and Z components of the Texture Scale to 2, 1, 1.
  7. Change the following Billow texture attributes to make the “billows” less dense, more spotty, and with randomly different sizes.
    • Billow Density: 0.6
    • Spottyness: 2.0
    • Size Rand: 0.40
  8. Modify the Opacity so that areas in the container that are very dense appear less opaque, areas that have very little Density become totally transparent, and the transition between areas that are totally transparent and areas that are more opaque is less gradual.

    In the Attribute Editor, go to the Shading section. Look at the Opacity graph in the Opacity subsection. This graph represents the relationship between Opacity values and Density values (the Opacity Input).

    Opacity values range from 0 on the bottom (totally transparent, no opacity) to 1 on the top (totally opaque).

    Density values range from 0 on the left side (no Density) to 1 on the right side (high Density).

    So for the linear graph shown above, where Density values are 0, Opacity values are 0, making the Density totally transparent, where Density values are 0.5, Opacity values are 0.5, making the Density partially opaque, and where Density values are 1, Opacity values are 1, making the Density totally opaque.

  9. Click the first dot on the Opacity graph to select the position marker. Position markers mark the location on the graph from left to right (the Opacity Input value). The outline of the dot is white when a position is selected.
  10. Change Selected Position to 0.10 to change the position of the marker.

    The position marker moves to the right. Now, for Density values between 0 and 0.10, the Opacity values will be 0. This means that Density that was previously partially transparent will be completely transparent.

    The more transparent areas of cloud disappeared, but now the solid areas of cloud are less opaque.

  11. Click on the graph to create a new position marker.
  12. Change the marker position and value as follows:
    • Selected Position: 0.15
    • Selected Value: 0.30

    Density values that are greater than 0.15 are now more opaque, and the transition between areas of total transparency (Opacity 0), and areas where the Density becomes more visible (Density 0.15) is less gradual.