Altering Screen Brightness?

Blitz3D Forums/Blitz3D Programming/Altering Screen Brightness?

Black Hydra(Posted 2005) [#1]
I've made some lens flare effects for my game and they look pretty good. The only problem is that there isn't any increase in the screens brightness to simulate intense lighting.

Is there any way I can modify the screens color output (gamma and such) so that it will render all the pixels at a shifted color or intensity? I couldn't see any commands that do this when looking through the command reference...


Barliesque(Posted 2005) [#2]
Have a look in the 2D category, under Graphics. There you'll find:
SetGamma, UpdateGamme, GammaRed, GammaGreen, GammaBlue.

I'm not sure whether these functions apply to 3D graphics modes. Something I've been meaning to look into for my own flare system. Would you post your findings here? Thanks!

Have a look at my flare system:
http://www.blitzbasic.com/codearcs/codearcs.php?code=1107


Beaker(Posted 2005) [#3]
Things to note with the gamma commands:

1) they effect everything on screen including your HUD/icons/text etc.

2) They don't work in windowed mode.


big10p(Posted 2005) [#4]
Just put a x2 multiply blended quad in front of the camera, then ramp it's alpha up/down to change the brightness. Something like the tequnique I use here:

http://www.blitzbasic.com/codearcs/codearcs.php?code=1183


Black Hydra(Posted 2005) [#5]
Thanks big10p I'll try that.

Yeah, I never thought about how the increased brightness would screw up my HUD. So I think a quad is the only solution.


nawi(Posted 2005) [#6]
Well, u could set gamma high, render, then set gamma normal and draw the huds and such.


Black Hydra(Posted 2005) [#7]
Just implemented the quad system, it makes far more sense and is much easier...


_PJ_(Posted 2005) [#8]
If you've ever seen any of the Final Fantasy games since Playstation 1 (i.e FFVII, VIII, IX, X and X-2) I have noticed a trick that occurs when they try to show some high level magical effects and intense forces.

Not only do they NEVER use white on the screen backgrounds (perhaps shades of grey up to about 180,180,180 tops), but in extreme cases, whilst using a brilliant white sprite (255,255,255) occasionally they also darken the rest of the screen. This really does intensify the light effect.

(I just looked for some screenies on the web, but couldnt really find anything. Hope this is clear though.)

In order to do this yourself, in theory, you will need a quad as in Big10p's idea, but, instead of making it slightly more transparent to show through more light, Alter the EntityOrder so that your actual lights sprites are before the quad, then darken the quad slightly as the light sprites increase.

It depends on what effects you're really after, but have a play and see what works best for you


flying willy(Posted 2005) [#9]
Just implemented the quad system, it makes far more sense and is much easier...
And slower.


Shambler(Posted 2005) [#10]
You could always adjust the ambient light, not as strong an effect but it is free.