Hi Zsolt,<div><br></div><div>I was able to reproduce the bug (not exactly what you are getting). I have worked on shadows before but not in VTK. I will see if I can fix this sometime soon (or if you do please submit your code in gerrit or via patch, first would be preferred though). </div>
<div><br></div><div>I am going to submit a bug report for this. </div><div><br>Thanks,</div><div><br><div><br><div class="gmail_quote">On Mon, Mar 7, 2011 at 3:20 PM, Zsolt V <span dir="ltr">&lt;<a href="mailto:vtkzsolt@gmail.com">vtkzsolt@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thanks for the response.<br>Yes, I tried <span style="font-family:&#39;Lucida Grande&#39;,Verdana,Geneva,Arial,sans-serif;font-size:12px"><i>VTK_TEXTURE_BLENDING_MODE_MODULATE, and I&#39;ve got the same</i></span> result.<br>

(I tried all other blending modes as well, without success.)<br><br>Zsolt<br><br><div class="gmail_quote">2011/3/7 Aashish Chaudhary <span dir="ltr">&lt;<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>&gt;</span><div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">Sounds like a bug to me. Can you try setting the blending mode of the texture to <div><br></div>
<div><span style="font-family:&#39;Lucida Grande&#39;,Verdana,Geneva,Arial,sans-serif;font-size:12px"><i>VTK_TEXTURE_BLENDING_MODE_MODULATE</i></span></div>
<div><font face="&#39;Lucida Grande&#39;, Verdana, Geneva, Arial, sans-serif"><span style="font-size:12px"><i><br>
</i></span></font></div><div><i></i><font face="&#39;Lucida Grande&#39;, Verdana, Geneva, Arial, sans-serif"><span style="font-size:12px"><i>Thanks, </i></span></font></div>
<div><font face="&#39;Lucida Grande&#39;, Verdana, Geneva, Arial, sans-serif"><span style="font-size:12px"><i><br>
</i></span></font><br><div class="gmail_quote"><div><div></div><div>On Mon, Mar 7, 2011 at 7:35 AM, Zsolt V <span dir="ltr">&lt;<a href="mailto:vtkzsolt@gmail.com" target="_blank">vtkzsolt@gmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div>
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&lt;vtkImageReader2&gt; floorReader = vtkSmartPointer&lt;vtkPNGReader&gt;::New();<br>vtkSmartPointer&lt;vtkTexture&gt; floorTexture;<br>floorReader-&gt;SetFileName(TEXTUREFILE);<br>



floorTexture = vtkSmartPointer&lt;vtkTexture&gt;::New();<br>floorTexture-&gt;InterpolateOn();<br>floorTexture-&gt;RepeatOn();<br>floorTexture-&gt;SetInput(floorReader-&gt;GetOutput());<br>rectangleActor-&gt;SetTexture(floorTexture);<br>



rectangleActor-&gt;GetProperty()-&gt;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></div></div>_______________________________________________<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&amp;D Engineer         <br>| Kitware Inc.            <br>| <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>    <br>
</div>
</blockquote></div></div></div><br>
</blockquote></div><br><br clear="all"><br>-- <br>| Aashish Chaudhary <br>| R&amp;D Engineer         <br>| Kitware Inc.            <br>| <a href="http://www.kitware.com">www.kitware.com</a>    <br>
</div></div>