EntityColor Color Range

Blitz3D Forums/Blitz3D Programming/EntityColor Color Range

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Ambient light is ambient light. It's not a "limitation" and it doesn't affect the "range" of colors to which you can set an entity.

Imagine you have a pure red entity. If you set ambient light to 255,255,255, then you'lll see it as pure red.

However, if you set ambient light to 511, 511, 511, you'll see it as pure WHITE.

This is because the red color is getting overbrightened, just like when you crank up entityshininess and have a specular hotspot on your model. In fact, thanks to the face that you can set colors up to 511, you can simulate specular by adjusting the vertex colors if you don't want to use hardware lights.

As long as the sum of your objectcolor (or vertex color) and the ambient light and the lights in your scene stays below 255, you won't get that overbrightening effect.

It works like this:

(Ambientcolor/255 + (Lightcolor*Falloff)/255) * ObjectColor

So you can go up to 2.0 and perhaps beyond that on the left side of the equation and that will multiply your object color above and beyond what it would be if fullbright.