Re: [Algorithms] RGB to XYZ conversion
Brought to you by:
vexxed72
From: Sam M. <sam...@ge...> - 2008-04-23 08:10:03
|
Out of interest, did you try exposing the YCoCg colour space to your artists at all? It's nice and simple, but I'm wondering if anyone has had any issues with it in practice? <snipped from the first hit in google:> We recall from [1] that the direct YCoCg color space transform is defined by: [y,Co,Cg]' = [1/4, 1/2, 1/4].[r,g,b]' [1/2, 0, 1/2] [1/4, 1/2, 1/4] and the inverse YCoCg color space transform is: [1, 1, 1] [1, 0, 1] [1, 1, 1] </snip> Cheers, Sam From: gda...@li... [mailto:gda...@li...] On Behalf Of Marco Salvi Sent: 21 April 2008 18:35 To: Game Development Algorithms Subject: Re: [Algorithms] RGB to XYZ conversion Umh..interesting, why did you use CIE XYZ for your post processing pipeline? Regarding the original question: small variations in the colour transform don't really make any significant difference if you are using CIE XYZ just to store your data in a different way (ie HDR data in 4 bytes per pixel or less), as you have to go back to RGB to display your image anyway. While working on Heavenly Sword I played with slightly different matrices and even artists couldn't notice any difference. Marco On Mon, Apr 21, 2008 at 10:24 AM, Wolfgang Engel <wol...@gm...> wrote: I used this for PostFX. The equation I use is different from yours. The color values that go in there are already gamma 1.0. I posted my numbers on my blog Diaryofagraphicsprogrammer.blogspot.com I can't remember how I came up with them but it was probably not a scientific way. Sent from my iPhone On Apr 21, 2008, at 10:04 AM, chr...@pl... wrote: > > Dan Glastonbury wrote: >> Dear colour space experts >> What matrix should I being using to convert RGB values to CIE XYZ? >> Christer Ericson (http://realtimecollisiondetection.net/blog/?p=15) >> gives the following matrix: >> >> M = [0.497,0.339,0.164] >> [0.256,0.678,0.066] >> [0.023,0.113,0.864] >> >> to be used in [X Y Z] = [R G B]*M and I assume this comes from Greg >> Ward's paper. Charles Poynton's ColorFAQ and wikipedia's article on >> CIE 1931 give different formulations for the conversion. > > Good question Dan, and I for one don't know the answer. I asked myself > the same question when I wrote that blog post and first worked out the > code. Everywhere you look, there's another subtly different matrix > given. As we didn't end up using any logluv encodings, I never tried > to find out what's the "correct" matrix. As you correctly assumed, I > just used the values given in Greg Ward's paper for the blog post. > > > Christer Ericson, Director of Tools and Technology > Sony Computer Entertainment, Santa Monica > http://realtimecollisiondetection.net/blog/ > > > --- > ---------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |