[vtkusers] Two or more .jpg textures mapped to a Polydata

Wes Turner wes.turner at kitware.com
Fri Jul 20 08:25:28 EDT 2007


To my knowledge, there is no simple way to do what you want.

1 - For mapping a texture to part of an image, the easiest course is to turn
mirroring off on the texture so that instead of replicating the image, the
texturer extends the boundary of the image to the rest of the plane.  Then
put a one pixel border around your texture jpegs that is the background
color you desire on the untextured regions of the part.  This one pixel
border will then be the only color replicated.  I don't remember the
specific calls, but some combination of calls to the actor and texturer
should handle the first question, while creating the boundary can be managed
through the image pad filters.

2 - You are limited by one texture per actor.  To use multiple textures with
an actor, you will need to either synthesize your multiple textures into
one, or divide your single actor into multiples.

A first attempt at this is:

Query Results from the ADS Database

Retrieved 1 abstracts, starting with number 1.  Total number selected: 1.

   author = {{Turner}, W. and {Drake}, T. and {Osterkamp}, M. and
{Kaiser}, D. and
	{Miller}, J. and {Tu}, P. and {Wilson}, C.},
    title = "{Using Computer Vision to Map Laser Ultrasound Onto CAD
booktitle = {Review of Progress in Quantitative Nondestructive Evaluation},
     year = 2003,
   series = {American Institute of Physics Conference Series},
   volume = 657,
   editor = {{Thompson}, D.~O. and {Chimenti}, D.~E.},
    month = mar,
    pages = {340-350},
      doi = {10.1063/1.1570156},
   adsurl = {http://adsabs.harvard.edu/abs/2003AIPC..657..340T},
  adsnote = {Provided by the Smithsonian/NASA Astrophysics Data System}

- Wes

On 7/20/07, Godofredo <godofredoiii at gmail.com> wrote:
> Hi to all. I have a triangulated 3D model and I would like to add textures
> to
> it from a set of jpg images. My 3D model is stored as a Polydata. I've
> reading and looking at some examples but I'm a bit lost. There are some
> points which I'm not able to figure out how to do:
> -In a simple example of mapping an image to a plane, how do I map the
> Image
> only to a certain region of the plane, and have no texture in the rest of
> the plane? Can this be done? I've tried this in a simple example with
> "vtkTextureMapToPlane" and "vtkTransformTextureCoords". The texture is
> mapped to the region I want but it is also displayed as a mosaic in the
> rest
> of the plane I map it to.
> -Is it posible to have a simple actor with two or more different textures
> added?
> -If so, how do I overlap those textures? I mean, the jpg Images I have
> correspond to certain regions of the model and in some regions they
> overlap.
> Is there a way to do this?
> Hope someone please give me any advise. Many thanks to all.
> --
> View this message in context:
> http://www.nabble.com/Two-or-more-.jpg-textures-mapped-to-a-Polydata-tf4115864.html#a11704498
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

Wesley D. Turner, Ph.D.
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x120
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070720/b6a350b7/attachment.htm>

More information about the vtkusers mailing list