POV-Ray : Newsgroups : povray.general : 16-bit greyscale using rg values? : Re: 16-bit greyscale using rg values? Server Time
2 Aug 2024 10:18:19 EDT (-0400)
  Re: 16-bit greyscale using rg values?  
From: Christopher James Huff
Date: 2 Nov 2004 13:31:09
Message: <cjameshuff-6F2394.13310102112004@news.povray.org>
In article <web.4186a25f26a673e570f077560@news.povray.org>,
 "brandon" <moc.tibroni@drut backwards> wrote:

> I know PPM's can be used, but they're so space inefficient for my little
> hard drive.

You're space limited, and using windows BMPs?
How about putting them in PNG format? IIRC, 16 bit grayscale PNG will 
work in height fields, and will be far smaller than red-green encoded 16 
bit BMP. Or just use TGA...BMP doesn't have any advantages over it.

Anyway, you can use it with any file format. Simply make a pigment 
function using the image in an image_map, then make a scalar function 
using the .hf feature or combine the channels yourself. Then use that 
function in an isosurface, HF mesh, or height field.

#declare PigFn = function {pigment {image_map {...}}};
#declare HeightFn = function {PigFn(x, y, z).hf};

You could even go further, and have 24 bit height values encoded in all 
three channels. Or combine multiple images in useful ways, or mix them 
with built-in patterns or mathematical functions.

-- 
Christopher James Huff <cja### [at] earthlinknet>
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.