MathGroup Archive 2001

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

Search the Archive

Re: Transparent Layering w/ Solids

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26561] Re: Transparent Layering w/ Solids
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 5 Jan 2001 22:22:58 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <92k1b0$636@smc.vnet.net> <92uru4$dt3@smc.vnet.net> <933mqg$k9r@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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 ?

http://phong.informatik.uni-leipzig.de/~kuska/mathgl3dv3/09296d70.jpg

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 

alpha*PolygonPixelColor+(1-alpha)*OldPixelColor

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.

Regards
  Jens


  • 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