OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Slow down with shared nodes

Goto page Previous  1, 2
 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10791

PostPosted: Wed Mar 08, 2017 2:34 pm    Post subject:
Slow down with shared nodes
Reply with quote

Hi Andre,

Thanks for the file. I've just tried it on my Kubuntu 16.04. NVidia
760 with the OSG-3.4 branch and I see decent performance, the draw
dispatch is bit more expensive than I'd usually expect for a model of
this size but it's not widely expensive like you are seeing.

The dataset itself looks like the large number of PrimitiveSets is
very high for the number of vertices in each osg::Geometry. The use
of very short triangle strips rather than a single DrawElementsUShort
GL_TRIANGLES is the core of what is wrong with how the osg::Geometry
have been generated.

The source of this issue may be down to the .obj or perhaps original
data being very poorly set up.

Robert.

On 8 March 2017 at 09:39, Andre Normann <> wrote:
Quote:
Hi Robert,

I used 3.2.3 to load the obj files and converted it into ive format. In
3.2.3 I load the ive file, build my scenegraph and I get 60 fps. When I now
load the same ive file into 3.4.0, build my scenegraph, I get the slow down.

- There must be something which is causing the slow down in OpenSceneGraph
- The obj loader is creating a lot of primitive sets, which is not optimal.
In near future I will try to fix that issue.

I created a test file. Simply do an "osgviewer SlowDownTest.zip".



2017-03-08 9:45 GMT+01:00 Robert Osfield <>:
Quote:

Hi Andre,

On 8 March 2017 at 08:40, Andre Normann <> wrote:
Quote:
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.








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
cbuchner1
Appreciator


Joined: 14 Mar 2012
Posts: 303

PostPosted: Wed Mar 08, 2017 2:38 pm    Post subject:
Slow down with shared nodes
Reply with quote

I've recently written some code to merge individual triangle strips

by joining them using some degenerate (zero area) triangles.



One issue that I've run into is that in wireframe mode this generated

some very odd looking artifacts.

Find the code here. It may need some adaptation for your use case.
http://forum.openscenegraph.org/viewtopic.php?t=16412


Christian



2017-03-08 15:32 GMT+01:00 Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi Andre,

Thanks for the file.  I've just tried it on my Kubuntu 16.04. NVidia
760 with the OSG-3.4 branch and I see decent performance, the draw
dispatch is bit more expensive than I'd usually expect for a model of
this size but it's not widely expensive like you are seeing.

The dataset itself looks like the large number of PrimitiveSets is
very high for the number of vertices in each osg::Geometry.  The use
of very short triangle strips rather than a single DrawElementsUShort
GL_TRIANGLES is the core of what is wrong with how the osg::Geometry
have been generated.

The source of this issue may be down to the .obj or perhaps original
data being very poorly set up.

Robert.

On 8 March 2017 at 09:39, Andre Normann < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Robert,

I used 3.2.3 to load the obj files and converted it into ive format. In
3.2.3 I load the ive file, build my scenegraph and I get 60 fps. When I now
load the same ive file into 3.4.0, build my scenegraph, I get the slow down.

- There must be something which is causing the slow down in OpenSceneGraph
- The obj loader is creating a lot of primitive sets, which is not optimal.
In near future I will try to fix that issue.

I created a test file. Simply do an "osgviewer SlowDownTest.zip".



2017-03-08 9:45 GMT+01:00 Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:

Hi Andre,

On 8 March 2017 at 08:40, Andre Normann < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
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.






Quote:
_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Andre Normann
Guest





PostPosted: Wed Mar 08, 2017 2:48 pm    Post subject:
Slow down with shared nodes
Reply with quote

Hi Robert,

thanks for your help. I think the problem is the obj loader. I have done a quick review of the source code and the loader seems to create for each "f" line an own primitive set. This can be optimized. I will try to fix this in near future.


I can not understand the difference between 3.2.3 and 3.4.0 on my computer. Maybe indeed a driver problem. For now I have a working solution.   




2017-03-08 15:35 GMT+01:00 Christian Buchner < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
I've recently written some code to merge individual triangle strips

by joining them using some degenerate (zero area) triangles.



One issue that I've run into is that in wireframe mode this generated

some very odd looking artifacts.

Find the code here. It may need some adaptation for your use case.
http://forum.openscenegraph.org/viewtopic.php?t=16412


Christian



2017-03-08 15:32 GMT+01:00 Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi Andre,

Thanks for the file.  I've just tried it on my Kubuntu 16.04. NVidia
760 with the OSG-3.4 branch and I see decent performance, the draw
dispatch is bit more expensive than I'd usually expect for a model of
this size but it's not widely expensive like you are seeing.

The dataset itself looks like the large number of PrimitiveSets is
very high for the number of vertices in each osg::Geometry.  The use
of very short triangle strips rather than a single DrawElementsUShort
GL_TRIANGLES is the core of what is wrong with how the osg::Geometry
have been generated.

The source of this issue may be down to the .obj or perhaps original
data being very poorly set up.

Robert.

On 8 March 2017 at 09:39, Andre Normann < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Robert,

I used 3.2.3 to load the obj files and converted it into ive format. In
3.2.3 I load the ive file, build my scenegraph and I get 60 fps. When I now
load the same ive file into 3.4.0, build my scenegraph, I get the slow down.

- There must be something which is causing the slow down in OpenSceneGraph
- The obj loader is creating a lot of primitive sets, which is not optimal.
In near future I will try to fix that issue.

I created a test file. Simply do an "osgviewer SlowDownTest.zip".



2017-03-08 9:45 GMT+01:00 Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:

Hi Andre,

On 8 March 2017 at 08:40, Andre Normann < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
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.






Quote:
_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org








_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



------------------
Post generated by Mail2Forum
Back to top
Andre Normann
Guest





PostPosted: Thu Mar 09, 2017 8:21 am    Post subject:
Slow down with shared nodes
Reply with quote

Hi,

just one more remark. I have testet the model with the current master version. Everything is working well.





2017-03-08 15:45 GMT+01:00 Andre Normann < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi Robert,

thanks for your help. I think the problem is the obj loader. I have done a quick review of the source code and the loader seems to create for each "f" line an own primitive set. This can be optimized. I will try to fix this in near future.


I can not understand the difference between 3.2.3 and 3.4.0 on my computer. Maybe indeed a driver problem. For now I have a working solution.   




2017-03-08 15:35 GMT+01:00 Christian Buchner < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
I've recently written some code to merge individual triangle strips

by joining them using some degenerate (zero area) triangles.



One issue that I've run into is that in wireframe mode this generated

some very odd looking artifacts.

Find the code here. It may need some adaptation for your use case.
http://forum.openscenegraph.org/viewtopic.php?t=16412


Christian



2017-03-08 15:32 GMT+01:00 Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi Andre,

Thanks for the file.  I've just tried it on my Kubuntu 16.04. NVidia
760 with the OSG-3.4 branch and I see decent performance, the draw
dispatch is bit more expensive than I'd usually expect for a model of
this size but it's not widely expensive like you are seeing.

The dataset itself looks like the large number of PrimitiveSets is
very high for the number of vertices in each osg::Geometry.  The use
of very short triangle strips rather than a single DrawElementsUShort
GL_TRIANGLES is the core of what is wrong with how the osg::Geometry
have been generated.

The source of this issue may be down to the .obj or perhaps original
data being very poorly set up.

Robert.

On 8 March 2017 at 09:39, Andre Normann < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Robert,

I used 3.2.3 to load the obj files and converted it into ive format. In
3.2.3 I load the ive file, build my scenegraph and I get 60 fps. When I now
load the same ive file into 3.4.0, build my scenegraph, I get the slow down.

- There must be something which is causing the slow down in OpenSceneGraph
- The obj loader is creating a lot of primitive sets, which is not optimal.
In near future I will try to fix that issue.

I created a test file. Simply do an "osgviewer SlowDownTest.zip".



2017-03-08 9:45 GMT+01:00 Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:

Hi Andre,

On 8 March 2017 at 08:40, Andre Normann < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
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.






Quote:
_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org








_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org








------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Multisampled FBO camera with shared d... HonzaS General 0 Fri Mar 17, 2017 3:19 pm View latest post
No new posts slow speed of osgDB::writeImageFile()... cbuchner1 General 0 Mon Sep 12, 2016 9:09 am View latest post
No new posts how safe is to add nodes in cull trav... Trajce Nikolov NICK General 3 Sat Sep 10, 2016 11:44 am View latest post
No new posts vpbmaster appears to slow down after ... etunko VirtualPlanetBuilder [vpb] 3 Wed Aug 31, 2016 9:35 am View latest post
No new posts Force redraw of PagedLOD nodes srappose General 4 Mon Aug 01, 2016 1:49 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP