Re: [osg-users] strange object clipping
HI Ben, On Thu, Mar 5, 2009 at 2:01 AM, Ben Axelrod baxel...@coroware.com wrote: Well, i tried it in osgviewer and there was no clipping. any ideas as to what might cause this in my app? If osgviewer works on the data, so it's only the viewer that is different then it points to your viewer setup as being the problem. However, you've not specified anything about how you have set up the viewer, so pray how might I have the knowledge required to diagnose this problem? Let me ask a similar question and see if you can answer it. Description of problem. I have a box, and inside that box is a ball. Question: I don't know what colour of the is ball is, could you tell me please. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] strange object clipping
Its red of course :] Ducks and runs for cover , -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, March 05, 2009 3:48 AM To: OpenSceneGraph Users Subject: Re: [osg-users] strange object clipping HI Ben, On Thu, Mar 5, 2009 at 2:01 AM, Ben Axelrod baxel...@coroware.com wrote: Well, i tried it in osgviewer and there was no clipping. any ideas as to what might cause this in my app? If osgviewer works on the data, so it's only the viewer that is different then it points to your viewer setup as being the problem. However, you've not specified anything about how you have set up the viewer, so pray how might I have the knowledge required to diagnose this problem? Let me ask a similar question and see if you can answer it. Description of problem. I have a box, and inside that box is a ball. Question: I don't know what colour of the is ball is, could you tell me please. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] strange object clipping
Thanks guys, I found the problem. I was not dirtying the bound for all of my ShapeDrawables. I was only calling dirtyBound() on the parent geode. I guess this is not sufficient. -Ben -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, March 05, 2009 3:48 AM To: OpenSceneGraph Users Subject: Re: [osg-users] strange object clipping HI Ben, On Thu, Mar 5, 2009 at 2:01 AM, Ben Axelrod baxel...@coroware.com wrote: Well, i tried it in osgviewer and there was no clipping. any ideas as to what might cause this in my app? If osgviewer works on the data, so it's only the viewer that is different then it points to your viewer setup as being the problem. However, you've not specified anything about how you have set up the viewer, so pray how might I have the knowledge required to diagnose this problem? Let me ask a similar question and see if you can answer it. Description of problem. I have a box, and inside that box is a ball. Question: I don't know what colour of the is ball is, could you tell me please. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] strange object clipping
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-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfi...@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 baxel...@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@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
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 baxel...@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@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org