If you change the near/far clip planes, then what was in the depth
buffer probably should be treated as random noise following the
change.  If you change the clip planes in the middle of drawing a
scene, then you really need to clear the depth buffer before doing any
more drawing.

In essence then what you are saying is that everything drawn after the
clip plane change will *always* be closer than everything that was
drawn before the clip plane change.

If that is not the case, then you will only be introducing odd
rendering effects and you probably need to come up with a different
approach.

It makes sense to change the near clip plane and clear the depth
buffer before drawing the 3d aircraft model *if* it is going to be
closer to the eye point than any terrain or other objects in the
scene.  This should be the case for 'chase plane' type external views.

However, for tower views or any long distance viewing of models, the
near/far clip planes should not be changed before drawing them so they
can be properly integrated with the rest of the scene and the hidden
surface removal will work right.

If then you see that the distant aircraft model is so detailed that it
has noticable z-buffer fighting within the model, then that needs to
be handled with some sort of LOD scheme which I believe David has been
working on implimenting (basic LOD is supported in plib, we just need
to provide the different LOD models and specify the range for drawing
them.)

Curt.


Jim Wilson writes:
> Norman Vine <[EMAIL PROTECTED]> said:
> 
> > David Megginson writes:
> > >
> > >That may be more efficient, but it's not absolutely necessary to solve
> > >the z-buffer problem -- we just have to ensure that in external view
> > >everything has the same clip planes.  I'm about to update the CVS to
> > >do so.
> > 
> > Yes,  the purpose of my  'Z-buffer 101' post :-)
> > 
> 
> I don't think it is necessarily a depth buffer precision issue.  What it is,
> I'm not sure yet, but the problem is there plain as day on my Voodoo3.  Maybe
> it has something to do with being in a seperate ssg root (keep in mind I know
> little about plib).  Rendering the model immediately after the scene did not
> help either.
> 
> For the doubting here are a couple screen shots illustrating a couple problems
> including the "Truman Show" effect:
> 
> http://www.spiderbark.com/fgfs/KSFO-sinking.png
> http://www.spiderbark.com/fgfs/KSFO-truman-show.png
> 
> Clearing the depth buffer before rendering the model fixes the problems --
> 'Z-buffer 101' not withstanding.
> 
> Best,
> 
> Jim
> 
> _______________________________________________
> 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

Reply via email to