POV-Ray : Newsgroups : povray.binaries.images : texture interpolation... why rgb ? : Re: texture interpolation... why rgb ? Server Time
2 Aug 2024 04:17:09 EDT (-0400)
  Re: texture interpolation... why rgb ?  
From: Warp
Date: 28 Nov 2007 09:20:20
Message: <474d7924@news.povray.org>
Le Forgeron wrote:
> I'm wondering why, short of historical reason, does the
> interpolation of weighted textures(pigment) is performed in the rgb
> space.
> 
> Wouldn't it be possible to perform it in HSV or HSL space

  Is HSV interpolation unambiguous?

  Suppose that the two colors you are interpolating between have the
same saturation and brightness, and only differ in hue. How would you
interpolate between them?

  A naive approach would be to interpolate between the separate
components. Since the saturation and brightness are equal in both
colors, their interpolation doesn't produce any change. Thus all that is
 left is interpolating the hue value. This means that if one of the
colors has eg. a red hue and the other a cyan hue, the interpolation
would go through yellow and green (or magenta and blue) producing a
rainbow of colors, which is hardly  what the user wanted.

  Another approach would be to interpolate linearly along the surface of
the hue disc, ie. the ring of colors which have the different hue values
at its border and gray at its center: Place both colors on this disc and
interpolate linearly between the two. The brightness can be interpolated
separately. (I think this effectively makes it an interpolation inside
the hue cone.)
  While this could work, I'm not exactly sure how it's different from a
direct RGB interpolation. I haven't tested it.


Post a reply to this message

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