POV-Ray : Newsgroups : povray.binaries.images : texture interpolation... why rgb ? : Re: texture interpolation... why rgb ? Server Time
2 Aug 2024 10:19:50 EDT (-0400)
  Re: texture interpolation... why rgb ?  
From: Trevor G Quayle
Date: 30 Nov 2007 08:55:03
Message: <web.4750160f2088bdecc150d4c10@news.povray.org>
"scott" <sco### [at] laptopcom> wrote:
> >> Oh I knocked up a quick program to interpolate between two colours in
> >> RGB space and Yuv space.  In each pair, the top version is RGB, the
> >> lower version is Yuv.
> >
> >  The yuv interpolation doesn't look half-bad.
>
> I realised an improvement though.
>
> Although the "colour" part (u and v) is supposed to be interpolated evenly,
> the Y part will not be.  Y is linear luminance, ie not gamma corrected, so
> interpolating it directly will not give a very "even" looking result (there
> will be too much "white").
>
> So I modified the code to do this (now a black-white gradient looks
> identical in both RGB and Yuv interpolation) and it looks a bit better,
> especially when going from dark to light colours.  Again, top bar is RGB and
> lower bar is Yuv.
>
> Also, the problem with converting from RGB to Yuv and back is that it
> assumes your display device is exactly calibrated to a standard (I used sRGB
> in the calculations).  If it's not then the results won't look as good as
> they could.

I think this does present an interesting result.  Similar to the RGB gradient,
the colour luminance is constantly increasing or decreasing (unlike in HSV or
HSL where it tends to arc up or down past the final luminance and back again),
however following a different path of colour mix.

-tgq


Post a reply to this message

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