gamma correction?

is there any way to darken / brighten a game? there is no real black for game objects. even a workaround would do.

corban

Proper gamma correction isn’t possible. It is possible to brighten up the entire screen, but you will make the black areas grey. Okay here’s how to do it:

  1. Create an overlay scene with a plane filling the entire camera view. Set it’s face settings to ‘Add’

  2. Use an IPO to animate the plane’s colour, starting from black and going up through grey to white.

  3. Set up a ‘property’ type IPO actuator using a property called ‘brightness’, and run it from an always sensor.

  4. Now add the overlay scene and use a python script to adjust the brightness property of the plane. The higher the setting, the more extra brightness it will add.

Okay I hope you find that useful. :slight_smile:

Keith. 8)

the problem is the other way round: the scene’s too bright, that’s why i can’t use an overlay scene (since there is no ‘subtstract’ face mode) :frowning: . but thank you anyway.

corban

Yeah you’re right a subtract face option would be useful, along with a filter face, OR face, XOR face… :-?

Keith. 8)

given it is opengl you really only have the following options

replace color (solid)
alpha blending
premultiplied alpha blending (the color on the texture is already multiplied by the alpha)
add
multiply

and probably replace inverted
invert
and some other odd things.

gamma correction should be a function on your video card
besides, if things are too bright it isn’t blender’s fault, you probably made it that way and are looking for a way to fix it easily (no offense, we all do it sometimes)

nay, it is a simple test scene. the lights are my problem, faces that receive no light at all are somewhat bright gray and not black, looks like there is an ambient light without a possibility to remove it. i wrote a little pure openGL scene that uses openGL lights, there the faces are black. hm.

corban

I just remembered you can use pretty much the same idea as I described before to make the scene darker as well. Just animate the plane in the overlay scene so that it is always black, but the alpha channel goes from 0 to 1. Now call the property ‘darkness’, and the higher that property the darker the scene will be. :smiley:

Keith. 8)