Hello and welcome back to Inside Unreal, where you can see how to make content for Unreal
Engine 4.
Today we're going to be continuing with Part 2 of our special feature on the visual effects
that were created for the Infiltrator tech demo.
Once again I'm joined by Tim Elek, senior visual effects artist for Epic Games.
Hi Tim.
Hi Zak.
Now tell me, what are we going to be talking about today?
We're going to talk a little bit more about the depth collision module.
We're also going to get into some water effects and then we're going to look at some atmosphere
effects for the underground section of Infiltrator.
Sounds awesome.
Let's get started.
To help illustrate this, I've set up a custom scene here with two particle effects that
are exactly the same.
And you can see the particles are both using the depth buffer collision to collide with
these meshes.
In the depth buffer collision, you can preview the actual depth buffer here in the buffer
visualization.
If I open that up, you can see this is the information that the particle collision module
uses to determine where the particles need to collide with the surface.
The lighter areas are further back and the darker areas are further up front.
If I switch back to lit mode, you can see that even though these are both the exact
same mesh, the only thing that's different about them is the material.
This is using an opaque material while this is using a masked material.
And as you saw in the depth buffer, the masked material writes to the buffer so all of these
particles can collide and fall through the holes in the actual masked surface.
So you're actually kind of poking holes in this mesh by way of the material and the particles
can fall through that?
Yes.
If I take my effect and pull the emitter tab and the properties tab over here...
These are two panels from the Cascade particle editor, correct?
Yes.
In Unreal Engine 4 you can tear the panels off and move them anywhere on the screen that
you want them.
And I'm just going to solo this emitter here so that we can really get a good look at this.
And I'm going to increase my spawn rate to something a little crazy.
You can really see the particles falling through there.
Let me reduce it just a little bit.
When we get into the actual collision module, there are several different options and you
can mouse over any of these to get a quick description of what it does.
As you can see, the resilience controls how bouncy the sprite is.
So if I set this to 1, the particles are just going to go crazy, bouncing all over the place.
If I set it back to .125, it's a little bit more reasonable.
And friction is just how sticky the surface may be, so if I set it to 1, the particles
are going to really adhere to the surface.
If I set it back to .25 they'll slide around a little more.
If I set it to 0, they'll just slide all over the place.
We can also use these radius controls to offset the sprites from the surface so that they
don't just clip right into the ground and we can get them to show up just a little bit
more.
So it's kind of like off-setting the collision surface?
Yes.
And then we have the response method which determines how the particles are going to
behave once they collide.
You can set them to "stop" and they'll stick right to the surface.
Or you can set them to "kill" and they won't go through the surface anymore.
You can see that most evidently over here.
That is just too cool.
Typically water is one of the more challenging effects to create.
What I try to do when I first get started is break the water down into what I consider
to be the ideal forms.
In order to do that I take a look at a lot of different references.
Sometimes I look at photography but I also like to look at 2D animation, like old Disney
films as well as the book "Elemental Magic" by Joseph Gilland which I recommend to any
effects artist.
You can see here that I've broken all of this down into the six parts that I felt like I
needed to achieve this particular effect.
This is sort of a larger splash, and another bit of water that sort of lifts off the surface,
then radiating ripples, as well as some different droplet shapes which I can use on sprites,
and this drop which I can use with a mesh emitter.
Once I get all of those things together, I pull all of that into Cascade and you can
see here is the final effect.
I can use the dynamic parameter and different material controls within Cascade to manipulate
the behavior of the material in time with the animation, which I control on the mesh
level.
Can we see that in wire frame?
Sure.
You can see here each one of these is 3-dimensional so if I rotate it around from different angles
you can get a different view of it.
We can even use it in different ways.
This particular mesh looks more like if someone were to step in a big deep puddle and the
water would lift up and splash out.
In order to re-use and save on memory, I actually just scale the mesh a little bit differently
and animate it differently here so that I can save on asset space.
Where do you see this effect in Infiltrator?
It's in the hallway as the soldier is making a turn and walking down towards the infiltrator.
You can see it on the right hand side there.
It's one of those effects that we use just more for ambience to add some secondary animation
to the world and just help bring the world to life.
You can see in the background here there is a lot of mist and haze.
This is achieved with a mixture of particle systems as well as meshes.
And there is some more haze down in here just kind of drifting up through the grates.
That helps define the midground and the background.
Then in the foreground we have this lit smoke or fog, some god rays coming through the grates
as well as all of these little tiny dust motes floating around in the air.
You can see they just sort of parallax as you move through the space.
Yes, they add a really nice depth.
These dust motes are kind of interesting because I'm actually using a vector field to control
their behavior.
This vector field is basically a grid of velocities as I move around within this space.
Each one of these little lines denotes a direction that the particle is going to move in.
The lit translucency also is fantastic because I can just grab this effect here and as I
drag it around the world, it updates in real time with the lighting information.
So I no longer have to tweak a material parameter or an instance parameter.
Let me ask you this, as an effects artist, how has Unreal Engine 4 enabled you to create
scenes like this?
With the new GPU particles, I really don't have to worry about my emission rates and
simulation time as much.
So I can emit hundreds and hundreds of these little dust motes in the air and I don't have
to worry that every single one of them is ticking and updating every frame and chewing
up game thread time.
I feel like these kinds of details are what really helps define the space and create a
relationship between the player and the world.
And best of all, we do everything in Cascade, so the tool is very familiar and for anyone
who is used to doing effects in Unreal Engine 3, making the move to Unreal Engine 4 with
Cascade is going to be pretty straightforward.
Well that's about all of the time we have for today.
So thank you very much for your time, Tim.
And we will see you on the next Inside Unreal.