oceanShader / ocean (texture)
 
 
 

The Ocean texture can be used to simulate a range of water wave patterns, from small scale waves in a bathtub to large stormy sea swells. It is designed to be used as a displacement map.

Turn off feature based displacement on objects that are assigned the shader before applying as a displacement. This sets up a bump node in addition to the displacement, allowing you to keep the number of triangles low. To see wave motion, animate the Time attribute. This texture is defined internally (procedural) using Perlin noise and sine waves that are driven by the Time attribute.

The Ocean shader simulates the way color changes with light and view angle for an ocean effect.

Ocean Attributes

Scale

Controls the size in meters that corresponds to the 0 to 1 texture space in UV (for default texture placement settings).

Time

Use this attribute to animate the Ocean texture. You can keyframe the Time attribute to control the rate and amount of change of the ocean texture in your scene. This value represents seconds for a water surface at the given scale value. Type the expression "= time" into the Time box to create approximately correct animation speed relative to the scale.

Wind UV

Controls the (average) direction that the waves will travel, simulating the effect of wind. This is expressed as U and V values, in the UV texture space.

NoteAnimating Wind UV causes unnatural motion, and should be avoided.
Wave Speed

Defines how fast waves move. It scales the input time used to determine wave movement.

When Wave Speed is 1.0 Maya creates the correct speeds for open ocean waves at the scale determined by the Maya units and the Scale attribute. For example, if the scale is 10 and the wave speed 1, 1 unit represents 10 meters and the waves will move at the correct speed.

To freeze the waves, make the speed zero.

You cannot change the speed over time using this attribute. You need to change the animation on the Time attribute instead.

Observer Speed

Observer Speed cancels out transverse wave motion by moving a simulated observer. This is similar to animating the UV Offset of the texture relative to the wind direction.

When Observer Speed is 1.0 the primary waves do not appear to travel because the viewer is moving at the same speed as the waves. The secondary waves still move relative to the primary ones.

Num Frequencies

Controls the number of interpolated frequencies between Wave Length Min and Wave Length Max.

NoteThe higher this value, the longer this texture takes to compute.

If this value is not an integer, then the number of created frequencies is the rounded up value, but the amplitude for the extra frequency is proportional to the remainder (for example, 0.25 for 8.25) This allows this attribute to be smoothly animated.

Wave Dir Spread

Defines the variance in wave direction with respect to the wind direction.

If it is zero, then all waves travel in the same direction.

If it is one, then waves travel in random directions.

Inconsistency of the wind direction along with other effects like wave refraction tend to cause a natural variation in wave direction.

Wave Length Min

Controls the minimum length of waves in meters. This is either the upper or the lower wavelength bound.

Wave Length Max

Controls the maximum length of waves in meters. This is either the upper or the lower wavelength bound.

Wave Height

Controls the size of waves relative to their wave length.

The left edge of the graph represents waves with the shortest wavelengths and the right edge represents waves with the longest wavelengths (as determined by Wave Length Min and Wave Length Max).

If the value is 1.0, then the waves are half as tall as they are long.

If the graph is a horizontal line, then all waves will be exactly the same height proportional to their length.

To create the curve

  1. To select a position on the curve, click the dot indicating the marker. The selected marker has a white outline around the dot.

  2. To add a marker, click the graph.
  3. To move a marker, drag the marker dot left or right, up or down, or select the marker and type the destination position in the Selected Position box.
  4. To delete a marker, click the square x at the marker position.
    Selected Position

    This value indicates the position of the selected marker on the ramp (between 0 on the left to 1 on the right).

    Selected Value

    Indicates the value on the ramp at the selected position. To change the value, drag the marker dot up or down, or type the value in this box.

    Interpolation

    Controls the way values blend between position markers on the curve. The default setting is Linear.

    None

    There is no interpolation between values.

    Linear

    The values are interpolated with a linear curve.

    Smooth

    The values are interpolated along a bell curve so that each value on the graph dominates the region around it, then blends quickly to the next value.

    Spline

    The values are interpolated with a spline curve, taking the values at neighboring position markers into account for a smoother transition.

Wave Turbulence

Controls the amount of turbulence at different wave frequencies.

The left edge of the graph represents waves with the shortest wavelengths and the right edge represents waves with the longest wavelengths (as determined by Wave Length Min and Wave Length Max).

For values of 1.0 the wave motion will be completely turbulent at the defined frequency.

For each wave frequency, the turbulence wave component consists of multiple sine waves at that frequency. This is the most computationally expensive attribute. Making it zero will speed up renders significantly, although it is important for simulations of stormy or windy water. The Wave Peaking attribute only affects the turbulent wave layer, so there will be no affect from the Wave Peaking attribute wherever this value is zero.

For details on creating the curve, see To create the curve.

Wave Peaking

Controls the amount of crest formation for waves across the range of wave frequencies. Wave Peaking simulates a side to side sloshing of waves, as opposed to up-down motion. Wave Turbulence must be non-zero for this attribute to have an effect, as it is only applied to the turbulent waves.

When this attribute is non-zero many more evaluations of the noise function are performed, and thus the computation speed will be affected.

For details on creating the curve, see To create the curve.

Wave Height Offset

(Shader only) Simple offset on the overall displacement of the ocean. When textured this is useful for adding custom waves and boat wakes.

Foam Emission

Controls the density of foam generated above the Foam Threshold. The Foam Emission value is output to the outFoam attribute, which can be used to define opacity of a layered foam shader.

Foam Threshold

Controls the Wave Amplitude required to generate foam and how long the foam will last.

Foam Offset

Adds a uniform foam everywhere. It is useful when you need to add a custom foam texture.

Bump Blur

Defines the separation of samples (relative to the smallest wavelength) used in computing the bumped normal for shading. Larger values have the effect of making small waves and peaks smoother.

Horizon Filter

Smooths or filters jittering and chattering along the ocean horizon by increasing the Bump Blur based on view distance and angle. Horizon Filter is 1.0 by default.

Color Mode

(Texture only) Select what to output to the color channel, the normalized Wave Height, Foam, or Foam on Waves (Wave Height in blue-green with white foam).

Common Material attributes

Water Color

Defines the basic color of the surface.

Foam Color

Defines the color of the foam layer. Part of the simulated foam might be considered submerged, in which case the color is blended with the material color.

Transparency

Controls how transparent or opaque the material is. Black means completely opaque (the default), and white means completely transparent. You can set it to any level in between. You can also control transparency on a per-channel basis; for example, if you set this to red, then only the red channel will be transparent.

NoteIf this material has specular highlights (for example, if this is a Phong or Blinn shader), the transparency setting does not affect the highlights. So if you are trying to make an object disappear by animating the transparency attribute, you might also have to animate the specular highlight attributes.
Refractive Index

Defines how much a ray of light will bend when it passes through an object. This attribute only works if your material is partially or completely transparent (see “Transparency”), refractions are turned on (see “Refractions”), and you are rendering using Ray Tracing (set in Render Settings).

If the Refractive Index is set to 1.0, then light does not bend when it passes through the object. Here are some other useful values for Refractive Index:

Air: 1.0 Water: 1.33 Gasoline: 1.45 Crystal: 2.00 Glass: 1.5 Ice: 1.309 Quartz: 1.6 Ruby: 1.77 Sapphire: 1.77 Salt: 1.54 Alcohol: 1.329 Emerald: 1.57 Polystyrene: 1.55
NoteIf you make an object transparent, objects that are seen through it will be refracted only if their Visible In Refractions attribute is turned on.
Incandescence

Makes a material appear opalescent, as if it were emitting light itself, such as lava or a phosphorescent moss. A slight touch of incandescence on vegetable matter, for example, can make the vegetation look alive.

By default, the color is black, which has no effect on the surface.

NoteAlthough incandescence makes a surface appear to glow, it does not actually act as a source of light in the scene.

See also Glow.

Ambient Color

Ambient Color is black by default, which means it does not affect the material’s over-all color. As the ambient color becomes brighter, it affects the material’s color by lightening it and blending the two colors.

If there are ambient lights in the scene, then the color and brightness of those lights are used to control how much the ambient color contributes to the final color of the material.

Diffuse

Controls how much of the light in the scene is scattered from the object. Most materials absorb some of the light falling on them, and scatter the rest.

Trough Shadowing

Darkens the diffuse color in the wave troughs. This can simulate certain lighting conditions where wave peaks are brighter, scattering light. This attribute works well when the wave color is in a blue-green range.

Translucence

Simulates the way light diffusely penetrates through translucent objects. This means that when light shines on one side of the object, the other side is partially illuminated. This can be used for effects such as clouds, fur, hair, marble, jade, wax, paper, leaves, etc.

If Translucence is set to 0 (the default) then no light shows through the object. If it is set to 1, all the light shows through.

Translucence Focus

Simulates the way light scatters more in a forward direction through translucent objects. Thin objects like a leaf, or low density objects like a cloud tend to scatter more in a forward direction.

When the Translucence Focus is 0.0, translucent light is scattered in all directions. As the focus value is raised the translucent light is scatter more in the light direction. This makes the backlit side of a leaf glow more than the front lit side. At high focus values you will see a halo or glow around the light source when seen through a translucent object.

Translucence Depth

Defines the depth of penetration into an object at which translucence decays to nothing.

When Translucence Depth is 0, translucence does not decay with respect to the distance light travels through the object.

Specular Shading

Specularity

Controls how bright the specular highlights are. It is a multiplier of the specular color.

Eccentricity

Controls how big the specular highlights (hot spots) are.

Specular Color

Defines the color of the specular highlights on the material. The final color of a specular reflection is a combination of the Specular Color and the color of the light.

By making the Specular Color brighter or dimmer, you can control the brightness of the specular reflections on an object.

TipTo make a material look more plastic, use white for the specular color. To make a material look more metallic, make the specular color similar to the surface color.
Reflectivity

Use Reflectivity to make an object reflect light like a mirror.

Set this to 0 if you don't want your material to reflect at all. Increase the value to make brighter reflections. Note that brighter reflections hide more of the base surface color. This attribute is only meaningful if there is a reflection map, or if you are Ray Tracing.

Here are some useful values for Reflectivity:

Car Paint: 0.4 Glass: 0.7 Mirror: 1.0 Chrome: 1.0

NoteIf you are Ray Tracing, and you want other objects in the scene to be seen in reflections, then the Visible In Reflections attribute for those objects must be turned on (the default).

Environment

Defines a simple sky to ground environmental reflection using a ramp. The left of the ramp is the top of the sky and the right is the bottom. For details, see Environment.

Glow

Glow Intensity

Controls the brightness of the glow (the faint halo of light around the material). Glow Intensity is 0 by default, meaning that no glow is added to the material. As you increase the Glow Intensity, the apparent size of the glow effect increases.

Glow Intensity is different from the Incandescence attribute in two important ways:

Matte Opacity

The attributes in this section control how this fluid shows up in the matte (alpha channel or mask) when you render with one. This is useful if you will be compositing your rendered images.

Matte Opacity Mode

Select how Maya uses the Matte Opacity value.

Opacity Gain

Matte values are calculated based on the transparency of the object then multiplied by the Matte Opacity value. With Opacity Gain, you can animate the Matte Opacity value to change the overall transparency of the object when it is later composited.

Solid Matte

The entire matte for the fluid is set to the value of the Matte Opacity attribute. This option is like “Opacity Gain”, except that the normally-calculated matte values are ignored in favor of the Matte Opacity setting. If there are transparent areas on the object, the transparency in these areas is ignored in the matte. Use this setting to composite an object with transparent areas, when you don’t want the background to show through them.

Black Hole

The Matte Opacity value is ignored, and all the matte for this fluid is set to be transparent. Use this option when you use substitute geometry in a scene to stand in for objects in a background image that you will be compositing with later. Your stand-in objects will ‘punch a hole’ in the matte. This allows other computer-generated geometry to pass behind your stand-in objects. Later, when foreground and background are composited, the results will be correct, with the background object showing through the ‘black hole’ areas.

Matte Opacity has a default value of one, so by default Solid Matte and Opacity Gain have no effect.

Matte Opacity

Matte Opacity is used with Matte Opacity Mode to affect how the matte (alpha channel or mask) for this fluid is calculated.

Raytrace Options

Refractions

Turn on Refractions to make your material refract light when you are rendering with Ray Tracing. You will not see a difference unless Refractive Index is set to a value other than 1.0. (See the Refractive Index attribute for more details.) Refractions are turned off by default.

Refraction Limit

Ray depth limit.

Shadow Attenuation

(Fake Refraction Caustics)

Shadow Attenuation causes shadows of transparent objects to be brighter in the center, simulating the focusing of light. A value of 0 gives constant intensity shadows, 1 gives shadows focused in the center.

Reflection Limit

Reflected ray depth limit.

Reflection Specularity

Controls the contribution of the specular component when dealing with reflection rays for ray tracing (the specular contribution when seen as a mirror reflection).