[osg-users] I created 10000 cylinder, osg run very slow

Robert Osfield robert.osfield at gmail.com
Tue Jul 21 23:42:13 PDT 2015


Hi Luo,

You've created a scene graph is one of the least efficient ways possible,
well done :-)

Basically you're scene graph is overloaded with MatrixTransform, which will
create a big CPU bottleneck.

There are number of ways to improve things, how best to go about it will
depend upon what you are actually trying to achieve and the hardware
constraints you have.  The only info you provide is that you are trying to
simulate a ladder, but 10,000 rungs on a ladder is quite an extraordinary
amount so I can't believe this is a normal ladder, leaving me wonder what
you actually mean.

Could you explain what you are trying to achieve, providing a screenshot
would be helpful.

Robert.



On 21 July 2015 at 02:22, LUO Jianguo <luojianguo at tsinghua.org.cn> wrote:

> Hi,
>
> I need to use cylinder to simulate the “ladder”.  So there are many
> cylinder to create. I new a osg::Geode , and then use it to new 10000
> osg::MatrixTransform, all these osg::MatrixTransform were added to one
> group.
>
> But the program runs very very slow.
> In fact I create the same scene using opengl, the program runs quickly.
>
> How can I upgrade my program?
> thanks.
>
> Thank you!
>
> Cheers,
> LUO
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=64386#64386
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/mfc_osg_124.cpp
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150722/11333522/attachment-0003.htm>


More information about the osg-users mailing list