Dev Diary: September 2017 – Lightning & Rain

Since I mentioned the post about adding rain effects, I wanted to cover the Lightning effects seen below.

I wanted to create a simple effect that did the job as this would only be seen through the windows if the player was staring into the sky at the right time. However, even just by going down the simple route, I think the end result works great. So how was it done?

Originally, all I had was a flash of light emitting from the Directional light and it worked… from a certain point of view. The biggest problem with just doing it this way is that the night sky would not light up and also meant that if you were standing far away from the windows, there would be no flash of light outside in the sky. This broke the illusion and meant I had to find another way.

As I was using a Skybox, I decided to look into switching out the frames used in the Cubemap. This meant that for each face on the Cubemap there would be another version with the Lightning bolt.

Furthermore, I animated the exposure of the Skybox in time with the audio and Directional light to give the clouds some pulses of light.

With just a few simple changes to the Skybox, I think the end effect is convincing and together with the audio does the job rather well.

If I get more time in the future, I could expand upon this effect by adding more frames to the Lightning to make it travel across the sky but as of right now, I am very happy with it.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.