From: Praveen Bhaniramka (praveenb++at++gauri.engr.sgi.com)
Date: 10/24/2002 15:46:15
Hi John,
Two situations -
1. If your polygonal geometry (the cube faces and the wireframe) is
opaque, you need to enable depth testing before you render the scene.
Also, you need to make sure that all your opaque geometry gets rendered
_before_ the semi-transparent geometry (the volume data in this case).
From frame # 391, for example, the depth ordering is definitely not
correct. The 4 quads comprising the planes look opaque to me... in that
case, you should make sure that they are rendered first! This should be
taken care of automatically if you are using pfVolume shipped with
Performer v2.5 and Volumizer 2.1 or later.
2. If your polygonal geometry is semi-transparent (if the green FRONT face
is actually one semi-transparent quad), then you need to do some more
work to get the correct sorting. Since your geometry is a planar quad,
things are still pretty simple however. Essentially, you can render the
volume data using two passes, as follows -
+------\---------------+
| \ | <---- Volume data
| \ <-- Plane |
| \ | <--- View direction
| \ |
+-----------\----------+
A B
1. Enable GL clip plane for plane
2. Render Volume Data (effectively renders A in the above figure)
3. Disable GL clip plane
4. Render geometry for the quad
5. Enable GL clip plane for -plane
6. Render Volume Data ((effectively renders B in the above figure)
7. Disable GL clip plane
This scheme essentially renders the geometry and the volume data in a
proper back to front order. Since your application uses Performer, I am
not entirely sure how you would accomplish the above... so I am CC'ing
this reply to info-performer to see if people there have any
suggestions.
hth,
Praveen
On Thu, 24 Oct 2002, John Kelso wrote:
> Hi again,
>
> Thanks for the speedy reply. Here's another question, which might be
> related.
>
> I load the head data and a cube. As I rotate the objects, the geometric
> data sometimes correctly occludes the head, and sometimes doesn't. In my
> particular case, at certain angles and with certain geometry, the
> volumetric data is incorrectly hidden by the geometric data. An exciting
> movie demonstrating this is avaible at:
>
> http://snoid.sv.vt.edu/~kelso/movie2.mov.gz
>
> Any ideas?
>
> Thanks again,
>
> -John
>
>
>
-- ----------------------------------------------------------------- Praveen Bhaniramka Member of Technical Staff (MTS) praveenb++at++sgi.com Advanced Graphics Division (650)933-1785 Silicon Graphics, Inc. -----------------------------------------------------------------
This archive was generated by hypermail 2b29 : Thu Oct 24 2002 - 15:46:27 PDT