OpenSceneGraph/osgEarth vs VulkanSceneGraph/vsgpagedlod

685 views
Skip to first unread message

Robert Osfield

unread,
Mar 17, 2021, 3:36:33 PM3/17/21
to OpenSceneGraph Users
Hi All,

Over the past 2 1/2 years I've been mainly focused on VulkanSceneGraph project, this isn't yet at 1.0 but it's come along nicely.  This week I wrote an example that illustrates how to use vsg::PagedLOD and vsg::ReaderWriter to implement paged database that streams data from online tile serves such a OpenStreetMap and ReadyMap.  It's like a very simple and crude demo of osgEarth style paging.

To look at the visual differences and performance differences I've recorded a camera animation path in osgviewer then run this same path with the same OpenStreetMap databasee in osgviewer using osgEarth, and then with the same path but using the new vsgpagedlod example.


I've upload the a video of running the two applications, first the OSG then VSG, to youtube:


The average fps for the 2 minutes camera animation path was 878fps for the OSG/osgEarth combo and 2698fps for VSG/vsgpagedlod, which is just under 3 times faster for the Vulkan/VulkanSceneGraph.

As I explain in the video it's not an exact like for like comparison as osgEarth is doing blending between LODs, while the VSG/vsgpagedlod is selecting a higher level of detail for a given view.

The osgviewer was run with default DrawThreadPerContext threading, while vsgpagedlod viewer was running single threaded.  In both cases the osgDB::DatabasePager and equivalent vsg::DatabasePager are doing all the loading in a set of background threads.

The VSG supports running viewer multi-threaded but is unnecessary in this instance as the cull/draw traversal/dispatch are all happening less than half a millisecond :-)

Nathan Mielcarek

unread,
Mar 23, 2021, 2:26:27 PM3/23/21
to osg-...@googlegroups.com
Robert,

Great news! I look forward to using this in the near future either through OSG directly or osgEarth.

Was a bit amused by your comment about the accuracy on "finding your house". I think it's a great feature, especially considering how that data can be used by autonomous vehicles eventually.

-Nathan

--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/b1adc63f-28b5-49b9-b200-1fcd5624b400n%40googlegroups.com.

Robert Osfield

unread,
Mar 23, 2021, 4:05:31 PM3/23/21
to OpenSceneGraph Users
Hi Nathan,

On Tue, 23 Mar 2021 at 18:26, Nathan Mielcarek <nmiel...@gmail.com> wrote:
Great news! I look forward to using this in the near future either through OSG directly or osgEarth.

The VSG is intended as the successor to the OSG and would typically be used instead of the OSG. The VSG is significantly faster than the OSG but is still in development so isn't feature complete and is still a moving target.  For now it's something folks who are happy to work on the bleeding edge in order to get best performance.

One could integrate OSG/VSG into a single application using OpenGL/Vulkan extensions to exchange data between them. Thomas Hogarth didn;'t some work on this earlier in the VSG project, this work needs updating and porting to work across all platforms.
 
Was a bit amused by your comment about the accuracy on "finding your house". I think it's a great feature, especially considering how that data can be used by autonomous vehicles eventually.

It's impressive how so much verifiably accurate data is publically available, also a bit unnerving.

Cheers,
Robert,
 

Jason Beverage

unread,
Mar 24, 2021, 11:22:22 AM3/24/21
to OpenSceneGraph Users, OpenSceneGraph Users
Very impressive Robert!  As you said, comparing osgEarth to your example isn't exactly apples to apples since the implementation under the hood is quite different but this is still great.

From what I've seen from your performance reporting, vsg is significantly faster than osg in most of your tests.  Do you have a feel for how much of that is just Vulkan being faster than OpenGL vs some of the other improvements you've made in design decisions of VSG vs OSG?  Are there any opportunities for porting some of the structures or concepts from VSG back to OSG to get some of the performance benefits you've seen in VSG in OSG?

Jason

--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+...@googlegroups.com.

Chris Hanson

unread,
Mar 24, 2021, 12:05:22 PM3/24/21
to OpenSceneGraph Users, OpenSceneGraph Users

From what I've seen from your performance reporting, vsg is significantly faster than osg in most of your tests.  Do you have a feel for how much of that is just Vulkan being faster than OpenGL vs some of the other improvements you've made in design decisions of VSG vs OSG?  Are there any opportunities for porting some of the structures or concepts from VSG back to OSG to get some of the performance benefits you've seen in VSG in OSG?

(Not answering for Robert, but you've touched on something I have an interest in.)

My understanding from Robert is that while Vulkan can be faster than OpenGL, there are also many opportunities taken to make the scene graph itself faster  (better code design, removal/optionalizing of features that degrade performance, improving memory layouts eg. Structures of Arrays instead of Arrays of Structures, etc).

I've mulled over the idea of taking the OSG and refactoring it to make the same architectural scene graph changes (and feature removals!) Robert implemented in VSG and making in effect an OSG that is class-compatible with VSG but still runs on (modern) OpenGL. I think it's a viable concept, and would make a nice stepping stone towards porting applications to VSG, but so far, I haven't convinced any funders to support it.

If there was someone wanting to move a big OSG application to VSG and needed assistance getting there, it might become a reality, but I can't fund it out of pocket myself.
 

Jason

On Tue, Mar 23, 2021 at 4:05 PM Robert Osfield <robert....@gmail.com> wrote:
Hi Nathan,

On Tue, 23 Mar 2021 at 18:26, Nathan Mielcarek <nmiel...@gmail.com> wrote:
Great news! I look forward to using this in the near future either through OSG directly or osgEarth.

The VSG is intended as the successor to the OSG and would typically be used instead of the OSG. The VSG is significantly faster than the OSG but is still in development so isn't feature complete and is still a moving target.  For now it's something folks who are happy to work on the bleeding edge in order to get best performance.

One could integrate OSG/VSG into a single application using OpenGL/Vulkan extensions to exchange data between them. Thomas Hogarth didn;'t some work on this earlier in the VSG project, this work needs updating and porting to work across all platforms.
 
Was a bit amused by your comment about the accuracy on "finding your house". I think it's a great feature, especially considering how that data can be used by autonomous vehicles eventually.

It's impressive how so much verifiably accurate data is publically available, also a bit unnerving.

Cheers,
Robert,
 

--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BW1ELMrv540_3UE%3D1%3DpuFrO6WtCTrLH0%3DQkT2g46rznCg%40mail.gmail.com.
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+...@googlegroups.com.

Robert Osfield

unread,
Mar 24, 2021, 12:18:52 PM3/24/21
to OpenSceneGraph Users
Hi Jason,

On Wed, 24 Mar 2021 at 15:22, Jason Beverage <jasonb...@gmail.com> wrote:
Very impressive Robert!  As you said, comparing osgEarth to your example isn't exactly apples to apples since the implementation under the hood is quite different but this is still great.

Thanks.  Indeed it's apples to oranges comparison so we shouldn't draw too many conclusions.  I guess I could rewrite the vsgpagedlod example into an OSG equivalent so all the settings are the same.  I'd actually be quite a nice OSG examp[le.  My priority for the OSG is support so I'll have to leave this to others.
 
From what I've seen from your performance reporting, vsg is significantly faster than osg in most of your tests.  Do you have a feel for how much of that is just Vulkan being faster than OpenGL vs some of the other improvements you've made in design decisions of VSG vs OSG?  Are there any opportunities for porting some of the structures or concepts from VSG back to OSG to get some of the performance benefits you've seen in VSG in OSG?

The CPU overhead is much lower in the VSG than the OSG due to architecture changes in the core Object/Node structure to reduce memory footprint/bandwidth load and to avoid conditionals, These could be ported into an OSG lite, but it'd break compatibility with a great many applications - no BoundingSphere on all nodes, no NodeMask, no Callbacks, no ancillary data stored in Object/Node.  It would break so many applications and even the OSG itself it wouldn't be a small task to update everything.

The differences are fundamental to the VSG delivering on the performance capability that Vulkan provides, without it you'd only see a small % improvement here or there if porting the OSG from OpenGL to Vulkan.  I've a few applications and libraries that cite modest improvements when porting to Vulkan, and don't recall any that claim 3 x to 10+ x faster than I'm seeing on OSG vs VSG.  I think this either means the OSG is more of CPU hog that we've long assumed or the VSG does a better job of not holding Vulkan back by designing everything from the ground up to not get in the way as much as possible.  I suspect it's a bit of both.

 Cheers,
Robert.
Reply all
Reply to author
Forward
0 new messages