Re: Range/Density array in SPLINE fog !!!

New Message Reply Date view Thread view Subject view Author view

Sharon Clay (src++at++rose.asd.sgi.com)
Mon, 30 Sep 1996 11:35:49 -0700


+>---- On Sep 30, 10:34am, ram munjulur wrote:
> Subject: Range/Density array in SPLINE fog !!!
->
-> I am trying to get a Fog with varying density along the Range. I am trying to
->go from a Zero visibility - 100% visisbility - Zero visibility - 40% - 80% and so on.
->But when I plugin the values below, into the pfFogRamp() function, I see no "spikes" in
->the fog density. OR atleast, how do I know that there are spikes in the fog ?
->
->Of course, the man page on pfFog says
->"These are given in
-> ascending order in the arrays range and density. " But to get the my desired effect,
->I am specifying a non-uniform order of Range & Density.
->
-> In SPLINE fog implementation, do these Range/density arrays make sense?
->
-> float fog_range[10] = { 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9};
-> float fog_density[10] = { 1.0, 1.0, 0.0, 0.0, 1.0, 1.0 , 0.0, 0.0, 1.0, 1.0};
->
->Is there a better way to get a variation in fog ?
->

The density is to be the total fog that is accumulated when looking at an object at a
given distance and this must obviously be only increasing.
What you apparently are wanting to do is describe local pockets of fog in world
space and then have the hardware accumulate the fog for you. This we cannot do.
However, you can do the accumulation this yourself and put those values in your fog_density array.
Note however that the fog is in terms of distances so it will follow you around.
If you want to describe fog in world space you can put the values into a texture map
and use an object-space texgen to access the proper values.

->Also for every draw, I keep getting a message
->
-> "PF Warning: pfFog::setRamp() IrisGL-style ramp values: converting"
->
-> I believe that the density values for OpenGL and IRIS GL are 1's complement of each other.
->Does this conversion take place on the whole array before the array is used OR does the
->conversion take place as each value in the array is used ?
->

We convert the entire array one time before handing the entire thing to the GL.

src.

-- 
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
Sharon Rose Clay (Fischler) - Silicon Graphics, Advanced Systems Dev.
src++at++sgi.com  (415) 933 - 1002  FAX: (415) 965 - 2658  MS 8U-590
http://www.sgi.com/Technology/Performer/
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:39 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.