Lighting/Shading > Transfer Maps for ambient and custom maps

 
 
 

You can create ambient occlusion and custom maps using the Lighting/Shading > Transfer Maps tool if you have the Mayatomr.mll plug-in loaded. For more information regarding this tool, see Lighting Shading > Transfer Maps. This section lists all the mental ray specific attributes and functionalities.

If you enable the Mayatomr.mll plug-in (from Window > Settings/Preferences > Plug-in Manager), the Ambient and Custom map types are available:

NoteIn each section, you can:
  • Uncheck the box beside the map type (for example, Ambient map) to remove it from the list of maps to generate;
  • Click the Remove Map button to remove a map from the list of maps;
  • Check the Use mental ray common settings options to honour them;
  • Uncheck theUse mental ray common settings to enter custom settings for each transfer map.
  • If you want to render your normal map in mental ray for Maya, you must save the normal map in one of the supported formats (EXR, Maya IFF, JPEG, MI, PNG, YUV, RLA, SGI, PIC, TIM, TGA, BMP). The EXR file format is recommended. mental ray does not support DDS files . Choose a different file format for your normal map. In addition, you must turn on the Maya Derivatives option in the Render Settings window, mental ray Options tab, Translation section, Performance sub-section. For more information, see Render Settings: mental ray tabs.

Your settings (for example, the map sections that you have created and checked) are saved with each session of Maya.

Ambient occlusion map

Ambient occlusion map

Only available when the Mayatomr.mll plug-in is loaded. When ambient light is used, the objects in your scene may appear to be too bright and geometric detail may become lost. Ambient occlusion solves this problem by subtracting ambient light and adding shadowing. At each sample point, a number of probe rays are emitted around the normal vector that determine how much light is blocked by other geometry in your scene.

When on, an ambient occlusion map is generated. Enter the path and filename to which you want to save the map.

The Transfer Map tool evaluates the ambient occlusion on the high resolution object and bakes it to a map for the low resolution object.

File format

Sets the file format for the ambient occlusion map you want to create. See File formats.

When you select a file format from the drop-down list, Maya automatically appends the appropriate file extension to the filename of the ambient occlusion map. For example, if you select gif from the drop-down list, .gif is automatically appended to the filename.

Similarly, if you enter path/mapname.gif as your filename, the file format option is automatically set to gif.

Bits per channel

Specifies the number of bits per channel to use in the output bitmap. The options are: 8 bits, 16 bits, and 32 bits.

Optimization

Select for multiple objects to bake in the default light map mode. This baking method is single threaded and uses one thread per object. This method can give better performance for baking multiple objects.

Select for single object to use lens shader baking. The shape of the lens changes to be the same as that of your geometry. This baking method is multi-threaded and uses multiple threads for each object. This method can give better performance for baking a single complex piece of geometry.

Occlusion Rays

Determines the number of occlusion rays to trace per sample point. Increasing the number of occlusion rays improves quality, but reduces performance speed. The default is 64.

Tip

The most important parameter for adjusting the quality of your ambient occlusion map is the Occlusion Ray attribute. You can increase the occlusion rays up to 2048.

Occlusion Max Distance

Determines the maximum length of an occlusion ray. Rays longer than this value are not considered for occlusion.

Use mental ray common settings

If you plan to create several maps with the same width and height, you can reuse your settings by entering them in the mental ray Common Output section of the Transfer Maps window.

If you uncheck this option, the Map width and Map height attributes appear within the Ambient occlusion Map section of the window. For more information regarding these attributes, see mental ray Common Output.

Custom map

Custom map

Only available when the Mayatomr.mll plug-in is loaded. Evaluates your custom shader on the high resolution object and bakes that to a map for the low resolution object. By using this map, you can include geometric detail in your scene without increasing its rendering time. Example custom shaders that you can use include a normal map (map normals to a texture), a bump map (bent normals map), mental ray materials, or shading and lighting maps.

When on, a custom map is generated using the custom shader specified. Enter the path and filename to which you want to save the map.

File format

Sets the file format for the custom map you want to create. See File formats.

When you select a file format from the drop-down list, Maya automatically appends the appropriate file extension to the filename of the custom map. For example, if you select gif from the drop-down list, .gif is automatically appended to the filename.

Similarly, if you enter path/mapname.gif as your filename, the file format option is automatically set to gif.

Bits per channel

Specifies the number of bits per channel to use in the output bitmap.

Optimization

Select for multiple objects to bake in the default light map mode. This baking method is single threaded and uses one thread per object. This method can give better performance for baking multiple objects.

Select for single object to use lens shader baking. The shape of the lens changes to be the same as that of your geometry. This baking method is multi-threaded and uses multiple threads for each object. This method can give better performance for baking a single complex piece of geometry.

Custom shader

Specifies the custom shader for which you want to create a transfer map.

Include Shadows

Bake shadows to your custom maps.

Orthogonal Reflection

This option is on by default. When turned on, the Orthogonal Reflection option causes all reflection rays to be orthogonal to the surface being baked. They are no longer true reflection rays; instead, they point parallel to the surface normal vectors, but the resulting baked texture or vertex colors are meaningful when viewed later from any direction. This option should be turned on if the textures or vertex colors generated are to be used as textures in a game engine.

Turn this option off if you are baking in order to accelerate software rendering and the reflections are only viewed from the baked position. However, in this case, the textures or vertex colors generated are not for use as textures in a game engine.

Camera

Specifies the camera name that corresponds to the view you desire.

Use mental ray common settings

If you plan to create several maps with the same width and height, you can reuse your settings by entering them in the mental ray Common Output section of the Transfer Maps window.

If you uncheck this option, the Map width and Map height attributes appear within the Custom Map section of the window. For more information regarding these attributes, see mental ray Common Output.

mental ray Common Output

Map width

Sets the width of the texture map to be created, in pixels. You can select the following texture resolutions: 16, 32, 64, 128, 256, 512, 1024, 2048, 4096. The default map width is 256.

Map height

Sets the height of the texture map to be created, in pixels. You can select the following texture resolutions: 16, 32, 64, 128, 256, 512, 1024, 2048, 4096. The default map height is 256.

Transfer in

Select one of the following options:

World Space

Use World Space when your objects are different sizes. When you transfer in world space, make sure that your source and target objects are at the same positions (on top of each other) in the scene view.

Object Space

Use Object Space to see the result of your transfer maps without having to overlap meshes. To ensure that the object space transfer works, move your objects on top of each other (pivots for all meshes overlap), freeze all their transforms, and then move them apart to positions beside each other.

Number of Samples

Use this option to specify the number of samples (per pixel) that is used for anti-aliasing during baking. The default value is 1, and the maximum value is 4.

Normal Direction

Use the Normal Direction drop-down list to set the direction of the baked object’s resulting normals. Select from Face Camera (towards the camera), Surface Front (outwards from the object surface), and Surface Back (inwards from the object surface).

Bake Alpha

Turn this on to bake the alpha channel (equivalent to the Bake Transparency option under Edit > Convert to File Texture (Maya Software) > in the Hypershade menu bar) and then select an Alpha Mode.

Note

When you turn Bake Alpha on, the transparency connection is automatically made for you when you add a surface shader.

Alpha mode

When Bake Alpha is turned on, the Alpha Mode specifies how it’s computed. Select one of the options, which include Pass Through (alpha as output from shading network) Surface Transparency, Luminance of Surface Color, and Coverage.

Note

The Pass Through option is mainly for custom shader usage within Maya. The returned baked color alpha component is retained and is not affected by Maya's matte channel. Custom shaders usually set the fourth component of a mental ray color to provide the alpha channel.

Final Gather Quality

Determines the final gather precompute quality. When rendering from the camera, mental ray precomputes a final gather pass before actually rendering the scene. This precomputation pass is disabled by default for baking.

When this attribute is set to higher than zero, mental ray computes a number of final gather points before it bakes the lightmap. When this attribute is set to one, the resulting lightmap should be of approximately the same quality as a lightmap rendered from the camera. When this attribute is set higher than one, then the quality of the lightmap is improved as a denser map of final gather points is precomputed.

Do not use this option to tune final gather quality for baking. Final gather quality affects the number of points calculated at the precomputation phase of the final gather algorithm. By increasing the final gather quality, you are only creating more points during precomputation and possibly reducing the amount of interpolation or extrapolation required during rendering. Increasing the final gather quality does not affect the accuracy of the light calculated for each point or the filtering that is used on the data.

Instead, adjust the Scale in the Render Settings Window. This attribute controls the accuracy of the light calculated for each final gather point. Adjust also the View (Radii in Pixel Size). This attribute controls how data is interpolated/extrapolated between final gather points.

Final Gather Reflect

Determines the reflectivity of an object when precomputing final gather points for light mapping. This simplifies the simulation of reflective objects whose texture maps include contributions from objects that surround them. For example, if the Final Gather Reflect value is set to 0.25, every fourth final gather point is precomputed on the object hit by the reflection ray.

UV range

Specifies whether to bake the area in UV space from [0,0] to [1,1], bake the entire UV space, or bake a manually specified space range.

U min, U max

Specifies how much to stretch the sampling range of U or V components. Maya stretches the sample region to fit the output image size within the [0,0] to [1,1] sampling range.

V min, V max

Minimum V and maximum V for baking.

Fill texture seams

If the selected UV space contains boundaries, these boundaries may appear as black stripes in renderings that use the baked textures. This occurs when the texture is sampled so close to a boundary that the filter picks up values (generally black) from outside the desired space.

This setting artificially extends the boundaries by a small amount to alleviate this problem. It is measured in texels (pixels of texture). Typically, the filter is only a few texels in diameter and can only reach as far as its radius into these boundary spaces, so a value of 1 or 2 is usually enough.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License