Hi Christian In general one should aim to minimize the amount of separate state in the scene graph, the more you can share the better performance will be. However, if you are already hitting a solid 60Hz(or whatever your display refresh rate is) then your job is done and there is no need to go that extra mile in optimizing the scene graph.
If you do need to optimize your scene graph then the task of minimizing separate state could be achieved by placing each of the different roof textures into a texture atalas - a single texture object that contains several images, and then use texture coords to index into this. Texture atlas are best for non repeating textures, so in the case of a roof it all depends whether a single current texture covers the whole roof, or just a small section that is repeated. Robert. On Wed, May 20, 2009 at 9:26 PM, Christian Sam <[email protected]> wrote: > Hi community, > > i have a bunch of categorized roof-types. out of a handful of different > textures (small dimensioned), i want to assign - depending on the rooftype, a > texture per roof. the roofs are not ordered per rooftype, and i hardly expect > a roof to have the same texture assigned like the previous one - so frequent > (texture) statechanges will certainly arise when creating the geometry. > > what can i expect in creating such a scenegraph? > > (A): osg should have no problems to store a handful of small-sized textures > as texture objects. so frequent (texture)state-changes are no problem while > assignment. > > or > > (B): this situtation will result in a problem. > > > If situation (B) - what would be appropriate counter-methods? (i guess one > would be a to do a manual sorting of the roofs per rooftype, before creating > the scenegraph. but would the following also work? > > - use a different renderbin for every rooftype(/texture)? > > - let the optimizer run over the created scenegraph? > > > thanks in advance, > christian > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=12627#12627 > > > > > > _______________________________________________ > 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

