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 

Multiple maps in model with osgdem? (vpb)


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


Joined: 04 Sep 2011
Posts: 3

PostPosted: Sun Sep 04, 2011 12:46 am    Post subject:
Multiple maps in model with osgdem? (vpb)
Reply with quote

Hi,

I am not sure if this is even possible, but I would like to use 5 or 6 different maps taken at varying altitudes but of the same region and create one model/map.

As a user zooms in on the model/map the texture would update.

For example: Say I had a map of North America, then a more detailed map of the United States, and finally another detailed map of just a state in the US. As the user zooms in they would see North America, then the United States, and finally a detailed state map.

From the little bit of experimenting I have done, I have thrown all the geotiffs in one folder (from all 3 different maps) and built a model. What I am seeing is parts of the map are at the original scale (North America), then the regions of North America that have more detailed tiles available from the "sub" maps are simply overwritten with the more detailed tiles. So its like 3 different map formats all on one map and looks like some kind of Frankenstein monster.

What I would like is for all of the North America map to display, then as the user zooms in, if a more detailed view/map is available, it should update accordingly, showing the detailed portions only if the user is at the necessary scale/zoom level.

I hope this makes sense, I feel I explained it horribly. Is this even possible using VPB/osgdem? Are there any other tools that may work better?


Thank you!

Cheers,
Chris
Back to top
View user's profile Send private message
Martin Naylor
Guest





PostPosted: Thu Sep 08, 2011 10:08 pm    Post subject:
Multiple maps in model with osgdem? (vpb)
Reply with quote

Hi,
I believe it may be possible with vpb.
But you may want to take a look at osgearth, it has some features you need
such fade in between layers.
My knowledge on the two is minimal, but it may help?
Regards
Martin Naylor


-----Original Message-----
From:
[mailto:] On Behalf Of Chris Ess
Sent: 04 September 2011 01:46
To:
Subject: [vpb] Multiple maps in model with osgdem? (vpb)

Hi,

I am not sure if this is even possible, but I would like to use 5 or 6
different maps taken at varying altitudes but of the same region and create
one model/map.

As a user zooms in on the model/map the texture would update.

For example: Say I had a map of North America, then a more detailed map of
the United States, and finally another detailed map of just a state in the
US. As the user zooms in they would see North America, then the United
States, and finally a detailed state map.

Quote:
From the little bit of experimenting I have done, I have thrown all the
geotiffs in one folder (from all 3 different maps) and built a model. What
I am seeing is parts of the map are at the original scale (North America),
then the regions of North America that have more detailed tiles available
from the "sub" maps are simply overwritten with the more detailed tiles. So
its like 3 different map formats all on one map and looks like some kind of
Frankenstein monster.

What I would like is for all of the North America map to display, then as
the user zooms in, if a more detailed view/map is available, it should
update accordingly, showing the detailed portions only if the user is at the
necessary scale/zoom level.

I hope this makes sense, I feel I explained it horribly. Is this even
possible using VPB/osgdem? Are there any other tools that may work better?


Thank you!

Cheers,
Chris

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









------------------
Post generated by Mail2Forum
Back to top
Brad Christiansen
User


Joined: 04 Nov 2010
Posts: 91

PostPosted: Fri Sep 09, 2011 5:01 am    Post subject:
Multiple maps in model with osgdem? (vpb)
Reply with quote

Hi,

What you want is possible with VPB by restricting the levels at which the maps are used. I cant remember the options off the top of my head, but you will need to specify each source individually and specify at what levels it should be used. From memory, the levels are quad tree levels so you may need to do some calculations of your own (or use trial and error) to figure out what level a certain map should become available.

Cheers,
Brad

-----Original Message-----
From: [mailto:] On Behalf Of Martin Naylor
Sent: Friday, 9 September 2011 6:11 AM
To:
Subject: Re: [vpb] Multiple maps in model with osgdem? (vpb)

Hi,
I believe it may be possible with vpb.
But you may want to take a look at osgearth, it has some features you need
such fade in between layers.
My knowledge on the two is minimal, but it may help?
Regards
Martin Naylor


-----Original Message-----
From:
[mailto:] On Behalf Of Chris Ess
Sent: 04 September 2011 01:46
To:
Subject: [vpb] Multiple maps in model with osgdem? (vpb)

Hi,

I am not sure if this is even possible, but I would like to use 5 or 6
different maps taken at varying altitudes but of the same region and create
one model/map.

As a user zooms in on the model/map the texture would update.

For example: Say I had a map of North America, then a more detailed map of
the United States, and finally another detailed map of just a state in the
US. As the user zooms in they would see North America, then the United
States, and finally a detailed state map.

Quote:
From the little bit of experimenting I have done, I have thrown all the
geotiffs in one folder (from all 3 different maps) and built a model. What
I am seeing is parts of the map are at the original scale (North America),
then the regions of North America that have more detailed tiles available
from the "sub" maps are simply overwritten with the more detailed tiles. So
its like 3 different map formats all on one map and looks like some kind of
Frankenstein monster.

What I would like is for all of the North America map to display, then as
the user zooms in, if a more detailed view/map is available, it should
update accordingly, showing the detailed portions only if the user is at the
necessary scale/zoom level.

I hope this makes sense, I feel I explained it horribly. Is this even
possible using VPB/osgdem? Are there any other tools that may work better?


Thank you!

Cheers,
Chris

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










-------------------------------------------------------------------------
DISCLAIMER: This e-mail transmission and any documents, files and
previous e-mail messages attached to it are private and confidential.
They may contain proprietary or copyright material or information that
is subject to legal professional privilege. They are for the use of
the intended recipient only. Any unauthorised viewing, use, disclosure,
copying, alteration, storage or distribution of, or reliance on, this
message is strictly prohibited. No part may be reproduced, adapted or
transmitted without the written permission of the owner. If you have
received this transmission in error, or are not an authorised recipient,
please immediately notify the sender by return email, delete this
message and all copies from your e-mail system, and destroy any printed
copies. Receipt by anyone other than the intended recipient should not
be deemed a waiver of any privilege or protection. Thales Australia
does not warrant or represent that this e-mail or any documents, files
and previous e-mail messages attached are error or virus free.

-------------------------------------------------------------------------



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


Joined: 23 May 2009
Posts: 621

PostPosted: Fri Sep 09, 2011 6:06 am    Post subject:
Reply with quote

Hi,

if you use VPB and restrict your differnet maps to different levels, be aware of the popping effect if you change your camera position and run into a new map.

If you want a smooth transition ( blending) between the different map, look at the osgmultitexturecontrol example and configure your VPB run to add every map to a different texture layer. I thing the osgMultiTextureControl allows up to 3 different layers.



Thank you!

Cheers,
Torben
Back to top
View user's profile Send private message
cfsb78
Newbie


Joined: 04 Sep 2011
Posts: 3

PostPosted: Fri Sep 09, 2011 1:43 pm    Post subject:
Reply with quote

Thanks the responses everyone! This is actually very exciting news, as I was getting ready to redesign some software I have been working on to try to force the same effect (and the deadline is in less than a week!).

Now, I will have to ask that you excuse my ignorance, but I am very unfamiliar with the vpb tool and mapping tools in general to be honest. The application I am using requires that I use VPB/osgdem 0.9.10 since we are using a third party library that runs on top of an older version of openscenegraph to display the maps. The command that I have been using to generate maps from the GEOTIFF textures I have is something like the following:

Code:

osgdem -o MyMap.ive -l 15 --compressed --skirt-ratio 0.0 --levels 0 15 -t MyGeotiffTextureDir


I have looked up the command line options on the "Osgdem/vpbmaster Command Line Options" page
I noticed there is a list /w a small description but it didn't seem very helpful unless you already have some experience with how the application works. I have geotiffs taken from a number of different scales (in separate directories) : 5M:1, 1M:1, 500K:1, 250K:1, 100K:1 ...etc

I guess where I am getting confused is how I specify what scale of textures I want to show at what levels. Its my understanding that using the command above, I am currently generating 15 levels. Any thoughts on how to specify textures at each of those levels? Can I specify each level with a different "-t TextureDir" argument? Also, is osgdem "smart" enough to figure out when the best time to show the next level is based on scale?

As far as the "popping" effect mentioned earlier, that isn't a concern. It may actually be better as our customers will be able to recognize when they are looking at different map data/scales.

Any quick responses are greatly appreciated as I am under a bit of a time crunch!

Thank you!

Chris
Back to top
View user's profile Send private message
Brad Christiansen
User


Joined: 04 Nov 2010
Posts: 91

PostPosted: Mon Sep 12, 2011 5:30 am    Post subject:
Multiple maps in model with osgdem? (vpb)
Reply with quote

Hi,

Some quick answers for you:

Quote:
Quote:
. Any thoughts on how to specify textures at each of those levels? Can I specify each level with a different "-t TextureDir" argument?

You use the '--levels' argument, one for each source. For example:
--levels 0 5 -t GeoTiff1.tiff --levels 6 10 -t GeoTiff2.tiff --levels 11 15 -t GeoTiff3.tiff

Quote:
Quote:
Also, is osgdem "smart" enough to figure out when the best time to show the next level is based on scale?
In short, no. The longer answer is that all the infornation is actually available internally to osgdem but there is no mechanism exposed to use this info in the way you wish (unless this has chaanged since I last worked with the code)

Cheers,
Brad



-----Original Message-----
From: [mailto:] On Behalf Of Chris Ess
Sent: Friday, 9 September 2011 9:43 PM
To:
Subject: Re: [vpb] Multiple maps in model with osgdem? (vpb)

Thanks the responses everyone! This is actually very exciting news, as I was getting ready to redesign some software I have been working on to try to force the same effect (and the deadline is in less than a week!).

Now, I will have to ask that you excuse my ignorance, but I am very unfamiliar with the vpb tool and mapping tools in general to be honest. The application I am using requires that I use VPB/osgdem 0.9.10 since we are using a third party library that runs on top of an older version of openscenegraph to display the maps. The command that I have been using to generate maps from the GEOTIFF textures I have is something like the following:


Code:

osgdem -o MyMap.ive -l 15 --compressed --skirt-ratio 0.0 --levels 0 15 -t MyGeotiffTextureDir




I have looked up the command line options on the "Osgdem/vpbmaster Command Line Options" page
I noticed there is a list /w a small description but it didn't seem very helpful unless you already have some experience with how the application works. I have geotiffs taken from a number of different scales (in separate directories) : 5M:1, 1M:1, 500K:1, 250K:1, 100K:1 ...etc

I guess where I am getting confused is how I specify what scale of textures I want to show at what levels. Its my understanding that using the command above, I am currently generating 15 levels. Any thoughts on how to specify textures at each of those levels? Can I specify each level with a different "-t TextureDir" argument? Also, is osgdem "smart" enough to figure out when the best time to show the next level is based on scale?

As far as the "popping" effect mentioned earlier, that isn't a concern. It may actually be better as our customers will be able to recognize when they are looking at different map data/scales.

Any quick responses are greatly appreciated as I am under a bit of a time crunch!

Thank you!

Chris

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








-------------------------------------------------------------------------
DISCLAIMER: This e-mail transmission and any documents, files and
previous e-mail messages attached to it are private and confidential.
They may contain proprietary or copyright material or information that
is subject to legal professional privilege. They are for the use of
the intended recipient only. Any unauthorised viewing, use, disclosure,
copying, alteration, storage or distribution of, or reliance on, this
message is strictly prohibited. No part may be reproduced, adapted or
transmitted without the written permission of the owner. If you have
received this transmission in error, or are not an authorised recipient,
please immediately notify the sender by return email, delete this
message and all copies from your e-mail system, and destroy any printed
copies. Receipt by anyone other than the intended recipient should not
be deemed a waiver of any privilege or protection. Thales Australia
does not warrant or represent that this e-mail or any documents, files
and previous e-mail messages attached are error or virus free.

-------------------------------------------------------------------------



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


Joined: 04 Sep 2011
Posts: 3

PostPosted: Mon Sep 12, 2011 9:49 pm    Post subject:
Reply with quote

Thanks Brad, that worked.

My (hopefully) final issue is trying to set the levels correctly to update the texture at an appropriate time. I have been tinkering with it attempting to get it using trial and error. However, it takes a long time to build the map so each of my adjustments is causing me to wait close to 45 mins each before I see how it has changed.

Is there any rule of thumb or equation that can help give me better results?

Cheers,
Chris
Back to top
View user's profile Send private message
Brad Christiansen
User


Joined: 04 Nov 2010
Posts: 91

PostPosted: Tue Sep 13, 2011 1:50 am    Post subject:
Multiple maps in model with osgdem? (vpb)
Reply with quote

Hi,

The way the resolution works is thus (once again, this is just from memory, so no guarantees an accuracy):

Level 0 will cover the entire bounds in a single texture (assuming you use the defaults, this will be 256x256 pixels). Level 1 will then split the terrain into two or more textures. The number of textures that are created depends on the aspect ratio of the source data. I think you will always end up with either one row or one column, with the required number of rows/columns to maintain the aspect ratio.

For example, for a whole world database (twice as many lon values as lat), you will end up with one row, two columns (each tile is 180 degrees width and height).

Quote:
From this point, things get easier, as for each level, each texture is divided into four textures which cover the same region, a standard quad tree. To calculate the resolution of a level you simply divide the number of pixels by the covered area.

As a simple example, lets say your source data covers a quarter of the world from 0-90 lat and 0-90 lon.
At level 0, this is covered by 256x256 pixels, therefore the resolution is 90/256 degrees per pixel.
At level 1, this is covered by 512x512 pixels, therefore the resolution is 90/512 degrees per pixel.
At level 2, this is covered by 1024x1024 pixels, therefore the resolution is 90/1024 degrees per pixel.
etc etc

To calculate the resolution of your source imagery use something like gdalinfo to get the required details.

I am sure everything is now as clear as mud for you : )

Cheers,

Brad

-----Original Message-----
From: [mailto:] On Behalf Of Chris Ess
Sent: Tuesday, 13 September 2011 5:49 AM
To:
Subject: Re: [vpb] Multiple maps in model with osgdem? (vpb)

Thanks Brad, that worked.

My (hopefully) final issue is trying to set the levels correctly to update the texture at an appropriate time. I have been tinkering with it attempting to get it using trial and error. However, it takes a long time to build the map so each of my adjustments is causing me to wait close to 45 mins each before I see how it has changed.

Is there any rule of thumb or equation that can help give me better results?

Cheers,
Chris

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








-------------------------------------------------------------------------
DISCLAIMER: This e-mail transmission and any documents, files and
previous e-mail messages attached to it are private and confidential.
They may contain proprietary or copyright material or information that
is subject to legal professional privilege. They are for the use of
the intended recipient only. Any unauthorised viewing, use, disclosure,
copying, alteration, storage or distribution of, or reliance on, this
message is strictly prohibited. No part may be reproduced, adapted or
transmitted without the written permission of the owner. If you have
received this transmission in error, or are not an authorised recipient,
please immediately notify the sender by return email, delete this
message and all copies from your e-mail system, and destroy any printed
copies. Receipt by anyone other than the intended recipient should not
be deemed a waiver of any privilege or protection. Thales Australia
does not warrant or represent that this e-mail or any documents, files
and previous e-mail messages attached are error or virus free.

-------------------------------------------------------------------------



------------------
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 Running multiple (independent) viewer... Aneoshun General 2 Wed May 22, 2019 4:49 pm View latest post
No new posts Dragging individual model nodes arfaa General [forum] 9 Tue Apr 23, 2019 1:10 pm View latest post
No new posts why does the adding of lighting shade... mirro General 0 Mon Feb 11, 2019 3:03 am View latest post
No new posts Selecting a mesh of 3d model (say 3ds... nebsar General 2 Wed Jan 02, 2019 9:47 pm View latest post
No new posts osgText crash with multiple Viewers ravidavi General 3 Tue Dec 18, 2018 8:50 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