A map texture discussion thread
#59

ClockWatcher Wrote:...The scale, roughly is the following:

0 - 600m: 1 RGB increment in value = 3.75m: RGB range 0 to 160
600 - 1100 m: 1 RGB increment in value = 15.6m: RGB range 160 to 192
1100 - 2080m: 1 RGB increment in value = 29.7m: RGB range 192 to 225
2080 - 4030m: 1 RGB increment in value = 65.0m: RGB range 225 to 255

ie, if
RGB = 2, height = 2 x 3.75m = 7.5m
RGB = 160, height = 160 x 3.75m = 600m
RGB = 180, height = (160 x 3.75m) + (20 x 15.6m) = 912m

Well, mr N developed more precise method, which is pretty straightforward:

c = 0 - 64, h = 0 + (c - 0) * 1, h = 0, 1, ... 64 (i.e. h = c)
c = 65 - 96, h = 64 + (c - 64) * 2, h = 66, 68, ... 128
c = 97 - 128, h = 128 + (c - 96) * 4, h = 132, 136, ... 256
c = 129 - 160, h = 256 + (c - 128) * 8, h = 264, 272, ... 512
c = 161 - 192, h = 512 + (c - 160) * 16, h = 528, 544, ... 1024
c = 193 - 224, h = 1024 + (c - 192) * 32, h = 1056, 1088, ... 2048
c = 225 - 255, h = 2048 + (c - 224) * 64, h = 2112, 2176, ... 4032

where c is an RGB value
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)