[osg-users] multiple matrix transfromations cause severe slowness in performance
Gianluca Natale
natale at europe.altair.com
Tue Oct 8 05:20:49 PDT 2019
Hi all,
I have a performance issue in my scenegraph that I cannot completely understand.
My scenegraph is made by a main matrix transform, with these 2 children:
* One geode that renders a big object on screen (the geometry in the drawable can take up to several thousands vertices);
* One group node that in its turn has 200 children, each made by a matrix transform and a geode. The drawable in each of those geodes is very simple (no more than 100 vertices)
It seems that this configuration allows me to have at most 50 fps.
I feel that this should be rendered much faster.
So I made some experiment. If I remove the 200 matrix transform attached to the group node I mentioned above,
and directly apply the transformations to the vertices of the geometries in the 200 drawables of the small objects, performance improves a lot, till 100 fps.
I investigatd a bit inside OSG code (I'm using OG ver.3.4.1), and apparently the only overhead due to the additional matrix transformations is a call to glLoadMatrix (I'm using the old ffp).
How can you explain such an improvement?
My real problem is that I would like to replace the 200 matrix transfromations with 200 auto-transform matrices, since I'd like those small objects to keep constant size on screen.
But if I do that, I cannot remove the 200 transformations at all, and I'll end up with a bad performance.
Any idea about what I can try to make rendering of my scenegraph faster?
Thanks,
Gianluca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20191008/ad0f30be/attachment.html>
More information about the osg-users
mailing list