POV-Ray : Newsgroups : povray.general : 24 bit heightfields : Re: 24 bit heightfields Server Time
30 Jul 2024 14:25:44 EDT (-0400)
  Re: 24 bit heightfields  
From: clipka
Date: 10 Dec 2008 21:40:00
Message: <web.49407d17869f689febb7cc8a0@news.povray.org>
"SharkD" <nomail@nomail> wrote:
> I generated the following heightfield in some program or other. It uses all 24
> bits for elevation information. My question is, how are the colors/height data
> organized? I would like to create a pigment that produces similar maps.
>
> http://i421.photobucket.com/albums/pp292/SharkD2161/Support/Untitled1_hf.png

it's not very easy to tell, given the low resolution - but it is quite obvious
that the red channel is most significant. So I'd guess that the height is coded
as:

    height = red + (green/256.0) + (blue/65536.0)

with red, green, blue and height all ranging from 0.0 to 1.0.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.