Color > Prelight (Maya)
 
 
 

The Prelight feature calculates and then stores the shading and lighting color information from the rendered appearance of a polygon mesh directly on the color per vertex information for the mesh. This is also referred to as “baking” the lighting.

You can prelight a polygon mesh in a scene using either the Prelight (Maya Software) feature or using the Batch Bake (mental ray) feature that uses the mental ray for Maya renderer.

It is also possible to export the prelighting information that is produced as a texture map.

Related topics

Color > Prelight (Maya) >

By default all options are turned off, and the Sample scale factor is set to 1.0.

Sample selected faces only

You can select objects and or any type of polygonal component of an object. This includes vertices, edges, faces, and UV / map component types. By default Maya examines each component type to determine which vertices have been selected and the selected vertices are then sampled.

If Sample selected faces only is turned on, Maya examines each component type to determine which complete faces have been selected. The selected faces are then sampled.

For example, if a face has four vertices, and only three of them are selected:

  • if Sample selected faces only is off, three vertices are used for sampling.
  • if Sample selected faces only is on, no sampling is performed since the face is considered to be only partially selected.
Sample using face normals

This option uses the corresponding face normals for sampling regardless of whether Sample selected faces only is off, or whether the edge is hard or soft.

Compute shadow maps

Turn this on if you want shadows to be computed. A software rendering Shadow Pass occurs, which outputs a set of depth shadow maps, and then uses these maps during a sample evaluation.

It is equivalent to doing the following in Maya rendering:

  • Set Shadow Pass on in the renderGlobals tab in the Attribute Editor. You can select this tab by opening the Outliner and turning Display > DAG Objects Only off.
  • Select each light and turn Use Depth Map Shadows on in the Attribute Editor.
  • Select each light and turn Disk Based Dmaps maps to Overwrite Existing Dmap(s).
  • Perform a software render with the current active view camera.
  • Select each light and turn Disk Based Dmaps off.
  • Read in the shadow maps, and use them during sampling.
Force shadow map usage on lights

This option is available only if Compute shadow maps is on. When Force shadow map usage on lights is turned on, shadows are computed for each light, even if Use Depth Map Shadows is turned off for the lights.

Reuse computed shadow maps

To re-use computed shadow maps, turn Compute shadow maps on. Turn this option on to skip the Shadow Pass computation (Compute Shadow maps above). This lets you use statically created shadows, and/or computes shadows just once for future adjustments of the prelight operation or the software rendering.

Ignore mapped channels on surface shaders

Turn this option on to turn on Ignore when Rendering for each channel of the surface shader.

Sample incoming illumination only

If this option is selected, only incoming illumination lighting is computed. This option is useful if you want to use this information for your own shading computations. It is also useful if you want to sample lighting effects, such as when a light’s color has been mapped.

Note that the lights in your scene must have a Decay Rate for this option to have an effect.

Displace geometry

Using sampled shading values to displace geometry is not a prelighting effect, but is related to using sampling data to modify attributes on an object’s geometry. The positions of the vertices selected to sample are displaced along their normals by the sampled data value amount. The normal used for displacement is the vertex normal used for rendering.

You can see this normal in a perspective view by turning on the Vertices Normals option by selecting Display > Polygons > Vertex Normals).

Note
  • Sample using face normals is disabled when this option is turned on. That is because performing a displacement for each face of a vertex cannot be done, which would be attempted if Sample using face normals was available.
  • Modify > Convert > Displacement to Polygons achieves much the same effect (although it can only be applied to the entire object).
Ignore double sided

Ignores the double sided attribute on the shape node for the mesh when prelighting the mesh. The default setting is on.

Store shared values

If there are multiple vertices are selected, turn this option on to average the values at the vertices and store the average value.

Sample scale factor

The scale factor is useful if you want to brighten or darken colors before storage, or to adjust the amount of displacement to be performed.

It is possible to scale the sample before applying it to the geometry (meaning, you can store color or displace a point). For colors, a negative scale factor is ignored. For geometric displacement, the scale factor is taken into consideration regardless of whether it is positive or negative.

Note

A value between 0.0 and 1.0 is usually applied to each channel of a sample, though values greater than 1.0 can be used.

Clamp minimum RGBA value, Clamp maximum RGBA value

Turn on these options to clamp the minimum and maximum RGBA values so that the values are forced to be within the range you set.

Color blending, Alpha blending

Control how the newly computed colors and transparency values affect the current colors/transparency on the vertices.

The minimum and maximum clamp options are applied after the operation.

Overwrite

The new value replaces the current value.

Add, Subtract, Multiply, Divide

Combines the current and new values with a mathematical operation.

Average

Averages the current value and the new value.

Don’t Overwrite

Won’t save the new value if the vertex has a current value.