Short Contents

8.8 The DSM display driver

This display driver produces deep shadow maps. As explained in Shadows, DSMs support opacity, prefiltering and motion blur. It is suggested to use DSMs whenever possible.

"float tolerance" [0.02]
DSMs tend to grow quite large, unfortunately. The display driver tries to compress them using an algorithm that shrinks file size without exceeding some specified error threshold. A value of `0' (that is, no error allowed) produces large DSMs and should never be used and a value of `1' compresses DSMs too much and results are unsatisfactory. If this parameter is not specified or set to -1, the display driver computes a default value (currently always 0.02).
"string compressionlevel" ["2"]
This option turns on additional compression which makes DSMs even smaller without affecting quality. "0" means no additional compression is not recommended. "1" uses compression which has no significant speed impact. "2" is the default and usually creates quite smaller files at the expense of slightly longer generation time.
"string nomipmap" ["off"]
Disables or enables mipmapping for this deep shadow map. Mipmapping is enabled by default but one could save more than 25% of storage space by using raw DSMs. Be careful though, since mipmaped DSMs usually produce nicer results (especially when viewed from far away).
"string volumeinterpretation" ["discrete"]
Specifies whether the deep shadow map is used to compute shadows cast by solid objects or those cast by participating media (fog, clouds, smoke, etc). When rendering participating media shadows, one should specify "continuous" to this parameter. Default is "discrete".

EXAMPLE

# Write out a deep shadow map for participating media
Display "shadow.dsm" "dsm" "rgbaz"
    "string volumeinterpretation" ["continuous"]

There is not need to run tdlmake on files produced by this display driver since they are already in the right format. This display is limited to resolutions which are a power of two.

3Delight 8.5. Copyright 2000-2009 The 3Delight Team. All Rights Reserved.