Fading Materials

Hi Guys,

I’m stuck with fading materials and maybe you guys have an idea how to tackle the following:
I’d like to change the color of my material in dependency of the geometry, but I would like to make it dependent only from one axis. Tried my best with material nodes for cycles but simpyl I can’t find out how to extract a single axis from the “geometry node”. :spin: The effect I am aiming for is that a fluid running through a glass spiral changes its color during traveling. I am quite near, but still its “jumping back” to the initial color, Blend-File is on: https://dl.dropboxusercontent.com/u/30916427/ColorConversion.blend

Grateful for hints!
Cheers
Oliver

About single axis from the “geometry node”:


RGB=XYZ

“vector math” node on the picture is only needed to move the center of the global coordinates

Great, that works! Thank you so much!

Cheers
Oliver