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

Home » Public Forums » archive » Re: IDLgrPolygon semi opaque / transperent polygons
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: IDLgrPolygon semi opaque / transperent polygons [message #37276] Fri, 12 December 2003 10:15
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Neil" wrote in message...
> Is there any capability in IDL for making polygons semi-opaque? There
> you would set no hidden facet and be able to see one polygon through
> another polygon. This would be a useful facility for some spectral
> imaging wavebands where materials are semitransparent.

This has been covered in depth in previous posts. In general, you texture
map your IDLgrPolygon with an texture containing an alpha channel. From the
docs:

"Setting TEXTURE_MAP to the object reference of an IDLgrImage that contains
an alpha channel allows you to create a transparent IDLgrPolygon object. If
an alpha channel is present in the IDLgrImage object, IDL blends the texture
using the blend function src=alpha and dst=1 - alpha, which corresponds to a
BLEND_FUNCTION of (3,4) as described for the IDLgrImage object."

For transparent polygons to render properly in IDL you have to pay keen
attention to the order in which they are drawn. Order, both in relation to
other atoms in the scene and in relation to itself, needs to be back to
front. The order in which atoms are drawn depends on the order in which
they were placed in the view and the order they were placed in the model(s).
The order within an individual atom depends on how the connectivity list is
constructed.

For example, if you draw a transparent sphere and then a solid sphere behind
it, you will not see the solid sphere thru the transparent one because when
the transparent object was drawn nothing existed behind it. Reverse the
drawing order and you are golden.

Taking just the sphere, if it is constructed (as defined by the connectivity
array) from front to back, you will not see the back side of the sphere thru
the front because at the time the front polygons were drawn the back did not
exist. If you reverse the drawing order you'll see the back side of the
sphere.

I suspect this is enough to get you going :)

As you run into problems google this group. There is a lot of good info out
there.

-Rick
[Message index]
 
Read Message
Previous Topic: Re: Another VM conundrum
Next Topic: Re: Resolve iTools for Virtual Machine

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

Current Time: Sat Oct 11 12:16:27 PDT 2025

Total time taken to generate the page: 1.12038 seconds