DEM Question

Started by Cemoa, June 10, 2008, 01:58:08 AM

Previous topic - Next topic

Cemoa

Hi all,

I am pretty new to Terragen, but have learned a lot so far from these forums (you guys are fantastic!). As you can see, I've been in lurk mode up until now, using the search feature to answer most of my questions. There is one thing though that I have been trying to do now for about a day or two, but just can't get it down. Lately, I've been reading up on DEM usage, and how to import them into TGD. It seems a little complicated for my basic Terragen knowledge, but I figure it could help me a lot in some projects I wish to do in the future. My problem is that after I load my DEM into TGD, the ground is pretty much flat with the exception of a weird plateau. Keep in mind, the DEM I am trying to load in is full of steep mountains. (http://edc.usgs.gov/products/elevation/gtopo30/w140n40.html) I'll try to give you guys a walkthrough on what I do to import it:

1). I get my DEM.
2). I use 3dem, and select "Save->Entire Terrain"
3). I open up TGD and select "Add Terrain->Heightfield Load.
4). I insert the file when it asks me for it.
5). It seems to try to load it, but all I get is a weird plateau effect.

I saw an earlier thread with someone with this problem, but the explaination was a little over my head (it had something to do with changing the height of the DEM to be over 0 or something like that, can't really remember).

If anyone could post a solution to my problem in noob terms it would be greatly appreciated. I look forward to talking with you guys and learning more and more on this awesome program!  ;D

P.S: I attached a TGD of my problem if it will help any. It's basically plain, but I figure it's better than nothing.  :)

Mohawk20

Without looking at the tgd I'd say the solution should be simple.
Rightclick in the node view and select 'Create Heightfield Operator', then select 'Heightfield adjust vertical', the top one.
Attach the node like this: 'Heightfield load' output into 'Heightfield adjust vertical' input, 'Heightfield adjust vertical' output into 'Heightfield shader 01's 'Heightfield' input.

Then doubleclick the 'Heightfield adjust vertical' node to go to it's settings and andjust the bottom slider, labeled 'Add Height' to lower values until the heightfield is at the level you want intead of stretched out of view.
Howgh!

Cemoa

Well I tried all that, but unfortunately it still didn't work. The Add Height function didn't seem to change anything, be it at 1 or 500. The only thing I did differently was hook up the Heightfield Adjust Vertical output to the Heightfield Shader's "Heightfield" input, instead of it's "Input" node, since it wouldn't let me hook it up to the Input node. I've attached a picture of what the plateau looks like. In the picture the Add Height function is at 1.


jo

Hi,

I had a look at your TGD. Obviously I don't have the same .ter file as you, but I used another one I had handy. Everything with that seemed to work fine. I'm guessing the issue is somehow related to the .ter file you're using. I don't have any experience with 3DEM so I can't help much, but at least it points in the direction of the terrain file being the issue.

Regards,

Jo

ZStar

Hi Cemoa,

I am fairly new to TG myself so I don't know if this will help or not.  I just started playing around with importing heightfields and found that I had to apply several HF operators in order to size things correctly.  What may be of specific interest to you, are the Heightfield resize and Heightfield adjust vertical operators.  I have attached screen captures showing my settings to change the default size from 10km x 10km to 200m x 200m and to set the elevation range from -5m to 44m.

If you are trying to apply a really big HF, I don't know if there is an option for wrapping it around a planetary radius.  Do any of the TG gurus out there know?

I hope this helps.

Cemoa

Whew! Well I finally got some mountains to show up. :D Looks like the terrain I was importing into TGD was too large. I selected a smaller area this time to convert to .ter file, and when I loaded it in it looked good. Although the mountains aren't exactly what I thought they would be, I'm at least happy to see that the terrain is loading in fine. I'll try your method ZStar to see if I can get the mountains looking a bit sharper. Thanks for the advice!

Oshyan

For larger DEM's it may help to turn off "Flatten Surface First" in the Displacement tab of the Heightfield Shader.

- Oshyan

gregsandor

Quote from: Cemoa on June 11, 2008, 10:18:44 PM
Whew! Well I finally got some mountains to show up. :D Looks like the terrain I was importing into TGD was too large. I selected a smaller area this time to convert to .ter file, and when I loaded it in it looked good. Although the mountains aren't exactly what I thought they would be, I'm at least happy to see that the terrain is loading in fine. I'll try your method ZStar to see if I can get the mountains looking a bit sharper. Thanks for the advice!

The only way a terrain could be too large is if you're using the free version.  3dem automatically resizes terrains for terragen to one of the acceptable sizes, up to 4097 x 4097.

wackymidget

Hi,

I'm having a similar problem. I use the same method as Cemoa. I don't get a plateau though. Just don't see anything. I thought maybe the exported .ter file was faulty, but I tried it in the demo version of 0.9 and it does show a heightmap there.
I tried ZStar's solution, but it didn't work for me in Terragen2.

I followed gregsandor's advise and bought Terragen2, but it didn't solve it for me... :(

I downloaded the MOLA file http://pds-geosciences.wustl.edu/geodata/mgs-m-mola-5-megdr-l3-v1/mgsl_300x/meg128/megt00n000hb.img and tried to load it as a heightfield directly, but it also didn't give me any results.

I'm going to try to use a smaller area to convert to a .ter file. I hope that will help.

BTW I'm running on a Intel Mac.


Cyber-Angel

Quote from: wackymidget on August 08, 2008, 07:39:02 PM
Hi,

I'm having a similar problem. I use the same method as Cemoa. I don't get a plateau though. Just don't see anything. I thought maybe the exported .ter file was faulty, but I tried it in the demo version of 0.9 and it does show a heightmap there.
I tried ZStar's solution, but it didn't work for me in Terragen2.

I followed gregsandor's advise and bought Terragen2, but it didn't solve it for me... :(

I downloaded the MOLA file http://pds-geosciences.wustl.edu/geodata/mgs-m-mola-5-megdr-l3-v1/mgsl_300x/meg128/megt00n000hb.img and tried to load it as a heightfield directly, but it also didn't give me any results.

I'm going to try to use a smaller area to convert to a .ter file. I hope that will help.

BTW I'm running on a Intel Mac.



In order to use MOLA data in TG2 you need to load it via a MOLA Map Shader (Shaders > Add Layer > Surface Shader > Displacement Shader)

Regards to you.

Cyber-Angel 

wackymidget

Thanks Cyber Angel. Tried it. It runs very slow and I get errors: ReadMOLA: Unable to load file <filename>

For the GTOPO30 DEM's I tried a smaller terrain size 12 and 24 degrees, but they don't seem to work.
I then tried to save the selection in 3dem and import it. I do see a little relief. When I try Zstar's approach everything is flat again...

Any ideas? Thanks

rcallicotte

@wackymidget - Did you follow Oshyan's advice?  "For larger DEM's it may help to turn off "Flatten Surface First" in the Displacement tab of the Heightfield Shader."

If so, maybe it's in the MOLA data you are using.  I know this has worked in the past.
So this is Disney World.  Can we live here?

wackymidget

Callco, thanks, I'll try using a diferent dataset instead.

BTW does anybody know the best way to populate an entire planet with DEM's?

Thanks



rcallicotte

I've heard it's virtually impossible to populate an entire planet with DEMs, due to the way the planet curves...or something.  Not sure I remember the details.  It's posted around here somewhere.
So this is Disney World.  Can we live here?

wackymidget

#14
Ok, thanks,

Any other way to accurately create the planet earth?
I'd like to make something like this, except with earth.

http://www.youtube.com/watch?v=xSTEo5QK9vk