The Polybump Tool Reference document has information on each of the settings of the Polybump Tool.
The Computation Settings dialog is found under Document > Computation settings. This dialog allows users to specify input meshes and additional settings required for the polybump computation such as size and quality.
1. Low Poly File: Specify the filename (in Alias Wavefont .OBJ format) of the low poly objects that should receive the date of the high poly object[SANDBOX:s].
2. High Poly Files: Specify one or more high poly .OBJs. Using multiple high poly meshes is useful for splitting a high-res mesh (i.e. a character) into multiple body parts for workflow reasons. Make sure that all of these parts share the same pivot in your 3D application and that they have no transformations applied to them. If needed, use "reset Xform" in 3ds Max.
3. Smooth: Activating the Smooth checkbox averages all vertex normals in the mesh, making the shading appear smooth. When using a mesh exported from 3ds Max, this option is not necessary since smoothing groups will be kept. Applications such as zbrush export meshes with "hard" edges or faceted shading so for these programs this option can be useful. However, this computation requires some memory and additional Computation time during loading which is not necessary if the object is highly tessellated. This option is off by default, and for most high poly meshes should remain so. Only if your high poly mesh has less tessellated areas, might it make sense to activate this feature
4. Cage File: Specify an additional cage mesh to be used during the calculation. Using a cage mesh is advised when you have small folds and gaps in a model that cause the rays being shot from the low poly mesh to hit the high poly mesh twice or hit an opposing surface in the mesh (see below), creating rendering errors. This can occur in the mesh of a hand in the pits between fingers. Simply adding some boxes between fingers is enough to avoid rendering errors, since they stop the rays from reaching the adjacent finger and thus keep the rays from hitting the low poly mesh twice.
5. Rayshooting: Configures the detail settings of the polybump algorithm.
- Mode: (Latest, Nearest) Defines the intersection mode for the ray casting algorithm. The algorithm shoots rays with a certain length (see the option below) from the low poly mesh in both directions, outwards and inwards, along the surface's normal. The ray will eventually hit the high poly mesh, and the surface normal will (at that point) be rendered into the texture as a certain color. If the high poly mesh isn't one uniform surface, but consists of several elements (for example a belt around the waist of a character), the ray will hit the high poly mesh at several points. Highest/Latest mode determines which point will ultimately be used for the calculation. Usually, "latest" will deliver best results, as you will most likely want the top-most parts of the mesh included in the rendering (as in the belt example). It is also the default setting.
- Ray length is x % of low poly size: This specifies the length of the rays that are being shot. If the rays are too short, they might not reach salient elements of the high poly mesh and produce incorrect results. But the longer the ray is, the higher the risk of hitting another point of the high poly mesh becomes, for example in small folds, or in the pits between the fingers. To avoid these problems, a cage mesh can be used (see 4). % of low poly size means that a bounding sphere is created around the low poly mesh, fully encapsulating it. The radius of this sphere determines the ray length: 10% means the ray length is 10% of the bounding sphere diameter.
Use nearest hit with 2%, 5% and 50%.
Use latest hit with 2%, 5% and 50%.
Note: Look at how the very short rays don't reach the high poly mesh and produce black spots on the normal map (left pictures). Also note how using nearest hit instead of latest hit doesn't render the top-most surface elements of the high poly mesh (belts, clips, etc.)
- Horizon: (low, med, high) If this item is activated, the polybump will calculate a horizon map which can be used as a source for various outputs (e.g. accessibility map, Unoccluded area direction). The horizon map is essentially the ambient occlusion of the high-poly mesh projected onto the low-poly mesh and baked into a texture. You can set it to either low, med, or high to define the quality. The higher the quality, the longer the calculation will take. This quality setting has the most significant impact on calculation time, so low quality should be used for testing and troubleshooting, and high only for final renders. Setting the option to "none" means that no horizon map will be rendered. Note that the ray length parameter also influences the horizon map rendering. Using short rays will produce a more high-contrast occlusion map, with darkening visible in rather tight folds only, while using long rays will produce a very "soft" shading where even slight pits in the surface will become darker. However, using a very high ray length also means increased rendering time.
- Anti-aliasing: (none, Selective 2x2, Selective 3x3, full 2x2, full 3x3) Enabling anti-aliasing will improve the texture quality, but will also increase calculation times. Full anti-aliasing produces better quality than selective anti-aliasing, but it also requires longer calculation times.
6. Output: Specifies the texture dimensions.
7. Preview: Previews the objects chosen for computation. The low-poly mesh is rendered in white and the high-poly mesh in black. If there is a cage mesh present, it will be rendered in red. You should use this view to check if the objects align properly and share the same position, this is especially important when you use OBJs exported from Zbrush. If everything is correct you should see the objects overlapping each other like here:
The following dialog box will be displayed when you select Document > Export data.
The available options are:
1. Normal Map: The format of the texture map, typically 8-bit RGB with no alpha channel - Reduce Resolution (2): The size of the final texture, in relation to the size of the polybump source map.
2. Reduce Resolution: 0 (no change) is a 1:1 ratio, the final texture will be as big as you originally specified in polybump. 1 means a smaller texture, -1 means a larger texture, and so on.
3. Expand border: If activated, polybump "smudges" the border of objects in the texture outside of their UV shells, in order to keep seams from occurring in the final game model. Using this feature is recommended, as you will see seams and inaccuracies once mip-mapping is involved.
You can choose between no expansion, 1,4,8, and 16 pixels.
No expansion(left) 16 pixel expansion (right)
4. Transform Vectors to: (Tangent/Object Space) This setting specifies the final "format" of the normal map. Most game engines (including CryENGINE) use tangent space normal maps, so using this setting is recommended. Object space means that the normals are encoded in absolute world space, which means that objects using these normal maps cannot have transformations applied to them, or the lighting will look wrong. However, they are slightly easier to process, but very few game engines use world space normal maps.
There are many possibilities for computing tangent space matrices per vertex and that computation is required to reconstruct the normals in the shader when rendering the low poly model. To avoid distortions, the same computation should be used when transforming the world space normals to the tangent space (exporting .srf).
For further information on triangle mesh tangent space calculation see Martin Mittring's, ShaderX4, 2006. High quality normals in object/worldspace still exists in the .srf file and can be extracted and possibly transformed from there into some other space.
5. Horizon data: When calculating a horizon map, you can now choose several ways to export it. If these checkboxes are grayed out, the map hasn't been calculated. You need to go back to the calculation settings to make one.
If a _DDNDIFF texture is present in the directory of the material and the other textures, and you have specified an ordinary _DDN texture in your material's normal map slot, CryENGINE will automatically choose the _DDNDIFF texture for the advanced rendering technique, provided the textures have the same prefix (as in: boots_DDN.tif and boots_DDNDIFF.tif).
6. Displacement: When set to linear signed, polybump will include a displacement map in the alpha channel of the normal map.