MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Transparent Layering w/ Solids

  • To: mathgroup at
  • Subject: [mg26561] Re: Transparent Layering w/ Solids
  • From: Jens-Peer Kuska <kuska at>
  • Date: Fri, 5 Jan 2001 22:22:58 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <92k1b0$> <92uru4$> <933mqg$>
  • Sender: owner-wri-mathgroup at

Hi Martin,

thanks for this nice solution.

> Of course, this is far from being as powerful as OpenGL-like
> transparency
> (whatever that might be :-).

something like ?

MathGL3d "transparence" uses alpha-Blending for transprent polygons.
It draw the polygons from back to front and combine the 
pixels in the frame buffer due to 


with and alpha<1 the polygon look transparent.

OpenGL has two problems with it. At first, the depth buffer
does not work for transparent objects. Drawing the polygons
in a false order (not back to front) some artefacts become visible.
MathGL3d sort the transparent polygons and draw all transparent
polygons after the solid objects in the graphics.
Since the sorting can take some time, only for new view points
the polygon order is updated. Using the spin option of MathGL3d
with transparent objects may fail. Reordering can be forced
by using the viewpoint control and select the synchron update
of the main window.

The second problem here is that the human eye not only expect
transparence, it expect light refraction too. Because
every real transparent object must have a refraction index
differnt form 1. 

This can't be simulated with OpenGL and for good looking
transparent objects a raytracer is the only possible
solution. Fortunatly MathGL3d can write POVRay scripts
and it is easy to add a refraction index to the scripts
and get real looking transparent objects.


  • Prev by Date: InequalityInstance bug?
  • Next by Date: RE: output precision
  • Previous by thread: Re: Transparent Layering w/ Solids
  • Next by thread: Re: Combining 3D Graphics