For Activ8te’s latest track, Netrunner, I am producing a music video that tells the story of Lucy, a netrunner who uses social engineering to extract secrets from a Militech corporate hacker. The music video is produced completely in Unreal and makes use of Unreal’s metahuman technology. The first chorus has a dance scene where Lucy is singing the vocals and a laser ligth show plays in the background.
Laser Light Show
The Unreal Marketplace has a great Laser Light Show asset which actually allows Unreal to control a real lasers via DMX. In my case, I just wanted to use it for the Chorus dance scene. Due to limitations with metahumans and motion blur, I need to render images 16x slowed down via time dilation. Afterwards, I compose the images in Nuke to get realistic looking motion blur. For the laser light show, I got interesting results when using random laser bursts:
As you watch the video you might notice a couple of moments when all of a sudden a lot of lasers appear. This happened because the asset creates a random configuration for every single frame. However, with time dilation, it effectively creates 8x as many laser bursts and each laser burst is very very short.
Fixing the Random Numbers in the Blueprint
When debugging the problem, I noticed that the blueprint used random numbers without any context of the time that was passing. As Unreal does not provide any functions to control randomness in the way that I needed, I used a simple LCNG (linear congruential number generator) to create semi-random numbers that were seeded by the time.
The idea is straight forward, With 0.625 time dilation each frame would be rendered 16 times and I wanted the random lasers to stay stationary for the duration of a whole frame. Unreal provides the option to get the current real time in seconds as a float. Multiplying this by the frame rate and rounding down to the nearest integer means that input to the LCNG stays the same for the duration of the 16 sub-frames I was rendering.
Laser Light Show under Time Dilation
Once the random numbers were seeded by time, I was able to achieve the effect that I wanted
This was just another of the many problems, I encountered when producing the music video for Activ8te’s new Netrunner track. You can learn more about EDM, by reading my guide on electronic dance music.