Trying to comprehend how min/max is applied to height map

Trying to comprehend how min/max is applied to height map

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
MetalSkin
Posts: 77
Joined: 31 Aug 2007, 02:42

Trying to comprehend how min/max is applied to height map

Post by MetalSkin »

I'm trying to understand the height options in the compiler and also the options in TASMapMaker.

the only text I've found is:
Max Height This specifies the maximum height of the map. This option looks like -x Height, where Height is the maximum height of the map. Typing -x 300 will give your map a maximum height of 300 map units.

Minimum Height This specifies the minimum height of the map. This option looks like -n Height, where Height is the minimum height of the map. Typing -x -50 will give your map a minimum height of -50 map units.
Which came from http://spring.clan-sy.com/wiki/Maps:Compiling

The problem I have is that adjusting the options for min and max height seems to affect how my height map is applied. However I don't know how to determine what the correct options are for min and max height to apply my height map as I modelled it.

I do know that going below 0 for min seems to affect at which point water appears, as it seems to me that 0 is where water appears, so I suspect that the min/max is some sort of offset on determining the height and how it's applied. But to me there are only 256 options available in the height map, so does that mean i should use a range of x to x + 256 where the first x is the min val I want? But from what I have read, this doesn't seem to be the norm.

Can anyone provide some correlation between the height map, the values it contains and how the min/max value affect the compiled product?
User avatar
hunterw
Posts: 1838
Joined: 14 May 2006, 12:22

Post by hunterw »

the 0 - 255 "colors" of your greyscale is in arbitrary units

the min/max value that you set in your compiler (by the way download a program called smfed so you can change them without compiling) is what spring will set the 256 color (maxheight) and the 0 color (minheight) to, and it scales the heightmap proportinally. yes, spring's 0 is your water level.

lets say youve made your heightmap and you designed it such that color 50 on your greyscale height map is to be your water level. what you would do is subtract 50 from 255 to determine maxheight, and subtract 50 from 0 to determine minheight. set your minheight to -50 and your max height to 205 and run the map. your water should be exactly at color 50 on your greyscale, but now you need to get the scale right, because lets say for instance your big mountains are only half as tall as you want them to be. well, you want to stretch the height by twice as much, so what you do is multiply the min and max values by two, so now you open up smfed, and change -50 to -100 and 205 to 410. save it, re-archive it, and reopen it, and now your map will be scaled twice as tall.

i hope my tutorial has been fun and informative, and i wish you luck in your spring mapping exhibition
MetalSkin
Posts: 77
Joined: 31 Aug 2007, 02:42

Post by MetalSkin »

Thanks mate, that is a brillant explination.

Reckon you should append that to either the compile page or the tutorial map page (though would be better as a resource on the compile page).

Yup your tutorial is a rip snorter. I started following other tutorials before I found yours (and unfortunately the other ones seemed to just stop in the middle of nowhere) so I've been doing some things a tad half assed, but overall your tut has been extremely helpful.
User avatar
hunterw
Posts: 1838
Joined: 14 May 2006, 12:22

Post by hunterw »

8)
Post Reply

Return to “Map Creation”