POV-Ray : Newsgroups : povray.programming : Got the grey blues. : Re: Got the grey blues. Server Time
28 Jul 2024 18:24:01 EDT (-0400)
  Re: Got the grey blues.  
From: Nathan Kopp
Date: 26 Aug 1999 23:31:46
Message: <37C60728.A57B363B@Kopp.com>
"Edward C." wrote:
> 
> Looking through the source for a formula to convert RGB values to grey
> values, I've discovered a number of slightly different formulas, none of
> which will convert RGB <1,1,1> to a grey value of 1.  Perhaps there is some
> good reason for this, perhaps not, but either way, does someone have a
> formula that will convert in this manner?

There are two that I have seen in POV:
  0.2125*R + 0.7154*G + 0.0721*B (as mentioned by Nieminen)
and
  (R+G+B)/3.0

I agree that it should be standardized (with a macro or inline function)
in the future.

-Nathan


Post a reply to this message

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