A deep look into the production process behind the amazing effects of the space epic. Plus a guide to frame blending with motion vectors by Klemen Lozar.
You have to admit, Star Citizen demonstrates the next level of VFX. The artists here are doing amazing things, creating realistic explosions and various different effects. One of the studio’s video journals runs through the production process behind explosion asset. Caleb Essex, a senior visual effects artist from Frankfurt’s Foundry 42 discussed the visual effects pipeline, as well as went over some of the new tech they use to take particles up to the next level. Let’s study this case.
First of all, he creates the asset inside 3ds Max. Once he’s happy with that, he renders out various different passes. He has lighting information from five directions, which is used to compile the diffuse texture, as well as the normal map. He also renders out a temperature map, which is used for fire and an optical flow map, which is used for frame blending.
What does he have inside the engine? It is just a simple texture lit by the engine. There’s not a whole lot of lighting information. He applies the normal map over top and you can it see how it picks up the light in a much more realistic way. Then, there is the temperature map layered on top of the smoke. It is colored by a 32-bit gradient and this allows the artist to adjust the brightness and the colors in real time. And by applying different colored gradients it is possible to change the look of the overall effect from fire to plasma and to color the smoke.
And lastly, he has the optical frame blending. Previously, in CryEngine they simply had standard frame blending, which simply blended the next frame over top of the first. But this can bring issues, especially with the silhouettes and framerate issues. The optical blend map records the information — the motion information from one frame to the next and distorts the frame into the position of the next, so he gets a nice smooth transition from frame to frame. This particular texture only has 32 frames of information, but he’s able to extend that by over 30 times, while still maintaining the smooth motion.
Want to know more? You can check out Klemen Lozar‘s variation of the frame blending technique first developed by Guerrilla Games for Killzone 2. The technique is quite old, but it gets the job done. The aim here is to extend the utility of animated textures by distorting them with motion vectors to procedurally generate the in-between frames. You pay with shader complexity and texture memory, but the results are awesome.
To render motion vectors out of FumeFX you’ll need to make sure you’re outputting the velocity channel before you simulate. Additionally you’ll need to go to Rendering – Environment, select “FusionWorks Renderer” and under parameters check “Create Channels” and “Image Motion Blur” or the velocity vectors won’t render. Afterwards you can render them as a separate render pass called “FusionWorks Velocity”. You can play with the “max velocity” parameter to make sure you’re not hitting 0 or 1 if you check the pixel values, you want to stay midrange otherwise you’re not getting a full range of motion data.
When you bring the velocity pass to After Effects (or other compositing software) you might have to modify the gamma. If you’re not sure, one way to check is to remove the blue channel and make sure the empty area has the following values:
It’s worth pointing out you might have to invert x or y components of your motion vector to make sure Unreal interprets it properly.
Alongside motion vectors you’ll also want to render the base texture with an alpha channel along with any other texture passes you might have. This will be the final output and we’ll use the motion vector texture to drive it.