[vtkusers] create a texture map for an arbitrary surface

Tim Hutton T.Hutton at eastman.ucl.ac.uk
Tue Jul 22 05:47:23 EDT 2003


Hi John,

Well, if you map, say, a teapot using TextureMapToPlane then parts of the 
surface will be allocated the same part of the texture image, since the 
teapot gets projected onto a plane. If you have a routine that allows the 
user to paint the pixels in the texture image by pointing at the teapot 
with the mouse then the paint they apply may appear not only where they 
want but also somewhere else on the teapot! The same is true of the other 
TextureMapTo* filters.

I was wondering if there was some standard way of mapping an arbitrary set 
of polygons to the unit square of the texture image such that no polygon 
overlaps with any other. My idea was simply to map the triangles onto a 
grid (http://www.eastman.ucl.ac.uk/~thutton/tri_grid.jpg) but I wasn't sure 
if that was a good idea and was wondering if anyone else knew of a way to 
approach this. Of course multiple texture images is one solution.

I'm not actually writing a painting routine, I just want to texture a 
surface such that each bit of surface gets its own bit of texture (for 
human faces).

Tim.



At 10:27 22/07/2003 +0100, John Biddiscombe wrote:
>Tim,
>
>What do you mean? TextureMapToPlane effectively maps a unit square to your 
>dataset (you supply the extents of the plane though). In what way will you 
>be doing things different?
>
> > My thought is to simply map the list of triangles (ideally
> > polygons) onto
> > the unit square using a grid layout
>
>Care to elucidate?
>
>JB
>
> > -----Original Message-----
> > From: Tim Hutton [mailto:T.Hutton at eastman.ucl.ac.uk]
> > Sent: 21 July 2003 16:56
> > To: VTK Users
> > Subject: [vtkusers] create a texture map for an arbitrary surface
> >
> >
> > Hello vtk users,
> >
> > I would like to create a texture map for an arbitrary
> > polygonal surface
> > (for example, to enable painting of any 3D object) - is there
> > an easy way
> > to do this in VTK? I don't want to use vtkTextureMapToPlane
> > or similar
> > because these don't guarantee a unique bit of texture for
> > each part of the
> > object.
> >
> > My thought is to simply map the list of triangles (ideally
> > polygons) onto
> > the unit square using a grid layout, and use that for the texture
> > coordinates (duplicating vertices as necessary). Has anyone
> > done something
> > similar? Would such a class be useful in VTK?
> >
> > Thanks,
> >
> > Tim.
> >
> >
> > --------------------------------------------------------------
> > -------------
> > Tim Hutton,
> > http://www.eastman.ucl.ac.uk/~dmi/MINORI
> > Research Fellow & PhD student,
> > T.Hutton at eastman.ucl.ac.uk
> > MINORI Project, Biomedical Informatics Unit,
> > Eastman Dental Institute, UCL,                   Tel: [+44]
> > (0)20 7915 2344
> > 256 Gray's Inn Road, London WC1X 8LD, UK         Fax: on request
> > --------------------------------------------------------------
> > -------------
> > This email represents the views of the sender alone and must not be
> > construed as representing the views of the Eastman Dental
> > Institute. It may
> > contain confidential information and may be protected by law
> > as a legally
> > privileged document and copyright work. Its content should
> > not be disclosed
> > and it should not be given or copied to anyone other than the
> > person(s)
> > named or referenced above. If you have received this email in
> > error, please
> > contact the sender.
> >
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list