You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

Texture File Format

For 3Delight for Maya to render efficiently with texture maps, texture file must be prepared and saved in a certain format. That format is a standard TIFF file augmented with mipmaps. This preparation can be either automatic or done manually.

Although the 3Delight texture format is standard TIFF augmented with mipmaps, some applications are not able to read it properly because the data is stored in tiles and not scanlines (this is a performance feature).

Automatic Preparation through the Hypershade shading network

If an object is shaded using an Hypershade shading network that uses a texture file (any image file format via a node such as the File 2D texture node), 3Delight for Maya will automatically convert the texture to 3Delight’s efficient texture file format and then use this file for rendering. The automatic conversion is not done if the file is already prepared. It is detected as already prepared in the following two situations:

  1. The file extension is: .tdl 
  2. The file extension is: .tdl.tif

All the textures that are prepared using this automated process are cached in the location specified in 3Delight Data Locations. For subsequent renderings (of the same image, all the frames of an animation or even for other scenes or projects) 3Delight for Maya will re-use the prepared textures from the cache location. If any original texture is modified, it will be converted again to update the cached version. All this process is automated.

It is possible to prepare the texture file manually (and save it using a file name with the above extension) in order to avoid this automatic conversion – which could slow down the rendering process.

Manual Preparation of Texture Files

3Delight for Maya comes with a command line tool named tdlmake to prepare texture file for efficient rendering. The prepared texture file should be saved using a file name with the '.tdl' extension. You can also use the '.tdl.tif' extension instead if you want to keep the ability to open and view the texture using the tool of your choice (if it supports the TIFF image format with data stored in tiles). The prepared texture file can then be used directly in a Hypershade node such as the File 2D texture node. Here is a typical example of how to use the command line tool:

tdlmake -preview8 0.5 mytexture.tif mytexture.tdl


Also, when manually preparing your mipmap texture files consider to pre-linearize your input textures:
  • For color maps which are typically in sRGB or REC/BT.709 color space:

tdlmake -colorspace sRGB -preview8 0.5 mytexture.tif mytexture.tdl
tdlmake -colorspace BT.709 -preview8 0.5 mytexture.tif mytexture.tdl 

  • For non-color linear maps such as:
    • float/vector displacement maps
    • bump/normal maps
    • anisotropy maps
    • masks
    • baked non-color maps
    • etc...

tdlmake -colorspace linear  -preview8 0.5 mytexture.tif mytexture.tdl

Refer to section "3.3 Using the Texture Optimizer - tdlmake" in the 3Delight-UserManual.pdf for more details on the command line tool by running the following command in your terminal/prompt:

tdlmake -h

This process ca be automated furtherly via MEL using the following function in 3Delight for Maya 2015/2016 (or newer):

DL_convertTextures()

This function will scan all the shaders and then do the necessary work to call tdlmake.

 

For a proper linear workflow, color textures must always be linearized before rendering, this is a complex topic and depends on Maya versions, see:

 

Important

Maya can not read TIFF file stored in tiles, only in scanlines. For this reason, it is necessary to use tdlmake with the '-preview' option so it will also insert an embedded thumbnail (stored in scanlines) at the begining of the file that Maya can read. This is useful for Maya to display a texture preview image.

  • No labels