Re: pfLightSource and texture projection

New Message Reply Date view Thread view Subject view Author view

rvandepo++at++csc.com
Tue, 16 Nov 1999 09:30:50 +1000


I would like to say thanks to Brian and Hui for the suggestions regarding
'pfLightSource and texture projection'! Unfortunately there are still some
outstanding issues... and I wonder whether somebody may have some answers?!

I followed Brian's suggestion to change far clip plane and FOV but unfortunately
there was no major change in the final rendering. I also included the fog but
again there was no change.

By changing the transparency of the texture map I managed to improve the
darkening of the entire scene. However during the first frame I observe the
texture map as sitting right in front of the eye point(no projection on any
surface) (why?); during the subsequent frames the texture's image is reduced in
size to such an extent that it requires a mega search party to find it somewhere
in the scene. I wonder what is happening in the first frame and how to change
the size of this minute texture image.

[The light's position is at the eye point which in turn is about 20-30 meters
above the terrain. Hardware consist of both O2 and Onyx.]

I also implemented texture projection without using the pfLightSource [using
EYE_LINEAR for texture coordinate generation and a non-Identity texture matrix].
I then observe that the position and size of the projection onto the terrain is
not in sync with a change in altitude; the eyepoint and projection origin are
supposed to be in the same location (the projection behaves nicely when I move
the eyepoint in lat/long or do a pitch/roll/heading). Is there an obvious
explanation for this? I am also able to create a situation whereby the texture
image is sitting right in front of the eye point, something I can't quite
comprehend in terms of the texture transformation from 3D texture scene vertex
coordinates to the 2D s,t texture map coordinates. Does this perhaps mean that
the projected image is sitting on the near plane for some reason? If anybody has
some explanations/suggestions, please feel free to let me know!

Kind regards,

   Rene

-----------------------------------------------------------
Brian (brian++at++sgi.com) wrote:

For the projection frustum bring in your far clipping plane and cut down
the FOV might be too much for the spotlight texture. In the examples on
the pfLightSource man page they are using far clip of 100.0f and FOV 60
degrees. You might be to far away from the iluminated object for the
resolution of your light map. Make sure you have positioned the light
somewhere close to the object you are iluminating at first to get
everything working, and make sure you the observer are somewhere you can
see it.

Notice they us fog in the manpage to attenuate the light source once you
get the light working you could try playing with that.

One question though what graphics hardware are you rendering this on?

Brian
------------------------------------------------------------
Hui (hulll++at++mall.sc.cnInfo.net ?) wrote:

have you seen the shadows.c example?

------Original message--------------------------------------
Rene (rvandepo++at++csc.com) wrote:

I am currently implementing a pfLightSource with texture projection enabled. I
am following the example given in the man page but can't get the thing to work;
the entire scene gets darker and the projected texture is vaguely visible for a
split second at start up. Perhaps somebody has some idea what is going on; a
code example will be appreciated too!

Any feedback would be welcome!

Rene


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Nov 15 1999 - 14:33:28 PST

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