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 

Significant drop in frame rate when updating from OSG 3.2.1 to 3.4.0


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
wernerM
User


Joined: 06 Feb 2013
Posts: 66

PostPosted: Mon Mar 20, 2017 3:32 pm    Post subject:
Significant drop in frame rate when updating from OSG 3.2.1 to 3.4.0
Reply with quote

Hi Robert,

I updated my project from version 3.2.1 to 3.4.0.
I'm on Window 7 Pro.
Unfortunately the frame rate dropped significantly from 60 fps to 2.x fps.
I verified it several times by just linking to the 2 versions without any change of my code.
Please see the 2 screen shots with the stats output.

Do you have any idea what might be the reason for it or how I can do further analysis?

Thanks for any idea.

- Werner -

Ich habe 2 zu dieser E-Mail gehörende Dateien hochgeladen:
OSG 3.4.0.png(727 KB)Hightailhttps://www.hightail.com/download/dDZFdFdRMm1veE5vZE1UQw
OSG 3.2.1.png(628 KB)Hightailhttps://www.hightail.com/download/dDZFdFdRMm1veE5jR01UQw

Mozilla Thunderbird macht es einfach, große Dateien über E-Mails zu teilen.

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11238

PostPosted: Mon Mar 20, 2017 5:11 pm    Post subject:
Significant drop in frame rate when updating from OSG 3.2.1 to 3.4.0
Reply with quote

Hi Werner,


Hopefully others will be able to chip in as I don't have a answer right now, it's certainly very odd.  If it were a general problem then we'd seen lots of issue with it being reported.

With this level of slow down it's almost like your'e invoking a software renderer when running with 3.4.0.


My next thought is that perhaps an OpenGL error is being invoked somehow. Are there any errors being reported to the console?


What happens with the standard OSG example set?  Does osgviewer run any differently with models you have on the two versions.


Robert.








On 20 March 2017 at 15:29, Werner Modenbach < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Robert,

I updated my project from version 3.2.1 to 3.4.0.
I'm on Window 7 Pro.
Unfortunately the frame rate dropped significantly from 60 fps to 2.x fps.
I verified it several times by just linking to the 2 versions without any change of my code.
Please see the 2 screen shots with the stats output.

Do you have any idea what might be the reason for it or how I can do further analysis?

Thanks for any idea.

- Werner -

Ich habe 2 zu dieser E-Mail gehörende Dateien hochgeladen:
OSG 3.4.0.png(727 KB)Hightailhttps://www.hightail.com/download/dDZFdFdRMm1veE5vZE1UQw
OSG 3.2.1.png(628 KB)Hightailhttps://www.hightail.com/download/dDZFdFdRMm1veE5jR01UQw

Mozilla Thunderbird macht es einfach, große Dateien über E-Mails zu teilen.




_______________________________________________
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
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11238

PostPosted: Tue Mar 28, 2017 4:25 pm    Post subject:
Significant drop in frame rate when updating from OSG 3.2.1 to 3.4.0
Reply with quote

Hi Wener,

On 28 March 2017 at 16:24, Werner Modenbach < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
I know it is actually not your duty giving help here but you are very
familiar with the driver calls and it would help a lot if you can provide
an idea what kind of setting might cause this issue.



I'm a very occasional Windows user so really don't have much experience with Windows drivers to be able help with driver settings.



It's a long shot, but have your tried the OSG-3.4 branch or OSG master as these both contain a range of bug fixes/OSG improvements, there is chance that something has changed that might fix things. 

Whatever the cause is it seems to be some small OpenGL state difference between OSG-3.2 and OSG-3.4.0, I'm afraid I don't know what this might be.  Perhaps using a 3rd party OpenGL debugging tool might help here - capture all the GL calls for 3.2.x and 3.4.x and see what the differences are.


Robert.

 

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


Joined: 06 Feb 2013
Posts: 66

PostPosted: Fri Mar 31, 2017 11:14 am    Post subject:
Significant drop in frame rate when updating from OSG 3.2.1 to 3.4.0
Reply with quote

Hi Robert,

the 3.4.0 tagged version is OK with the frame rate.
We discovered your commit in the 3.4 branch causing the problem:

From 1f1c21772ae0dd10a93cd31ab81bf563802b7b2d Mon Sep 17 00:00:00 2001
Quote:
From: Robert Osfield <> (
Only registered users can see emails on this board!
Get registred or enter the forums!
)
Quote:
Date: Thu, 3 Nov 2016 11:31:07 +0000
Quote:
Subject: Added check against binding type of array to decide whether it's
Quote:
appropriate to assign array to VBO.
Quote:
diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp
Quote:
index 779e8cd..244bf25 100644
Quote:
--- a/src/osg/Geometry.cpp
Quote:
+++ b/src/osg/Geometry.cpp
Quote:
@@ -445,7 +445,7 @@ bool Geometry::getDrawElementsList(DrawElementsList& drawElementsList) const
Quote:
Date: Thu, 3 Nov 2016 11:31:07 +0000
0
Quote:
Date: Thu, 3 Nov 2016 11:31:07 +0000
1
Quote:
Date: Thu, 3 Nov 2016 11:31:07 +0000
2
Quote:
Date: Thu, 3 Nov 2016 11:31:07 +0000
3
Quote:
Date: Thu, 3 Nov 2016 11:31:07 +0000
4
Quote:
Date: Thu, 3 Nov 2016 11:31:07 +0000
5
Quote:
Date: Thu, 3 Nov 2016 11:31:07 +0000
6
The question is: Why is the viewer frame rate OK, even it is built with the same version we are using?
What are we doing different to the viewer?

Thanks so much for your excellent work!

- Werner -

Am 28.03.2017 um 18:22 schrieb Robert Osfield:

Quote:
Hi Wener,

On 28 March 2017 at 16:24, Werner Modenbach < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
I know it is actually not your duty giving help here but you are very
familiar with the driver calls and it would help a lot if you can provide
an idea what kind of setting might cause this issue.



I'm a very occasional Windows user so really don't have much experience with Windows drivers to be able help with driver settings.



It's a long shot, but have your tried the OSG-3.4 branch or OSG master as these both contain a range of bug fixes/OSG improvements, there is chance that something has changed that might fix things. 

Whatever the cause is it seems to be some small OpenGL state difference between OSG-3.2 and OSG-3.4.0, I'm afraid I don't know what this might be.  Perhaps using a 3rd party OpenGL debugging tool might help here - capture all the GL calls for 3.2.x and 3.4.x and see what the differences are.


Robert.

 





Quote:
Date: Thu, 3 Nov 2016 11:31:07 +0000
7

--
TEXION Software Solutions, Rotter Bruch 26a, D-52068 Aachen
Phone: +49 241 475757-0
Fax: +49 241 475757-29
Web: http://texion.eu
eMail: (
Only registered users can see emails on this board!
Get registred or enter the forums!
)

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


Joined: 06 Feb 2013
Posts: 66

PostPosted: Fri Mar 31, 2017 1:43 pm    Post subject:
Significant drop in frame rate when updating from OSG 3.2.1 to 3.4.0
Reply with quote

Hi Robert,

final analysis:

In our software we did the following patch to make it run with high fps in master of 3.4 branch:

Quote:
osgNormals = new osg::Vec3Array;
Quote:
+ osgNormals->setBinding(osg::Array::BIND_PER_VERTEX);
Quote:
geometry->setNormalArray(osgNormals.get());
Quote:
geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
Obviously we have to set the binding in the array itself and the setNormalBinding works but has poor performance.

Now we are happy again Smile

- Werner -

Am 31.03.2017 um 13:11 schrieb Werner Modenbach:

Quote:
Hi Robert,

the 3.4.0 tagged version is OK with the frame rate.
We discovered your commit in the 3.4 branch causing the problem:

From 1f1c21772ae0dd10a93cd31ab81bf563802b7b2d Mon Sep 17 00:00:00 2001
Quote:
From: Robert Osfield <> (
Only registered users can see emails on this board!
Get registred or enter the forums!
)
Quote:
Date: Thu, 3 Nov 2016 11:31:07 +0000
Quote:
Subject: Added check against binding type of array to decide whether it's
Quote:
appropriate to assign array to VBO.
Quote:
diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp
Quote:
+ osgNormals->setBinding(osg::Array::BIND_PER_VERTEX);
0
Quote:
+ osgNormals->setBinding(osg::Array::BIND_PER_VERTEX);
1
Quote:
+ osgNormals->setBinding(osg::Array::BIND_PER_VERTEX);
2
Quote:
+ osgNormals->setBinding(osg::Array::BIND_PER_VERTEX);
3
Quote:
+ osgNormals->setBinding(osg::Array::BIND_PER_VERTEX);
4
Quote:
+ osgNormals->setBinding(osg::Array::BIND_PER_VERTEX);
5
Quote:
+ osgNormals->setBinding(osg::Array::BIND_PER_VERTEX);
6
Quote:
+ osgNormals->setBinding(osg::Array::BIND_PER_VERTEX);
7
Quote:
+ osgNormals->setBinding(osg::Array::BIND_PER_VERTEX);
8
Quote:
+ osgNormals->setBinding(osg::Array::BIND_PER_VERTEX);
9
Quote:
geometry->setNormalArray(osgNormals.get());
0
Quote:
geometry->setNormalArray(osgNormals.get());
1
The question is: Why is the viewer frame rate OK, even it is built with the same version we are using?
What are we doing different to the viewer?

Thanks so much for your excellent work!

- Werner -

Am 28.03.2017 um 18:22 schrieb Robert Osfield:

Quote:
Hi Wener,

On 28 March 2017 at 16:24, Werner Modenbach < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
I know it is actually not your duty giving help here but you are very
familiar with the driver calls and it would help a lot if you can provide
an idea what kind of setting might cause this issue.



I'm a very occasional Windows user so really don't have much experience with Windows drivers to be able help with driver settings.



It's a long shot, but have your tried the OSG-3.4 branch or OSG master as these both contain a range of bug fixes/OSG improvements, there is chance that something has changed that might fix things. 

Whatever the cause is it seems to be some small OpenGL state difference between OSG-3.2 and OSG-3.4.0, I'm afraid I don't know what this might be.  Perhaps using a 3rd party OpenGL debugging tool might help here - capture all the GL calls for 3.2.x and 3.4.x and see what the differences are.


Robert.

 





Quote:
geometry->setNormalArray(osgNormals.get());
2

--
TEXION Software Solutions, Rotter Bruch 26a, D-52068 Aachen
Phone: +49 241 475757-0
Fax: +49 241 475757-29
Web: http://texion.eu
eMail: (
Only registered users can see emails on this board!
Get registred or enter the forums!
)



Quote:
geometry->setNormalArray(osgNormals.get());
3

--
TEXION Software Solutions, Rotter Bruch 26a, D-52068 Aachen
Phone: +49 241 475757-0
Fax: +49 241 475757-29
Web: http://texion.eu
eMail: (
Only registered users can see emails on this board!
Get registred or enter the forums!
)

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11238

PostPosted: Fri Mar 31, 2017 2:05 pm    Post subject:
Significant drop in frame rate when updating from OSG 3.2.1 to 3.4.0
Reply with quote

Hi Werner,

Great to her you got to the bottom of this issue, amazing how such a
small and innocuous looking change can have such a dramatic impact.

BTW, the short hand for setting the binding in OSG-3.4 onwards is:

geometry-setNormalArray(array, osg::Array::BIND_PER_VERTEX);

The separate setNormalBinding(...) method is now deprecated as
osg::Array itself now manages the Binding rather than osg::Geometry.

Robert.

Robert.

On 31 March 2017 at 14:39, Werner Modenbach <> wrote:
Quote:
Hi Robert,

final analysis:

In our software we did the following patch to make it run with high fps in
master of 3.4 branch:

osgNormals = new osg::Vec3Array;

+ osgNormals->setBinding(osg::Array::BIND_PER_VERTEX);

geometry->setNormalArray(osgNormals.get());

geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);



Obviously we have to set the binding in the array itself and the
setNormalBinding works but has poor performance.

Now we are happy again :-)

- Werner -


Am 31.03.2017 um 13:11 schrieb Werner Modenbach:

Hi Robert,

the 3.4.0 tagged version is OK with the frame rate.
We discovered your commit in the 3.4 branch causing the problem:

From 1f1c21772ae0dd10a93cd31ab81bf563802b7b2d Mon Sep 17 00:00:00 2001

From: Robert Osfield <>

Date: Thu, 3 Nov 2016 11:31:07 +0000

Subject: Added check against binding type of array to decide whether it's

appropriate to assign array to VBO.

diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp

index 779e8cd..244bf25 100644

--- a/src/osg/Geometry.cpp

+++ b/src/osg/Geometry.cpp

@@ -445,7 +445,7 @@ bool Geometry::getDrawElementsList(DrawElementsList&
drawElementsList) const



void Geometry::addVertexBufferObjectIfRequired(osg::Array* array)

{

- if (_useVertexBufferObjects)

+ if (_useVertexBufferObjects &&
array->getBinding()==Array::BIND_PER_VERTEX)

{

if (!array->getVertexBufferObject())

{


The question is: Why is the viewer frame rate OK, even it is built with the
same version we are using?
What are we doing different to the viewer?

Thanks so much for your excellent work!

- Werner -

Am 28.03.2017 um 18:22 schrieb Robert Osfield:

Hi Wener,

On 28 March 2017 at 16:24, Werner Modenbach <>
wrote:
Quote:

I know it is actually not your duty giving help here but you are very
familiar with the driver calls and it would help a lot if you can provide
an idea what kind of setting might cause this issue.


I'm a very occasional Windows user so really don't have much experience with
Windows drivers to be able help with driver settings.

It's a long shot, but have your tried the OSG-3.4 branch or OSG master as
these both contain a range of bug fixes/OSG improvements, there is chance
that something has changed that might fix things.

Whatever the cause is it seems to be some small OpenGL state difference
between OSG-3.2 and OSG-3.4.0, I'm afraid I don't know what this might be.
Perhaps using a 3rd party OpenGL debugging tool might help here - capture
all the GL calls for 3.2.x and 3.4.x and see what the differences are.

Robert.






--
TEXION Software Solutions, Rotter Bruch 26a, D-52068 Aachen
Phone: +49 241 475757-0
Fax: +49 241 475757-29
Web: http://texion.eu
eMail:





--
TEXION Software Solutions, Rotter Bruch 26a, D-52068 Aachen
Phone: +49 241 475757-0
Fax: +49 241 475757-29
Web: http://texion.eu
eMail:





------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
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 measuring a frame Trajce Nikolov NICK General 2 Mon Nov 06, 2017 12:57 am View latest post
No new posts Call for assistance: Migrating and up... Chris Hanson General 11 Mon Oct 09, 2017 4:07 pm View latest post
No new posts Frame rate improvement Ale General 4 Fri Sep 22, 2017 9:44 am View latest post
No new posts Running a per-frame task on the graph... James Turner General 2 Fri Sep 22, 2017 8:53 am View latest post
No new posts ViewerBase::frame() method slow after... gambr General 8 Fri Jul 21, 2017 9:11 am 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