[vtk-developers] VTK and transparency problems

Lisa Avila lisa.avila at kitware.com
Fri Sep 30 17:46:06 EDT 2005


>>
>>Second, keep in mind that UpdateGeometry renders props, not actors. So - 
>>if you render a prop that is actually a vtkVolume twice, it will show up 
>>twice since the settings of glCullFace do not matter. You'll need to 
>>determine if the prop is a volume and not render it in either of your two 
>>passes, but render it between these two passes. So you wind up with three 
>>passes - one for non-volumes with front faces culled, then all volumes, 
>>then again for all non-volumes with back faces culled. Thinking about it 
>>- I am not sure it is the same sorting you need for the first and last 
>>pass - right? If you have nested spheres, A inside of B, and B inside of 
>>C, then you want to draw C, B, A (any volumes) A, B, C - right? You 
>>generally need to reverse the order for the second geometry pass....
>
>It is actually the same sorting (back to front) for both passes of 
>non-volume actors.

Yes - but to get back to front order for nested objects you either have to 
sort with two different criteria (one pass sorts by farthest bounds and the 
other sorts by closes bounds) or reverse the order, right? If you have 
nested spheres A in B in C and you sort by farthest distance then you get 
C, B, A as your back-to-front order. You draw this for back faces which is 
fine (outer sphere, B, then inner sphere), but if you use this same order 
for front faces you will again draw the outer sphere first, then B, then 
the inner sphere, which would be the wrong order at this point.

Lisa 





More information about the vtk-developers mailing list