POV-Ray : Newsgroups : povray.binaries.images : texture interpolation... why rgb ? : Re: texture interpolation... why rgb ? Server Time
2 Aug 2024 04:20:20 EDT (-0400)
  Re: texture interpolation... why rgb ?  
From: Alain
Date: 27 Nov 2007 22:55:12
Message: <474ce6a0$1@news.povray.org>
Le Forgeron nous apporta ses lumieres en ce 2007/11/27 15:38:
> 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, even for
> out of rgb <0,0,0> / rgb <1,1,1> block ?
> And wouldn't the result be different and maybe more natural (or not ?)
> 
> Linear for SL/SV should be easy, but I'm still wondering about
> interpolation of opposite hue: what would be the right solution ?
> 
> Could it be chosen per interpolation ?
> 
> Attached is a rgb interpolation of the polygon, with various
> strength of mix.
> 
> 
> ------------------------------------------------------------------------
> 
Your computer, and most image formats, use the RGB space. So, it's much simpler 
to work in RGB space.
You can work in another colour space, but it's more complex, as you need to 
translate from one to the other. There are some macros to do just that in 
colors.inc.
They are:
CH2RGB()
CRGB2H()
CHSL2RGB()
CRGB2HSL()
CHSV2RGB()
CRGB2HSV()

-- 
Alain
-------------------------------------------------
The strongest reason for the people to retain the right to keep and bear
arms is, as a last resort, to protect themselves against tyranny in
government.
Thomas Jefferson


Post a reply to this message

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