POV-Ray : Newsgroups : povray.binaries.images : texture interpolation... why rgb ? : Re: texture interpolation... why rgb ? Server Time
2 Aug 2024 10:26:27 EDT (-0400)
  Re: texture interpolation... why rgb ?  
From: scott
Date: 30 Nov 2007 09:49:24
Message: <475022f4$1@news.povray.org>
Yes, the "brightness" will ramp up or down linearly in gamma-corrected 
space.

The colour will linearly interpolate between two points in the uv plane.

You can see a picture of the uv plane here:

http://content.answers.com/main/content/img/CDE/_CIE1976.JPG

The outer edge are single-wavelength colours, with the wavelengths marked 
on.  If you mix two or more wavelengths you can simply take a weighted 
average of the uv coordinates and that will give you the resulting colour. 
That is essentially what I am doing in my code, varying the % of each colour 
linearly from 0-100%.

The problem occurs when you interpolate from blue to yellow (or any other 
pair either side of white).  In real life, if you mix 50% blue and 50% 
yellow you do get white (it's how most white LEDs work).

To me though it doesn't seem right that if you want a nice colour gradient 
between a strong blue and yellow, you end up with a muddy grey in the 
middle, but then I don't know what else you could do without introducing 
other colours...


Post a reply to this message

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