Water Height: Mapconv vs. Heightmap: Difference between revisions
No edit summary |
|||
| Line 1: | Line 1: | ||
===The Problem=== | ===The Problem=== | ||
Revision as of 14:11, 23 June 2006
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
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:
-x 82 -n -100 <- this would produce very low mountains -x 205 -n -250 <- this would probably be better