On 04/22/2013 11:24 PM, Sergey Kurdakov wrote:
 >scenegraphs are too expensive for games.

it depends,  but due to extensive use, scenegraphs like OSG are quite
optimized  for minimizing state changes, and thus there are games on
smartphones and PCs which are based on OSG.

The "scene graphs are too expensive for games" is one of the urban legend "wisdoms", unfortunately. This was true maybe back in the 90's when scene graph meant Performer or something VRML ... The paradox is that most game developers that refuse to use scene graphs end up reinventing them in their own code at some point. Or the middleware/engine they are using does it for them.


 >I only know that Ogre3d is using an scenegraph too.

that is correct, and Ogre3d is used in many games. the difference is
though with OSG - that Ogre3d rendering pipeline is not thread safe, so
only one core is used for all graphics operations ( while OSG can use
one or more threads),  Ogre3d is just somehow more popular among those
who develops games, because it has additional features which are useful
when developing games, but OSG is more powerful in respect to rendering
flexibility

Also if you need/want OpenGL, forget Ogre3D. The OpenGL renderer in Ogre is horrid (put nicely). I did profile it (we are using Ogre3D at work too) and it is basically wasting 90% of frame time doing state changes that are redundant and have no effect - reloading and rebinding textures and shaders, recreating display lists for no reason, duplicating textures, etc. It is a very naively written renderer. The Direct3D one is better, it shows that the developers were more interested in that API.

Also the OSG API is much cleaner and more orthogonal than what is in Ogre3D, but I guess that is a personal opinion.


 >I also saw that there are many different implementations of
scenegraphs, like BSP octree etc.

OSG is not about octree of BSP thought there are use samples see
/"OpenSceneGraph/ 3 Cookbook" for octree and also
there are examples for BSP use in osgBullet and Delta3D which are
related to OSG. Also  OSG has KdTree implementation

BSP and octree are actually data structures, not scene graphs. Scene graph can use those, but doesn't have to - there are different ways to organize things and optimize traversals and culling.

Regards,

Jan


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to