- FEATURE REQUEST - Ambient Color Mix Modes

Hey. I know that there’s not really a huge amount of developers working on the BGE, but I really appreciate what those who are developers have done for it so far. It’s really shaping up. One thing that I really would appreciate if someone could take a look at is to add the ability to change the mix mode for ambient color.

Currently, any ambient color appears to be added to objects if their materials accept ambient color. It would be very helpful, particularly for out-door scenes, if we could specify if we wanted an ambient color to be Mixed, multiply, or added. The other options are nice, but not necessary immediately. Here’s an example.

As can be seen, with a world ambient color of White, and an ambient factor of 0 on the brick, it is shaded, which is fine. However, with an ambient factor of 1, it becomes white, not becomes unshaded.

The same thing happens with any color - the object takes on that color, rather than changing the color (and opacity) of its unshaded parts. With a mix mode next to the factor for each objects’ material, you would be able to change how an object uses the ambient color. You could set it to Multiply, for example, and then use a light ambient color - this would change the shaded areas to be brighter.

Currently, the only way to achieve lighter shaded areas (without influencing light areas) would be either 1) to use the Emit value (which does indeed make objects brighter overall, which is fine for what it does, but not for outdoor scenes), or 2) use two Hemi lamps (which is an unnecessary strain). It would be a great help to have this feature implemented.

EDIT: If this is found to be too unimportant or useless, at the very least, could the GLSL ambient color mixing behave more like the Multi-texture color mixing? In Multi-texture mode, changing the ambient color to be brighter makes darker areas brighter, while not changing the light areas. That really helps things out. If the GLSL version could perform similarly, that would be great.

Bumping for a BGE dev to see this. Also, any feedback on whether this is a wanted feature would be welcome, as well.

The additive behavior is technically correct:

I can see where a feature like this might be useful, but it would also be slightly redundant with custom shaders. I would rather see development on custom shaders than a feature like this however.

I understand that the current custom shader system is a little weak, are you encountering any particular road blocks to using a custom shader to achieve the effect you are looking for?

I suppose I could get the result I want with nodes (which is what I’m thinking of using), but I would like to be able to quickly swap out global ambient lighting levels by just changing worlds, for example. That would really be helpful.