POV-Ray : Newsgroups : povray.binaries.images : texture interpolation... why rgb ? : Re: texture interpolation... why rgb ? Server Time
5 Nov 2024 04:24:10 EST (-0500)
  Re: texture interpolation... why rgb ?  
From: Trevor G Quayle
Date: 29 Nov 2007 15:30:01
Message: <web.474f21112088bdecc150d4c10@news.povray.org>
Le Forgeron <jgr### [at] freefr> wrote:
> I had a try with RGB (the pov current way), HSL & HSV. (see attached
> picture)
>

I've been having a look at this.  One problem in your graphic is the
interpolation of opposite colours in HSV and HSL.
You are basically interpolating linearly between individual H,S and V/L values.
The interpolation of H is done in the shortest direction around the
circumference. This poses a problem because there is no logical way to choose
the direction to interpolate H around the circumference, as both directions are
equal in length, so you have chosen to interpolate directly across the colour
space, which creates a discontinuity (eg: check the interpolation of
<1,0,0><0,1,1> compared to <1,0,0><0.001,1,1>, they should be virtually
indistinguishable, but the slight value added to the R value tips the shortest
route from being undefined to defined).  It would be far better to interploate
all colours directly across the colour space to remove this discontinuity.

A second problem I see is that this really only shows the halfway colour, and
not the full transition from one to the other.

The attached image shows interpolation between pure red and the other 5 pure
colours using interpolation across the colour space as described above.

top band: HSV
middle band: RGB
bottom band: HSL

Looking at this, RGB interpolation seems to give the most pleasing transition to
the eye (my eye at least).

-tgq


Post a reply to this message


Attachments:
Download 'interp.jpg' (72 KB)

Preview of image 'interp.jpg'
interp.jpg


 

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