[osg-users] Best practice for dynamic StateSets & Geometry
Jannik Heller
scrawl at baseoftrash.de
Wed Apr 15 03:55:16 PDT 2015
Hi Robert,
Thanks for the hints - I am using a release build, and I already disabled double precision from cmake which gave me another nice boost.
In the stats handler I am seeing roughly the same amount of time spent in the cull, draw and GPU threads. After adding the double buffering the 3 threads all run in parallel so performance is decent now.
I know that my app is CPU bound but there's not much I can do about it.
Some of the time in the cull thread is spent updating vertex animations, and some time for organizing light lists. I have scenes with a lot more than 8 lights, so I have to check what lights are closest to a given sub-graph before rendering it. This system was really slow to begin with but I already optimized it a lot. Non the less setting the lights still has a noticable overhead.
Next problem is the sheer number of objects - often thousands per scene. I tried batching before but the problem is the scenes I am working with are scripted, so objects can be moved or removed at any time, also, batching objects would interfere with the light lists - i.e. with too many objects sharing a large batch I can not set fine grained light lists on them.
I'm looking forward to switching the light system to deferred shading in the future - I'm sure then it will be GPU bound. I still need a forward rendering fallback in place though.
Cheers,
Jannik
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63417#63417
More information about the osg-users
mailing list