POV-Ray : Newsgroups : povray.general : Creating 16-bit HFs from C++ : Re: Creating 16-bit HFs from C++ Server Time
2 Aug 2024 00:12:00 EDT (-0400)
  Re: Creating 16-bit HFs from C++  
From: Christopher James Huff
Date: 21 Feb 2005 14:27:59
Message: <cjameshuff-F0941A.14280321022005@news.povray.org>
In article <4219be88$1@news.povray.org>, "scott" <sco### [at] spamcom> 
wrote:

> I'm writing some code in C++ (on windows) to generate some 16-bit height
> field data.  What is going to be the easiest way for me to export the
> numbers to use in POV?  The PNG file format looks pretty complex (compared
> to BMP which is what I'm used to).

PNG would be the best option. libpng is really not that hard to use, 
just follow the examples in the documentation. You get lossless 
compression and files that are widely supported.

Alternatively, you could encode the data as 16 or 24 bit fixed point 
float values split into 8 bit chunks among the RGB channels, and either 
use POV-Ray's built in red-green "16 bit grayscale TGA" feature or 
combine the channels manually using a function to generate the height 
field. I would suggest the latter...it seems most flexible.

-- 
Christopher James Huff <cja### [at] gmailcom>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

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