POV-Ray : Newsgroups : povray.advanced-users : Frustration!! : Re: Frustration!! Server Time
1 Jul 2024 05:52:47 EDT (-0400)
  Re: Frustration!!  
From: Chris B
Date: 15 Aug 2009 11:09:01
Message: <4a86cf8d$1@news.povray.org>
"Lioness" <cat### [at] livecouk> wrote in message 
news:web.4a86c707be92e5065a751fb0@news.povray.org...
> "Chris B" <nom### [at] nomailcom> wrote:
>> The problem is that your #if statement is comparing two function
>> definitions. Instead you need to compare the results of evaluating the 
>> two
>> functions.
>> I suspect you probably meant to write something like:
>>
>> #declare Val1 = Image1(x,y,z).gray;
>> #declare Val2 = Image2(x,y,z).gray;
>
> Hiya Chris,
> thanks for your reply!
> Well, the situation has slightly improved, at least Pov doesn't try to 
> throw me,
> my cat and my goldfish out the window anymore ... However, I now get an 
> error
> message saying: Float expected, but vector or color expression found.
>
> SIGHHHH!!
>
> I've had that error before, but I can't remember what I did about it. :-{
>

Ah yes. Actually to get a value you need to specify the coordinates of a 
point on the image, rather than just the x, y and z vectors, so something 
like:
#declare Vec = <0.1,0.2,0.3>;
#declare Val1 = Image1(Vec.x, Vec.y, Vec.z).gray;
#declare Val2 = Image2(Vec.x, Vec.y, Vec.z).gray;

This brings into question what it is you're trying to do within the 
declaration of the 'OverlayRed' pigment. I get the nasty feeling you're 
trying to get it to take the brightest color for each pixel, but what you've 
got there won't do that. At best that approach will pick one image or the 
other based on the brightness of a particular pixel in both images.

ps There's a spare close-bracket after the second '.red'.

Regards,
Chris B.


Post a reply to this message

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