|
|
Warp schrieb:
> What kind of color correction do I need when I'm rendering an image to
> be later used to generate a heightfield?
>
> The answer is: None.
No, the answer is "that depends on the software reading the heightfield".
> When I specify a color of 0.5, I expect a value
> which is exactly half of the pixel component value range to be written
> to the image file so that when the image is later used to create a
> heightfield, that pixel will produce a height which is exactly half of
> the maximum height.
What you expect is a color of 0.5 being halfway between 0% height and
100% height of the height field - and that the absolute vertical
resolution is independent of the absolute height.
The question, however, is what the software reading the height field
interprets as 50%:
(a) A brightnes of 50%? (That would appear to me the most "official" way
to handle PNG files for height fields, and leave you with the option of
setting File_Gamma any way you like.)
(b) A "framebuffer value" of 127? (That would appear to me the most
stupid way to handle PNG files for height fields, and leave you with a
problem indeed.)
(c) An encoded value of 127? (That would appear to me the most
/reasonable/ way to handle PNG files for height fields, and leave you
with the option of setting File_Gamma=1.0 to get the desired result,
even though you might not be aware that it would make a difference.)
Note that in cases (a) and (c) you'd be fine with File_Gamma=1.0, which
would also ensure a uniform vertical resolution across all heights.
In case (b) however you'd be better off with a different file format,
because such an encoding would run contrary to the way the PNG file
format tries to handle gamma.
Post a reply to this message
|
|