Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Anyone knows any implementation of the "light at the end of tunnel" effect? where the outside is entirely bright and gradually becomes more visible?

The reverse could also be true, where the inside of the tunnel is very dark until you step in and gradually start seeing

Any implementation/algo will help or even the actual name of the effect

Thanks

share|improve this question
1  
read up on hdr, especially implementations that have gradual adjustment, i'll link an example if i can find one –  dreta Oct 25 '12 at 15:46
2  
This is called eye adaptation. –  Laurent Couvidou Oct 25 '12 at 15:49
add comment

1 Answer

up vote 7 down vote accepted

Two ways, basically.

One's HDR. You adjust brightness of the image according to the brightness of the image (if that makes sense). It's somewhat hard to control and might not work exactly the way you want. The implementation is somewhat hard to do, too.

The other one's a simple sprite that gets brighter when the camera is further away and looking from the right direction. A very simple approach: additive rendering, one simple equation to control brightness, sprite must fit in the scene (where all sprites are sorted according to distance from camera).

You can find the performance of both techniques in different "parts" of Half-Life 2. The first can be found in "Lost Coast" while the second can be found in the original game, Half-Life 2 (the highway levels, to be specific), here's a video that displays this technique.

share|improve this answer
    
That video is a good example, you can clearly see the sprite at the end of the tunnel as the player drives by (so it was somewhat poorly implemented, but still effective). They didn't even have to use any kind of bloom effect because the sprite was over the black walls of the tunnel so it looked like bloom. Also the sprite appeared to get dimmer from the outside in. –  Byte56 Oct 25 '12 at 15:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.