RenderVertex

RenderVertex allows you to bake complex texturing, render tree, and other surface information into color at vertices (CAV) properties. It works basically the same way as RenderMap (see Generating and Baking Surface Attribute Maps (RenderMap)), but samples the object’s polynodes instead of its surface. The results are stored in new or existing CAV properties. Consequently, the quality of the result depends mainly on the density of the polygon mesh.

RenderVertex supports HDR values. For example, you can use RenderVertex to bake the results of HDR image-based lighting into an object’s vertex color property.

 

A RenderVertex property generates CAVs using the original geometry of the object to which it is applied. This means that RenderVertex ignores things like displacement maps and subdivision surfaces which change the object’s geometry during tesselation.

 

RenderVertex is useful for game development because it allows you to bake basic texturing information, lighting information, and surface information (like normals and tangents) directly into scene objects. This means that you can, for example, delete some of the lights in your scene, reducing the number of calculations and the overall “weight” of the scene.

RenderVertex can be applied to polygon meshes, polygon clusters, hierarchies, and groups (but not to NURBS surfaces or assembled surfaces). You can apply multiple RenderVertex properties to a single object.

To apply a RenderVertex property

1. Select a polygon mesh, polygon cluster, hierarchy, or group whose vertex colors you wish to render.

2. From the Render toolbar, choose Get > Property > Render Map to open the RenderMap property editor.

3. On the Basic tab, set Sampling to Vertices Only (Render Vertex).

4. Do both of the following:

- Choose and configure the maps that you wish to generate, as described in Choosing and Configuring the Maps to Generate.

- Once you’ve configured your maps, set the rest of the general RenderVertex options (those that affect all maps), as described in Setting General RenderVertex Options.

5. If you want to store HDR values, set PrecisionDatatype to Float on the Advanced tab.

6. After you’ve finished setting the options, click the Regenerate Maps button at the top of any tab to generate all active maps.

7. Repeat as necessary.

Choosing and Configuring the Maps to Generate

Each RenderVertex property that you apply to an object can produce up to three different types of maps, baked into their respective CAV properties. These are: a surface color map, a normal map, and U and V basis maps.

Each type of render vertex CAV has its own unique options that, combined with the general RenderVertex options, define its output CAV. When you regenerate the maps, all of the maps that you’ve activated in the current RenderVertex property are generated.

The following sections describe the available map types, and how to set the options for each one.

• Surface Color maps are described in the following section, Generating Surface Color Maps.

• Normal maps are described in Generating Normal Maps.

• UV Basis maps are described in Generating UV Basis Maps.

• Depth Maps are described in Generating Depth Maps.

In addition to the map-specific options, you must set the general rendervertex options (those that are common to all map types) before generating your maps. These options are described in Setting General RenderVertex Options.

Generating Surface Color Maps

Surface color maps burn a variety of different surface and/or illumination information into a CAV property. Each time you regenerate the maps for a RenderVertex property, you can generate one of the following types of surface color map:

Surface Color and Illumination bakes all object surface attributes, including color, illumination, bump, and so on, into the rendermap output image.

Surface Color Only (albedo) bakes object surface color without considering the current illumination environment.

Illumination bakes illumination information into the surface color map. This includes light color.

Illumination maps can optionally include bump map information provided that the Consider Bump option is activated in Surface Color Map options (see the procedure below).

Ambient Occlusion uses Softimage’s ambient occlusion shader to create a color representation of the extent to which the object is occluded by other objects, or the environment, at any given point.

When you’re setting the RenderMap properties, you can adjust a subset of the ambient occlusion shader’s parameters to control the final output map. This is described in Setting Ambient Occlusion Options.

Ambient occlusion maps can optionally include bump map information provided that the Consider Bump option is activated in Surface Color Map options see the procedure below).

To burn a surface color map into a CAV property

1. Apply a RenderVertex property to one or more objects as described [here].

2. In the RenderMap property editor, click the Basic tab.

3. From the Surface Color options, check the Enable box to activate the surface color map.

4. Select a Destination CAV (color at vertices) property in which to store the vertex color information.

If necessary, click New to create a new CAV property.

5. From the Map list, choose one of the surface color map types previously described.

6. If the rendermapped object(s) is bump mapped, you can toggle the Consider Bump option to specify whether the bump map is included in the output image (See [here] for information about rendermapping bump-mapped objects).

 

This option is not available for all of the surface color map types, some of which include bump mapping automatically. See Generating Surface Color Maps for details.

7. If necessary, activate the Overwrite CAV alpha channel option to overwrite the color at vertices (CAV) property’s alpha channel when you regenerate the RenderVertex property.

8. If necessary, use the options in the Disable and Enable sections to control whether various surface attributes appear in the output image. For details about using these options, see Deactivating Surface Attributes.

9. If necessary apply any of the color correction options described in the following section, Color Correcting RenderVertex CAVs.

10. If you are generating an ambient occlusion map, you can set additional ambient occlusion options, which are described in Setting Ambient Occlusion Options.

11. Activate and configure any other maps (surface color map, normal map, and so on) that you wish to generate using the current rendervertex property. For a list of available maps, see [here].

12. Set the general rendervertex options, described in Setting General RenderVertex Options.

13. Click the Regenerate Map button to generate the rendervertex when you’re finished.

Bump-Map Considerations For Surface Color Maps

If you are generating a surface color map for a bump-mapped object, and wish to include the bump map information in the resulting RenderVertex CAV property, you must apply the bump map to the rendermapped object in one of the following ways:

• A bump map generator shader connected to the Bump Map input of the object’s material node.

 

or

• A texture shader, with bump mapping active, connected to the Diffuse input of a surface shader that is, in turn, connected to the Surface input of the object’s material node.

 

When you generate a surface color map, the material node’s Bump Map and then Surface inputs are evaluated. If the shaders connected to either of these inputs perturb the shading normals and leave them perturbed, then the bump information is baked in; otherwise, only the “bumpless” surface is captured.

For example, while either of the render trees shown above produce correct surface color maps with bump, this render tree does not:

 

Deactivating Surface Attributes

When you generate certain types of surface color map, you can use the Disable Surface Properties options on the Basic tab of the RenderMap property editor to control whether or not specific surface attributes are included in the RenderVertex CAV property.

The Disable Surface Properties options control whether shadows, refractions and/or reflections, as well as the ambient, diffuse and/or specular lighting components on the rendermapped object appear in the RenderVertex CAV property. When any of these boxes is checked, the corresponding attribute does not appear.

Of course these surface attributes can only be toggled provided they are active to begin with. For example, if the object is Blinn shaded, but the Blinn shader’s specular component is deactivated, toggling the specular component in the RenderMap property editor has no effect.

In other words, these options are simply a mechanism to toggle surface attributes that are already activated for the object — not a mechanism for adding these attributes to the object.

 

Not all of the Disable Surface Properties options are not available for all types of surface color map. This is either because the corresponding attributes are not applicable to the map type, or because they are included automatically.

You set the Disable Surface Attributes options along with the other surface color map options, as described in the following section: Generating Surface Color Maps.

Color Correcting RenderVertex CAVs

You can apply a color correction process to your surface-color type RenderVertex CAV properties as they are being generated. For example, if you’re baking illumination into a RenderVertex property, you can brighten or darken it.

To apply color correction to RenderVertex properties

1. Configure a surface-color type rendervertex, as described in the previous section.

2. From the Surface Map Settings tab of the RenderMap property editor, set the Mode to one of the following:

- Grayscale (Average): creates a grayscale rendervertex CAV based on the average of each pixel/vertex’s RGB values.

- Grayscale (Intensity): creates a grayscale rendervertex CAV based on each pixel/vertex’s intensity value.

- Negative: creates an inverted version, or negative, of the CAV on the object.

- Custom: allows you to manually set the color correction options.

3. If you set the Mode to Custom, you can now set the Gamma, Contrast, Hue, Saturation, and Level values.

Setting Ambient Occlusion Options

Ambient occlusion works by firing rays into a predefined hemispherical region above a given sampled point on an object's surface in order to determine the extent to which the point is blocked - or occluded - by other geometry.

If you are generating an ambient occlusion map using the rendervertex tool, you can adjust the following parameters, which are located on the Surface Map Settings tab of the RenderMap property editor:

Samples specifies the number of sample rays used to determine occlusion. Higher settings produce a smoother result but take longer to generate the ambient occlusion map.

Spread defines the size of the cone from which sample rays are fired. A value of 0 samples only in the direction of the surface normal, while a value of 1.0 samples the entire hemisphere above the sampled point.

Dark Color is a color used to scale the ambient lighting where the object is completely occluded. If the object is partially occluded, this color is mixed with the Bright color.

Bright Color is a color used to scale the ambient lighting where the object is completely unoccluded. If the object is partially occluded, this color is mixed with the Dark color.

 

These parameters are actually a subset of Softimage’s ambient occlusion shader’s parameters. For detailed information about the ambient occlusion shader, see Ambient Occlusion [Indirect Illumination].

Generating Normal Maps

Normal maps allow you to burn the rendermapped object’s normals into a CAV property where they are stored as color values.

 

Data in normal map CAVs is stored in a biased form. To ensure that they are always in the 0 to 1 range, the X, Y, and Z of the normal are stored as:

(x+1)/2,(y+1)/2,(z+1)/2

To get the unbiased, original normal value, use:

r*2-1,g*2-1,b*2-1

 

Normals can also be burned into an image file by using RenderMap instead of RenderVertex. This is described in Generating and Baking Surface Attribute Maps (RenderMap).

To burn a normal map into a CAV property

1. Apply a RenderVertex property to one or more objects as described [here].

2. On the Maps tab, activate the normal map by checking the Enable box in the Normals section.

3. Select a Destination CAV (color at vertices) property in which to store the normal map.

If necessary, click New to create a new CAV property.

4. From the Space list, choose how the normal vectors should be encoded:

- If you choose Object space, the vector is represented relative to the coordinate frame of the object. Rotation, translation, and scaling of the object do not have an impact on the result.

- If you choose World space, the vector is represented relative to the scene root. Rotations and scaling of the object affect the result. Translation never affects normals.

- If you choose Relative to UV Basis, the vector is represented in the local space defined by the UV basis; that is, the coordinate frame defined by the tangent (X-axis), binormal (Y-axis), and interpolated normal (Z-axis).

The tangent and binormal (U and V basis, respectively) are computed based on a texture projection that you will specify in step 6.

 

The U and V bases can also be burned into a separate map, as described in the following section, Generating UV Basis Maps.

Normal maps generated this way are very useful for bump-mapping in games.

5. From the Type list, choose the type of normal to burn into the normal map CAV:

- The Interpolated Normal is computed by interpolation across the triangle of the rendermapped surface. It is not affected by bump mapping, and is always the normal of the surface being rendermapped.

Computing this normal does not involve evaluating the surface shader, and is much faster to compute than the Sampled Normal.

 

If the Space option is set to Relative to UV Basis, burning the interpolated normal is generally not useful, since the coordinate frame is defined based on the interpolated normal to begin with. In such cases, (0,0,1) is always returned as the relative normal.

- The Sampled Normal is the normal used for shading after ray-casting and evaluating the surface color. As such, bump mapping affects the result.

In cases where the ray-casting “catches” a surface other than that of the rendermapped object (for example, if the Ignore RenderMapped Objects parameter on the Advanced tab is activated), the normals of the other surface are burned into the map.

If there is no bump mapping, and the rendermapped object’s surface is “caught” by the sampling, the sampled normal matches the interpolated normal.

 

The Sample Normal setting is useful for computing the normals of a high-resolution object relative to the coordinate frame on a low-resolution object, as defined by the U/V basis and the interpolated normal.

- Geometric Normal: This is the normal of the geometric triangle being sampled. It is not affected by bump mapping, and is always the normal of the surface being rendermapped.

Computing this normal does not involve evaluating the surface shader, so it is much faster to compute than the Sampled Normal.

6. If you had previously set the Space option to Relative to UV Basis then, from the UV Basis options on the Advanced tab, do one of the following:

- Make sure that the Automatic Basis option is activated and then, using the Texture Projection (for automatic generation) options, specify a texture projection to use when calculating the U and V bases.

or

- Deactivate the Automatic Basis option and then, using the User-Defined Basis options, specify a color at vertices (CAV) property to use when calculating the U and V bases.

 

In most cases, the texture projection specified in the Format options on the Basic tab is ideal for computing the UV basis because this projection tends to have low sheering in the UVs.

7. If necessary, deactivate the Force perpendicular basis option.

When activated, this option first changes the V-basis to ensure it is perpendicular to the (current) U basis and the interpolated normal. It then changes the U-basis to ensure it is perpendicular to the new V basis and the interpolated normal. The interpolated normal itself never changes.

8. Activate and configure any other maps (surface color map, normal map, and so on) that you wish to generate using the current rendervertex property. For a list of available maps, see [here].

9. Set the general rendervertex options, described in Setting General RenderVertex Options.

10. Click the Regenerate Map button to generate the rendervertex when you’re finished.

Generating UV Basis Maps

Together with an object’s interpolated normal, the U basis (tangent) and V basis (binormal) define a coordinate frame on the object’s surface. Conceptually, the U and V bases are supposed to be tangent to the surface, while the interpolated normal is perpendicular to the surface. This coordinate frame is useful for relative normal computations for bump mapping in games.

The Basis Vector map options in the RenderMap property editor allow you to burn the U and V bases into separate CAV properties.

 

As with normal maps, data in U and V basis CAVs is stored in a biased form. To ensure that they are always in the 0 to 1 range, the X, Y, and Z of the vectors are stored as:

(x+1)/2,(y+1)/2,(z+1)/2

To get the unbiased, original vector value, use:

r*2-1,g*2-1,b*2-1

 

The U and V bases can also be burned into image files by using RenderMap instead of RenderVertex. This is described in Generating and Baking Surface Attribute Maps (RenderMap).

To burn U and V basis maps into CAV properties

1. Apply a RenderVertex property to one or more objects as described [here].

2. From the UV Basis options on the Advanced tab, do one of the following:

- Make sure that the Automatic Basis option is activated and then, using the Texture Projection (for automatic generation) options, specify a texture projection to use when calculating the U and V bases.

or

- Deactivate the Automatic Basis option and then, using the User-Defined Basis options, specify a color at vertices (CAV) property to use when calculating the U and V bases.

3. If necessary, deactivate the Force perpendicular basis option.

When activated, this option first changes the V-basis to ensure it is perpendicular to the (current) U basis and the interpolated normal. It then changes the U-basis to ensure it is perpendicular to the new V basis and the interpolated normal. The interpolated normal itself never changes.

4. On the Maps tab, activate one or both basis vector maps by checking the Enable U and/or Enable V boxes in the Basis Vectors section.

5. Select Destination CAVs (color at vertices) properties in which to store the U and V basis maps.

If necessary, click New to create a new CAV property for each map.

6. From the Space list, choose whether the basis vectors should be encoded in object space or world space:

- If you choose Object space, the vectors are represented relative to the coordinate frame of the object. Transforming the object does not have an impact on the result.

- If you choose World space, the vectors are represented relative to the scene root. Rotating and scaling the object affects the result.

7. Activate and configure any other maps (surface color map, normal map, and so on) that you wish to generate using the current rendervertex property. For a list of available maps, see [here].

8. Set the general rendervertex options, described in Setting General RenderVertex Options.

9. Click the Regenerate Map button to generate the rendervertex when you’re finished.

Generating Depth Maps

Depth Maps, also called height maps, are grayscale representations of the height of every point on an object’s surface. Depth maps are often used by game developers to create a more realistic bump-mapping effect called parallax mapping, which simulates the correct displacement you perceive on an object’s surface, based on the camera’s point of view.

To set depth map options

1. Apply a RenderVertex property to one or more objects as described [here].

2. On the Maps tab, activate the depth map by checking the Enable box in the Depth section.

3. Select a Destination CAV (color at vertices) property in which to store the depth map.

If necessary, click New to create a new CAV property.

4. Activate and configure any other maps (surface color map, normal map, and so on) that you wish to generate using the current rendermap property. For a list of available maps, see [here].

5. Set the general rendervertex options, described in Setting General RenderVertex Options.

6. Click the Regenerate Map button to generate the rendervertex when you’re finished.

Setting General RenderVertex Options

This section describes how to set the options that are common to all types of RenderVertex CAVs. These options include:

• The Sampling options described in the following section, Setting the Sampling Options.

• The Virtual camera options described in Setting the Virtual Camera Options.

In addition to these options, you must also set the options specific to the maps that you wish to generate. Map-specific options are described in Choosing and Configuring the Maps to Generate.

Setting the Sampling Options

The Sampling options give you additional control over how rendermapped objects are sampled to produce the resulting CAV.

To set the sampling options

1. Apply a RenderVertex property to one or more objects as described [here].

2. From the RenderMap property editor, click the Advanced tab.

3. Select the Average colors around vertices to average the colors around vertices when the RenderVertex CAV is generated.

This is useful for games development because it ensures that all samples around a vertex have the same color, and therefore leads to more efficient triangle stripping.

 

Activating the Average colors around vertices option may cause color errors where the color changes drastically between polygons.

4. If necessary, set the Sample inset factor to control the distance between each sampled vertex and the location where the sample is actually taken.

Raising the value moves the sample location closer to the center of the triangle (a value of 1 means the sample location is at the triangle’s center). Lowering the value moves the sample location closer to the vertex.

 

• Higher values are more likely to produce artifacts in the resulting CAV.

• You cannot set the value lower than 0.001. This is because RenderVertex does not sample exactly at a given vertex, but slightly inside the polygon near the vertex. This helps to ensure that the object is colored correctly at each vertex in cases where there is a drastic change in surface color.

5. If you haven’t done so already, activate and configure the maps (surface color map, normal map, and so on) that you wish to generate using the current rendervertex property, as described in Choosing and Configuring the Maps to Generate.

6. Continue setting the other RenderVertex options, then click the Regenerate Map button to generate the rendervertex when you’re finished.

Setting the Virtual Camera Options

RenderVertex uses a virtual camera to sample the surface of the rendermapped object. You can control some of the virtual camera’s attributes to modify the resulting CAV.

To set the virtual camera options

1. Apply a RenderVertex property to one or more objects as described [here].

2. From the RenderMap property editor, click the Advanced tab.

3. From the Virtual Camera options, set the Distance from Surface to specify the virtual camera’s distance from the rendermapped object.

Non-zero distances are useful when you want to include other scene elements in the resulting CAV.

 

Unless you want to incorporate elements other than the rendermapped object into the final CAV, it’s best to keep the Distance from Surface set to 0. Non-zero settings increase the time it takes to generate the rendervertex, often significantly.

4. If your object is rendered using final gathering, and you find that the resulting CAV contains undesirable artifacts, increase the Final Gathering Smoothness value. The higher the value, the “smoother” (fewer artifacts) the result.

 

You should adjust the final gathering Accuracy setting to get rid of artifacts in the resulting CAV. Once you’ve done that, adjusting the Final Gathering Smoothness value can help you to reduce the appearance of any remaining artifacts.

5. Set the View option to specify the virtual camera’s point of view:

- Perpendicular to Surface: the virtual camera samples the rendermapped object(s) from a position perpendicular to the object(s) surface, and from the distance specified by the Distance from Surface setting.

or

- Scene Camera: the virtual camera samples the rendermapped object(s) from the direction of the scene camera specified in the render options, but from the distance specified by the Distance from Surface setting.

As a result, the RenderVertex sampling ray may not originate from the scene camera’s position.

This is useful when you want to accurately reproduce camera-dependent effects like specular highlights or reflections.

 

If you are generating an Illumination surface color map, specular highlights and reflections are automatically forced off, making camera direction irrelevant. As a result, the View options are unavailable.

6. If necessary, activate the Ignore Rendermapped Objects option. When this option is activated, RenderVertex casts a ray to find the surface to be sampled, but ignores the object(s) affected by the RenderVertex property. As a result, the color information that is computed is taken from whatever object the ray hits, and not the object being rendermapped.

7. If you are using RenderVertex to transfer attributes from one surface to another, activate the Bidirectional Tracing option. This causes RenderMap to shoot each ray in both directions, if necessary, and choose the best of the two resulting samples. If neither sample is appropriate, both are rejected.

For bidirectional tracing to work properly, make sure that the Ignore Rendermapped Objects option is activated and the virtual camera View is set to Perpendicular to Surface.

For a full explanation of how bidirectional tracing works, see Bidirectional Tracing Explained.

 

Bidirectional tracing causes additional rays to be cast, and may affect computation times.

8. Select or deselect the Front Facing Triangles and Back Facing Triangles options to include or exclude the object’s front and/or back facing triangles (relative to the scene camera) in the RenderVertex calculation.

9. If you haven’t done so already, activate and configure the maps (surface color map, normal map, and so on) that you wish to generate using the current rendervertex property, as described in Choosing and Configuring the Maps to Generate.

10. Continue setting the other RenderVertex options, then click the Regenerate Map button to generate the rendervertex when you’re finished.

 



Autodesk Softimage v.7.5