Texture extraction >
Texture extraction overview

Why extract a texture map?

Sculpting and subdividing models in Mudbox can produce models with very high polygon counts resulting in large file sizes. 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 polygon counts in the range of tens of millions.

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

The Texture Extraction utility extracts the high resolution detail from the sculpted mesh as a bitmap image (map). You can produce either a normal or a displacement map:

- A normal map extracted in Mudbox represents the difference of the surface normals between the sculpted source model and the target model and represents these differences as a color map.
- A displacement map represents the height difference between the two surfaces as a grayscale image.

Source and target meshes can be low and high resolution versions of the mesh or even arbitrary meshes that have differing topology but suit the production pipeline requirements.

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 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 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 in color (compared to a displacement map which has gray tones).

What is displacement mapping?

A displacement map is a 2D image that records height information for points on the model as gray scale information. Displacement mapping allows a model to represent visual detail not modeled or sculpted into the original mesh and can be used as a method for transferring sculpted detail from one model to another.

Displacement maps differ from normal maps in that they work well to represent detail on simplified meshes when the model’s silhouette detail needs to be apparent to the viewer. Displacement maps are widely supported where the 3D model is rendered using software (for example: to produce images for film and print) and in circumstances where normal/bump maps don’t provide enough realism.

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

NoteDisplacement maps and normal maps can also be 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

Extracting 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. The source mesh is sampled to produce a texture map that can be applied to the target model.

The second mesh, referred to as the target model, receives the texture map (normal or displacement) that is output. The target model is normally much lower in resolution than the source mesh. The target model in most situations needs to have UV texture coordinates that are non-overlapping, unless the UVs are arranged on the model to produce a symmetrical color map.

The output texture map(s) are normally applied to the target model using another 3D application (for example Maya, 3ds Max, or a games console).

An extracted displacement map can also be used within Mudbox to displace the vertices on another model using Sculpt using a displacement map.

Mudbox extracts normal and displacement maps from a polygon model by sampling the detail and offset between the source and target versions of the user-defined models. The difference between the source and target model is written in the UV texture space of the low resolution (target) model. For this reason, the target model 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 lets you 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 align 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 is in relation to the surface from which it was extracted. The bit depth you specify depends entirely on your production 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.

8 bit displacement maps - 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 cannot accurately capture surface displacements that cover a wide range on the mesh and can appear with banding because of the compressed and limited tonal range in the image. When an 8 bit displacement map is applied to a mesh and rendered, the banding in the texture map appears as stair-stepping or contour lines on the rendered model. An 8 bit displacement map can be suitable in situations where a low resolution result is sufficient, however.

16 bit displacement maps - Can record 65,536 unique height values. Just like an 8 bit map, the ranges of values are 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). More detail can be extracted compared to the 8 bit, but contour lines and stair-stepping can still occur when the texture is rendered.

32 bit displacement maps - 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.

NoteIn general, the higher the image bit depth for an image, the larger the file size. Keep this in mind if you plan to extract multiple high resolution images at higher bit depths or paint images with higher bit depths in general. For more information, see Graphics memory optimization.

Mudbox extracts 32 bit floating point maps in world space units (centimeters 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 32 bit gray scale images, zero and negative distances display as black values in the image, distances between 0 and 1 as a gray scale value, and distances larger than 1 display as white. 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 map. However, the 32 bit image records a range of data 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 it contains much more information than can be displayed on your computer monitor. To view this full range of values you need a utility that displays HDRI images such as the Image Browser in Mudbox.

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. You can also view negative displacement values in green using the See Negative As Flat Color option. For more information, see Using the Image Browser.

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, and so on.

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 float,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 converts it to either an 8 or 16 bit normalized set of values that range between zero and one.