[vtkusers] Texture Mapping with 2D Texture Coordinates

Wenlong Wang scc.wwl at gmail.com
Fri Nov 18 03:55:14 EST 2011


Yes, I did set the number of components and number of tuples explicitly.
However, the texture is not positioned right.

I think it because I used a picture which doesn't belong to the dataset.
So, my question is, should I process the image in some way before I map it
onto the model? if so, what should I do?

Thank you very much.

Wenlong

2011/11/18 youpie <meriadegp at yahoo.fr>

> You mean you work on the texture loaded ?
>
> I make a little mistake in my last answer.
>
> Not good :
> creat a vtkFloatArray with size of vtkPoints size and associate the good
> coordinate texture for each point.
>
> good :
> creat a vtkFloatArray with size of 2 * vtkPoints size and associate the
> good
> coordinate texture for each point. So don4y forget :
>  floatArray->SetNumberOfComponents(2);
>        floatArray->SetNumberOfTuples( vtkPoints size);
>        floatArray->SetTuple2(i, tx, ty);
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Texture-Mapping-with-2D-Texture-Coordinates-tp4997298p5003697.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111118/503e070d/attachment.htm>


More information about the vtkusers mailing list