I thought I may have found a bug but now I think it's more "the way things
are" so I'll report this as a tip of how to do/not do volume rendering in
DX. This problem appeared on both NT and SGI with more than one version of
compiled opendx on SGI so I think it's fundamental to the way DX works
rather than being an issue that needs to be addressed. File this in your
tips drawer for later.


Problem statement: I want to visualize a volume fraction, that is, a range
of values within a volume. That is, I don't want to look through a blue
haze to try to see the "good parts". Test data is 157x167x80 unsigned bytes.

One possible solution: Include a range of the data before passing this to
Image to volume render.

Result: this did work, but you got only 5 or 6 renders (say if you were
changing the rotation of the camera around the object) before DXEXEC went
zombie: kept running and running but never came back with the new render.

After some thought, we realized that this was demanding a huge amount of
effort to calculate the irregular set of voxels (culled by Include by
default). Not sure if the volume rendering routine uses octrees or what as
a data structure in this case, but it was believable that it would either
be very memory or CPU intensive. We might have been encountering a massive
garbage cleanup, but after waiting 10 minutes or more, I found it faster to
Disconnect and start a new server (instant garbage collection!).

Next idea: OK, dummy, so turn off CULL in Include, that is, keep the
underlying structure regular but add an 'invalid positions' array.

Result: Well, it sort of works, but it's even slower and hangs up even
sooner (maybe 2 renders).

After some thought, we decided that parsing the 2 million member invalid
positions array was probably at least as much work as walking the octree.

RIGHT ANSWER: And of course, this is documented... In Colormap, set the
range of data you DON'T want to see to ALL BLACK and 0.0 Opacity.

Result: You can rotate and zoom and muck around all day, without DXEXEC
zombie'ing on you.

Note that this is NOT the same as using Colormap to exclude part of the
range (thereby creating "invalid positions"). Apparently, the volume
renderer can simply and quickly integrate "all black, completely
transparent" voxels with non-black&&non-transparent voxels.

DOWNSIDE: You don't have an easy to dial up range like with Include. I
have, with effort, manufactured "colormaps" to mark off ranges. It's too
bad it's not as easy as just hooking a couple Scalars to Include but them's
the breaks.

Chris Pelkie
Vice President/Scientific Visualization Producer
Conceptual Reality Presentations, Inc.
30 West Meadow Drive
Ithaca, NY 14850
[EMAIL PROTECTED]

Reply via email to