Seams there really is an overhead on the cull...
Further to all advices already given, I would recommend you to use the 
osgUtil::Optimizer within FLATTEN_STATIC_TRANSFORM and MERGE_GEOMETRY options
(Don't forget to set the DataVariance of your osg::Object) 
Hope it helps

Pertur wrote:
> Hi,
> 
> I'm having problems to increase the frame rate on this scene. I haven't 
> experience with very complex scenes, so I need your advice.
> 
> This is the scene:
> [Image: http://s30.postimg.org/lwm83ipm9/Foot_Ball_Scene.jpg ]
> For more detailed image the file is atached to the post
> 
> The stadium could be very huge. I can start reducing the number of poligons 
> here...
> 
> I load 600 animated characters with very low poligons and less than 100 
> joints. These are actually 16 different models, and multiplied copying them 
> as follows:
> 
> Code:
> 
> int v = getRandomValueinRange(characters.size()); // 16 characters
> osg::ref_ptr<osg::Group> c = characters[v];
> osg::MatrixTransform* tr = new osg::MatrixTransform;
> tr->setMatrix(osg::Matrix::translate( 80.0 * (i - xChar * .5),                
> 100+(100.0 * j), -600+(-200 * j)));
> tr->addChild(c.get());
> 
> 
> 
> And are animated with hardware rigid geometry, like osg demo:
> 
> Code:
> 
> osgAnimation::AnimationManagerBase* animationManager = 
> dynamic_cast<osgAnimation::AnimationManagerBase*>(p->getUpdateCallback());
> 
> osgAnimation::BasicAnimationManager* anim = 
> dynamic_cast<osgAnimation::BasicAnimationManager*>(animationManager);
> const osgAnimation::AnimationList& list = 
> animationManager->getAnimationList();
> if(list.size()>0)
> anim->playAnimation(list[0].get());
> 
> SetupRigGeometry switcher(true);
> p->accept(switcher);
> characters.push_back(p);
> 
> 
> 
> 
> Shodows are activated too. Are configured like ViewDependentShadowMap:
> 
> Code:
> 
> osg::ref_ptr<osgShadow::ViewDependentShadowMap> vdsm = new 
> osgShadow::ViewDependentShadowMap;
> m_shadowRoot = new osgShadow::ShadowedScene;
> m_shadowRoot->setShadowTechnique( vdsm.get() );
> m_shadowRoot->setReceivesShadowTraversalMask( rcvShadowMask );
> m_shadowRoot->setCastsShadowTraversalMask( castShadowMask );
> 
> 
> 
>  
> The culling mode is active as VIEW_FRUSTUM_SIDES_CULLING, and I don't know 
> what more I can tell you...
> 
> My computer is not very powerful: Intel Core2 Quad Q8400, 4GB RAM and GForce 
> 8500 GT.
> 
> Any suggestions to improve the performance and visual appearance are welcome. 
> 
> Thank you!
> 
> Cheers,
> Aitor


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=61857#61857





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to