[vtkusers] Please Help

Lisa Avila lisa.avila at kitware.com
Sun Feb 1 01:48:25 EST 2004


Hello,

VTK does use OpenGL (or Mesa) for the hardware rendering. You can find all 
the code in the Rendering directory in the vtkOpenGL* files. The hardware z 
buffer is used and you can see in vtkOpenGLRenderWindow.cxx that a less 
than or equal function is used (a pixel will be overwritten if the new z 
value is less than or equal to the one currently stored in the z buffer).

What you are trying to do does not sound straight-forward. The frame buffer 
only stores one result per pixel - you want more than one. You could 
consult the z buffer after every polygon is drawn and save the results 
(adding any changes into your own modified z buffer that can store multiple 
results per pixel) but that would be very very slow. There are some 
specialized OpenGL extensions supported by some graphics cards that can 
help you do this - but again this is not a simple change to the VTK code base.

Lisa






At 12:52 AM 2/1/2004, Mayuresh Dalal wrote:
>Hi People,
>
>Please help me......Can someone please tell me which is the method where 
>Z-buffering is actually
>performed for each pixel?
>
>I need to modify the way z buffering is performed and also the way Z 
>buffer is used for displaying objects/props
>
>Does vtk rely on OpenGL z-buffering or does it have its own explicit 
>z-buffering ?   If, can someone point out the C++ method where z-buffering 
>is performed in VTK ?
>
>Ok, in the terminology that I am used to(might differ with some of you), 
>frame buffer is the array in which all pixel info( R,G,B,A,Z) is stored 
>and is used to plot indivisual pixels on the screen.
>
>I want to render 2 objects. Areas of object 2 are occluded behind object 
>1.I want to preserve the data corresponding to the OCCLUDED areas, which 
>are traditionally eliminated / overwritten in the frame buffer. I want to 
>preserve the data so that I can use it when looking at the same 2 objects
>from a different camera position.
>
>how should I go about backing up that info before it is lost/overwritten 
>in the framebuffer?
>
>I need to stop the removal of FRONT FACING , but HIDDEN surfaces.
>
>Is there a way of doing this?
>
>Please help me.
>
>_________________________________________________________________
>Let the new MSN Premium Internet Software make the most of your high-speed 
>experience. http://join.msn.com/?pgmarket=en-us&page=byoa/prem&ST=1
>
>_______________________________________________
>This is the private VTK discussion list. Please keep messages on-topic. 
>Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list