|
|
Ger nous apporta ses lumieres en ce 16/08/2006 10:10:
> 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)))
>
>
>
>
You could also use .gray as:
#if ((COL.gray < LowerGrayLimit) | (COL.gray > HighGrayLimit))
It evaluate the average of all 3 chanels, discriminating on the brightness
regardless of the hue.
--
Alain
-------------------------------------------------
I'm interested in the fact that the less secure a man is, the
more likely he is to have extreme prejudice. (Clint Eastwood)
Post a reply to this message
|
|