Page 1 of 1

Horizontal map scaling of heightmaps.

PostPosted: Tue Feb 25, 2014 10:13 am
by bendragon1337
Hi there

I was wondering how the horizontal map scale works.

I was wondering this because I'm having to guess the scaling on maps to see the most realistic way of presenting it in the 3-D view without it looking too flat and pointed.

Re: Horizontal map scaling of heightmaps.

PostPosted: Thu Feb 27, 2014 12:06 pm
by Aaron
Hi Bendragon1337,

The horizontal scale is the spacing in the horizontal plane between neighbouring vertices in the heightfield. If the number is large, the heightmap is stretched out and covers a large area with low detail, and if it is small the heightmap is packed in close with high detail. If you change the horizontal scale without also changing the altitude of the heightmap, you will change the slope of the terrain, because slope is defined as the vertical rise from one point to the next divided by the horizontal run between points. If you want to adjust the slope, you can change either the horizontal scale or the altitude range, or both.

What I would recommend you do is choosing a horizontal scale that gives the desired lateral resolution for your application (e.g ~0.5-2m for a FPS, maybe 10m for a flight simulator, etc.), and then adjust the altitude range to get the desired slope.

Best regards,
Aaron.

Re: Horizontal map scaling of heightmaps.

PostPosted: Fri Feb 28, 2014 12:53 pm
by bendragon1337
But if you know the altitude range, and know what the terrain is supposed to look like, complete with heightmap, what would be my best bet to replicate the desired effect within the program?

Re: Horizontal map scaling of heightmaps.

PostPosted: Sat Mar 01, 2014 1:34 am
by Aaron
Hi Bendragon1337,

Do you know what area the map is supposed to cover, like 10mi x 10mi, for instance? If so, divide the map width in distance units (miles, kilometers, metres, feet, whatever) by the map width in pixels. This will give you the horizontal scale, but before you enter it into L3DT, you will need to convert it to metres (assuming you didn't start with distances in metres). The quickest way to do the conversion is to type, say, "326 miles in metres" into Google, and presto, there's your answer.

If you don't know the physical map size, then you've only got trial and error. Guess a value for the horizontal scale (start with 10, say), check the slope in Sapphire, if its too steep/flat, go to 'Operations->Heightfield->Change horizontal scale' in the L3DT menu, enter a number that is double/half the current value, and re-check in Sapphire. If still to steep/flat, repeat. If instead it's now too far the other way, enter a number halfway between the two previous guesses. Rinse & repeat until you're satisfied with the slope.

Best regards,
Aaron.

Re: Horizontal map scaling of heightmaps.

PostPosted: Sat Mar 01, 2014 1:02 pm
by bendragon1337
Thank you.

Re: Horizontal map scaling of heightmaps.

PostPosted: Sun Feb 01, 2015 8:40 am
by Kiwi-Hawk
Kia ora

Asking here rather than starting a new thread

Trying to get my head round the sizing etc, I have a heightmap that is 3072x3072
I'm thinking 4 with -512 to 512 setting Min max height (this I relate to doing maps with TESAnnwyn)
I would have say -h -2048 (sea bed) and -s 0.5 (for eg:) scale. A island ( I thought ) would use a - number
to set the sea bad round it. as I'm taking this to use in a Skyrim world space I'm using factors of 4, 8 , 16, 32
etc and image size's like 1024, 2048, 3072, 4096 which do not tile. I 'm thinking I need to know what 3072x3072
works out in Miles or Kilometers right?

Re: Horizontal map scaling of heightmaps.

PostPosted: Sun Feb 15, 2015 10:00 am
by Tamb0
Kiwi-Hawk wrote:Kia ora

Asking here rather than starting a new thread

Trying to get my head round the sizing etc, I have a heightmap that is 3072x3072
I'm thinking 4 with -512 to 512 setting Min max height (this I relate to doing maps with TESAnnwyn)
I would have say -h -2048 (sea bed) and -s 0.5 (for eg:) scale. A island ( I thought ) would use a - number
to set the sea bad round it. as I'm taking this to use in a Skyrim world space I'm using factors of 4, 8 , 16, 32
etc and image size's like 1024, 2048, 3072, 4096 which do not tile. I 'm thinking I need to know what 3072x3072
works out in Miles or Kilometers right?


Hi Kiwi-Hawk

I done a full tutorial on making a new worldspace for Skyrim. You'll find all the settings required -

http://tambomedia.com/Site_Pages/tutorials/L3DT.html

Hope this helps.

Re: Horizontal map scaling of heightmaps.

PostPosted: Wed Feb 18, 2015 5:20 am
by Kiwi-Hawk
Tamb0 wrote:
Kiwi-Hawk wrote:Kia ora

Asking here rather than starting a new thread

Trying to get my head round the sizing etc, I have a heightmap that is 3072x3072
I'm thinking 4 with -512 to 512 setting Min max height (this I relate to doing maps with TESAnnwyn)
I would have say -h -2048 (sea bed) and -s 0.5 (for eg:) scale. A island ( I thought ) would use a - number
to set the sea bad round it. as I'm taking this to use in a Skyrim world space I'm using factors of 4, 8 , 16, 32
etc and image size's like 1024, 2048, 3072, 4096 which do not tile. I 'm thinking I need to know what 3072x3072
works out in Miles or Kilometers right?


Hi Kiwi-Hawk

I done a full tutorial on making a new worldspace for Skyrim. You'll find all the settings required -

http://tambomedia.com/Site_Pages/tutorials/L3DT.html

Hope this helps.



Thank you
Thats the tutorial I been trying to follow, I'm just having a little trouble with the maths lol, getting the heights correct etc.
I think it's all down to the adjustments in scales to set things right

Edit:
BTW if I do the whole process at 4096x4096 when I load back to Photoshop to set the levels at 67 (74%) grayscale if I resize to 3072x3072 or 2048x2048 is that going to change a lot?

Re: Horizontal map scaling of heightmaps.

PostPosted: Thu Feb 19, 2015 1:01 pm
by Aaron
Hi Kiwi-Hawk,

Kiwi-Hawk wrote:BTW if I do the whole process at 4096x4096 when I load back to Photoshop to set the levels at 67 (74%) grayscale if I resize to 3072x3072 or 2048x2048 is that going to change a lot?


I would think so, yes. Resampling from 4096x to 3072x means the horizontal scale needs to increase by a factor of one third to maintain the same area. Changing the greyscale levels will also mess up the vertical scale.

Best regards,
Aaron.

Re: Horizontal map scaling of heightmaps.

PostPosted: Thu Feb 19, 2015 10:55 pm
by Tamb0
Kiwi-Hawk wrote:
Tamb0 wrote:
Kiwi-Hawk wrote:Kia ora

Asking here rather than starting a new thread

Trying to get my head round the sizing etc, I have a heightmap that is 3072x3072
I'm thinking 4 with -512 to 512 setting Min max height (this I relate to doing maps with TESAnnwyn)
I would have say -h -2048 (sea bed) and -s 0.5 (for eg:) scale. A island ( I thought ) would use a - number
to set the sea bad round it. as I'm taking this to use in a Skyrim world space I'm using factors of 4, 8 , 16, 32
etc and image size's like 1024, 2048, 3072, 4096 which do not tile. I 'm thinking I need to know what 3072x3072
works out in Miles or Kilometers right?


Hi Kiwi-Hawk

I done a full tutorial on making a new worldspace for Skyrim. You'll find all the settings required -

http://tambomedia.com/Site_Pages/tutorials/L3DT.html

Hope this helps.



Thank you
Thats the tutorial I been trying to follow, I'm just having a little trouble with the maths lol, getting the heights correct etc.
I think it's all down to the adjustments in scales to set things right

Edit:
BTW if I do the whole process at 4096x4096 when I load back to Photoshop to set the levels at 67 (74%) grayscale if I resize to 3072x3072 or 2048x2048 is that going to change a lot?


You shouldn't need to adjust any grayscales when using L3DT. You seem to be mixing information from different tutorials. If you are making a map from an image file (non L3DT generated RAW or Windows bitmap file) then you have to adjust grayscales.

If you export from L3DT, the pixels themselves have height information associated with each pixel and Tesannwyn reads this information, not the greyscale information.

You shouldn't be reducing the RAW size...you will lose information. If you require a 3072 x 3072 map, start the project with those dimension. Set your horizontal scale to 3 or 4. You can lower this later to the Skyrim default of 1.82882m (6ft), if you want. This makes curves on the map a bit smoother.
After changing the horizontal scale, you also have to adjust the max and min height values to keep the map looking the same as the original.

If there's anything else that you're not sure about, go to my Contact page and send me a message. I'll help in any way I can.

Re: Horizontal map scaling of heightmaps.

PostPosted: Fri Feb 20, 2015 11:28 pm
by Kiwi-Hawk
Thank you very much for that choice offer Sir.

I think maybe where I'm going wrong is the shading in my image is messing with the scale
of things. the mountain shades do not seem to lend to high mountains more rather shallow
easy to run up and the contrast in my ground is make deeper ridge's less flat ground. Tho th ground is darker it's giving out more detail
than the mountains are giving height at this point, I notice the ground in Skyrim round lakes pools is quite pointed/jaggid