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 

Database pager and failed loading of PagedLOD's children


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


Joined: 20 Mar 2009
Posts: 128

PostPosted: Sun Mar 04, 2018 5:51 pm    Post subject:
Database pager and failed loading of PagedLOD's children
Reply with quote

Hi,

I use PagedLODs and the database pager to load dynamically nodes. Here is the pseudo code:

Code:

pagedLOD->addChild(nodePtr,limit,std::numeric_limits<float>::max);
pagedLOD->setFileName(1,fileName);
pagedLOD->setRange(1,0.0,limit);


In case the pseudo-loader for fileName fails I would like to keep the child at position zero (here called nodePtr).

What is the best method to achieve this?

Thank you!

Cheers,
Hartwig

PS: Sorry for posting this item also in the wrong forum. Crying or Very sad
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12148

PostPosted: Sun Mar 04, 2018 5:56 pm    Post subject:
Database pager and failed loading of PagedLOD's children
Reply with quote

As for the particular question, the OSG requests children that are
required for a given range when then come into range, and while they
aren't available will automatically fallback to the next highest level
of detail until this child is loaded.

So... in your case if child 1 fails to load when request the OSG will
just keep fallback back to child 0 automatically.

On 4 March 2018 at 17:51, Hartwig Wiesmann <> wrote:
Quote:
Hi,

I use PagedLODs and the database pager to load dynamically nodes. Here is the pseudo code:


Code:

pagedLOD->addChild(nodePtr,limit,std::numeric_limits<float>::max);
pagedLOD->setFileName(1,fileName);
pagedLOD->setRange(1,0.0,limit);




In case the pseudo-loader for fileName fails I would like to keep the child at position zero (here called nodePtr).

What is the best method to achieve this?

Thank you!

Cheers,
Hartwig

PS: Sorry for posting this item also in the wrong forum. :'

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








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


Joined: 20 Mar 2009
Posts: 128

PostPosted: Sun Mar 04, 2018 9:02 pm    Post subject:
Reply with quote

Hi Robert,

the problem seems to be that the database pager (respectively the paged LOD) keeps trying to load the node that fails to load. To stop this I somehow have to tell the paged LOD to stop loading the children, or I have to modify the limits. But for doing so I need to know when a child fails to load.


Cheers,
Hartwig
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12148

PostPosted: Mon Mar 05, 2018 8:25 am    Post subject:
Database pager and failed loading of PagedLOD's children
Reply with quote

HI Hatwig,

On 4 March 2018 at 21:02, Hartwig Wiesmann <> wrote:
Quote:
the problem seems to be that the database pager (respectively the paged LOD) keeps trying to load the node that fails to load. To stop this I somehow have to tell the paged LOD to stop loading the children, or I have to modify the limits. But for doing so I need to know when a child fails to load.

This repeating of requests is part of the design of
PagedLOD/DatabasePager, the pager gets requested each time a LOD level
is selected as required by the cull traversal isn't available. This
request happens every frame till that LOD level is loaded or isn't
required anymore. The later part is the key to why the mechanism is
used, the pager prunes requests that are no longer being requested so
that areas that you move out of view don't get paged in as they aren't
needed anymore. This mechanism is crucial part of achieving the
lowest latency on loading tiles that are required for the view on
screen. The faster moving the view is the more important it becomes -
think flight simulators etc.

For you usage case it sounds like your database isn't complete for
some reason, the current design+implementation doesn't have any
fallback mechanism for incomplete paged databases. Nothing untoward
should happen in this case, all will happen is that the paging thread
will spend a bit of time trying and failing, so it'll lower
performance a bit but that's it. If the database is fixed while the
application is running - for instance a lost http connection is
re-established then finally the tiles can be loaded, so this scheme
will isn't 100% efficient in the failure case it does add resilience.

If it really is the case that a file request failure is permanent for
the life of the application then what you'd ideally want to do is have
the missing child entry into PageLOD be filled in be the child before
it. This would then kill off any future requests for the missing
child. Save for modifying the core OSG (PagedLOD/DatabasePager) to
add support this particular behaviour it wouldn't be straight forward,
but there is chance you might be able to use a combination of a
osgDB::Option object with a ReadFileCallback assigned to it such that
it uses the existing PagedLOD children as fallback.

Robert


------------------
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 the speed of PagedLOD create nodes snowlove General 0 Thu Sep 20, 2018 8:07 am View latest post
No new posts Load OSG trimesh to ODE: Read Vertice... TKoller General 2 Fri Jul 20, 2018 3:06 pm View latest post
No new posts error while loading .iv file in opens... Rj@123 General 0 Wed Jun 20, 2018 10:52 am View latest post
No new posts osgQt failed in QT 5.10.1 + osg 3.6 feelapi General [3rdparty] 3 Fri May 11, 2018 12:31 pm View latest post
No new posts Support for loading cubemap images in... Farshid Lashkari Submission 7 Wed May 09, 2018 5:56 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