Tutorial #6: IL Volume Effects
In this tutorial, you'll learn how to create IL Volume Effects and leverage them for more advanced and customized effects to render them to your light controllers. Volume Effects allow you to take full advantage of the effects system and do what you want with your light controllers. We even support IL Effect Volumes to render video, textures, particles and sound to lights in really cool ways so the sky is the limit.
In the future, the effects system will also be able to leverage Niagara in exciting and awesome ways!
EXPERIMENTAL FEATURE: This tutorial as well as the features are not final and may change. If you have any feedback, we'd love to hear your thoughts!
#1: Create an Immersive Lighting Volume Effect Blueprint
You can add this new asset to your Effects folder from the previous tutorial or by creating a new folder in your Content Browser called VolumeEffects under your IL folder if you've already created it as an example. Right-click in the new folder and add a new blueprint based off of the parent class Immersive Lighting Emitter Volume and name the effect RainEmitterEffectVolume. Open the effect so we can edit it.
In the following example, we've created a volume effect that uses the emitter volume to control how to inject light into nearby controllers based on where the "particles" are in world space. We set the color to a deep blue and set the Particle Class to ImmersiveLightingDebugParticle to get a visual representation of the particle. The other defaults will spawn 100 particles per second and then the particles will fall naturally based on gravity. This will give a rain like effect as the particles fall past the real-world lights.
#2: Setup the Volume Effect to be triggered using multiple Light Controllers
One way is to add the new blueprint to your level and it will affect the users lights based on where they are in relation to the volume. The other way is to apply and constrain it to a single or multiple Light Controllers using an IL Effect. These can be also used in IL Master Effects and/or triggered manually.
To setup the IL Volume Effect to be triggered manually, we'll need to create a new IL Effect asset. Start by creating a new folder in your Content Browser called Effects under your IL folder if you've haven't already created it as an example. Right-click in the new folder and under the Immersive Lighting menu, select Immersive Lighting Effect and name the effect RainVolumeEffect. Open the effect so we can edit it.
First thing is to enable Effect Volume to enable the functionality and then to set the Effect Volume Class to the new RainEmitterEffectVolume blueprint we created earlier. That's it!
Let's hook up the new RainEmitterEffectVolume to be triggered to start on BeginPlay using this second method. Go into your level blueprint and call Get Immersive Lighting System and from that, call Play Master Effect for BeginPlay and Stop Master Effect (or Stop All Lighting Effects) on EndPlay.
That's it! Keep in mind this effect can be added to an IL Master Effect to combine it with other standard or volume IL Effects.
Create Custom Effect Volumes (optional)
You can also create your own parent volume classes in C++ or Blueprints (C++ requires pro plugin). Use the UImmersiveLightingEffectVolume class with the ImmersiveLightingEffectVolume.h header.