Color Ramp Mapping Questions

Hi Guys,

I’m hoping someone can explain to me what’s going on behind the scenes when you combine a mapping node set to object and a color ramp onto a material.

The set up in the picture shows five planes at scale 1 (2 blender units wide), each 1 bu away from each other on the z axis. An empty is in the center of the scene and is being used in the node setup as the object for the point mapping. All the planes have the same material.

A few things I don’t understand. Why does the color go through the planes on an angle? How many blender units does the color ramp cover from position 0 to position 1? Is there any reason I would ever want to use a negative scale?

Thx in advance!


After some tests it appears that the color ramp maps to a default 3 blender units long if your scale is set to one. Why is this?

The colour ramp node does not bear any direct relationship to blender units, it is only remapping the values you feed into it.

The color ramp is not a texture. It doesn’t use coordinates of any kind, as the only thing it does is to convert any value between 0 and 1 into a color in the ramp.

In your setup, the input of the color ramp are the coordinates… But because the node only accepts floats, the coordinates are converted into grayscale…

this results in the following formula being applied: Fac= 0.2126 * X + 0.7152 * Y + 0.0722 * Z.
And with object coordinates, XYZ will be in blender units if the object scale is [1,1,1]; their origin and direction will be the object origin and rotation

:wink:

If you want to know more about the way the different coordinates work this video is good:

Thanks a lot you guys, I’ve got a much better sense of it now. I’ll have to watch that video entirely jandress it looks very thorough. Cheers!