Water Height: Mapconv vs. Heightmap: Difference between revisions
fix category |
|||
| (6 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
[[Engine_Development|Development]] < [[Map_development|Map Development]] < {{FULLPAGENAME}} | |||
===The Problem=== | ===The Problem=== | ||
It has come up as a source of confusion as to what shade of grey in your heightmap is water level. The simple answer is that there isn't a simple answer, but don't worry it really isn't all that hard. It is determined by your height input parameters to mapconv (Does none of this make sense? You probably want to stop here, go back and read some of the [ | It has come up as a source of confusion as to what shade of grey in your heightmap is water level. The simple answer is that there isn't a simple answer, but don't worry it really isn't all that hard. It is determined by your height input parameters to mapconv (Does none of this make sense? You probably want to stop here, go back and read some of the [http://taspring.clan-sy.com/wiki/Map_development tutorials]. ) ''Note this assumes you have both 0% and 100% grey (black and white, respectively) on your heightmap, which should be the case (this maximises the range of greys you can play with for your heightmap)'' | ||
the '''-x''' value in mapconv is the altitude (in elmos?) of a 100% white surface | the '''-x''' value in mapconv is the altitude (in elmos?) of a 100% white surface | ||
| Line 14: | Line 16: | ||
'''x''' and '''n''' are the parameters from mapconv | '''x''' and '''n''' are the parameters from mapconv | ||
and '''a''' is the altitude of that value | and '''a''' is the altitude of that value | ||
'''The water level is always assumed to be 0 in mapconv''', so anything with a negative '''a''' value will be underwater. | |||
===An Example=== | ===An Example=== | ||
| Line 19: | Line 23: | ||
So to make 50% grey underwater, you could for example set your water line at 55% grey. Then, some values for mapconv that would work are: | So to make 50% grey underwater, you could for example set your water line at 55% grey. Then, some values for mapconv that would work are: | ||
-x 82 -n -100 | *this would produce very low mountains | ||
-x 205 -n -250 | : -x 82 -n -100 | ||
*this would probably be better | |||
: -x 205 -n -250 | |||
[[Category: Map_making]] | |||
Latest revision as of 19:15, 13 March 2010
Development < Map Development < Water Height: Mapconv vs. Heightmap
The Problem
It has come up as a source of confusion as to what shade of grey in your heightmap is water level. The simple answer is that there isn't a simple answer, but don't worry it really isn't all that hard. It is determined by your height input parameters to mapconv (Does none of this make sense? You probably want to stop here, go back and read some of the tutorials. ) Note this assumes you have both 0% and 100% grey (black and white, respectively) on your heightmap, which should be the case (this maximises the range of greys you can play with for your heightmap)
the -x value in mapconv is the altitude (in elmos?) of a 100% white surface
the -n value is the altitude of a 0% white surface
To find the altitude of an intermediate shade of grey, do this,
n+(y*(x-n)) = a or, simplified, y*x + (1-y)*n = a
Where y is your value (in percent or in RGB value / 255) x and n are the parameters from mapconv and a is the altitude of that value
The water level is always assumed to be 0 in mapconv, so anything with a negative a value will be underwater.
An Example
So to make 50% grey underwater, you could for example set your water line at 55% grey. Then, some values for mapconv that would work are:
- this would produce very low mountains
- -x 82 -n -100
- this would probably be better
- -x 205 -n -250