Re: [osg-users] Dynamical loading of resources

2017-08-22 Thread Robert Osfield
Hi Joachim,

On 22 August 2017 at 14:05, Joachim Gehrung <
joachim.gehr...@iosb.fraunhofer.de> wrote:

> sorry for my late reply. One of my requirements is that the backend should
> be flexible... this was why is was so attached to the DatabasePager when I
> first heared about it ;). To me it sounded like the part one needs to
> exchange to switch backends. Well, if it isn't the DatabasePager, what is
> it then? As far as I were able to follow your suggestions, I may need
> different PagedLODs or some kind of plugin you mentioned, but I don't know
> about already, correct :)?
>

I think you mis-understood the role of the DatabasePager - it's the tool
that the manages the theading or loading, compile, merging and expiring
subgraphs, it doesn't do any loading itself, it defers all the loading to
the standard osgDB file loading mechniams managed by the osgDB::Registry.

To do different backends all you need is different plugins that do the
loading for you.


> A possible "backend" is of course the file system, but it should also be
> possible to handle a server with a proprietary protocol.
>

Have a look at the curl plugin that provides the OSG's support for
http/https loading of data.  This takes filenames as input and opens up a
connection using libcurl and then uses other OSG plugins to load the actual
data,

The curl plugin doesn't actually know anything about the DatabasePager and
the DatabasePager knows nothing about the curl plugin as the two are
completely independent yet work really well together.

Robert,
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Dynamical loading of resources

2017-08-22 Thread Joachim Gehrung
Hi,

sorry for my late reply. One of my requirements is that the backend should be 
flexible... this was why is was so attached to the DatabasePager when I first 
heared about it ;). To me it sounded like the part one needs to exchange to 
switch backends. Well, if it isn't the DatabasePager, what is it then? As far 
as I were able to follow your suggestions, I may need different PagedLODs or 
some kind of plugin you mentioned, but I don't know about already, correct :)?

A possible "backend" is of course the file system, but it should also be 
possible to handle a server with a proprietary protocol.

Thank you!

Cheers,
Joachim

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71495#71495





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Dynamical loading of resources

2017-08-15 Thread Robert Osfield
Hi Joachim,

On 15 August 2017 at 14:21, Joachim Gehrung <
joachim.gehr...@iosb.fraunhofer.de> wrote:

> ok, thank you. I think I'm starting to get the picture :). When you talk
> about a database, you mean just a bunch of files on the filesystem, not
> some kind of SQL database, right?
>

It could be either...

For VPB generated paged database what you have is set of files, with one
file as the topmost and lowest level of detail that your application loads
and then this topmost file contains a PageLOD that references a file
contains the next level details and so on.  With a quad tree you get four
more files for each level, for an octree you get eight more files.

For osgEarth it dynamically creates the PagedLOD subgraphs in that extract
image and elevation data from online or local raw data sources.

Other users have written custom osgPlugins that use tile references encoded
into the PagedLOD filename strings that the custom plugin uses to read from
an external source. some have even done this extracting the data from a SQL
database.


> I'm afraid I have to implement against our own backend. So let my guess, I
> would have to implement a subclass of the osgDB::DatabasePager to handle
> that?
>
>
Um... how many times do I have to say you don't need to subclass from
DatabasePager.

Repeat after me:
I don't need to subclass from DatabasePager.
I don't need to subclass from DatabasePager.
I don't need to subclass from DatabasePager.

:-)

All you need to do create a paged database using standard
osg::PagedLOD/osg::Geometry Nodes, you can do this offline like VPB or on
the fly like osgEarth.  I suspect a custom plugin might be the way from for
yourself, but this is just a guess, you haven't said anything how you data
is stored and should be accessed.  Please share info on how your data
stored and what it represents, this will help guide you in the right
direction.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Dynamical loading of resources

2017-08-15 Thread Joachim Gehrung
Hi,

ok, thank you. I think I'm starting to get the picture :). When you talk about 
a database, you mean just a bunch of files on the filesystem, not some kind of 
SQL database, right?

I'm afraid I have to implement against our own backend. So let my guess, I 
would have to implement a subclass of the osgDB::DatabasePager to handle that?

Cheers,
Joachim

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71419#71419





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Dynamical loading of resources

2017-08-15 Thread Joachim Gehrung
Hello Sebastian, hello Robert,

thank you for your quick reply. Paging.. I was thinking about a lot of search 
terms, but not this one. In retrospect it seems obvious :).

Pointers in direction of osg::PagedLOD and osgDB::DatabasePager were all I was 
looking for, thanks. I did some reading on the topic, but there is one thing I 
still might need your expertise. Lets say I want to use a data structure such 
as point clouds, which are not supported out of the box and I want to load them 
from a database with a non-standardised interface.

In this case, I would implement the visualization within a osg::PagedLOD. I 
would also write my own osgDB::DatabasePager and register it at the visualizer. 
Is that correct? And that's also how it would work within the context of OSG 
Earth, or are there additional layers around the problem?

Thanks and best regards,
Joachim

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71416#71416





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Dynamical loading of resources

2017-08-14 Thread Robert Osfield
Hi Jey,

The OSG is designed to fully support paging of databases.  There are many
discussions about paging here on the osg-users mailing list/forum so have a
look through the archives for discussions about osgDB::DatabasePager (the
class that manages the loading + unloading of data) and osg::PagedLOD (the
level of detail node that provides the hooks for external resources.)

The osgViewer::Viewer and CompositeViewer class have builtin support for
the DatabasePager so you don't need to explicitly do anything to leverage
the database paging - you just stick the appropriate PagedLOD's in your
database and everything will happen automatically for you.

osgEarth is built intop of PageLOD so leverages all the core OSG's
osgDB::DatabasePager support.
The VirtualPlanetBuilder tool provides another way for creating native OSG
paged databases from source geospatial imagery and DEMs.

Have a look at the archives though, there is wealth of discussion about
paging.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Dynamical loading of resources

2017-08-14 Thread Sebastian Messerschmidt


Hi Joachim,

Hi,

I was tasked with writing a visualizer for large 3D areas, the kind of areas 
that may not fit into RAM, either because they are too large, or because the 
RAM on the machine is not large enough ;).

I am new to OSG, this is my first post to the forum (hello, guys :)!). I was 
wondering how to perform out-of core handling of the 3D resources I intent to 
render. Its not possible for me to load everything and then start rendering, i 
need to constantly load new parts of the environment and unload geometry that 
is out of view.
That is where PagedLOD comes into play. It allows for background loading 
of tiles.


So I would like to know, is there any mechanism in OSG (or OSG Earth) which 
already supports this? Or would I have to implement it myself? Either way, I 
would be very happy if one of you could give me a rough explanation of how to 
approach this problem with OSG.


See the osgPagedLod example for reference.
If you need a resolution-pyramid approach, VPB(VirtualPlanetBuilder) can 
generate multiscale data for paging from various sources.
Sorry for just giving you pointers, but a short answer might be better 
than none ;-)


Thank you, I appreaciate yout help!

Cheers,
Jey

Cheers
Sebastian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71409#71409





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Dynamical loading of resources

2017-08-14 Thread Joachim Gehrung
Hi,

I was tasked with writing a visualizer for large 3D areas, the kind of areas 
that may not fit into RAM, either because they are too large, or because the 
RAM on the machine is not large enough ;).

I am new to OSG, this is my first post to the forum (hello, guys :)!). I was 
wondering how to perform out-of core handling of the 3D resources I intent to 
render. Its not possible for me to load everything and then start rendering, i 
need to constantly load new parts of the environment and unload geometry that 
is out of view.

So I would like to know, is there any mechanism in OSG (or OSG Earth) which 
already supports this? Or would I have to implement it myself? Either way, I 
would be very happy if one of you could give me a rough explanation of how to 
approach this problem with OSG. 

Thank you, I appreaciate yout help!

Cheers,
Jey

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71409#71409





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org