Robert
I tried to find out a little more detail about what is happening.
Attached is a screenshot to illustrate the problem. The viewer is 2m
above the ground height.
I thought it might be culling one node (5x5 quads plus a 256 pixel
texture) but the ground surface is clipped as you can see (not at the
skirts of the database which are also visible) and it is clipped
smoothly as one advances or retreats - it doesn't suddenly include
another node.
It seems to be a clipping problem and not culling. The clipping
generally occurs when looking uphill - but not enough of a slope that I
expected the near plane to be clipping it.
I am using the following to set the near clipping plane to 0.001m, but I
suspect I am missing something.
SceneView::setProjectionMatrixAsPerspective(fovy,aspectRatio,znear,zfar)
This happens if the window size is changed. On re-entry znear is set to
another value, typically 1/2000 of zfar. Is there a control somewhere on
the ratio or values of znear and zfar?
I would be grateful if you could point me in the right direction.
Regards
Alan Harris
Robert Osfield wrote:
Hi Alan,
On 4/26/07, Alan Harris <[EMAIL PROTECTED]> wrote:
Return of an old question!
If the corners of the bounding volume (I assume a box) are all outside
the view frustrum would that node be culled? I assume a bounding box is
used as I would expect a bounding sphere to generally interact with the
view frustrum.
The Node's all have bounding sphere's that enclose their children.
The Drawable leaves all have bounding boxes that enclose their geometry.
The view frustum culls the above such that if any point of the
bounding sphere or bounding box is in the view frustum then its
accepted.
I expect it is from what is happening. Therefore is there a simple way
of ensuring that culling does not occur on objects within, say, a
specified distance of the viewer.
There isn't a way to disable culling for near objects, it shouldn't be
required any, such a feature would just be a hack around a bug
elsewhere in the culling set up - in this case its looks like the
ClusterCullingCallback set up is wrong so this is where the fix should
happen - in the set up of the ClusterCullingCallback.
Robert.
_______________________________________________
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/