Re: Mapping an Image to a Polygon Object [message #30745] |
Wed, 15 May 2002 11:56 |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
Try looking at David Fanning's texture_surface.pro program.
www.dfanning.com
In short, you need to specify the texture coordinates for your polygon using
the texture_coord keyword. The texture coords map a normalized pixel value
from your texture map to a vertex on your polygon.
You may also want to search the newsgroup using google groups. This topic
comes up again and again...
-Rick
"Brian Bell" <sailfalmouth@yahoo.com> wrote in message
news:f65c611a.0205151015.2bef0341@posting.google.com...
> I need to map an image to be displayed on a polygon object. Can
> someone explain to me how I can do this?
>
> I've tried using Texture_Map, but I can't get it to work properly.
>
> Thanks,
>
> Brian
|
|
|
Re: Mapping an Image to a Polygon Object [message #30747 is a reply to message #30745] |
Wed, 15 May 2002 11:53  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning (david@dfanning.com) writes:
> Brian Bell (sailfalmouth@yahoo.com) writes:
>
>> I need to map an image to be displayed on a polygon object. Can
>> someone explain to me how I can do this?
>>
>> I've tried using Texture_Map, but I can't get it to work properly.
>
> I think you have identified the crux of the problem: you
> have to get the Texture_Map to work properly. :-)
>
> The place I always get stuck is creating the Texture_Coordinates,
> which maps each vertex of each of the the polygons to a particular
> location or pixel in the image I'm trying to map. I don't think
> there is any particular way to do it. I stare at the documentation
> until I'm cross-eyed, try to touch my nose with my tongue, then
> plunge in and make mistake after mistake. After a couple of hours
> of this, I usually get something to work.
>
> Well, let's just say that's my method. I'd be happy to
> hear someone else's. :-)
Whoops! I forgot to mention that I wrote an article once about
how do to this on a surface. It might be of some help to you.
http://www.dfanning.com/ographics_tips/imgtex.html
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Mapping an Image to a Polygon Object [message #30748 is a reply to message #30747] |
Wed, 15 May 2002 11:49  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Brian Bell (sailfalmouth@yahoo.com) writes:
> I need to map an image to be displayed on a polygon object. Can
> someone explain to me how I can do this?
>
> I've tried using Texture_Map, but I can't get it to work properly.
I think you have identified the crux of the problem: you
have to get the Texture_Map to work properly. :-)
The place I always get stuck is creating the Texture_Coordinates,
which maps each vertex of each of the the polygons to a particular
location or pixel in the image I'm trying to map. I don't think
there is any particular way to do it. I stare at the documentation
until I'm cross-eyed, try to touch my nose with my tongue, then
plunge in and make mistake after mistake. After a couple of hours
of this, I usually get something to work.
Well, let's just say that's my method. I'd be happy to
hear someone else's. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|