RenderMap and RenderVertex Tips

 
 
 

RenderMap and Satellite Rendering

RenderMap takes advantage of satellite rendering, if it's available. The default tile size is 32. You can change this value using the TileSize parameter of the RegenerateMaps() command. Changing the tile size can affect the rendering speed, depending on the complexity of the objects and the size of the maps. For more information about this command, see RegenerateMaps [SDK Guide].

RenderMap and Spatial Projections

If you rendermap an object using a spatial texture projection, the output images will look as though they were generated using a planar projection.

To correctly bake a spatial projection's surface attributes into a rendermap, apply an appropriate projection to the object. The texture will still be projected by the spatial projection, but the RenderMap will sample the object using the UV projection.

Rendermapping Symmetric UV Coordinates

When working with symmetrical texture maps and overlapping UV coordinates, it's useful to rendermap clusters instead of the whole object.

Suppose you have a model of a head. Each half of the head uses the same UV coordinates, but is lit differently. If you rendermap the entire head, the same part of the texture is used for each half, with no indication of which half's results come out on top. As a result, the two halves' results are blended together in the resulting surface color map (for example), which is probably not what you want.

To generate a surface color map that includes the correct lighting for each half of the head, you can create a cluster on each half and then rendermap each cluster. When you apply the surface color maps to their respective clusters, each side of the head is textured correctly, with the correct lighting "baked" in. Alternatively, you can combine both surface color maps into a single texture image, apply the image to the head, and adjust the head's UV coordinates accordingly.

   

Each side of the head shown above was lit with a different colored light, giving the result shown below.

   

Since both sides of the head occupy the same UV coordinates, a surface color map of the entire head blends the lighting from both sides into a single image.

   

Creating a cluster for half of the head and generating a surface color map for it correctly captures the lighting on that half of the head.