[vtkusers] Mixed Color with Depth Peeling

LiPan li76pan at hotmail.com
Mon Nov 10 08:17:39 EST 2014


Dear all,
I was trying to use Depth Peeling to display several translucent polydata in one 3D scene. The problem is, if their colors are set with SetColor, everything works fine. However, if texture mapping is applied to one of the polygon, the colors of the rest polydata are mixed up with color of this texture map.

In the attached simplified example code, I was trying to create two polydata. One is quad, the other is cube. Quad got a texture which is loaded from a jpg file. The image is nothing more than a square of red color. The color of cube is white. Opacity of both were set to 0.5. So, if you run the program, you'll see the cube polygon becomes red which comes from the texture image.

I'm using vtk6.0 under Kubunto 12.04. glxinfo shows OpenGL version string: 4.4.0 NVIDIA 331.38. I've read the paper of Depth Peeling by Cass Everitt. Still couldn't understand where the problem comes from. Could anyone give me a hint?

Thank you
Pan



 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141110/b0b5465b/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DepthPeerlColorMix.cxx
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141110/b0b5465b/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: texture.jpg
Type: image/jpeg
Size: 1808 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141110/b0b5465b/attachment.jpg>


More information about the vtkusers mailing list