Assign colors to polygon vertices using Prelight

Prelighting calculates and then stores the shading and lighting color data from the rendered appearance of a polygon mesh directly on its vertex colors. This is also referred to as “baking” the lighting.

Prelighting is often used when creating content for interactive video games because it can more efficiently simulate shading and lighting effects. This reduces the amount of rendering calculations that must occur in real-time during the game and subsequently improves the interactive performance of the video game.

You can prelight a polygon mesh in a scene using either the Maya software renderer or using the mental ray for Maya renderer. It is also possible to export the prelighting data that is produced as a texture map.

Note: If the mental ray Batch Bake feature appears dimmed in the menu, it indicates that the Maya for mental ray plug-in is not loaded. Select Windows > Settings/Preferences > Plug-in Manager to load the plug-in Mayatomr.mll.

To prelight a scene

  1. Select the meshes or components you want to prelight.
  2. You can choose either the Maya software renderer or the mental ray for Maya renderer depending on your desired workflow for your prelighting work. Do one of the following:
    • Select Mesh Display > Prelight (Maya) > .
    • Select Mesh Display > Batch Bake (mental ray) > .
  3. Set the prelight options and apply the settings and close the window.

To save prelighting to a texture map

  1. Select the prelit mesh.
  2. Select Mesh Display > Paint Vertex Color Tool > > .
  3. In the Paint Vertex Color Tool Options window, open the Attribute Maps > Export section.
  4. Set the attributes you want to export and click Export.

Notes