<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//DE"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><TITLE>Message</TITLE></HEAD><BODY>Hallo,<br>&nbsp;<br>I try to work with texture in vtk. What i dont understand is the behaviour ot the object conserning the light sources<br>when they have a texture ?<br><br>So if i map a texture on an object the only shadow i get is a blue one. I tried ti change the settings of the light sources in the<br>renderer and the behaviour of the actors properties like ambient, diffuse and specular (in power and color ) ?<br><br>Can anyone help me understand the problem.<br><br>Thanks a lot..<br><br>Here is a part of my source code --&gt;<br><br>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkBMPReader&gt; bmpReader = vtkSmartPointer&lt;vtkBMPReader&gt;::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; bmpReader-&gt;SetFileName("skin04.bmp"); // --&gt; hier muss noch ein Absoluter Pfas gesetzt werden + Fehlerabfang !<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkTexture&gt; atext = vtkSmartPointer&lt;vtkTexture&gt;::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; atext-&gt;SetInputConnection(bmpReader-&gt;GetOutputPort());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; atext-&gt;RepeatOn();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; atext-&gt;InterpolateOn();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkProp3DCollection&gt; collection = m_PolyDataAssembly-&gt;GetParts();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkActor&gt; actor = vtkActor::SafeDownCast(collection-&gt;GetItemAsObject(3));<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; actor-&gt;GetProperty()-&gt;SetColor(255,255,255);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; actor-&gt;GetProperty()-&gt;SetAmbient (1);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; actor-&gt;GetProperty()-&gt;SetAmbientColor (0,0,0);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; actor-&gt;GetProperty()-&gt;SetDiffuse (0.1);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; actor-&gt;GetProperty()-&gt;SetDiffuseColor(0,0,0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; actor-&gt;GetProperty()-&gt;SetSpecular(0.5);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; actor-&gt;GetProperty()-&gt;SetSpecularColor(255,255,255);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkTextureMapToSphere&gt; tmapper = vtkSmartPointer&lt;vtkTextureMapToSphere&gt;::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; tmapper-&gt;SetInput(actor-&gt;GetMapper()-&gt;GetInput());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; tmapper-&gt;AutomaticSphereGenerationOn();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkTransformTextureCoords&gt; xform = vtkSmartPointer&lt;vtkTransformTextureCoords&gt;::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; xform-&gt;SetInputConnection(tmapper-&gt;GetOutputPort());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; xform-&gt;SetScale( 5.0, 5.0, 5.0);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkDataSetMapper&gt; mapper = vtkSmartPointer&lt;vtkDataSetMapper&gt;::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mapper-&gt;SetInputConnection(xform-&gt;GetOutputPort());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mapper-&gt;SetLookupTable(bmpReader-&gt;GetLookupTable());<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; actor-&gt;SetTexture(atext.GetPointer());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; actor-&gt;SetMapper(mapper);<br>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>


<br>--<br><!-- AdSpace freenet EMO Webmail Banner --> 
<a href="http://adserver.freenet.de/click.ng/site=fn&prod=chetools&kat=rub&tbl=webmail&ppos=14&TransactionID=1185519264624536&rgtg=256" target="_blank"><img src="http://adserver.freenet.de/image.ng/site=fn&prod=chetools&kat=rub&tbl=webmail&ppos=14&TransactionID=1185519264624536&rgtg=256" border="0"></a><!-- / AdSpace -->
</BODY></HTML>