[vtkusers] textured polydata to image ?
Sebastien BARRE
seb-ml-vtk at barre.nom.fr
Mon Sep 11 19:42:53 EDT 2000
Hi
Any idea on how I could transform a planar *textured* polydata to the
corresponding image ?
My polydata lies in that plane :
0.0 <= X <= 1.0,
0.0 <= Y <= 1.0,
Z = 0.0
It has texture coordinates, and a vtkTexture.
I tried vtkShepard, but it does not interpolate/incorporate texture values,
it just use scalars.
Should I use the rendering pipeline directly and save the window to an
image, or use a vtkRendererSource ?
=> I tried vtkPolyDataMapper2D, but it needs a vtkActor2D, which does not
accept any texture (why ? :)
=> I tried vtkRendererSource, but it needs a renderer, and to call
Render(), therefore it has to be visible, and I can not afford that, I have
to do the conversion behind the user.
The texture I'm applying on my planar polydata is not a planar image,
otherwise it would be just too easy. Basically my polydata was a 3D
textured model with complexe tcoords, I applied cylindrical texture
coordinates mapping on it (vtkTextureMapToCylinder), then flattened the 3D
model using these texture coordinates (points coords = tcoords, Z = 0),
then Delaunay triangulation, and here am I : a polydata representation of
whatever texture was projected on my original 3D model. Now I need to save
that texture as an image, so that it might be used as a real texture.
Thanks
More information about the vtkusers
mailing list