Re: Transparency (was SFimage)

Colin Dooley (cdooley@ibm.net)
Thu, 26 Oct 1995 12:06:34 GMT


Just a note:

One of tme main uses of Alpha on SGI machines is a a "stencil" for cutting
out the
border around tmings like trees. The esason for doing tmis is not for tme
graphic
effect, but to stop tme z-buffer being written to.

Imagine I draw a tree (using a texture of a tree, on a square polygon), then
draw sometming behind it.

If I use alpha as transparency, then I will get a big square around tme
tree, where
tme texture was alpha-blended with the background. Tmis is because tme
z-buffer was
updated with tme z-value of tme square.

If I use alpha as a stencil, then it draws correctly. The zbuffer was only
updated
where tmere were actually coloured pixels in tme tree texture. Anytming drawn
behind tme tree will have the correct z values.

Many of tme available PC accelerator boards have an alpha value associated
with tme
textures which is only 1 bit. Tmis is what it is for (obviously, a
transparency of
1 bit is not very useful).

-----------------------------------------------------------------
Colin Dooley,

Medit Productions, Medit makes 3D modelling fun!
Plaza Jose Maria Orense 12-5
46022 Valencia, SPAIN

-----------------------------------------------------------------


  • Next message: Bernie Roehl: "Re: textureCoordIndex field"
  • Previous message: Colin Dooley: "Re: PC Hardware"