As I’m sure you know, XSI (and almost all 3D/graphics programs) mix colour in an addative RGB(A) manner. This is reasonably obvious and straight forward for most of the time, but when I was playing around with the Add Colour nodes I’ve blogged about previously I happened on something slightly off:
The idea of this test was that each of the spheres would add blue and red respectively, then the slab at the top of the screen would add yellow. There’s no problems there with the red blending through orange to yellow, but try as I might I couldn’t get it to blend ‘blue – green – yellow’ correctly. As every colour wheel will tell you, this is the way things should be and generally would look a lot better than how it is at the moment.
This is the trouble I sometimes have with RGB – I still revert back to my secondary school art theory of ‘red – yellow – blue’ primary colours. This isn’t necessarily a bad thing, at the end of the day colour theory is the same now as it was then, but it does mean that it pays to double check that you’re not being complacent and/or presumptive.
If we look at the actual numbers we’re playing with we can see our problem: we’re trying to go from blue (which, in RGB, is 0,0,1) to yellow (1,1,0) via green (0,1,0). Thinking about this in raw data for you can see the problem – getting from blue (0,0,1) to red (1,0,0) via purple (0.5,0,0.5) is easy as we’re only changing two out of the three values, but this requires us to first add the green while taking away the blue, then adding in the red.
This video has two tests to demonstrate: the first is blending from blue to yellow using a single Add Colour node. The second uses two overlapping nodes to get a better, more natural blend.
Here’s the colour part of the ICE Tree for the first example:
…and here’s the second:
As you can tell, there’s afair amound of tweeking involved to get the right balance and I’d highly recommend these kinds of isolated tests to find what works – it’s one thing to do it for a very abstract example such as this but these principles can still hold true for more subtle colour shifts. Besides, even if you’re going from blue to red you might want to weight the purple more to blue, meaning that you’d have to employ a similar technique adding a more and more red at closer and closer intervals by multiple Add Colour nodes.
























