[osg-users] UpdateCallback for a lot of models
Robert Osfield
robert.osfield at gmail.com
Thu Jan 21 07:59:07 PST 2016
H i Nikita,
Handling updates to lots of dynamic models can be done with update
callbacks and needn't be a bottleneck, in your case right now it's not
a bottleneck - the cull, draw dispatch are so it's these areas that
you need to look at optimizing.
I would however suggest that you do realistic benchmarking, creating a
regular grid of models as using this as a benchmark is very likely
unrepresentative of what you application will have to manage - I'd
guess it's pretty unlikely you'll have 100 aircraft on screen at any
one time. It's important to do benchmarking on realistic cases as you
may find yourself wasting lots of time trying to optimize for
botttlnecks that never occur in real applications.
For instance much of the bottleneck you see in your models is down to
what I'm guessing are transforms in the scene that are positioning the
models. If the scene has the 100 planes distributed over the work in
a representative way most will be culled higher in the scene graph
that then transforms so the cost of visiting that subgraph will
disappear from the cull, draw dispatch and draw GPU.
Once you have built yourself a representative test and got
benchmarking results then it'd be appropriate to start looking at the
relative costs of various operations and what you can do to lower
these. There are so many different things you can do when optimizing
scene graphs that right now it'd be premature to start throwing lots
of ideas at you, plus it's just a waste of our time.
Robert.
Robert.
More information about the osg-users
mailing list