POV-Ray : Newsgroups : povray.general : using image as a function hf_macro : Re: using image as a function hf_macro Server Time
5 Aug 2024 20:16:57 EDT (-0400)
  Re: using image as a function hf_macro  
From: Christopher James Huff
Date: 1 Aug 2002 17:57:35
Message: <chrishuff-4E3775.16484301082002@netplex.aussie.org>
In article <3d498742@news.povray.org>, "Shay" <sah### [at] simcopartscom> 
wrote:

> I guess I am doing something else wrong. Here is the relevant part of the
> scene:
> #declare ImageFunction = function {pigment {image_map {png "name2.png" }}};
> #include "Shapes.inc"
> 
> HF_Square (ImageFunction,no,no,<10,10>,no,"Test_Out.inc",<-1,-1,-1>,<1,1,1>)

It expects a scalar float value instead of the color the pigment image 
gives. Try "function {ImageFunction(x, y, z).gray}"

I thought there was another keyword that used the same algorithm the 
height field object uses to get a float value from a color, but I guess 
it didn't make it into the final release. The ".gray" method should be 
close enough for most purposes though.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

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