[vtkusers] Texture map a polygon
Bill Lorensen
bill.lorensen at gmail.com
Tue Nov 17 13:17:31 EST 2009
You need to define texture coordinates for each point in the polydata.
Texture coordinates are part of a polydata's pointdata. Then you need
to assign a texture the actor that contains the polygon.
Texture coordinate (0,0) corresponds to pixel (0,0) and coordinate
(1,1) corresponds to the last pixel in the texture.
I think the vtk textbook explains all of this. Actually, any computer
graphics book will do the same. Generating texture coordinates for
arbitrary shapes is still a research problem.
Bill
On Tue, Nov 17, 2009 at 1:06 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> I can texture map a plane:
> http://www.vtk.org/Wiki/Texture_map_a_plane
>
> But how would I texture map a polygon? Say I have 4 points that define a
> quad (lets say a rectangle) - how would I map an image onto this polygon?
>
> Thanks,
>
> David
>
> _______________________________________________
> 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
>
>
More information about the vtkusers
mailing list