Hi. a) try playing with activating setUseDisplayLists(false); setUseVertexBufferObjects(true) on all your geometry objects. It really makes a big difference on Intel chips - not so much on nVidia. b) Reduce the geometry complexity of the stadium. The geometry is rendered twice because of your shadow casting - this is why reducing the vertex+triangle count will likely have a big impact. c) are you really sure the figure animation isn't done entirely by the CPU? there is just one osg demo "osganimationhardware" that uses a Vertex shader to animate a very small number of joints. All other demos I am aware of use CPU based meddling with transformation matrices. d) the 8500GT is a really old chip. The modern Intel offerings (HD graphics of the latest core i series) might already be faster. e) Aren't most of your characters sitting in the stadium ranks? You could replace these with animated billboards.
2014-11-20 9:52 GMT+01:00 Aitor Ardanza <[email protected]>: > 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=61715#61715 > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

