[vtkusers] Texture coordinates in 3D

Tim Raupach tim.raupach at nicta.com.au
Thu Jun 30 01:13:45 EDT 2005


Hi all,

Firstly, thanks for your help with a previous problem I asked about.

I'm trying to understand how texture coordinates work - what I am trying 
to do is to map a 2D image as a texture onto a 3D vtkPolyData object.

I am having problems finding a solid definition of what texture 
coordinates actually mean. Is it the case that each point in a 
vtkPolyData object corresponds to a texture coordinate point (ie 
vtkPolyData point 0 is "mapped" to TCoord point 0?)? In my case that 
would mean that each x,y,z point in the vtkPolyData object is told to 
correspond to an x,y point in the texture image I am working with.

I have manually defined some texture coordinates as a vtkFloatArray and 
used GetPointData()->SetTCoords() to set the texture coords for my 
vtkPolyData object. Now, the texture image appears as tiny tiles across 
my 3D object, which is not what I am after.

Can anyone explain to me how texture coordinates work (or point me to 
some documentation on them)?

Thanks very much,

Tim

-- 
Tim Raupach




More information about the vtkusers mailing list