December 3rd, 2014
*Some video and link content may no longer be available. Please see the bottom of the page for details.
“This is gorgeous! I remember having dreams about this kind of dynamic indirect lighting back when I was building the Unreal Engine 1 renderer!”
-Tim Sweeney, Founder of Epic Games
Enlighten and UE4 enable new ways of interacting with lights which were previously impossible without breaking the believability provided by the indirect lighting. The focus of this post is dynamic lighting and gameplay. I hope to cover other aspects of the video such as the set-up process in a later post.
With UE4 and Enlighten we can place or modify lighting when editing or during gameplay, and Enlighten will bounce the lighting and provide reflection cubemaps in real time.
Enlighten works alongside all of Unreal’s built in graphics features such as ambient occlusion and screen space reflections, both of which are used in the video.
This workflow video shows two spotlights and the Enlighten Skylight being used to fully light the room very quickly.
We start the video by showing the sunlit room, with strong sunlight hitting the curtains. As the sun goes down, the directional light hits the curtain from behind and we transmit the direct lighting through the curtain into the global illumination. Because the curtains are red, this gives a warm tonality to the room.
We can see the effect more clearly with a spotlight in the screenshots and video below:
The dynamic light sources create a mysterious atmosphere in contrast to the sunlight at the start. We use Blueprints to enable interaction with the lighting.
The shader running on the television animates the noise and flashes the screen on. It has an intensity value exposed via the material parameters. Enlighten allows us to assign an emissive material to a static mesh such as the television screen, effectively turning it into a stationary area light.
We animate the colour of the rendered material, as well as the Enlighten emissive property, by multiplying a colour with three float curves defined in the timelines; one to fade in/out and two phase-offset noisy curves multiplied with each other. This gives a soft random motion to the flicker. We set the light and material parameters every frame and call events on the Timeline when we want to turn the television on and off.
Given more time we could have added:
The light cube was great fun to create. We wanted to add animated light hues to the scene via a fully-dynamic physics actor spawnable by the player in-game.
The cube is a spawnable actor. It has a spotlight pointing down and a very faint point light in the centre. We’re driving these two lights via the Blueprint below, and we simplify the collision mesh to a box.
For the material we try to keep it as simple as possible; we work with the emissive property of the material and expose parameters for colour to be driven from the Blueprint and a few tweakables.
This Blueprint acts as the central place where we control the dynamic appearance of the cube, both in the shader and in the light components. We lerp the lighting and material colours over time. We initialise two variables with random numbers when we spawn the actor, which we use in our expressions below for creating the motion of the colour lerps using the game time. This is to ensure we don’t get multiple cubes changing colour in sync when the player spawns the light cube in the level.
We could extend this by storing the colours in an array and allowing the player to change and add desired colours.
The Enlighten SDK is very flexible and is in constant development, and workflow may differ based on engine and integration choices.
These examples show how we combine UE4’s graphical features and Blueprints with Enlighten’s real-time global illumination to add more gameplay elements to lighting, while maintaining a believable look and feel.
by Geomerics, an ARM company
Mizuchi is a 3D CG rendering engine that aims to achieve
the highest quality in real-time visuals.
Mizuchi Official Site
YEBIS is the only post-effects middleware technology in the world that allows you to utilize various effects in post process with live action video or CG real-time visuals.
YEBIS Official Site
Free Trial / Purchase / Inquiry
■Contact Form
■Contact Number
TEL +81-3-5488-7481