comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to avoid texture-map overlapping?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to avoid texture-map overlapping? [message #46368 is a reply to message #46367] Tue, 15 November 2005 09:24 Go to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Mon, 14 Nov 2005 16:46:26 -0800, uniqrat wrote:

> Hi,all
> Here is my program:
>
snip
>
> I want to make the beam transparent.So I put a texture on it. But it is
> overlapped.
> How can I map it uniformly?
> Thanks a lot.

Oooh, you are hitting the classic translucent polygon sorting problem.

Search the newsgroup archives for "pimento" (yes, really) and strings like
"BSP", "transparency", and "polygon", etc...

The basic explanation is that when you are drawing translucent meshes like
this, you have to draw them back to front in order to get the correct
visual effect.

When you can rotate an object like yours with XOBJVIEW, there are going to
be few orientations where it will look correct.

In the general case, you'd have to sort your mesh and reorder the polygons
in it every time the view angle changes so that the polygons draw back to
front. I may have posted an example of an experimental BSP polygon object
that does this sort of thing.

In some special cases, like if the mesh is a sphere, you can create a
small number (like 4 or 8) of IDLgrPolygon objects, each with the
individual polygons sorted for one of 4 or 8 orientations, and then select
with the HIDE property the one with the orientation appropriate for the
current viewing angle. This isn't as hard as it sounds, and might work
for your "ray", since it has topology similar to a sphere, if you can get
rid of that dimple in the front.

Anyway, look through the newsgroup archives, as this has been covered
quite a bit.

Karl
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: strjoin - IDL 4 dummies
Next Topic: Writing Large Tiff Image file with Write_tiff

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 03:03:57 PDT 2025

Total time taken to generate the page: 0.47929 seconds