POV-Ray : Newsgroups : povray.binaries.images : Mario rendered in Lego : Re: Mario rendered in Lego Server Time
5 Nov 2024 14:23:42 EST (-0500)
  Re: Mario rendered in Lego  
From: Ger
Date: 16 Aug 2006 10:08:56
Message: <44e326f6@news.povray.org>
Trevor G Quayle wrote:

> Ger <No.### [at] ThankYou> wrote:
>> > Ger <No.### [at] ThankYou> wrote:
>> >> Not really that hard to do.
>> >> You know the value of the "sky" color (the blue) so you can fairly
>> >> easily determine what is not part of the sky. If it is not then raise
>> >> the block by 1 lego-unit.
>> >
>> > Is there a POV-Ray function that will return the RGB value at a
>> > particular point in an external image?
>>
>>     #if ((COL.blue < LowerColLimit) | (COL.blue > HighColLimit))
> 
> This may cause problems for the code as it only polls the blue channel for
> comparison.  Colours that have a high blue value but aren't blue may get
> caught by it (i.e. white<1,1,1>, cyan<0,1,1>, magenta<1,0,1>).  A method
> to filter the other channels as well should be added as well.
> 
> 
> -tgq
You're right. I lifted this from a code section where I was only interested
in the blue channel.

So it should be something like this :
  #if (((COL.red < LowerRedLimit) | (COL.blue > HighRedLimit)) &
    ((COL.green < LowerGreenLimit) | (COL.blue > HighGreenLimit)) &
    ((COL.blue < LowerBlueLimit) | (COL.blue > HighBlueLimit)))




-- 
Ger


Post a reply to this message

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