3
$\begingroup$

I found an unexpected behavior of ColorRamp node and I will demonstrate it on a simple example.

There are five cubes and they have vertex colours set. From left, the colours are in RGB: (0.0, 0.0, 0.0), (0.25, 0.0, 0.0), (0.5, 0.0, 0.0), (0.75, 0.0, 0.0), (1.0, 0.0, 0.0). Then the 'R' part of the colour is set as an input into the color ramp and the final colour should be set according to the color ramp.

There are two cases, which are in the Figure 1 and 2.

Figure 1 Correct colours

Figure 2 Wrong colours

In the Figure 1, the final colours seems to be right, it is according to the color ramp from blue to white. But when the color ramp is reversed (from white to blue) in the Figure 2, the final colours of the cubes are wrong. They should be the same as in the Figure 1, only in reversed order, but they are not and it even looks like that the first three cubes from left in the Figure 2 are only white.

Do you have any idea why this happens? Should I change some setting to get the same coulours (only reversed) for both cases? Or do you think, it can be a problem of Blender?

Thank you very much for any advice.

$\endgroup$
2
  • 4
    $\begingroup$ Vertex colors are converted to sRGB, so their values change. If you're using Cycles, creating a vertex_layer_float is a better alternative. $\endgroup$
    – Secrop
    Sep 16, 2021 at 9:06
  • 3
    $\begingroup$ See, e.g.: blender.stackexchange.com/a/87978/35559 $\endgroup$ Sep 16, 2021 at 9:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.