Christian, It appears that in opengl, environment mapping is based on the the view direction relative to the object normal, not the eyepoint position relative to the object normal.
In otherwords take an outdoor scene where our view is upright (i.e. up is opposite of gravity). There is a small reflective sphere at our eye level some distance away. We are looking directly at it so it is drawn in the center of our screen. We should see a reflection where the top half of the sphere shows sky and the bottom half of the sphere shows ground. Now if we pitch our view 30 degrees down, but keep the sphere in view, we would hope that the reflection wouldn't change because our eyepoint hasn't moved so we should see the same reflection. However, opengl environment mapping is a crude approximation and it only cares about your view "direction" so now the reflection is drawn as if we were viewing the sphere from a 30 degree up relative view position. This means if we try to use environment mapping to impliment VASI/PAPI type lights, they will only react to our view direction (i.e. amount of pitch up/down and heading) not our actual position relative to the glide slope (i.e. we are a little high, little low, etc. on our approach path.) So my conclusion is that we will need to find some sort of fancier opengl "trick" or else we will have to resort to implimenting vasi/papi lights "the hard way." Cub mapping *seems* like it might do the trick, but it's unclear to me at this point how we would get the cub map space to align properly with the flightgear world. In spherical environment mapping, "up" in the environment map texture always corresponds to the current view up so if you do a 180 degree roll and look at the same object, the reflection will now be backwards. I don't know how this is handled with cub environment mapping. Regards, Curt. Christian Mayer writes: > "Curtis L. Olson" wrote: > > > > Here's a question I'll throw out to the list on my way to bed. > > > > I'm working on VASI/PAPI type lights tonight and am running into a > > problem. I'm using environment mapping with the normal aligned along > > the desired approach path. This almost works as expected except for > > one major problem. The texture coordinate that is generated is > > ***highly*** dependent on the object's position on the screen. > > > > Thus, on approach, simply pitching up or down radically changes the > > color of the vasi light, even though the relative view position > > changes very little. > > Something to take cara about with environment mapping is the orientation > of the normal vector. If you've got it wron (i.e. pointing away from you > not towards you) you'll see the singularity - and thus quite possibly > rapid changes. > > Apart fro mthat I can't help - except to point you to the little demo I > wrote quite a long time ago. It seemed to work correctly for me. > > CU, > Christian > > -- > The idea is to die young as late as possible. -- Ashley Montague > > _______________________________________________ > Flightgear-devel mailing list > [EMAIL PROTECTED] > http://mail.flightgear.org/mailman/listinfo/flightgear-devel -- Curtis Olson IVLab / HumanFIRST Program FlightGear Project Twin Cities [EMAIL PROTECTED] [EMAIL PROTECTED] Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel