[osg-users] UpdateCallback for a lot of models

Nikita Petrov nikitapetroff at gmail.com
Thu Jan 21 01:03:59 PST 2016


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?


Read this topic online here:


More information about the osg-users mailing list