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.
By default all options are turned off, and the Sample scale factor is set to 1.0.
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:
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:
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.
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.
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).
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.