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.
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!
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.
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.
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.
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!
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.
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.
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.
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/