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

Compare with Current View Page History

« Previous Version 18 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

When 3Delight encounters a texture that is not optimized during rendering it will attempt to optimize it automatically.  These optimized textures will be stored at the location specified in the 3delight.config configuration file.

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 other means (than our Maya and Katana 3Delight plug-ins) can still 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 and sRGB.

  

Manual Optimization

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

  1. Save start-up time for renders. Compared to automatic texture optimization, manual optimization will save time only the first time you render a scene that references the textures. Since 3Delight re-uses already optimized textures, subsequent renders will have no performance hit.
  2. Save hard drive space as 3Delight will convert textures into the specified folder. By default, the folder is on the local machine but it's possible to direct it to a network location by specifying it in 3delight.config (using the "texturedirectory" option). Note that optimized texture directory is per-user so file duplication will happen if many users render the same assets.
  3. The automatic color space conversion for Katana is not satisfactory and a more fine tuned approach is needed.
  4. You want to pass additional options to tdlmake (e.g. filtering or output data type).

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 for faster data access and saving network bandwidth. The network cache content is updated automatically: when 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. 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 texture data are on a local drive of that computer, enabling Use Network Cache won't have any effect. 

The Network cache can be activated and configured through the 3delight.config configuration file.


  • No labels