Hi Youpie,<br><br>Thank you very much for your reply.<br><br>I tried in your way. But the position of the texture doesn&#39;t look right. The image I used is not the original texture map for the model. So I&#39;m wondering if that causes the failure. Do I have to pre-process the texture map?<br>
<br>Many thanks!<br><br>Long<br><br><div class="gmail_quote">2011/11/17 youpie <span dir="ltr">&lt;<a href="mailto:meriadegp@yahoo.fr">meriadegp@yahoo.fr</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
creat a vtkFloatArray with size of vtkPoints size and associate the good<br>
coordinate texture for each point.<br>
After : polydata-&gt;getPointData-&gt;setTcoord(you vtkFloatArray)<br>
<br>
For load the texture, use a vtkTexture and the good vtkReader for you<br>
picture format vtkPGNReader ( for PGN picture (for instance).<br>
<br>
 char* fname1 =<br>
            vtkTestUtilities::ExpandDataFileName(1, new char*(),<br>
&quot;myPicture.png&quot;);<br>
<br>
    vtkPNGReader * imageReader = vtkPNGReader::New();<br>
    imageReader-&gt;SetFileName(fname1);<br>
<br>
texture-&gt;SetInputConnection(imageReaderRed-&gt;GetOutputPort());<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Texture-Mapping-with-2D-Texture-Coordinates-tp4997298p5000665.html" target="_blank">http://vtk.1045678.n5.nabble.com/Texture-Mapping-with-2D-Texture-Coordinates-tp4997298p5000665.html</a><br>

Sent from the VTK - Users mailing list archive at Nabble.com.<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>
</font></span></blockquote></div><br>