[osg-users] strange object clipping

Ben Axelrod baxelrod at coroware.com
Wed Mar 4 18:01:17 PST 2009


Well, i tried it in osgviewer and there was no clipping.  any ideas as to what might cause this in my app?
Thanks,
-Ben

________________________________________
From: osg-users-bounces at lists.openscenegraph.org [osg-users-bounces at lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfield at gmail.com]
Sent: Saturday, February 28, 2009 2:49 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] strange object clipping

Hi Ben,

The visuals do look like they suggest a problem with the near/far
computation or clamping of near/far.  I'm not aware of a bugs in the
bounding box calculation of ShapeDrawable, but it could certainly be
an area to look into.  Could you output the model to .osg, test this
in osgviewer to see if the problem still exists and if it does then
post this model so others can test against it.

Robert.

On Fri, Feb 27, 2009 at 9:10 PM, Ben Axelrod <baxelrod at coroware.com> wrote:
>
> Hi,
>
> We are seeing some strange clipping of objects in OSG 2.6.  It happens with large numbers of ShapeDrawable boxes and spheres.  What should be displayed in the attached images is a large rectangular grid of small, colored cubes.
>
> The structure of our osg tree looks like:
>
> osg::Group
>  |
> \|/
>  osg::MatricTransform
>  |
> \|/
> osg::Geode
>  |    |    |
> \|/  \|/  \|/
>
> Multiple ShapeDrawable ()
>
>
> Our camera is an osgViewer.
>
> "cube1.png" demonstrates the clipping we are seeing.  the cubes are sliced, as if by the near clipping plane of the camera.
>
> "cube2.png" has the camera and objects in the exact same positions, except a large cone shape is added.  You can see that the clipping is gone.  We believe this is due to some bounding box miscalculations by OSG.  When the other object is added, the bounding box can be calculated properly, so the cubes are not cut.
>
> Any ideas on what is causing this issue and what can possibly be done about it?
>
> I have heard that ShapeDrawables is not very efficient, and is only meant for fast debugging.  Will converting the ShapeDrawables to straight Geometry fix it?
>
> Thanks,
> -Ben
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list