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

Compare with Current View Page History

« Previous Version 37 Next »

Texture Optimization

The optimization process consist of creating a mipmap version of images that can be used efficiently as a texture during rendering. This process is important as non-optimized textures (without mipmap) can slowdown rendering significantly. 

Automatic Optimization

If not already optimized, 3Delight will try to optimize textures automatically.  Optimized textures are stored at the same location of the source texture and will have the same base name as the original texture in addition to colour space information and the .tdl extension. This process will skip any files that have the .tdl substring in the file name (e.g. test.tdl.tif and test.tif.tdl will be considered as optimized).

For the automatic optimization to work, the texture directory or directories where the textures are located must have write permission not only to oneself, but to other users as well (so they have the ability to use them and have the optimization process to work if needed). Note that original textures themselves do not need to have the same write permissions as 3Delight access them only for reading, not for modifying them.

When using 3Delight Cloud, the optimization process does not create additional files. Everything is preformed in the cloud.

The texture optimization processes takes care of using the proper color space assigned to the texture. Color space assignment depends on the source of the texture:

Source
Maya

Renders started directly from Maya, or from NSI files generated by Maya, will use the Color Space that is used in the File shading node of the source texture.

KatanaFloating point textures (including 16 bit halfs) are considered as linear, everything else as sRGB. This is also the case for NSI files generated by Katana.
NSI file

NSI files generated by any other means (other than our Maya and Katana 3Delight plug-ins) can also take advantage of automatic texture conversion. To do so, there should be a special attribute accompanying every string value that points to a texture file. Here is a simple NSI example:

Create "example" "shader"
SetAttribute "example"
 "shaderfilename" "string" 1 "file"
 "textureName.meta.colorspace" "string" 1 "linear"
 "textureName" "string" 1 "sometexture.tif"

The textureName.meta.colorspace indicates the color space for the texture designated by textureName. Any available OCIO color space can be used. The following presets are recognised: linear, rec.709, sRGB.

Manual Optimization

You may consider preparing textures manually using the tdlmake tool for these reasons:

  1. Save storage space as 3Delight will convert textures and save them into a separate folder.
  2. The automatic color space conversion for Katana is not satisfactory and a more fine tuned approach is needed.
  3. You want to pass additional options to tdlmake for a custom preparation (e.g. type of filtering or output data type).

Another consideration is if you don't like the delay that will occur at the start of a render the first time one or more textures are used. And you prefer handle that one time process manually on your own term.

The Network Cache

3Delight has a unique feature that improves performance when rendering over networked environments: the renderer can cache textures that are located on the network to the local drive of the machine doing the rendering. This provides two benefits that can be significant:

  1. Faster access to textures during rendering, especially if the local drive is an SSD.
  2. Reduced network traffic, which can become seriously clogged when several computers are accessing textures simultaneously while rendering.

The network cache content is updated automatically: when texture files are modified on the file server, the local (cached) copies will be automatically updated the first time they are needed for a rendering. If there is no more space in the cache,  copied textures are removed to make space for incoming textures by following the Least Recently Used (LRU) principle.

By default, the Network Cache in not active. We recommend you turn it on. You only need to specify its maximum size (we recommend at least 50GB). This is done through the 3delight.config configuration file.

The only inconvenience is an initial delay before you start to see the image on the first render (because the first time the cache needs to be filled). The amount of delay will depend on how many textures are used in that particular image. Note that if you use only one computer, and all the textures are on a local drive of that computer, enabling Use Network Cache won't have any effect. 

  • No labels