HI Belthil,

If you base the compute near/far on a just the points in the center
you'll end up with the far plane clipping out beyond the small center
box, so... you really have to accept the computing then near/far on
all objects in the view frustum.

If moving the near/far ratio down causes problems with z fighting then
you are left with two options, to partition the scene into two depth
ranges and render the far range then the near range, as per the
osgdepthpartion example, or to use a shader to create your own no
linear depth buffer.  I have never tried the later, so you are rather
out on your own, but it might well work for you.

Robert.

On 5/21/07, belthil <[EMAIL PROTECTED]> wrote:



Hi Robert!

    The setNearFarRatio helped a lot, indeed! Now there is a big
improvement. I thank you! :-) The viewer can go much nearer than it used to.
But i still can't go within the little cube of points. And i encountered the
z-fighting problem too, from a ratio between 1e-7 and 1e-8.
You told me the frustrum is updated according to the bounding boxes. So if a
node is culled by the frustrum, it should be computed again, right?
I have more than 2 osg::Geometry, so i use PagedLODs. With the octree i'm
using there are about 320 osg::Geometry, but it could be much more with
other octrees. I checked the output of the frustrum and it does not change
(viewer.getLensParams(l,r,b,t,n,f)), maybe it is not the right function
call.
I tried things like i saw in other mails like
COMPUTE_NEAR_FAR_USING_PRIMITIVES or the default
COMPUTE_NEAR_FAR_USING_BOUDING_VOLUMES, but it does not
improve the problem that remains. Is there a possibility to tell OSG to
compute the frustrum only according to the little cube of points (in fact
lots of osg::Geometry again) at the center of the big one, as still seeing
some points of the big one?

Belthil


 Créez votre adresse électronique [EMAIL PROTECTED]
1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to