Hi Tim, many thanks<br>I've read something similar in another thread. I've been trying to add texture coords in a simple example using vtkjpegreader, but I don't get any good results. What I do is to add Tcoords to a polydata, then map the polydata whit a Polydatamapper and then add the mapper and a texture to the actor. Is that correct?
<br>Also I would like to keep the question of my first post hot: Is it possible to change Polydata point values in a vtkTextureMapToPlane but keeping the rest of the information? <br><br><div><span class="gmail_quote">On 9/3/07,
<b class="gmail_sendername">Tim Hutton</b> <<a href="mailto:tim.hutton@gmail.com">tim.hutton@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Godofredo,<br><br>VTK doesn't support per-face texturing natively. You can get the same<br>effect by splitting the vertices - duplicating them so that at a<br>junction between e.g. 6 triangles, there are 6 vertices, all with the
<br>same spatial coordinates but different texture coordinates.<br><br>If you look in vtkOBJReader that's the approach it uses where<br>necessary, to read-in the OBJ format (which does support per-face<br>textures).<br>
<br>To manipulate the texture coordinates, just use<br>my_polydata->GetPointData()->GetTCoords().<br><br>Tim<br><br>On 03/09/07, Godofredo <<a href="mailto:godofredoiii@gmail.com">godofredoiii@gmail.com</a>> wrote:
<br>><br>> Sorry for replying myself but I'm frustrated. Another question I have: Is it<br>> possible to change Polydata point values in a vtkTextureMapToPlane? I've<br>> tried doing:<br>> vtkTextureMapToPlane *planeMap = vtkTextureMapToPlane::New();
<br>> planeMap->GetPolyDataOutput()->SetPoints(vPoints);<br>> Where vPoints is the new array of point values.<br>><br>> But this doesn't seem to work at all.<br>><br>><br>> Godofredo wrote:<br>
> ><br>> > Hi. I'm trying to add texture to a region of a 3d polydata. The texture is<br>> > a .jpeg file and the polydata is a triangulated point cloud. I would like<br>> > to know if it's possible to manually assign a region of the .jpeg image to
<br>> > each triangle. I don't know if this can be done with the tcoords field.<br>> > Any guidance will be apreciated as I'm a bit stuck. Many thanks in<br>> > andvance<br>> ><br>><br>> --
<br>> View this message in context: <a href="http://www.nabble.com/Per-triangle-texturing.-Please-help%21%21-tf4371233.html#a12460175">http://www.nabble.com/Per-triangle-texturing.-Please-help%21%21-tf4371233.html#a12460175
</a><br>> Sent from the VTK - Users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>><br>> _______________________________________________<br>> This is the private VTK discussion list.<br>
> Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers">
http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br><br><br>--<br>Tim Hutton - <a href="http://www.sq3.org.uk">http://www.sq3.org.uk</a><br><br>Take the Organic Builder challenge -<br><a href="http://www.sq3.org.uk/Evolution/Squirm3/OrganicBuilder/">
http://www.sq3.org.uk/Evolution/Squirm3/OrganicBuilder/</a><br></blockquote></div><br>