<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi all,<br>I solved the problem. The trick is, vtkOpenGLTexture set the flag useTexture (used in vtkDepthPeeling_fs.glsl) to true and does not reset to zero again. This will map the same texture image to the following polygon data which actually does not use texture mapping. So I reset the flag to zero before a new actor is drawn in function vtkRenderer::UpdateTranslucentPolygonalGeometry(). This is only a quick and dirty solution of cause. <br>regards<br>Pan<br><br><br><div><hr id="stopSpelling">From: li76pan@hotmail.com<br>To: vtkusers@vtk.org<br>Date: Mon, 10 Nov 2014 21:17:39 +0800<br>Subject: [vtkusers] Mixed Color with Depth Peeling<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:΢ÈíÑźÚ;
}
--></style>
<div dir="ltr">Dear all,<br>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.<br><br>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.<br><br>I'm using vtk6.0 under Kubunto 12.04.<code> glxinfo </code>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?<br><br>Thank you<br>Pan<br><br><br><br> </div>
<br>_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers</div> </div></body>
</html>