[vtkusers] problem with vtkTextureMapToPlane
Maurizio Turatti
mturatti at ais.it
Fri Sep 8 08:57:29 EDT 2000
Hi,
I'll explain what I'm doing, then the problem. I have a set of terrains
(PolyData) built from elevation points, with this pipeline:
vtkStructuredPointsReader
vtkStructuredPointsGeometryFilter
vtkWarpScalar
vtkCastToConcrete
vtkTriangleFilter
vtkDecimate
vtkPolyDataWriter
So, I start with StructuredPoints and I write to disk a PolyData. The initial
datasets are 205x205 elevation values each.
Then, I have a set of related textures (1024x1024 .bmp) and I map them on
meshes. Here is the simple rendering pipeline for each terrain.
vtkPolyDataReader
vtkPolyDataNormals
vtkTextureMapToPlane
vtkDataSetMapper
The problem here is that some terrain shows the texture flipped, so I have to
manually change and save them. I don't know where the problem is, I tried not to
decimate, but nothing changes (in this case I have a constant number of
triangles). So I guess it depends on the way vtkTextureMapToPlane works with my
polydata. I really want to avoid this manual procedure!
Is there something I miss, for example is there a different way to map textures?
I also tried with vtkProjectedTexture and the flipping disappeared, but the
mapping is rather imprecise on terrain edges. What in your opinion is the best
way to map a texture on a terrain?
(BTW, I'm using VTK Nightly 05/29/2000).
Thanks,
Maurizio
More information about the vtkusers
mailing list