Re: [osg-users] unrendered objects creating performance problems?
Thanks for the culling mode tip Robert. My terrain was generated using VirtualPlanet builder, but I didn't do it, so I'll get back to you when I get more details on that. I'm running my application on 2 machines getting similar results: a 64-bit-Linux-86 with a double headed Nvidia Quadro 3450. The other is an intel MacBook Pro with a GForce 8600. The available RAM for both is way over 1GB. I am trying OSG 2.6.0. It usually runs smoothly at 60fps, but on this particular terrain, when zoomed in, and at angles on which I look far into the distance, the framerate drops to below 20, which is unacceptable for my application. I believe I end up drawing way too many triangles for the computer to handle efficiently. I am trying to find ways to run at a solid 60fps no matter what. -Jose On Wed, September 10, 2008 12:56 am, Robert Osfield wrote: Hi Joseanibal, By default the OSG does not cull on the near/far planes, and near/far clipping is done down on the GPU only affect the fill rate performance of your application. You can enable culling on the near/far planes, but you have to be careful about setting your near/far planes so that encompass your scene - as the OSG by default computes the near/far planes it'll hide the inappropriately set near/far planes so by toggling these features on you might suddenly find parts of foreground or distance disappearing. To switch off the compute of near far use the Camera methods (inherited from osg::CullSettings) : viewer.getCamera()-setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR) To enable the culling against the far plane use methods inherited from osg::CullSettings again: int cullingMode = viewer.getCamera()-getCullingMode() | osg::CullSettings::FAR_PLANE_CULLING; viewer.getCamera()-setCullingMode(cullingMode); All of this doesn't really address the performance issue too much. You don't mention the nature of your database at all i.e. how you built it, what scene graph components it uses, or what hardware, or OS, or OSG version you are using, all this info is essential for others to know enough to really guide you in the right direction. Robert. On Wed, Sep 10, 2008 at 1:08 AM, Joseanibal Colon Ramos [EMAIL PROTECTED] wrote: Hi all, I was hoping someone has an idea about why I am encountering the following problem: I have a big terrain and on certain viewing angles it contains a huge amount of triangles to draw and puts a big strain on OSG's performance. I tried playing around with near/far clipping planes to improve performance, by cutting out a lot of the rendering, to the point only a very small fraction (and even none at all) of the terrain is seen through my camera. OSG's framerate, however, behaves just as if I was looking at the whole thing and drawing all the triangles. At certain angles, the framerate increases (where small number of triangles would normally be - even thought I don't see anything), and at other angles, it decreases (the same angles at which the viewer normally tries to draw a large number of triangles - even though I can't see anything). What is going on here?!? help! -J ___ 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] unrendered objects creating performance problems?
Hi Jose, If you build your VPB terrain using --terrain it'll produce terrain which a high degree of geometry, but you can dynamically control how much geometry is rendered by setting the osgTerrain::Terrain::setSampleRatio(float). You can also control the LOD scale via viewer.getCamera()-setLODScale(float). See the osgmultitexturecontrol example for illustration of this in action. The LODScale is a value you can vary per frame, so if you want to change it in response to load you can. The SampleRatio is something that'll be used on building of terrain geometry, and changing this on the fly would force a rebuild of the geometry so isn't something you want to vary per frame. I'd suggest altering the SampleRatio fit different hardware, then use LODScale on the fly. Robert. On Wed, Sep 10, 2008 at 7:52 PM, Joseanibal Colon Ramos [EMAIL PROTECTED] wrote: Thanks for the culling mode tip Robert. My terrain was generated using VirtualPlanet builder, but I didn't do it, so I'll get back to you when I get more details on that. I'm running my application on 2 machines getting similar results: a 64-bit-Linux-86 with a double headed Nvidia Quadro 3450. The other is an intel MacBook Pro with a GForce 8600. The available RAM for both is way over 1GB. I am trying OSG 2.6.0. It usually runs smoothly at 60fps, but on this particular terrain, when zoomed in, and at angles on which I look far into the distance, the framerate drops to below 20, which is unacceptable for my application. I believe I end up drawing way too many triangles for the computer to handle efficiently. I am trying to find ways to run at a solid 60fps no matter what. -Jose On Wed, September 10, 2008 12:56 am, Robert Osfield wrote: Hi Joseanibal, By default the OSG does not cull on the near/far planes, and near/far clipping is done down on the GPU only affect the fill rate performance of your application. You can enable culling on the near/far planes, but you have to be careful about setting your near/far planes so that encompass your scene - as the OSG by default computes the near/far planes it'll hide the inappropriately set near/far planes so by toggling these features on you might suddenly find parts of foreground or distance disappearing. To switch off the compute of near far use the Camera methods (inherited from osg::CullSettings) : viewer.getCamera()-setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR) To enable the culling against the far plane use methods inherited from osg::CullSettings again: int cullingMode = viewer.getCamera()-getCullingMode() | osg::CullSettings::FAR_PLANE_CULLING; viewer.getCamera()-setCullingMode(cullingMode); All of this doesn't really address the performance issue too much. You don't mention the nature of your database at all i.e. how you built it, what scene graph components it uses, or what hardware, or OS, or OSG version you are using, all this info is essential for others to know enough to really guide you in the right direction. Robert. On Wed, Sep 10, 2008 at 1:08 AM, Joseanibal Colon Ramos [EMAIL PROTECTED] wrote: Hi all, I was hoping someone has an idea about why I am encountering the following problem: I have a big terrain and on certain viewing angles it contains a huge amount of triangles to draw and puts a big strain on OSG's performance. I tried playing around with near/far clipping planes to improve performance, by cutting out a lot of the rendering, to the point only a very small fraction (and even none at all) of the terrain is seen through my camera. OSG's framerate, however, behaves just as if I was looking at the whole thing and drawing all the triangles. At certain angles, the framerate increases (where small number of triangles would normally be - even thought I don't see anything), and at other angles, it decreases (the same angles at which the viewer normally tries to draw a large number of triangles - even though I can't see anything). What is going on here?!? help! -J ___ 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] unrendered objects creating performance problems?
Hi all, I was hoping someone has an idea about why I am encountering the following problem: I have a big terrain and on certain viewing angles it contains a huge amount of triangles to draw and puts a big strain on OSG's performance. I tried playing around with near/far clipping planes to improve performance, by cutting out a lot of the rendering, to the point only a very small fraction (and even none at all) of the terrain is seen through my camera. OSG's framerate, however, behaves just as if I was looking at the whole thing and drawing all the triangles. At certain angles, the framerate increases (where small number of triangles would normally be - even thought I don't see anything), and at other angles, it decreases (the same angles at which the viewer normally tries to draw a large number of triangles - even though I can't see anything). What is going on here?!? help! -J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] unrendered objects creating performance problems?
Have you broken your terrain in to tiled regions such that each tile has its one geode/node and uses an distributed node graph so that nodes that are not need can efficiently be culled, or do you have all the tri' under one node ? ( is your scene graph more like the top one in this basic diagram http://www.vis-sim.com/imgdp/vp_db_partion_01.jpg ) Have you considered using LOD's, Paged LOD's OSV VPB ( aka osgDem ) __ Gordon Tomlinson [EMAIL PROTECTED] IM: [EMAIL PROTECTED] www.vis-sim.com www.gordontomlinson.com __ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joseanibal Colon Ramos Sent: Tuesday, September 09, 2008 8:08 PM To: OpenSceneGraph Users Subject: [osg-users] unrendered objects creating performance problems? Hi all, I was hoping someone has an idea about why I am encountering the following problem: I have a big terrain and on certain viewing angles it contains a huge amount of triangles to draw and puts a big strain on OSG's performance. I tried playing around with near/far clipping planes to improve performance, by cutting out a lot of the rendering, to the point only a very small fraction (and even none at all) of the terrain is seen through my camera. OSG's framerate, however, behaves just as if I was looking at the whole thing and drawing all the triangles. At certain angles, the framerate increases (where small number of triangles would normally be - even thought I don't see anything), and at other angles, it decreases (the same angles at which the viewer normally tries to draw a large number of triangles - even though I can't see anything). What is going on here?!? help! -J ___ 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] unrendered objects creating performance problems?
Hi Gordon, Those are great questions, thank you. I do not think my terrain tiles have their own geode or node, and maybe that can be a reason why the unneeded tiles are not being efficiently culled. I my terrain is maintained as a single geometry (which would be as you say: I am keeping the whole tri' under one node), but it IS a Paged LOD terrain in '*.ive' format and it is clearly divided into tiles for every level of detail. I thought that OSG's database pager would take care of culling unneeded tiles for me... How would you advise I break up the terrain as a distributed node-graph? Can I load it that way at run-time, or do I have to re-create the terrain differently? Thanks for your insight, I think, this is the right track! -Jose On Tue, September 9, 2008 6:19 pm, Gordon Tomlinson wrote: Have you broken your terrain in to tiled regions such that each tile has its one geode/node and uses an distributed node graph so that nodes that are not need can efficiently be culled, or do you have all the tri' under one node ? ( is your scene graph more like the top one in this basic diagram http://www.vis-sim.com/imgdp/vp_db_partion_01.jpg ) Have you considered using LOD's, Paged LOD's OSV VPB ( aka osgDem ) __ Gordon Tomlinson [EMAIL PROTECTED] IM: [EMAIL PROTECTED] www.vis-sim.com www.gordontomlinson.com __ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joseanibal Colon Ramos Sent: Tuesday, September 09, 2008 8:08 PM To: OpenSceneGraph Users Subject: [osg-users] unrendered objects creating performance problems? Hi all, I was hoping someone has an idea about why I am encountering the following problem: I have a big terrain and on certain viewing angles it contains a huge amount of triangles to draw and puts a big strain on OSG's performance. I tried playing around with near/far clipping planes to improve performance, by cutting out a lot of the rendering, to the point only a very small fraction (and even none at all) of the terrain is seen through my camera. OSG's framerate, however, behaves just as if I was looking at the whole thing and drawing all the triangles. At certain angles, the framerate increases (where small number of triangles would normally be - even thought I don't see anything), and at other angles, it decreases (the same angles at which the viewer normally tries to draw a large number of triangles - even though I can't see anything). What is going on here?!? help! -J ___ 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