Sounds like a bug to me. Can you try setting the blending mode of the texture to <div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size: 12px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><em>VTK_TEXTURE_BLENDING_MODE_MODULATE</em></span></div>
<div><font class="Apple-style-span" face="'Lucida Grande', Verdana, Geneva, Arial, sans-serif"><span class="Apple-style-span" style="font-size: 12px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><i><br>
</i></span></font></div><div><em></em><font class="Apple-style-span" face="'Lucida Grande', Verdana, Geneva, Arial, sans-serif"><span class="Apple-style-span" style="font-size: 12px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><i>Thanks, </i></span></font></div>
<div><font class="Apple-style-span" face="'Lucida Grande', Verdana, Geneva, Arial, sans-serif"><span class="Apple-style-span" style="font-size: 12px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><i><br>
</i></span></font><br><div class="gmail_quote">On Mon, Mar 7, 2011 at 7:35 AM, Zsolt V <span dir="ltr"><<a href="mailto:vtkzsolt@gmail.com">vtkzsolt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br><br>I am trying to cast shadows on textured surfaces. I use VTK 5.6 and the test code found in the package: TestShadowMapPass.cxx.<br>The original program works well, the shadows of the objects appear on the surface. However, when I add texture to the rectangle, shadows disappear.<br>
I added the following lines to the original code:<br><br>vtkSmartPointer<vtkImageReader2> floorReader = vtkSmartPointer<vtkPNGReader>::New();<br>vtkSmartPointer<vtkTexture> floorTexture;<br>floorReader->SetFileName(TEXTUREFILE);<br>
floorTexture = vtkSmartPointer<vtkTexture>::New();<br>floorTexture->InterpolateOn();<br>floorTexture->RepeatOn();<br>floorTexture->SetInput(floorReader->GetOutput());<br>rectangleActor->SetTexture(floorTexture);<br>
rectangleActor->GetProperty()->SetDiffuseColor(0.75, 0.75, 0.75);<br><br>What is the correct way to visualize both textures and shadows in VTK?<br>Thanks for your help in advance.<br><br>Best regards,<br><font color="#888888">Zsolt<br>
<br>
</font><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a href="http://www.kitware.com">www.kitware.com</a> <br>
</div>