• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..23-Jan-2022-

m4/H23-Jan-2022-611532

AUTHORSH A D23-Jan-202267 83

ChangeLogH A D23-Jan-2022454 149

DtexToExr.cppH A D23-Jan-202217.6 KiB556420

Makefile.testH A D23-Jan-20221.4 KiB6040

PxBaseDeepHelper.hH A D23-Jan-20227.7 KiB275183

PxDeepOutPixel.hH A D23-Jan-20222.8 KiB11186

PxDeepOutRow.hH A D23-Jan-20227.4 KiB244186

PxDeepUtils.cppH A D23-Jan-20223.7 KiB14496

PxDeepUtils.hH A D23-Jan-202217.9 KiB452166

PxFourChanDeepRgba.hH A D23-Jan-202215.1 KiB456306

PxOneChanDeepAlpha.hH A D23-Jan-202210.9 KiB355240

PxOneChanDeepOpacity.hH A D23-Jan-202214.9 KiB442281

READMEH A D23-Jan-20224.1 KiB8670

bootstrapH A D23-Jan-20221.5 KiB6547

configure.acH A D23-Jan-20225.2 KiB229188

README

1//-*****************************************************************************
2
3Pixar's Dtex to Exr conversion utility
4Aug 1, 2012 - first checkin to OpenEXR 2.0 branch of OpenEXR git repository.
5
6This utility converts a DTEX deep shadow file to an OpenEXR 2.0 deep exr file,
7formerly, ".odz" (or .dexr, or whatever extension your facility may use). As of
8the first checkin, the utility only supports 1, 3, or 4-channel dtex files,
9corresponding to deep alpha or deep RGBA only.  The Nuke DTEX reader, which
10uses basically the same code, will support a more complete arbitrary channel
11set, and this utility may be upgraded as well. We also only support a single
12view for the time being.
13
14DTEX has a complicated set of interpretations, which represent six separate
15code paths for conversion to the deep representation in OpenEXR 2.0. They
16represent the permutations of these exemplary Display Driver config strings
17to prman:
18
19Display "+filename.dtex" "deepshad" "deepopacity" "string volumeinterpretation" "continuous"
20Display "+filename.dtex" "deepshad" "deepopacity" "string volumeinterpretation" "discrete"
21Display "+filename.dtex" "deepshad" "a" "string volumeinterpretation" "continuous"
22Display "+filename.dtex" "deepshad" "a" "string volumeinterpretation" "discrete"
23Display "+filename.dtex" "deepshad" "rgba" "string volumeinterpretation" "continuous"
24Display "+filename.dtex" "deepshad" "rgba" "string volumeinterpretation" "discrete"
25
26In our terminology, these six options are called:
27
28OneChanDeepOpacityContinuous
29OneChanDeepOpacityDiscrete
30OneChanDeepAlphaContinuous
31OneChanDeepAlphaDiscrete
32FourChanDeepRgbaContinuous
33FourChanDeepRgbaDiscrete
34
35Renderman will write out both 1-channel and 3-channel opacity in the
36"deepopacity" case, which we currently only use the first channel of, as
37we are only targeting a single opacity curve in space. This may evolve in
38the future.
39
40There are weird gotchas for each of these 6 cases, and they are documented
41in the PxDeepUtils.h file, along with specific comments in each of the six
42header files that correspond to each case:
43
44PxOneChanDeepOpacityContinuous.h
45PxOneChanDeepOpacityDiscrete.h
46PxOneChanDeepAlphaContinuous.h
47PxOneChanDeepAlphaDiscrete.h
48PxFourChanDeepRgbaContinuous.h
49PxFourChanDeepRgbaDiscrete.h
50
51The gotchas relate to several issues, mostly to do with coincident or
52out-of-order samples, precision issues, compression artifacts, and the
53differences between the "deepopacity" vs "deepalpha" interpretations.
54
55With "deepopacity" (the pre-prman 16 usage), opacity values stored in
56dtex files were accumulated, so they were bounded between 0 and 1. The
57values stored are actually not opacities, but rather transmissivities
58(1-opacity), and monotonically decreased from fully transparent (1)
59to fully opaque (0). This representation is ideal for meaningful error
60minimization during  compression, and also for usage as a shadow map
61by a renderer, because the extinction at a particular depth, at a
62particular pixel, can be evaluated with a single look-up. However,
63this representation is poor for deep compositing, because each of the
64samples includes data from smaller depth samples, and recombination is
65difficult. With these types of files, when using volumetric (continuous)
66interpretation, the samples represent the accumulated transmissivity at
67the NEAR SIDE of a depth span, and our code paths take this into account.
68
69With all other usages - "a" and "rgba", the values represent filtered
70samples of the given field at that point in space. The alpha values
71will be between 0 and 1, but are not guaranteed to be increasing or
72decreasing. This presents a strange problem for volumetric interpretation,
73as what does it mean to describe the alpha of an infintesimally small
74region of space (point sample). The best interpretation of the data
75in this case uses the alpha to represent the accumulated opacity of
76the region of space nearer than the sample, and thus each sample
77represents the FAR SIDE of a depth span. Our code paths take this into
78account as well.
79
80Please see the files for additional comments, and the command
81"dtexToExr" may be run with -h, --h, --help, or no arguments to
82print its usage.
83
84-Christopher Horvath, Aug 2012, Pixar
85
86