Jump to content
Sign in to follow this  
.pablo.

reversing height values

Recommended Posts

i've finally figured out how to get some DEM data into WRPEdit, but i have the strange problem that it shows up with all the land values having negative elevation values, and all the water values having negative elevation values closer to zero...

example piece of the .txt:

165.35 149.41 -31.45 <- ocean

166.35 149.41 -32.08 <- ocean

167.34 149.41 -130.02 <- above ground

168.34 149.41 -131.59 <- above ground

any ideas as to what might cause this, or how i could fix it?

Share this post


Link to post
Share on other sites

I think you might have gone wrong in either the preparation of the .wrp or, if you used Wilbur to make the lon/lat text file, in Wilbur.

I would first try, in WrpEdit, on the Landscape Tab, press the Default button, if this doesn't help, then one of your previous steps went wrong somewhere.

If all else fails and you are stuck. send the .dem or .wrp to me andb I will have a look.

Planck

Share this post


Link to post
Share on other sites

awesome, thanks!

here's the dem:

ETOPO5 Global DEM

and here's what i did (following the steps in your tutorial):

- converted it from DEM to TER with MDEM2TER.exe, using a scale factor of 1

- opened the TER in Wilbur, selected a portion with area 256x256 (i chose an area centered around cuba that also includes southern florida and a bit of south america).

- chose "Surface->Crop To Selection"

- saved resulting 256x256 selection as cuba.txt with lon/lat format

- opened it in WRPEdit

- land areas have elevation around ~-12, water areas have an elevation of ~-3

my real goal was to get the entire world into ofp as one map, but i'm trying to learn to walk before i try to run, and i've already found some problems that i don't know the answer to:

if you d/l the DEM you can see that they split it around england rather than down the bering straight. would there be any way to fix that? (like, move data from the left side of the DEM to the right?)

also, what is the max size a map in ofp can be? (for both distance units and the number of geography samples possible) i remember there being something about the terrain grid being something like 50m, but that it was also changeable; are there any tutorials on how to do that?

also, i've downloaded another DEM that comes in a .tz file, but when i un-pack it I get a bunch of .DDF files:

http://data.geocomm.com/catalog/US/61065/770/group4-3.html

it says its in "DEM SDTS" format; any idea on how i could convert these DDF files to a regular DEM or lon/lat file?

edit:

nevermind, i figured it out! all i had to do was go to this page and download SDTS2DEM.exe, put it in the directory with my DDF files, and follow the instructions when i ran it, and it worked beautifully! the only problem is that the file contains more than 256x256 points! is there any way to use more data? surely the AEC/Tonal/7 Mountains maps use more than 256x256 points, right?

thank you so much for your help Planck!

Share this post


Link to post
Share on other sites

Well, how can you possibly get the whole world squeezed into a .wrp file that is only 12.8 X 12.8 km in size.

It hardly seems possible to me.

OFP needs DEM's with a resolution of 50 metres, the nearest that is available is 30 metres, which can be resampled to 50 metres.

Dem's with a resolution of 1km are not suitable.

What you normally have to do once you have a DEM of a particular area, is, cut out the portion you want from the DEM, this portion must be 12.8 X 12.8 km in size, WrpEdit won't load maps bigger than this.

Once you have the second DEM derived from the first, you can them set about converting it to a lon/lat text file for WrpEdit.

I'll have a look at your DEM, but if has a 1km resolution it isn't going to look very good in OFP.

EDIT: Yes you need to use a program such as Microdem to cut out the portion you want from the DEM (12.8 X 12.8 km)

Planck wink_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]Well, how can you possibly get the whole world squeezed into a .wrp file that is only 12.8 X 12.8 km in size.

so, there is no possible way to make a map bigger than 12.8x12.8km in size? how big are the edges of AEC? how big are the edges of the default OFP islands (like malden)?

Quote[/b] ]OFP needs DEM's with a resolution of 50 metres, the nearest that is available is 30 metres, which can be resampled to 50 metres.

if you go to this link, the guy that made this island was able to reduce the cell size somehow. i was wondering if you knew how to change the cell size as well...

Quote[/b] ]I'll have a look at your DEM, but if has a 1km resolution it isn't going to look very good in OFP.

thank you! i realize that it won't look good, my idea is to use the original DEM to get a realistic outline of the terrain, and then touch it up myself to make it look good.

Share this post


Link to post
Share on other sites

Hmm......I was referring to WrpEdit, it can only load up to 12.8 X 12.8 km maps.

WrpTool and Visitor can play with larger sizes up to a possible 102.4 X 102.4 km, but this would probably lag a lot.

The AEC one was done in WrpTool and ALL the default BIS islands are 12.8 X 12.8 km in size.

Changing to a smaller cell size makes it very laggy by all accounts I have read, I have never tried it myself.

Your DEM is of the whole world, but its resolution is not suitable for this purpose.

The DEM needs to be square and once you resample to 256 X 256 elevation points there will be practicaly nothing left, if it were possible you would end up with being able to cross Europe in a few seconds......less if you had a vehicle.

The terrain details would be very blocky also.

I will see if I can resample most of it to give you an idea......no promises though.

Planck

Share this post


Link to post
Share on other sites
Quote[/b] ]Hmm......I was referring to WrpEdit, it can only load up to 12.8 X 12.8 km maps.

WrpTool and Visitor can play with larger sizes up to a possible 102.4 X 102.4 km, but this would probably lag a lot.

The AEC one was done in WrpTool and ALL the default BIS islands are 12.8 X 12.8 km in size.

ah, thank you thank you thank you, this is just the info i didn't know.

Quote[/b] ]Changing to a smaller cell size makes it very laggy by all accounts I have read, I have never tried it myself.

the typedemo island lagged on my old computer, but with my new laptop i don't get any lag at all. also, my idea wasn't to make the cell size smaller; it was to make it bigger. smile_o.gif

Quote[/b] ]The DEM needs to be square and once you resample to 256 X 256 elevation points there will be practicaly nothing left

but if i understand you correctly, with WRPTool i should be able to use up to 2048x2048 elevation points (102.4km^2). right? how would i go about doing that?

Quote[/b] ]I will see if I can resample most of it to give you an idea......no promises though.

thank you!

Share this post


Link to post
Share on other sites

Well, I had a go, but I didn't get anywhere with your DEM.

I managed to get it cleaned up a little by setting all missing data and sea-level to 0, but there is just too few data to squeeze it into a meaningful OFP map size.

It's also in a Spherical Projection.

OK, when you are making a DEM for a 12.8 X 12.8 km island, you first get a DEM of the area you want.

Next, you decide what part of that area you specifically want to use.

This means, if your DEM covers an area of 50km X 50km, you must decide what part of that area you want and cut another DEM of the right size (12.8 X 12.8).

Once you have a DEM you can set about converting it to a lon/lat text file for WrpEdit.

The process would be the same for a larger DEM, you just choose a larger area.

The WrpTool manual would give specific details that would be relevant to WrpTool.

You should try to get DEMs that have a resolution of at least 30 metres, which can then be resampled to 50 metres for OFP, or whatever grid size you prefer. 90 metres could be resampled to 100 metres I suppose if that was what you were going to do.

You will not however get a DEM of the whole world at 30 metre resolution, you don't have a hard drive big enough and OFP would have a heart attack.

crazy_o.gif

Anyway, sorry about your DEM, I may try a few more tricks with it, but I think I'm flogging a dead horse. biggrin_o.gif

Planck

Share this post


Link to post
Share on other sites
Quote[/b] ]I managed to get it cleaned up a little by setting all missing data and sea-level to 0

how did you do that?

Quote[/b] ]It's also in a Spherical Projection.

does that affect its ability to be put into wrpedit/tool?

Quote[/b] ]OK, when you are making a DEM for a 12.8 X 12.8 km island, you first get a DEM of the area you want.

Next, you decide what part of that area you specifically want to use.

This means, if your DEM covers an area of 50km X 50km, you must decide what part of that area you want and cut another DEM of the right size (12.8 X 12.8).

right, i understand all of that; i just don't want to do it for this one map idea of mine.

Quote[/b] ]The WrpTool manual would give specific details that would be relevant to WrpTool.

idk why i didn't think of that; i just took a quick look around WRPTool and gave up :P

Share this post


Link to post
Share on other sites
Quote[/b] ]

how did you do that?

I used a program called MicroDem, a free program available from Here.

It allows you to do such things, but, it is not a simple program and has a steep learning curve.

Although it does have a help file.

Quote[/b] ]

does that affect its ability to be put into wrpedit/tool?

Well, as the world is a sphere, when it comes to laying it out on a flat plane, it doesn't really work too well.

Its ok for small areas, but the larger the area the more problems there are.

The horse died btw, I had to give up, there just was no way of getting the world into a square, there would. I imagine, have been large distortions anyway if I had managed it.

Planck

Share this post


Link to post
Share on other sites

alright, im gonna put that idea to the side for now; can you explain to me how you resample data? do you use wilbur, microdem, or another program?

right now i'm trying to use the Wilbur resample option, but i don't understand what the relationship between "pixels" and elevation points is (is it one pixel per elevation point?). i tried resampling a DEM i had so that the widest part would be 1024 elevation points across (for a 51.2km map), but when i import the file into WRPTool the file doesn't show up correctly...

Share this post


Link to post
Share on other sites

Trying to explain this sort of thing in a forum isn't easy, but here goes.

When I get a DEM of an area I'm interested in, I load it into MicroDem.

The DEM I get is usually in 30 metres resolution, so, I resample it, using MicroDem, to 50 metre resolution.

Using my new resampled DEM, I then choose which part of it I want for my .wrp file.

For a more detailed explanation of how to do this I suggest you get a copy of Grens tutorial 'DEM->MicroDem->WrpEdit', from OFPEC.

Taking a 12.8 X 12.8 km size as an example, my DEM should end up with 256 columns and 256 rows, these are your elevation points. these would have a separation of 50 metres for OFP

Once I have the size of DEM I want, it is time to take this DEM and load it into Wilbur.

In Wilbur it will show as a 256 X 256 pixel image.

The whole process in Wilbur is also explained to some extent in Grens tutorial.

Output from Wilbur should end up as a lon/lat text mesh file for import into WrpEdit.....or wherever.

If you can get a copy of Grens tutorial you will be able to get a better understanding of the process, instead of my ramblings here. crazy_o.gif

If you still have problems then post back here and I will try to help.

EDIT: I seem to recall I already gave you a copy of Grens tutorial, and it was you that submitted it to OFPEC. crazy_o.gif

Planck

Share this post


Link to post
Share on other sites

the problem is that his explanation of how to resample data doesn't correspond to the version of MicroDEM that i have:

Quote[/b] ]To fit the Wrp Editor we need to Click on IN/OUT

This will open the Data Manipulation box.

Now click on Resample, DEM, and then DEM (general).

A browse box will appear.

Open our new subsetntc1.dem.

Change your x & y data spacing to 50 each.

Change your Z Units to decimeters.

when i click on IN/OUT and then go to Resample, I only see two submenus called "Shapefile" and "Database", neither of which contain any options that have the letters DEM in them...

Share this post


Link to post
Share on other sites

ok i was able to resample the data (microdem still has the ability to resample, it was just under a completely different menu); i then used MDEM2DEM.exe to convert the data from a microdem DEM file to a USGS DEM file (as in gren's tutorial). the problem is, when i try to load the usgs dem in wilbur, nothing happens (nothing shows up).

could you explain in detail what you do to get the file into wilbur from microdem?

Share this post


Link to post
Share on other sites

you don't need to do this whole process, you simple need microdem, and height converter and off course the dem file,

you can convert the dem with the In/Out button on microdem to XYZ triples Lat\Long, then take this file and use height converter to create the txt file, this file can input directed to wrpedit. for more info if you like contact me.

and i can send you a tutorial of mine to see how you can resample dems, merging dems and exporting dems to xyz with microdem.

i find willbur unecessary step in the proccess that can only confuse you and not help you.

yay.gif

Share this post


Link to post
Share on other sites

Yes, I must admit I was puzzled by your inability to Resample, till I looked and downloaded the latest version of MicroDem......currently version 8.01.

I was using version 6.03, which still has the Resample option in the previous location.

There are many ways to convert from your final output to WrpEdit, XYZ is only one.

At the time Gren wrote his tutorial, the XYZ output from the available version of MicroDem was not correct, or incompatible with WrpEdit in some way, so Wilbur was a viable option.

One advantage of Wilbur is, you can do additional processing on the DEM before converting to a Lon/Lat text file, including choosing the height ranges to output, obviating the necessity to use something like HeightConv.

Give the XYZ option a try.

Going back to Wilbur, I think you have to convert your DEM into a Terragen file for Wilbur.

Grens tut is quite old now, although it does have useful info.

There is a tut written by yours truly that describes the process of getting your DEM, once you have prepped it in MicroDem, into Wilbur.

You might already have this tutorial, but in case you don't, get it here.

I hope some of this has helped in some way.....good luck.

wink_o.gif

Planck

Share this post


Link to post
Share on other sites
Quote[/b] ]you can convert the dem with the In/Out button on microdem to XYZ triples Lat\Long, then take this file and use height converter to create the txt file, this file can input directed to wrpedit. for more info if you like contact me.

and i can send you a tutorial of mine to see how you can resample dems, merging dems and exporting dems to xyz with microdem.

cool, could you send that tutorial to me? i tried emailing you but i got a "failure to deliver" error.

also, what is a height converter? another program? is it necessary or optional?

thanks!

Quote[/b] ]There is a tut written by yours truly that describes the process of getting your DEM, once you have prepped it in MicroDem, into Wilbur.

yeah, that's the other one i was referring to when attempting all this stuff; i think it wasn't working either (something to do with the dem2ter converter or something), though im not sure. i'll give it another shot.

Share this post


Link to post
Share on other sites

height converter is a little program (made by snypir) it simply convert your XYZ triples file to TXT file so it can be imported to WRP edit.

it's easy to use the only thing to do is play with the tc.ini file that comes with it and make the apropriate adjuastments. in a way you can downsample your file if it's big, and not fit on wrpedit.

so i recommend you to make a downsample between 2-5 with microdem and then do the changes with height converter.

ty to do some combinations to see what is the best. yay.gif

Share this post


Link to post
Share on other sites

i got it to work!! thank you so much Planck and Sparky for your help! here are some pics:

oh, and by the way, the map is of Rangeley, Maine, USA, a heavily wooded area where my cousins live and i've spent many a summer/winter vacation; here's a link to the google map of the place:

http://maps.google.com/maps?q=....2&hl=en

01wrptoolmap.jpg

a map of the entire 12.8kmx12.8km area in WRPTool

02wrptool3dview.jpg

looking at the map in WRPTool's 3D viewer

03southernpeak1.jpg

at the tippy top of the southern moutain (right at the edge of the map)

04southernpeak2.jpg

same place, except down by the helicopter

anyway, although this is really, really awesome, i'm still not content! here's why:

05fullDEM.jpg

this is what the full DEM looks like (it's actually 2 merged DEMs)

06croppeddem.jpg

this is what i had to crop the DEM down to in order to fit it into 12.8kmx12.8km. ideally, i would like to have the full DEM in ofp.

the problem is that snYpir's heightfield converter only works for 256x256 points, and bigger maps (25.6x256, 51.2x51.2) use more points (right?). so idk if i should ask snYpir to make an updated version of his program (if i can find him crazy_o.gif), or cut my data into 12.8x12.8 chunks, or find another method of getting them into WRPTool...any suggestions?

Share this post


Link to post
Share on other sites

I think if you make your dem the size you want (25.6 X 25.6 maybe}, after converting that to a terragen file you can still convert it to a lon/lat text file via Wilbur.

WrpTool, I understand can import lon/lat text files as well.

I'll have a bash at it and let you know, however, WrpTool doesn't work to well on Windows Me, which is what I use.

Planck

Share this post


Link to post
Share on other sites

256X256 is a height converter limitation.

Though you have consider the annoying bug of earth trembling, map bigger than 256X256 should have a big trembling in the game. (you can read about that in wrptool manual). of course you have consider the memory that your map will use if it's bigger than standard.

My opinio is to try fit your map in 256X256, you can do that, but you will hsave less detailed map.

Share this post


Link to post
Share on other sites
Quote[/b] ]of course you have consider the memory that your map will use if it's bigger than standard.

My opinio is to try fit your map in 256X256, you can do that, but you will hsave less detailed map.

hmm, ok, but i still want to see what it will look like in ofp; that's a weird bug that you describe, i've played on PMC Rattler and PMC Rugen without any noticeable problems...is it at all based on the number of objects used, or only the cells? is it caused by the player's hardware or just ofp?

Quote[/b] ]after converting that to a terragen file you can still convert it to a lon/lat text file via Wilbur.

i tried doing that myself, but my DEM2TER converter doesn't seem to work...all my terragen files are 1kb...

Share this post


Link to post
Share on other sites

Hmmm, maybe your converter is damaged.

Try this site:

http://www.terrainmap.com/index.html#top

Scroll down to December 28 2003 and get MDEM2TER.

Actually, what you get once you unzip the package is:

mdem2ter_vcc++.exe ......... VC++

mdemter3.exe ......... Borland

and a Readme

Anyway, it is 2 versions, one is done in Borland Turbo C++ and the other is done in Microsoft VC++.

If you are running Windows XP maybe it doesn't like it.

I always get errors when I run it but I just press ignore and carry on, I always get my .ter file ok, my little tut mentions this too.

Planck

Share this post


Link to post
Share on other sites

that's exactly what i'm running, and it doesn't give me any errors when i run it; it just produces 1kb .ter files...

one thing that i don't get is that both .exe's say that they convert from MDEM to USGS DEM in the text blob when they start up; does it say that for you?

Share this post


Link to post
Share on other sites

Yes it says that for me too.

I think the author just forgot to edit the instruction blurb for the different converter.

I have an older version if you are interested it is called MDEM4TER.EXE.

If this version doesn't work for you then it might be XP, presuming you are running XP tha tis.

If you can supply an email address I can throw it your way.

Planck

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×