[osg-users] Slow down with shared nodes

Robert Osfield robert.osfield at gmail.com
Wed Mar 8 00:45:11 PST 2017


Hi Andre,

On 8 March 2017 at 08:40, Andre Normann <andre.normann at gmail.com> wrote:
> hopefully I am getting closer. I find out, that the source model might be
> the problem. I exported an obj file from Bentley Microstation and imported
> into OpenSceneGraph. When I now export the scene into an osg file, I see a
> lot of PrimiteSets (e.g. > 1000). So I will end up with a lot calls to
> DrawElementsUShort. When I load the obj file into 3dsmax convert it into a
> fbx file and reexport it from OpenSceneGraph into an osg file, I have only
> one PrimitiveSet with one DrawArrays call. This file is working well in
> 3.4.0 with sharing nodes.
>
> So I guess there might be a problem with sharing osg::Geometry which has a
> lot of primitive sets. In 3.2.3 it was working well. What do you think?

It sounds like data import path is the crucial part, perhaps changes
to the .obj plugin between 3.2.3 and 3.4.0 are what is causing the
difference.

Doing an:

    osgconv myfile.obj myfile.osgt

In 3.2.3 and 3.4.0 will tell you the differences that the plugin and
any optimization passes are making.

Is there any chance you could share an example of one of these .obj
files that is causing the performance problems?

Robert.



More information about the osg-users mailing list