<!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> <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 --><br><br>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br><br> vtkSmartPointer<vtkBMPReader> bmpReader = vtkSmartPointer<vtkBMPReader>::New();<br> bmpReader->SetFileName("skin04.bmp"); // --> hier muss noch ein Absoluter Pfas gesetzt werden + Fehlerabfang !<br> vtkSmartPointer<vtkTexture> atext = vtkSmartPointer<vtkTexture>::New();<br> atext->SetInputConnection(bmpReader->GetOutputPort());<br> atext->RepeatOn();<br> atext->InterpolateOn();<br><br> vtkSmartPointer<vtkProp3DCollection> collection = m_PolyDataAssembly->GetParts();<br> vtkSmartPointer<vtkActor> actor = vtkActor::SafeDownCast(collection->GetItemAsObject(3));<br><br> actor->GetProperty()->SetColor(255,255,255);<br> actor->GetProperty()->SetAmbient (1);<br> actor->GetProperty()->SetAmbientColor (0,0,0);<br> actor->GetProperty()->SetDiffuse (0.1);<br> actor->GetProperty()->SetDiffuseColor(0,0,0);<br> actor->GetProperty()->SetSpecular(0.5);<br> actor->GetProperty()->SetSpecularColor(255,255,255);<br> <br> vtkSmartPointer<vtkTextureMapToSphere> tmapper = vtkSmartPointer<vtkTextureMapToSphere>::New();<br> tmapper->SetInput(actor->GetMapper()->GetInput());<br> tmapper->AutomaticSphereGenerationOn();<br><br> vtkSmartPointer<vtkTransformTextureCoords> xform = vtkSmartPointer<vtkTransformTextureCoords>::New();<br> xform->SetInputConnection(tmapper->GetOutputPort());<br> xform->SetScale( 5.0, 5.0, 5.0);<br><br> vtkSmartPointer<vtkDataSetMapper> mapper = vtkSmartPointer<vtkDataSetMapper>::New();<br> mapper->SetInputConnection(xform->GetOutputPort());<br> mapper->SetLookupTable(bmpReader->GetLookupTable());<br><br> actor->SetTexture(atext.GetPointer());<br> actor->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>