Brian Furtaw (brian++at++sgi.com)
Mon, 15 Nov 1999 22:50:31 -0500
rvandepo++at++csc.com wrote:
>
> 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?!
>
Your welcome.
> 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.
So you tried the near clip at 1 and the far clip at 100 units?
>
> 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.
Opening the FOV backup will make the image bigger. If you really cut
down the FOV the image will shrink. Is the light source positioned as a
local light meaning a 1.0 appears in the four coordinate point of the
lights position?
pfLSourcePos(proj2, 0.0f, 0.0f, 0.0f, 1.0f); /* Make light local */
^
^
>
> [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
If its happening in multiprocess mode I would guess the data you are
providing to texgen is not frame syncronized. Use a pfFlux object to
manage the data in-sync.
> 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!
Just a few suggestions here everybody is guessing off of unknowns. If
you could get shadows.c compiled run it and see if it is working
correctly. Then we would have a known starting point to experiment from.
Adding in your own light map play with the pfLightSource intensity. Play
with the near and far clipping plane and the position of the light.
I don't exactly remember what was in the source example you sent before
but it looked like you had the right idea.
>
> 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
>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
--
----oOOo---- ----oOOo---- ----oOOo---- ----oOOo----
Brian Furtaw (brian++at++sgi.com)
Graphics Guru Office:(301)572-3293 Fax: (301)572-3280
12200-G Plum Orchard Drive OpenGL/Performer/OpenInventor/ImageVision
Silver Spring, Maryland 20904 Optimizer/React/PCI Device Drivers
This archive was generated by hypermail 2.0b2 on Mon Nov 15 1999 - 19:58:03 PST