Hi again
I have made some reading trying to find out what the RGB formula achieves.
If I got it right it should work like this:
RGB tells the z-position of each vertex in the imported terrain
RGB=0 gives a Z-position of 0, RGB=255,255,255 gives the highest Z-position.
Normally we have grayscale height maps where R=G=B so for them any of the
RGB values can be used. R is normally used.
So, the formula for grayscale height maps should be something like
R*1 + G*0 + B*0
We only care about one of the RGB components as they are all the same values
for each pixel
In MED the formula is said to calculate z-position.
I did a simple test by in MED importing a black 1024x1024 height map with one
white dot in it with following results when importing the produced .hm file into WED.
----------------------------
R*0 + G*0 + B*10 - terrain pos at z = 0, size 1024x1024x512
R*0 + G*10 + B*0 - terrain pos at z = 0, size 1024x1024x512
R*10 + G*0 + B*0 - terrain pos at z = 0, size 1024x1024x512
R*10 + G*10 + B*10 - terrain pos at z = 0, size 1024x1024x512
So apparently the formula does nothing for grayscale height maps
or have I totally missed the whole idea of how this works?
~Roland
Last edited by rstralberg; 02/21/08 22:04.