Hello and welcome to Part 3 in our series on the visual effects of the Infiltrator tech
demo.
Today we're going to take a look at the fireball effect that was seen about halfway through
that demonstration.
Joining me is senior visual effects artist Francois Antoine.
Hi Francois.
Hey Zak.
How are you?
Doing well.
So why don't you start by telling us a little bit about yourself.
Sure.
So, before coming to Epic, I worked in film visual effects for ten years.
I'm excited about this demo today because we're going to be showing an explosion which
uses some of the same techniques that we use in film visual effects.
Can you give us an overview of what's so special about this effect?
Well, we had to create this explosion with a new technique called a volume texture and
it's basically a texture that's three-dimensional.
That in combination with GPU particles allowed us to create what we call our volume explosion.
Traditionally, sprite-based explosions don't have that cohesive feel but the volume explosion
can overcome those limitations and give the impression that it's really rolling through
the geometry and expanding.
The first step was to create the data for the volume explosion.
For that, I went into 3ds Max and used the FumeFX plugin to generate a 3D fluid simulation.
You can see that here we imported the geometry from Unreal Engine and are using FBX.
It actually saves the placement of all the geometry and also allows you to import camera
with the camera angle and the different lens settings.
Which I imagine would be useful here, where you need to wrap a fluid simulation around
that.
Yes, absolutely.
Actually, having the camera allows you to really customize and animate to the camera,
which can be a big time saver so you don't waste time animating things that won't be
seen on camera.
Once we have the explosion going, what I did is render ten cross sections of the fluid
simulation from a top down point of view.
And you can see that each of these cross sections is represented by the volume between each
of these planes.
So these are now rendered out, and one of the cross sections looks just like this.
And you can actually see inside the explosion right there because this is a middle cross
section.
Alright, so once I had all of these cross sections rendered out, I brought them together
inside After Effects.
Over here as you can see on the left, I have all ten cross sections stacked on top of each
other.
This was just a way to test to make sure that there were no rendering artifacts or shadows
from one layer into another.
And it was to make sure everything was properly sorted before bringing that information into
Unreal Engine.
Now we're going to import each of these slices as a sub-UV texture.
So this is one of the bottom-most layers.
You can see the cross section for each of the frames of the render.
And I imagine this would be one of the lower slices?
That's exactly right.
As the explosion moves up, it just leaves behind smoke.
So what we could do is look at one of the higher level fireball slices.
You can see here that you have nothing in the beginning because the fireball hasn't
reached that area of the fluid simulation.
Then the top cross section is right here.
The next step is to recreate the information between each of these slices.
Here we are inside the material that we wrote.
You can see there is a node called the Volume Texture Sample and this is where we create
the 3D volume texture.
It is also a function; as you can see it is highlighted in blue.
A function is basically a network of nodes that can be re-used very easily, kind of like
a snippet of code.
And this was created by artists; you didn't have to bring in a coder to write this.
That's right, yes.
And that's where the power of Unreal is, is that we can actually prototype these kinds
of features using artist tools.
You can see right here we have more functions.
Each of these functions references one of the slices that we rendered out earlier and
brought into Unreal Engine.
You also see there are also extra parameters here that artists can set, which is like the
XY_Size of the volume, and the space between each slice.
So a little bit of customization if you need it later?
Yes.
And because these are parameters, they will be exposed to the material instance which
we'll plug in later for the explosion.
Very nice.
OK, so you've got your material at this point - what's the next step?
The next step is to actually be able to display that volume texture.
Typically, a way to display volume texture is to ray trace it, but that is very expensive
so we didn't want to use that approach.
Instead, what we are using is a point cloud of particles.
What's going to happen is that each one of these particles is going to look up a certain
point in space of the volume texture and display those color values.
I notice the particles aren't moving; we're looking at this in wire frame right now.
I guess each one of these is kind of like a static monitor?
That's exactly right, yes.
The motion is not in the particles; it is in the texture that is actually animated.
We basically just need a lot of tiny little billboards that will sample that texture and
display it, so they aren't moving for that reason.
Right here we have about 500 GPU particles in the GPU particle system.
That's the right amount when we are kind of far from the camera, but here because we are
looking at the explosion very closely, I'm going to increase that count just for the
sake of visualizing the explosion up close.
2,000 particles is still very cheap by GPU standards.
Now we can see the explosion happening and if we go to the top view, which is where our
camera is for the shot...
Oh that is amazing, you can actually feel it creeping up at the camera.
Yes, and that's exactly the feeling we wanted.
That's something we don't traditionally get with regular 2D sprite explosions because
they don't have the coherance between each other and they don't have this kind of growing
volume.
Because this is made of slices, if you switch to the side view you'll be able to see what
our material is doing.
You can see each of the ten slices in the effect here and you can see our material is
creating interpolated data between each of these slices.
So, in effect, we're recreating the explosion accurately from the top down by using more
efficient interpolated data where we don't need the detail.
So it's not going to be perfect from all angles but you've still got a wide range of visible
areas and a lot of motion and depth in the overall effect.
Exactly, if we needed to see this explosion from the side, we probably would have increased
the quality of the number of slices or used a different technique altogether.
But for what we need, which is some subtle parallax and that rolling motion, this is
just the right fit for that shot.
Awesome.
You can see here on the output of our volume texture node, we're plugging into the BlackBody
node.
What's special about the BlackBody node is that it takes in a temperature in Kelvin and
returns a color.
In effect, this allows us to color the explosion in a more realistic way.
No more having to fight and figure out what the best color for fire is.
Yes, that's right.
Ok, so the next step is to get it into the cinematic so we can see it.
I created a number of tracks in the cinematic tool, which is Matinee.
You can see I'm triggering the explosion using the Toggle track for the explosion.
That's just going to turn on the explosion and that's all?
That's correct, that just triggers the explosion and has it running.
But because we want it to sit better in the environment, I also create a track with lights.
This is called Explosion Light and that just creates light right here and it kind of blows
out the environment so you really get the feeling that there is an explosion going off.
On top of that you can see there's a layer of distortion right there.
The distortion is just a sheet that has a distortion material applied to it that sits
on top of the explosion and moves up with it.
So as it gets closer to the camera, you start getting the feeling of heat and heat shimmer.
If we run through the cinematic we can see the completed effect.
Tell me, how did Unreal Engine 4 enable you to make this effect?
Is this something you could have done previously?
It would have been hard to do previously because we are using custom material functions in
the material expression editor.
And on top of that, we need to use GPU particles.
Well, Francois thank you very much for your time and thank you for joining us.
We will catch you on the next Inside Unreal.