Game Development Community

Creating T3D terrain maps using satelite data?

by Jeff Yaskus · in Torque 3D Professional · 05/31/2012 (7:47 pm) · 14 replies

I have a basic concept of what I'm trying to accomplish.

My end goal is to have a t3d terrain, which mimics "real world data".

So far, the logic is something like this;
a) import heightmap
b) import the sattelite image and lay it over top
c) then paint the terrain with textures and forest items, etc ... using the satelite image as a template.
d) when done painting terrain, remove the sattelite image

I can get the first parts, including creating the heightmaps and importing/exporting using L3DT.

However, cant find any tutorial on how perform step (b) overlaying a satelite image over the terrain.

Is this the right approach ? is there a better way ?

(all of the) related tutorials (that I could find)
how to make a t3d terrain using l3dt
www.garagegames.com/community/resources/view/17275
generate TGEA maps using real terrain data
www.garagegames.com/community/resource/view/6314/2#comments
L3DT support for Torque 3D
www.garagegames.com/community/blogs/view/18815


#1
05/31/2012 (8:05 pm)
You may have to create a custom function to paint the terrain textures based upon pixel data from the satellite image.
#2
05/31/2012 (8:37 pm)
Just make your satellite image a very big terrain texture. Then just paint over it using smaller layers. Then once everything is set, you can just delete the satellite image texture and your left with your newly painted layers.
#3
05/31/2012 (9:13 pm)

7-8 month ago i was in need of this type of work.which lead me to GIS data and city engine.
i do not know anything on GIS data.so was searching on that and found this threads:
http://www.bundysoft.com/phpBB2/viewtopic.php?t=195#wrap
http://www.bundysoft.com/phpBB2/viewtopic.php?t=156
http://www.bundysoft.com/phpBB2/viewtopic.php?t=6&start=15#wrap

http://www.bundysoft.com/phpBB2/viewtopic.php?t=1228

last one was on t3d by (BigYak/Ya_k__)?

i dropped the work for my hardware limitation.thanks for remembering it
#4
06/01/2012 (8:22 pm)
I've been trying to do similar. I downloaded dem files from the USGS website and ran them through MICRODEM to turn them into a grayscale png. The main problem I'm having is how to scale it so it ends up in the real world units its supposed to be in.

Anyone have any idea what values I need to set Meters Per Pixel and Height Scale to? Or how do I calculate them?
#5
06/03/2012 (12:57 pm)
Meters per pixel is the number of meters that stretch across one pixel of your heightmap. So if you had a 512x512 heightmap and 1 meter per pixel, your terrain will be 512 meters long. If you change your meters per pixel to 3, your terrain will now be 1,536 meters long. The height scale is the elevation difference between pure black and pure white on your heightmap. So your height scale gives you you're total elevation for the terrain. Hope that helps!
#6
06/04/2012 (11:32 am)
Hey Spencer, thanks, I think I got the meters per pixel stuff sorted out.The main problem I'm having is that I don't know what the elevation of pure black and pure white are in the data that I downloaded. Is it encoded in the file somewhere?
#7
06/05/2012 (12:50 pm)
Scott@ When you import the heightmap into L3DT -- you can see the height range within the file. When you adjust the heightmap scale, it shows you the current values ... and its relative to the area, so it goes from say 0 to 2000 meters not the actual above sea level elevation in the raw map data.

Its only when exporting to T3D that you are limited to a range of 2048 meters in the heightmap ... at least, per each terrain. I have successfully stitched together (9) different terrain files to work around this limitation, since the mountain I was working with was over 14k feet tall.
#8
06/05/2012 (12:53 pm)
Spencer@
>>"Just make your satellite image a very big terrain texture."

(a) I need to find a way to "grab" the sattelite image ... the walk throughs all just detailed grabbing the heightmap (DEM) data.

(b) How in t3d, do you set a texture up to cover the entire ground without tiling ?

Anyone have further suggestions ?
#9
06/06/2012 (10:04 am)
@Jeff I've searched the forums for what you're trying to do before and it seems like there is no way to have a non-tiled material layer on the terrain. It would be nice if it were possible to have the satellite image as a base texture. The terrain code probably needs to be modified to allow you to pick different UV coordinates or something.If you want imagery or elevation data of anywhere in the united states you can use the tools at the USGS website. They have 2 that I know of:Seamless Server: http://seamless.usgs.gov/website/seamless/viewer.htmEarth Explorer: http://earthexplorer.usgs.gov/I know with the Seamless Server you used to be able to crop any section of data, but it seems like they're just making you download a full tile now.
#10
06/06/2012 (10:18 am)
maybe there is a terrain shader? so you can use colors for painting.

green = grass
red = hills
blue = water

something like this.
#11
06/06/2012 (9:42 pm)
Jeff, as far (a) goes, I haven't the faintest clue. But once you get your satellite image as an image file like jpg, png, etc. you just make it your terrain texture. But you need to have it the same size as your height map. I couldn't find the specific posts, but it's the technique Andy Wright has been using to get his gorgeous terrain textures. So if you have a 2048 height map, you need a satellite image as a 2048 texture and you set the texture texture size to whatever your terrain height is (so 2048Xmeters per pixels) I'm on the road right now and not at my computer. I believe those are the steps and correct words... I could be wrong. If you look at Andy Wright's posts you'll see the exact steps, with very pretty pictures. Hope that helps!
#12
06/13/2012 (12:39 am)
Interesting, I'll try that out when I get a chance as well.
#13
07/23/2012 (9:02 am)
Looks like the SRTM (from Google Earth) is ~90m resolution -- anyone know of any other DEM sources available in US ?

Looking for something closer to say 30-10m resolution, relevant to WA state area
#14
07/24/2012 (3:15 am)
In T3D open the terrain painter and select EDIT for the diffuse map. When prompted navigate to the folder where your satellite image is stored, and set the size of the diffuse map to the pixel resolution of said satellite image. Done.