Date
1 - 1 of 1
proper display transforms for Depth?
Jeremy Selan <jeremy...@...>
In Katana we have a few buttons in the monitor popup to control things like this:
toggle quoted message
Show quoted text
- First, we have a post-displaytransform color-correction where the user can specify viewmin, viewmax, viewgamma.(think pixel inspection). These default to 0.0, 1.0, 1.0. (code below) - Then we have a 'calc z' button, which when pressed analyzes the image using "depth appropriate" settings. (compute min,max but discarding all values < 1e-3, all value > something big, nans, and inf) map the mindepth to 1.0, the maxdepth to 0.0 (mimics how prman's 'sho' displays depth files.) It also should switch the input color space to data. - There's also the 'calc' button, which does the same thing but doesnt discard negatives/zero values, and then maps min to black, and max to white. -- Jeremy group = OCIO.GroupTransform() # First do a fit # catch any components where min == max newmin = [(i,0.0)[bool(i==j)] for i,j in zip(self.__viewMin, self.__viewMax)] newmax = [(j,1.0)[bool(i==j)] for i,j in zip(self.__viewMin, self.__viewMax)] mtx, offset = OCIO.MatrixTransform.Identity() mtx, offset = OCIO.MatrixTransform.Fit(newmin, newmax, (0.0,0.0,0.0,0.0), (1.0,1.0,1.0,1.0)) transform = OCIO.MatrixTransform() transform.setValue(mtx, offset) group.push_back(transform) # Second, add the exponent transform = OCIO.ExponentTransform() transform.setValue([1.0 / max(1e-6, v) for v in self.__viewGamma]) group.push_back(transform) self.__displayTransform.setDisplayCC(group)
On Tue, Mar 13, 2012 at 8:58 AM, Paul Miller <pa...@...> wrote:
|
|