From: Stephen Jeffrey (Stephen.Jeffrey++at++maths.uq.edu.au)
Date: 01/29/2002 00:07:02
Hi,
Does anyone have some example code that shows how to
implement a transparent texture map?
I am trying to implement the "caustic" under-water lighting effects
demonstrated by Angus Dorbie (http://www.dorbie.com/aqua.html).
Angus's method effectively does multitexturing by drawing the
scene twice:
1. clone the polygon
2. apply a texture map to the original polygon (if desired)
3. implement polygon offset and transparency
4. apply the second texture to the cloned, offset polygon
I have constructed two rectangles, one slightly above the other.
The first texture map was applied to the bottom rectangle and
then transparency was enabled and the second texture map
applied to the top rectangle. As yet I have not been able to get the
transparency to work properly. If I set the alpha material attribute for
the
top triangle to a value less than 1, transparency partially works,
but I cannot get it to appear the same as in Angus's example, and
I cannot see where (if at all) Angus set's the alpha value.
I have trimmed Angus' example down to the smallest scene graph
possible (it is a .flt file) but there appears to a problem with it.
There must be two rectangles in the .flt file - if one is deleted the
transparency no longer works.
Has anyone else encountered a similar problem, or have any
example code that might help?
cheers
steve
This archive was generated by hypermail 2b29 : Tue Jan 29 2002 - 00:05:42 PST