Lee Elliott writes:
> 
> On Friday 23 January 2004 00:34, Norman Vine wrote:
> > Lee Elliott writes:
>
> > > > > I've been giving quite a bit of thought to look-ahead algorithms for
> > > > > terrain following.  
> >
> > I thnk the fastest way todo this will be to use the Graphics hardware.
> >
> > i.e. render only that part of the terrain that is within your lookahead
> > distance with a *very* narrow field of view into a tall but skinny pbuffer
> > with the eye point at the desired 'agl' distance beneath the current
> > position with the view vector pointing in the direction of travel.  Now you
> > can read the position of the obstacles ahead directly from the pbuffer
> > rendered into
> >
> > Cheers
> >
> > Norman
> 
> 
> :)   I was thinking that in theory the graphics card is working out a lot of 
> the stuff that we need for this but I had no idea if the results were 
> accessible or not.

There is some tricky coding ot be done but basically what you want todo
is read back the depth buffer and then scaling that back into actual 'distance'
should answer the question 
'What is the distance to each point in the sillouette of what lies in that direction'

Cheers

Norman



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to