T3D Skybox question - How to put a mountain in the distance ??
by Jeff Yaskus · in Torque Game Engine · 01/10/2011 (4:54 am) · 11 replies
Hi all,
I'm trying to create a level based in the wilderness around Mt Rainier in WA state.
The mountain is huge, too big of scale to add into the map itself. However, I want the player to be able to look to the south (or maybe east or both -- south east) and SEE the mountain in the extreme distance.
Then when they go back into the woods or down a ravine, its out of sight again.
Is it possible to do this with Torque3D ? Can anyone elaborate on what it takes to make this happen ?
NOTE: I'm assuming the same question/answer would apply to all the Torque engines --
I'm trying to create a level based in the wilderness around Mt Rainier in WA state.
The mountain is huge, too big of scale to add into the map itself. However, I want the player to be able to look to the south (or maybe east or both -- south east) and SEE the mountain in the extreme distance.
Then when they go back into the woods or down a ravine, its out of sight again.
Is it possible to do this with Torque3D ? Can anyone elaborate on what it takes to make this happen ?
NOTE: I'm assuming the same question/answer would apply to all the Torque engines --
About the author
Long time gamer, hacker and programmer. With dreams of making video games -
#2
I found some tutorials on how to grab the satellite imagery and even turn it into a height map b/w image file. However, the scale is still WAY off during the import process.
builders.forumotion.net/t1151-tutorial-how-to-create-a-world-using-real-world-he...
Also think I'm hitting the terrain size limit by trying to enlarge the height map during the import process ... as the image file is already 4096^2 pixels.
The default Meters Per pixel (1) and Height Scale (256) ... has me a bit confused. I tried loading the height map using MPP of (2) and HT Scale (512) but the mountain looks squashed and tiny in the distance.
The height map itself has a range of about 2500 different elevations based on the gray scale (which I set using MICRODEM)... but the editor crashes if I put in a value that high.
THAT SAID ... You mention "adding secondary terrain within viewing distance" -- do you mean a level can have more than (1) terrain ? So I could have one terrain (height map?) which is the low lands and another just the mountain ??
Any tutorials on how to use more than (1) terrain in a level ??
01/11/2011 (5:47 am)
Thanks for the ideas!I found some tutorials on how to grab the satellite imagery and even turn it into a height map b/w image file. However, the scale is still WAY off during the import process.
builders.forumotion.net/t1151-tutorial-how-to-create-a-world-using-real-world-he...
Also think I'm hitting the terrain size limit by trying to enlarge the height map during the import process ... as the image file is already 4096^2 pixels.
The default Meters Per pixel (1) and Height Scale (256) ... has me a bit confused. I tried loading the height map using MPP of (2) and HT Scale (512) but the mountain looks squashed and tiny in the distance.
The height map itself has a range of about 2500 different elevations based on the gray scale (which I set using MICRODEM)... but the editor crashes if I put in a value that high.
THAT SAID ... You mention "adding secondary terrain within viewing distance" -- do you mean a level can have more than (1) terrain ? So I could have one terrain (height map?) which is the low lands and another just the mountain ??
Any tutorials on how to use more than (1) terrain in a level ??
#3
Now when I try to load it, I get the mAlloc errors (due to level too large??) when trying to load the mission ...
I tried to create bigger height map (8192^2 pixels) so I could reduce the meters per pixel down to (3) ... but then received this error "Height map must be between 128 and 4096 in size!"
Perhaps I need to use multiple terrains, like you suggested ... (1) for the mountain and (1) west and (1) North ... to get the entire area loaded.
Here is a link to the un-modified height map, based off the usgs data ... which I used gimp to enlarge before importing.
http://jyaskus.com/images/RAINIER_MAP.BMP
Going to take a stab at making a skybox with the mountain in it, perhaps that would be easier approach.
01/11/2011 (11:38 pm)
I created a height map covering a 15m^2 area (4096^2 pixels) around the mountain imported it at a resolution of 6 meters per pixel and its huge- 49mb .ter file.Now when I try to load it, I get the mAlloc errors (due to level too large??) when trying to load the mission ...
I tried to create bigger height map (8192^2 pixels) so I could reduce the meters per pixel down to (3) ... but then received this error "Height map must be between 128 and 4096 in size!"
Perhaps I need to use multiple terrains, like you suggested ... (1) for the mountain and (1) west and (1) North ... to get the entire area loaded.
Here is a link to the un-modified height map, based off the usgs data ... which I used gimp to enlarge before importing.
http://jyaskus.com/images/RAINIER_MAP.BMP
Going to take a stab at making a skybox with the mountain in it, perhaps that would be easier approach.
#4
The suggestion of using more than a single terrain I think is possible only in T3D or latest versions of TGEA but not TGE if I remember correctly..
01/12/2011 (9:15 am)
If you need just to see that mountain in the extreme distance I suggest to stay with the skybox approach... edit one of the image that compose the skybox putting the mountain in front of the actual image, I don't see the point of doing something different...The suggestion of using more than a single terrain I think is possible only in T3D or latest versions of TGEA but not TGE if I remember correctly..
#5
So my only option left, is like you suggest and put it into the skybox... which sucks horribly, because its no longer going to look "3D" at all.
01/13/2011 (9:23 pm)
Thanks for suggestions -- I think I have hit the limit of what Torque3D will support based on the T3D height map limit of 2048 meters.So my only option left, is like you suggest and put it into the skybox... which sucks horribly, because its no longer going to look "3D" at all.
#6
For that could be helpfull if we have a sky object with the possibility to use a material for it with a normal map so at least the shadows will change, at least a bit, with relation to sun azimuth/elevation ...
01/16/2011 (11:09 pm)
If in far far distance I think you cannot appreciate the difference except for the fact that it will not get shadowed by the changing in sun azimuth/elevation of the sun if using TimeOfDay (if not using it and then not updating you can try to do a correct painting of it) ...For that could be helpfull if we have a sky object with the possibility to use a material for it with a normal map so at least the shadows will change, at least a bit, with relation to sun azimuth/elevation ...
#7
Screenshots
jyaskus.com/downloads/mtn1.png
jyaskus.com/downloads/mtn2.png
jyaskus.com/downloads/mtn3.png
jyaskus.com/downloads/mtn4.png
01/19/2011 (1:14 am)
Here is what it looks like ... I croped the land west of the mtn and used it as a ht-map with mtn as a skybox. Not too bad ... Screenshots
jyaskus.com/downloads/mtn1.png
jyaskus.com/downloads/mtn2.png
jyaskus.com/downloads/mtn3.png
jyaskus.com/downloads/mtn4.png
#8
So why don't you create a dts mesh composed of a single plane and put it at a certain distance from the end of your terrain... obviously you must texture this plane with a material using an image of this mountain with alpha transparency enabled so you see the sky behind it... if you use also a normal map for it then it gets also some lighting appropriate to the sun direction, faking the lack of the 3rd dimension...
01/21/2011 (4:42 am)
Ok it's really big and having it baked into a skybox has the effect to always see it at fixed size... it doesn't become bigger when you movo towards it...So why don't you create a dts mesh composed of a single plane and put it at a certain distance from the end of your terrain... obviously you must texture this plane with a material using an image of this mountain with alpha transparency enabled so you see the sky behind it... if you use also a normal map for it then it gets also some lighting appropriate to the sun direction, faking the lack of the 3rd dimension...
#9
02/23/2011 (4:39 pm)
Wow Giorgio your a genius! Jeff did you follow his last instructions? If so i'd love to see the results? =]
#10
02/23/2011 (10:17 pm)
It sounds like it would work great, but its a bit over my head -- no idea how to make a dts mesh composed of a single plane ... or how to create a normal map for it. But the transparent image part does make sense -
#11
If you want you could also do something different and model just the half of the mountain you can see and put this shape in the distance and this would be also better... An approach for this could be also to convert a heighfield image into a 3d shape. There are a lot of info for many apps on how to do that.
03/02/2011 (4:24 am)
In your modelling app just do only a plane, if you don't know how check your app docs or just do a box and delete all faces but one... apply to that face your texture... for the normal maps you have to do a plane and sculpt it with all the relief features you want... then you have to bake a normal of it into a simpler mesh... there are a lot of tutorials about that on youtube...If you want you could also do something different and model just the half of the mountain you can see and put this shape in the distance and this would be also better... An approach for this could be also to convert a heighfield image into a 3d shape. There are a lot of info for many apps on how to do that.
Torque Owner Kirchgessner
Prosimian Productions
1. Make a low poly model based on the mountain that has an image or texture of the mountain placed on it
Pro - Can be setup in any program and usually made in any image editor.
con - can cause some lag for lower end machines.
Example - Call of Duty MW2 lvl- Rust they use this in all there extreme distant objects.
2. Get a good high quality picture of the mountain and build it into your skybox texture.
Pro - takes any image editor, use any image merge
Con - somewhat static as its attached to skybox so you really wont get to different angles.
Example - Halo, does this and a combination of #1 to achieve there worlds
3. create a secondary terrain put within viewing distance of character
Pro - use a height map of mountain needed
con - height map may be a pain to get (i dont know if there is converters from google earth/equiv for this)