[futurebasic] Re: [FB] More Color Resolution When Height Mapping?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2000 : Group Archive : Group : All Groups

From: BMichael@...
Date: Mon, 30 Oct 2000 10:22:19 EST
>When height mapping generally you use the luminosity components, so you
>average the 3 RGB's, and plot the height as a FN of that number, which at
>Gray scale or RGB + Averaging will give you 0-255 steps.
<snip>
>My question , after this long exposition,  is how can I generate more color
>or luminosity steps when height mapping, as 256 isn't nearly enough for a
>smooth mesh?

Average and multiply by 3, giving you 0-765. Using the original RGB 
value, if the "R" component is larger than the G & B, leave your result 
alone. If the "G" component is larger than the R & B, add 1. And if the 
"B" component is largest, add 2. Your final range is 0-767 - many more 
"steps", and consistent with (I think) the way the eye focuses different 
colors in different planes.

If you _really_ want to get inventive, you can multiply by larger 
numbers, and make the add-on value determined by the size of the 
difference between channels. You don't want to get to where _too_ much 
difference is made because of the actual colors, though, you still want 
your "color-dependent" result to be very close to what you'd get from an 
original in grey scale, just with more resolution. The only way to know 
when you've got this method "right" is when the output looks visually 
consistent with the input.

Bill