[vtkusers] Cylindric surface not textured properly
Heidler, Kirstin (GE Oil & Gas)
Kirstin.Heidler at ge.com
Wed Aug 29 12:03:45 EDT 2012
Hello,
I wrote my own source (like CylinderSource, CubeSource etc.) This works
very well.
I set all normals as well as texture coordinates.
Everything works fine and even the Texture gets drawn properly EXCEPT
that the last Quad (the Quad with the id 359 if you have a resolution of
360) does not get textured with the actual texture but with some
rubbish. (I am not sure: it might be that it repeats the texture or some
small condensed part of it)
The texture I am using is one I created using vtkImageCanvasSource2D.
This works just fine.
I think I know what the problem is: when the cylindric surface gets
drawn the Point with Id 0 is assinged texture coordinates (0, 0,
0)(Bottom left corner of the texture).
Actually the texture should end at the point with id 1(I hope you can
follow me). This Point should have the coordinates (1, 1, 0)(Upper right
corner of the texture).
Unfortunately the Point with id 1 gets the coordinates (1, 0, 0) which
is also correct, because it should also have the bottom right corner of
the texture.
The Problem is, that a point can only have one texture coordinate. As it
is in vtkCylinderSource the Point with the id resolution*2-1(In this
case 719) gets the upper right corner of the texture.
Is there any smart way to solve this?
I think this problem also exists with vtkCylinderSource?
Thank you,
Kirstin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120829/a7793334/attachment.htm>
More information about the vtkusers
mailing list