Object color values above 1.0 with additive type transparency.

I stumbled on to an interesting thing yesterday, not really a bug… maybe a feature?

Have you ever used object color? It’s a quick way of changing the color of something in game. You can change it directly with python just by using:

own.color = [1.0,1.0,0.0,1.0]

This would give the object a yellow color.

Here are some objects tinted red.

Not very useful as it tints the whole thing red, but it can be combined with nodes to give white a good color changing effect.

Now, just a few weeks ago I was saying that with RGB values mapped to 1.0 it was impossible for them to go higher than that. In the old days of 8 bit color we used to always use 0-255 to set the color of a pixel. Obviously with the 255 range you can’t get whiter than [255,255,255].

But it’s much more common these days to use a vector of 0.0-1.0 in 3-4 channels (RGBA).

When I was doing some experiments with using object color to effect UV scroll in material nodes I noticed that there was some strange mapping going on with color values. Taking the value above 1.0 continued to have an effect on how far the image scrolled (or in another case how much a HUE/SAT/LUM filter affected a texture) even though the object color still looked like 1.0 on screen.

I also tried it with additive blend type transparency.

Back when I switched from blender 2.49b to blender 2.5, I noticed that something changed with colors, perhaps the move to vectors to represent colors and the introduction of more advanced color management techniques… Anyway, with the older versions of blender, additive blended textures seemed much more vivid and bright. Now even with shadeless material, the pure white seems less than pure white. The other colors seemed very muted, it was impossible to get that bright neon effect which I’d used so much in the older versions of blender.

Here you can see the targeting reticule shaded with different values of object color. The original texture has a maximum RGB value which is less than full white, because I want it to blend with other additive objects.

It seems that using additive blend type transparency, combined with very high values of object color can give something similar to the old bright colors from blender 2.49.

It’s important to note however that it can have undesirable effects too, here I’ve set the object color on an ordinary shaded texture to show how high object colors can distort the colors of your objects.

As I say, I don’t know what this is, a bug, a feature? Anyway, it’s useful to know so I thought I’d share it.

Does this make it possible to also render values above 1.0? Like if I want the lamp object to be rendered above 1.0 in scene, will it also output a color above 1.0? I mean this in render-to-texture. Can it recieve color value over 1.0 and store in texture>

I don’t know about that, it only renders what you can see I guess, but if you set the object color of the object which has the render to texture texture on it higher than 1.0, it might bring out the bright areas more. I don’t know how the final result would look, slightly over exposed like the ones above I expect, but it might work.

If you try it, why not post the result here?

OK! Yes… However, it still won’t be perfect as sometimes object looks darker, but it casts high amount of light… This can’t be achieved here…

In render to texture it renders it 0.0 to 1.0, however, this method allows emit on objects using just object color. For example, you can turn on/off lights without animations of material or replacing mesh - just edit object color:)

Interesting. Thanks for sharing the tip :slight_smile:

The object colour multiples the fragment color by the object colour which is why it works like this. The reason it seems darker post 2.49 is because blender now uses colour management to give better colour accuracy.

Sent from my SM-G920F using Tapatalk

That makes sense, thanks.