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 

OSGDem - generate OSG terrain with pivot?


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> VirtualPlanetBuilder [vpb]
View previous topic :: View next topic  
Author Message
dekosser
Newbie


Joined: 29 Aug 2013
Posts: 3

PostPosted: Tue Sep 03, 2013 1:15 pm    Post subject:
OSGDem - generate OSG terrain with pivot?
Reply with quote

Hi,

I am generating terrain patches which will eventually be parented in the scenegraph to transforms relative to a predefined runtime scene origin.

When using OSGDem to generate terrain tiles from UTM-georeferenced data, my geometry receives very large coordinates, which I would like to reposition relative to a specific UTM origin.

That's my goal - a hamfisted solution would be to translate everything by (-origin), including the PagedLOD Center, RangeLists, TerrainTiles and Heightfield Origin. There seems to be no built-in option to support this, although I imagine it's a common use case.

Am I missing something obvious?

Thank you!

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


Joined: 18 Mar 2009
Posts: 10989

PostPosted: Thu Sep 12, 2013 2:53 pm    Post subject:
OSGDem - generate OSG terrain with pivot?
Reply with quote

Hi Fred,

You shouldn't need to do anything to handle dataset with large values, the OSG and VPB are built to manage things for you.  When VPB builds databases it decorates subgraphs with local transforms that place the subgraphs into world coordinates, whilst the subgraph containing the geometry have a local origin.  By default the OSG uses doubles for Transforms in the scene graph and doubles in the Camera matrices, and the cull traversal accumulates these all in doubles before finally passing a single modelview matrix to OpenGL.  This approach ensures that you be the best possible precision when rendering whole earth datasets.


So the answer is, stop trying so hard, everything is being done for you already Wink


Robert.



On 3 September 2013 14:16, Fred Dorosh < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi,

I am generating terrain patches which will eventually be parented in the scenegraph to transforms relative to a predefined runtime scene origin.

When using OSGDem to generate terrain tiles from UTM-georeferenced data, my geometry receives very large coordinates, which I would like to reposition relative to a specific UTM origin.

That's my goal - a hamfisted solution would be to translate everything by (-origin), including the PagedLOD Center, RangeLists, TerrainTiles and Heightfield Origin. There seems to be no built-in option to support this, although I imagine it's a common use case.

Am I missing something obvious?

Thank you!

Cheers,
Fred

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





_______________________________________________
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
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> VirtualPlanetBuilder [vpb] 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 How to reduce the size of the terrain qiaokun VirtualPlanetBuilder [vpb] 0 Fri May 19, 2017 7:49 am View latest post
No new posts How to query height of terrain given ... vinothrajendran4 VirtualPlanetBuilder [vpb] 0 Tue Mar 14, 2017 2:43 pm View latest post
No new posts Height of terrain bhanu406 General 5 Fri Mar 03, 2017 7:56 am View latest post
No new posts Error building terrain with shapefile... robertosfield VirtualPlanetBuilder [vpb] 0 Mon Feb 06, 2017 9:11 am View latest post
No new posts Error building terrain with shapefile... vinothrajendran4 VirtualPlanetBuilder [vpb] 0 Mon Feb 06, 2017 6:24 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