FOG

New Message Reply Date view Thread view Subject view Author view

Marco Crocetta (onyx++at++datamat.it)
Thu, 2 Mar 95 12:23:24 MET


Hi people!

I have some problems with pfESkyFog().

I'd like to simulate a small (height) fog layer at horizon of my scene in order
to obtain a sort of mixing between the scene horizon (sea) and the sky or,
more generally, a distant haze that i can manage i height.
I didn't found any reference for fog height in the pfFog man pages so I thoght
to use the pfESky facilities. This is a fragment of my code.

static void initFog(void)
{

fog1 = pfNewFog(pfGetSharedArena());
pfFogType(fog1, PFFOG_PIX_LIN);
pfFogColor(fog1, 1.0f, 1.0f, 1.0f);

}

static void initEarthSky(void)
{
pfEarthSky *es;
 es = pfNewESky();

 pfESkyMode(es, PFES_BUFFER_CLEAR, Shared->earthSkyMode); /*PFES_SKY*/
 pfESkyAttr(es, PFES_GRND_FOG_TOP, 0.5f);
 pfESkyFog(es,PFES_GRND,fog1);
 pfESkyAttr(es, PFES_GRND_HT, 0.5f);
 ...
 ...
 }

 The result is... that I have a fog totally covering my sky.
 I have the same effect using PFES_CLOUD_TOP/BOTTOM the clouds layer
 cover the whole sky.

 Where is my mistake?

 Thanks in advance

 P.S. Thanks to Lance R. Marrou for the help about my Intersection
          problems!


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:51:02 PDT

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