QUICK DEV TIP #18 UE4 - SEPARATE LIGHTING CHANNELS

This lighting tip is a super powerful one and if you don’t know about it already its something that I’m sure you are going to find useful in the future!

Did you know that you can split lighting into separate channels so only certain things will be lit and others will be excluded?

If you would prefer to watch the video version, check it out here

In my example below, we have a skeletal mesh character that we are trying to present in an appealing way. We currently have a single spotlight lighting the scene from above and we still need to add some more lighting.

QDT18_Blog01.JPG
 

However, when we add in some more lights (three point lights) the character is being lit up but so is the floor. We are getting unappealing patches of light on the floor which are drawing attention away from our character, which we don’t want!

QDT18_Blog02.JPG
 

We can get around this using todays Quick Dev Tip: Lighting Channels. If we click on our three lights and look in the details panel for Lighting Channels you will see the settings we are after. You will have to expand several rollouts to find it. We have three lighting channels that we can play with.

QDT18_Blog03.JPG
 

If we turn off Channel 0 you will see that the lights look like they have stopped working. This is normal, as we have technically stopped the lights affecting anything in the scene.

QDT18_Blog04.JPG
 

If we then turn the lights to Channel 1, still nothing happens. This is because although we have set the light we also need to mimic this action on the assets we wish to receive lighting. In this case our skeletal mesh.

QDT18_Blog05.JPG
 

If we go to our skeletal mesh and search for Lighting Channels (you will have to rollout some settings again), we will see the effect that we are after. The character is being affected by the light but the floor and surrounding area are not!

QDT18_Blog06.JPG
 

So as you can see in the example below because the character has channel 0 and 1 active we are getting the spotlight from above and the three point lights around. However, if we allow only channel 1, we have the lights around but will not get the spotlight from above.

QDT18_Blog07.JPG
 

This is a very powerful tool as it allows you to more easily control your lighting setups, in fact, you can create unique lighting setups without affecting the things around it. For example, you could add a light that follows your character around that effects the world but not your character (to stop them from getting “blown out”. Another example is that you can add a pop to specific objects in your scene. For example, imagine that the cube below is an important loot chest in our game. At the moment it blends into the world.

QDT18_Blog08.JPG
 

However, we can quickly and easily emphasise it and make it pop out by adding a light that only affects it and not the rest of the world.

QDT18_Blog09.JPG

I really like lighting channels and I think they are a great help when you are trying to add juice and polish to your game! The only thing to remember is that you can only have three channels, so sometimes you may need to plan ahead.

If you want more quick tips & tricks FOLLOW ME ON TWITTER @cbGameDev

Also, check out the parkour game I'm solo developing called Freerunners. Give it a wishlist if you like the way it looks!: https://store.steampowered.com/app/1430330/Freerunners/