`EntityColor` question?

Blitz3D Forums/Blitz3D Beginners Area/`EntityColor` question?

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.

I would not have expected 255 to give the equivalent of full bright under default ambient lighting. However if fullbright is not enabled my understanding is the entitycolor values are multiplied with the underlying mesh surface color values, which I think are initially set at 255 for the B3d primitives. These values are then multiplied by the light values. This is easily done for ambient light since it is the same everywhere. Other lighting requires more calculation and will be interpolated across the vertices of each triangle.

The default ambient light value in b3d is 127 for each of red green and blue. After normalising these values you get 0.5 * 1.0 which is 127. So that would be half bright, and to get the equivalent of full bright in this case you would need to set the entitycolor values to 512. If you have changed the default lighting things will of course be different.

The docs do not explain this very well and can be misleading. The example for entitycolor actually limits the values you can input to the range 0-255! It keeps the forums busy though and gives us something to moan about.