Simon Hui (shui++at++kid.asd.sgi.com)
Wed, 29 May 96 20:33:43 -0700
There are some drawbacks with using a pfColorTable for this:
1. It slows down every color setting in the scene, so its cost
is proportional to the number of vertex colors.
2. It affects only the vertex color, which in turn affects the
final color in two ways:
a. Texturing: if your texture environment is PFTE_MODULATE, then
the vertex color can be used to fade the final color, but this will
not work with the other texture environments.
b. Lighting: you can use pfMtlColorMode to cause the
vertex color to modify certain material properties and thereby control
the final color, but if you look at the opengl lighting equation
(in section 2.12.1 of the opengl spec), you'll notice that within the
choices of material properties that pfMtlColorMode offers, you can't
scale the entire lighting equation. For example, you can't fade a scene
that has both diffuse and specular lighting, or ambient and specular.
Another suggestion that may have crossed your mind is to fade the scene by
changing the X colormap. X indeed allows you to change the color ramps for
R,G,B,A if you have a DirectColor visual. However, even though Impact,
RealityEngine, and InfiniteReality systems all support a limited number of
DirectColor visuals, these visuals are capable only of X rendering and not GL
rendering. So using the colormap for fading not an option.
Morten Eriksen's suggestion of using alpha blending and drawing a polygon
over the entire scene is nice in that its cost is constant, and independent
of the scene complexity.
Simon Hui iris performer
shui++at++sgi.com advanced systems div
415.933.3244 silicon graphics inc
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer.html
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:56 PDT