...
Working With Large Textures
As mentioned, tdlmake has tdlmake
has been designed to adapt very well to huge work with any textures, including very large production-grade textures. One exception is compressed TIFFs that have a large "rows per strip" value. Here is an example output of tiffinfo on of tiffinfo
on a large texture file that can cause problems for tdlmakefor tdlmake
:
Code Block |
---|
% tiffinfo earth.tif Image Width: 43200 Image Length: 21600 Resolution: 72, 72 (unitless) Bits/Sample: 8 Compression Scheme: AdobeDeflate Photometric Interpretation: RGB color FillOrder: msb-to-lsb Software: "ImageMagick 5.5.7 07/22/03 Q16 http://www.imagemagick.org" Document Name: "earth.tif" Orientation: row 0 top, col 0 lhs Samples/Pixel: 3 Rows/Strip: 21600 Planar Configuration: single image plane Predictor: horizontal differencing 2 (0x2) |
There is only one strip, made of 21600 (total image height) rows. This means that accessing any scanline in this TIFF forces the TIFF reading library to uncompress the entire file(12). In order to lower memory usage for such large files, it is suggested that a lower "rows per strip" count be used. Typically, 16 or 32 scanlines is a good choice. tdlmake
prints a warning if it encounters a file that has the aforementioned problem:
...
Here are some examples using tdlmake
on the command line:
To create a texture named `gridgrid.tdl
' from a TIFF named `gridgrid.tif
' using a gaussian downsampling filter of width 4:
Code Block |
---|
tdlmake -filter gaussian -filterwidth 4 grid.tif grid.tdl |
...
To create a cubic environment map in which all cube sides were rendered using 90 degrees field of view:
...