Texture extraction overview
 
 
 

Why extract a texture map?

Sculpting and subdividing your meshes in Mudbox can result in very large polygonal meshes from a file size and polygon count perspective. While you can easily export these files in .obj format for use in other 3D software and games applications, these other applications may not efficiently handle models with very high polygon counts in the range of tens of millions of polygons.

The recommended workflow is to extract a normal or displacement map (or both) that represents the high resolution surface(s) from within Mudbox and then export the texture maps so they can be applied to a more simplified (low resolution) version of the model in the other 3D application. As a result, the fine high resolution detail is maintained on a more simplified version of the model. Which map type you choose to extract depends on your own particular needs and production workflow.

The Texture Extraction utility extracts the high resolution detail from the sculpted mesh as a bitmap image (map). Either a normal or a displacement map can be produced. A normal map represents the difference of the tangent at any given point on the surface (the difference in the surface normal) as a color map. A displacement map represents the height difference between the two surfaces as a gray scale image. Source and target meshes can be low and high resolution versions of the mesh or even arbitrary meshes that have differing topology.

It is also possible to extract detail from 3D laser scans of a real model and produce a map that can be applied to a digital mesh that has UV texture coordinates at a lower resolution.

What is normal mapping?

Normal mapping is a technique that is widely used to represent a highly detailed surface mesh using a more simplified low polygon count version of the mesh. Normal maps are widely supported where simplified 3D meshes are a requirement particularly in real time hardware rendering applications such as interactive games. A normal map is a 2D RGB image that records the the surface normal information for a mesh by using the red, green, blue color channels to record the X, Y, Z normal vector data. Each pixel in the extracted RGB image records the normal direction data and is used to determine lighting and shading on the low resolution surface when it is rendered. When you view a normal map on its own it appears with color (compared to a displacement map which has gray tones).

What is displacement mapping?

Displacement mapping allows a model to represent visual detail that wasn’t modeled or sculpted into the original mesh. Displacement maps differ from normal maps in that they work well in representing detail on simplified meshes when the silhouette detail of the model needs to be apparent to the viewer (and important to representing the model in a convincing manner) and are widely supported where the 3D model is rendered via software (for example: rendering images for film and print) and in circumstance where normal/bump maps would appear fake. A displacement map is a 2D image that records height information for points on the mesh as gray scale information.

When the displacement map is applied to a low resolution mesh and then rendered the faces are often subdivided further and then offset (displaced) from their original positions based on the gray pixel height values in the image map to produce a detailed effect. The rendered result should appear very similar to the high resolution surface in Mudbox from which the displacement map was extracted.

NoteDisplacement maps and normal maps can also be extracted and then used in combination for real-time rendering techniques such as relief mapping. Check your 3D rendering application to see if this technique is supported.

How texture extraction works in Mudbox

To extract a texture map requires two polygonal meshes - a source and a target.

The first mesh, referred to as the source mesh, contains the high resolution sculpted detail that gets sampled to produce a texture map that can then be applied to the target model.

The second mesh, referred to as the target mesh, receives the texture map (normal or displacement) that is output. The target mesh is normally much lower in resolution than the source mesh. The target mesh in most situations should have UV texture coordinates that are non-overlapping unless the UVs are set up on the model to produce a symmetrical color map. The texture map(s) that get output are subsequently applied to the target mesh in another 3D application, for example Maya, 3ds Max, or a games console.

Extraction of normal and displacement maps from a polygon mesh in Mudbox occurs by sampling the detail and offset between the source and target versions of the polygonal mesh that the user defines. Examples of a source and target mesh can be a high and low resolution version of the same mesh or even arbitrary meshes whose topology differ but suit the production pipeline requirements. The difference between the source and target meshes is written in the UV texture space of the low resolution (target) mesh. For this reason, the target mesh must have UV texture coordinates that are suitable for the texture extraction. For more information, see Prepare a model for sculpting.

In Mudbox, you have explicit control over the behavior of the source and target meshes during extraction which is crucial for professional results and to obtain good maps under varying circumstances.

Mudbox allows you to extract maps between polygonal and subdivision surfaces in any combination. For best results the low resolution and high resolution surfaces are treated as subdivision surfaces at extraction time. The resulting maps will line up when your 3D rendering application applies a smoothing operation (Catmull-Clark subdivision) to your low resolution polygon model at render time.

The importance of image bit depth

Mudbox can extract texture maps in a range of bit-depths (8, 16, 32 bit). In general, the bit depth of an extracted texture map determines how accurate the resulting image will be in relation to the original surface from which it was extracted. Which bit depth you choose depends entirely on your production pipeline requirements. For example, in games applications an 8 bit normal map may fully meet the production requirements, whereas for film applications, a 32 bit floating point bit displacement map may be necessary.

Displacement maps that are 8 bit can record 256 unique height values. The extracted height values are converted to gray scale values in an image. The range of values are then normalized to fit within the given bit depth. For this reason, 8 bit maps that get extracted cannot accurately capture surface displacements that cover a wide range on the mesh and will appear with banding because of the compressed and limited tonal range in the image. When an 8 bit displacement map is subsequently applied to a mesh and then rendered, the banding in the texture map appears as stair-stepping or contour lines on the rendered model. However, an 8 bit displacement map may be perfectly suitable for situations where a low resolution result is required.

Displacement maps that are 16 bit can record 65,536 unique height values. Just like an 8 bit map, the ranges of values also get compressed into a 0 to 1 range which results in banding artifacts on the resulting image (though less pronounced than a comparable 8 bit map). The amount of detail that can be extracted is increased compared to the 8 bit, but contour lines and stair-stepping can still occur when the image is rendered as a displacement map.

Displacement maps that are 32 bit can record 4,294,967,295 unique height values as floating point values, and capture all of the detail on a mesh without any loss in quality provided that the UV texture coordinates are laid out efficiently. This is the recommended bit depth for extracting displacement maps in Mudbox if high resolution detail with minimal artifacts is a requirement for your production pipeline.

32 bit floating point maps in Mudbox get extracted in world space units (centimeters (cm) by default) by recording the actual distance between the source and target surfaces. The values are not normalized and use black as the base point. Where the high resolution (source) surface is above the low resolution (target) surface, a positive value is recorded. Where the high resolution (source) surface is below the low resolution (target) surface, a negative value is recorded.

On a 32 bit gray scale image, zero and negative distances are displayed as black values in the image, distances between 0 and 1 as a gray scale value and distances larger than 1 are shown as white.

NoteWhen viewing 32 bit gray scale images using the Image Browser, negative distances are displayed as positive values by default. This helps you easily troubleshoot problems in an extracted texture map. Its also possible to view negative displacement values in a green color using the See Negative As Flat Color option. For more information, see Using the Image Browser.

This might lead you to initially believe that the image is normalized to fit within a zero to one value range similar to the 8 or 16 bit versions. However, the 32 bit image is recording a range of data that is larger than your computer monitor can display in one image.

A 32 bit image, also referred to as a high dynamic range image (HDRI), records all of the positive and negative distance values beyond the 0 to 1 range so contains much more information than can be displayed on your computer monitor. To view this full range of values you need a utility that can display HDRI images such as the Image Browser in Mudbox.

Supported extraction file formats and bit depths

Mudbox can extract a texture map of your sculpted detail in a variety of bit depths and file formats that are compatible with your particular rendering application and production pipeline whether you render using Maya, mentalray, RenderMan etc.

File format Bit Depth Number of channels
BMP 8 3
JPG 8 3
PNG 8 4
TGA 8 1, 3, 4
TIFF 8, 16 integer, 32 floating point 1, 3, 4
OpenEXR 8, 16 integer, 32 floating point 1, 3, 4
NoteIf you specify either 8 or 16 bit depth for an extracted texture, the extraction feature samples the surface in 32 bit depth and then down-converts it to either an 8 or 16 bit normalized set of values that range between zero and one.