[osg-users] UpdateCallback for a lot of models

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Thu Jan 21 07:28:54 PST 2016

Hi Nikita,

I know this post
I used it too. The way how I managed to have like 1000x1000 grid of a real
model (at 60hz)  using UpdateCallbacks was by having a Visitor to "compile"
the model into one DrawArrays so you can draw the whole model with one
call. I was grabbing the highest LOD in my visitor and the model was using
a baked texture. The model was having like few thousands triangles. Give it
a shot it should work. At least worked for me

Hope it helps,


On Thu, Jan 21, 2016 at 10:03 AM, Nikita Petrov <nikitapetroff at gmail.com>

> Hi,
> I will start from afar.
> I'm developing an application using osgEarth. The basic idea is to
> visualize objects like aircrafts, cars, ships. These objects should move by
> updating their coordinates and angles (pitch, roll, yaw).
> Currently I'm using an UpdateCallback on the group, containing all
> aircrafts, to change position and rotation of the model.
> I decided to test the performance of this approach. I've added 10x10 grid
> of aircrafts and in UpdateCallback started to rotate and move them. Results
> are shown in the first screenshot.
> After that I decided to try the same idea in OSG witch osg:Box instead of
> aircraft model.
> I've added 100x100 grid of boxes and set the similar UpdateCallback on the
> parent group. Results were 30-40 fps (see attached image).
> PC specification:NVIDIA GeForce GTX 580;
> Intel Core i7-930;
> 12GB DDR3-1333;
> MS Windows 8.1 x64;
> OpenSceneGraph Library 3.5.1 x86;
> osgEarth Library 3.0.0 DEVELOPMENT () x86.
> I suppose I miss something, because I hope the frame rate should be higher
> for 100 aircrafts on such PC.
> I've found articles about GPU instancing  (
> http://3dcgtutorials.blogspot.ru/2013/08/instancing-with-openscenegraph.html)
> and example osgdrawinstanced in OSG. But as far as I understood it is
> pretty hard to insert 3D model into this approach and it is not possible to
> easily update position and rotation.
> Could you give me any suggestions about how to solve this problem?
> Nikita[/url]
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=66073#66073
> Attachments:
> http://forum.openscenegraph.org//files/manyobjects_2_152.png
> http://forum.openscenegraph.org//files/manyobjects_1_136.png
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160121/b0ca448c/attachment.htm>

More information about the osg-users mailing list