[vtkusers] Associate texture with polydata

David Doria daviddoria+vtk at gmail.com
Sun Nov 15 18:53:59 EST 2009


> The vtkActor has a SetTexture method that allows you to associate a
> vtkTexture
> object with polydata.  The vtkTexture is essentially a mapper that takes a
> vtkImageData and turns it into an OpenGL texture.
>
> The vtkPlaneSource should produce a polydata that already has the proper
> texture coordinates to map the points of the plane to the corners of the
> image.
> There is also a vtkTextureMapToPlane filter that can be used to add texture
> coordinates to a polydata.
>
> AFAIK none of the VTK file formats allow textures to be stored with
> polydata,
> but they will at least save the texture coordinates.
>
>    David
>

Hm, I'm not sure that will help. Let me explain what I am actually trying to
do. I have a text file with 50 sets of camera parameters (describing 50
camera positions and orientations). I have a folder of 50 images - one for
each camera. What I am trying to do is create a plane for each camera and
texture map the corresponding image onto the plane. Then I want to load the
scene in paraview. You can see how I wouldn't want to select manually 50
images to map onto each of the planes. I actually don't even know how that
would work if there is more than 1 plane in the polydata (if I used
vtkAppendPolyData).

Do anyone have any other suggestions now that you know the full story?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091115/04aa40b3/attachment.htm>


More information about the vtkusers mailing list