Hey, everyone.
And welcome back.
This part I didn't add into the intro, but I think it will definitely be useful
for us to do and just to help bring some more life to the scene as well.
And that's we can add in some falling leaves.
And I think that will be useful to add in some directionality
and have them going in the same direction as these
these clouds that we've got going on in the background.
I think they'll be good for.
Yeah, just adding some some extra life to the scene.
So what we're going to do first is we're just going
to find one of these trees, whichever one you want.
Really.
We can't click on them because they are in the landscape tool.
So what we need to do is just go over to our content browser and just type in tree.
Hopefully they're cool tree.
Maybe they're not called tree.
They're not called tree.
I think they're called like spruce or something. Yes.
Okay.
So all we're trying to do here is just grab the material
from one of these so you can double click on any of them.
So we've got this one here and then find the material for the leaf.
So if you click either double click on the material or click that spyglass.
Okay,
this has got some information on it we can use.
So we could probably steal
one of these little ones over here, map
to one of those and then have that falling and maybe do another one as well.
We'll find another spot in there somewhere.
So if you just browse to that material.
Sorry. No. Don't press that material.
Find the texture.
Okay, so the textures aren't in here.
It's in the parent material, I presume.
So you can also double click on that one, scroll down
and find the parent for that one.
Maybe we'll get there someday soon.
If we go up to the base color.
Where are the leaves?
Where are you?
Leaf?
I think if it takes us too long to find it,
let's just navigate to one of these.
So just click on it.
And then over here on the left.
Hit that browse button.
Okay, then go to textures.
And then if we just add a little filter
for textures, if we can find it somewhere.
Texture.
there was already one in there.
And now I've made it go away.
Sweet.
Okay, let's have a scroll through here.
See if there's anything in a leaf we can use.
Yep. There's one small one there. And then.
Yeah, let's get one of these pine cones as well.
That might be cool.
Just for some difference in color between the two.
Maybe.
Or maybe one of these larger ones and that leaf.
That's fine.
Okay, so what we need to do to get this texture out of the engine,
we just need to right click it, go to asset actions
and then export and then decide where it is you want to export it to.
I'm going to go onto my desktop and then throw it into Part six resources
and then just call it leaf zero one, save it there,
and then it should export it out at the highest resolution, which is four.
Okay,
So what we should have now
is a 4K texture and what we're going to do is move over to my R
or whatever modeling program it is that you're using,
and we're going to map the texture to a piece of geometry,
just like a little plane that then we're going to have kind of float around
and we can give the plane a bit of a curve so that we can
when you see it falling, it has a bit of shape to it.
So we'll do that if everyone can move over to your modeling program,
we'll carry on from there.
Okay, great.
So now we're in my app or whichever modeling program you're using,
just create a plane and let's
change the subdivisions to just one in the middle and let's go for two
to probably be enough.
Maybe three, three be enough.
Okay, perfect.
So this is going to be our leaf.
You can scale it in that way.
And all we're going to do is
to take out our middle one and let's just have it like this.
So what are we going to do is select the ends, give it a bit of a curve,
and give the whole thing observer that angle as well.
And that should be enough.
So let's map our material to our texture, to it,
create a new material,
find our material should be in to do
too many folders on my desktop.
Part six resources and then leaf.
And then it would help if we could view the material.
Amazing.
So let's make two of these duplicate that one and control DX If you're in Maya
and then
let's turn on the image so that you can see it.
So that's just image and then display or six.
Is that hockey for that?
And let's just map
this material, this texture as you be
sorry to this texture,
and then we should have a nice leaf mesh
that we can use in a particle system.
So how does that look?
That looks pretty good for that one.
Let's grab another one.
So do exactly the same thing.
I think it would be nice
to let's map this one over here
just so we have one with a bit of a different shape
to it,
and then we can just increase the size of that.
There.
So there we go.
We've got two leaves and that one slightly bigger than the other one.
Put them both at zero.
Perfect.
And then all we're going to do is freeze
the transformers on those and export them.
So we call the first one
leaf all in
the next one and call it falling
leaf.
You just it small
and then let's export those and put those,
just put them into our resources folder
and then put the other one
in exactly the same place.
Great.
Now let's import it into our seed
and we can do that
just by growing it.
We find out where does this one leaf?
We just put that into our materials, fold
it and let's make a effects folder.
So content
new folder effects.
I think we should move the clouds there.
So if we find the cloud material,
if you go here, these guys
and you just click on them
and go move here
and then the engine will sort out all of the redirections and stuff,
you don't need to worry about that.
So so the next thing we're going to want to do is import
on the meshes
so only small and falling leaf large
and we can import them into here
into our mesh folder
and let's just
make sure everything's set right
and let's create a material,
but make sure that it's
not finding the textures, which it did.
Amazing.
We don't need it to
because they already exist somewhere, so we can delete that one out.
So it's not going to load those textures twice
than if we just opened one of them.
This one here
and then find what that texture was called.
That was leaf, I think
you go
track one of these in
and then browse back to our folder
just so that we're back with the, with the materials for this.
So now we've got our leaf in.
You're going to want that in the base color for sure.
And then let's see how this is handling Alpha
and just find if we search for it again.
I think this one is where the Alpha lives.
Yeah.
So it's in the our channel or the G channel if you want a blurry vision.
So we're going to also need to bring in that one
and the normal map and the same.
So let's drag all of those into the material.
Have I closed it?
I have a date, so let's just open all of these
by clicking on them so that we have them in this little pop out window
and go back over to mesh
and open in one will rename this afterwards.
So we want to browse back to those textures.
This one, this one, this one
and this one is what we need
to pull them all into our material.
Great.
So let's start wiring these up
base color into base color.
The normal map into the normal map.
And this is a AOC.
So see, in the A mess
and then a mask in M,
I mean, I would have packed these differently, but
that's fine.
I'm not sure what it stands for if occlusion is in.
well, maybe that's a party.
Okay,
so at least we know we have.
And I've just closed out my amazing
and lost all.
Don't be like me, guys.
Take those back in
crates.
So let's start wearing these back up again.
So a so the albedo
or base color that went into normal and then this is going to be our mask
and then ambient occlusion and
where we are for roughness and see how that looks
way too shiny.
Yeah.
I think if we break that then let's just put a value in.
So hold down one
and then in our roughness,
let's give it a 0.37.5.
And then what
we're going to do is if we click anywhere in here
and then go down to blend mode and opaque and then just press masked
and that will be able to mask the material out.
And what channel was
mask on?
so we'll try both our and G.
G sometimes might be better
if we're using low resolution so that it blows out a little bit
and you don't get like really harsh jagged edges.
But we'll see.
So that looks like it will be good enough.
So we'll look at G
now, which is rubbish on a mask because it doesn't accept correct value.
Sorry, I forgot that.
So we'll need to use our
and then save that
perfecto.
Okay.
We can close that now and just go back to mesh and that's rename this
playing relief.
That's
and we can delete the other one
And then inside
falling leaf and falling the falling leaf large and falling leaf small.
Let's just put our material
zoom into the leaf so you can see it is it's very small.
We might need to scale this up later, but there we go.
Let's just have a look.
Actually, is it going to be insanely small?
It is indeed.
So let's go back to my
and then scale these up by,
let's say ten times and
where's my panel gone?
Let's just do it here.
That's fine.
And it's too soon for the other one.
These are transforms and export them again.
Sorry, one at a time,
and then the other one
falling leaf.
Large
crates now back in engine re-import those two.
So you just select them, right click them, re-import,
that's a bit better.
Still going to be a little bit small.
Might look fine when they're falling.
No, let's go for another ten.
So I mean, we could have done it by 100.
That's to leave those
and go up and send
sweet.
So let's re-import those again.
Are we looking now.
Super huge
but closer to what we see
on the tree,
which is fine.
You tweak that down a little bit once we get them into the M,
once we get them into the emitter. So that's cool.
At least they kind of match the tree now.
But I think it's going to look a bit mental, having huge branches
falling through the sky.
So now we've done that.
What we need to do is start to set up a particle system
and to do that,
basically what we need to do is
just create a new Niagara system.
And basically all you do to do that is if we go into our effects folder
and right click and then go to Effects and then go to Niagara system here
we can just use
a new system from selected admins.
So you can choose a mix of emitters
and templates, or you can do a new system from a template copy
existing system that you really set up or create a completely empty one.
So for this, what we're going to do is just do new system from a template
and it's next.
And then I think probably
the easiest one for us to do to use
this from is just directional burst.
We're just going to have them floating down from the sky.
So let's just do that one and then let's call it
falling Leaves Effects.
So when it opens up,
what you have is this window, which looks exactly the same as the asset
you are really, except it's got some additional parts.
You've got this workspace over here
which has like a it's called the System Overview.
And then basically it looks the same as kind of the node view of for materials
or since the blueprint layouts look like this as well.
But what we'll do is most of our work in here
and then you have your viewer over here to the left,
you can move around it in the same way that you would do the one in for the asset
so you can move the light around and you can also move around it
by holding left click and then you move the light around with L
you have this timeline down the bottom, which is useful that plays
your particle system over and over and over.
And that's pretty much what we'll need to use just now.
And you can compile and save it here and then you can also look at the
performance of it.
If you press performance, it tells you here what's going on.
So what we're going to do
really is just start working with this
and turning it from this into falling leaves with some direction to them.
So I'll walk you through that.
And yeah, we should, we should have something looking quite cool in the end.
So the first things that
we don't want to do is just delete off this location based ribbon.
You can see that's what's creating these,
these like tails on the particles.
We don't need those.
So you can just delete those, just delete those out.
That's fine.
And where we want to start
is an emitter update.
We can start here, I suppose.
Yeah, let's start, let's start at the top and then work our way downwards.
So in here there are all a bunch of different
settings or things that you can do to particles.
You can then also if you press the plus button,
add things extra so you can type like wind
and you can add in a wind force.
There are a whole bunch of different things that we can add in here.
I'll not go through all of them, but it's in similar
in ways to the things that you can add in blueprints or in the material system.
There's just loads of different things that you can put in here.
If you press the plus button, it will give you what things you can add.
So you can just have a flick through these
and see what all of the different things do.
They'll be in context, so you won't be able to add things that don't work.
So the stuff that you can add to spawn, you can see that list has gotten smaller
to the list that I can add here.
So these will all do something.
Some of
them play audio, things like that so you can have a flick through those.
What I'll do is just to stop it from becoming too complex too quickly.
I'll work through what it is that we need to do to get the result
and then hopefully you'll pick up kind of what you can do from there.
And then if you'd like to create different systems, then go on from there.
But you should gain a base understanding of kind of what's going on here.
It is all named for you, which is the best thing.
So this all make sense to some degree.
There are some things in here that baffle me.
Unless you're an artist, I imagine they will do,
but it's fairly simple to try and work out
and get something going, which is what I did here to make the system work.
So yeah, let's start off at Mr.
Update and we want the loop
behavior to be infinite so that it just keeps going forever.
And it doesn't just happen once,
which is what we
want, and then set the loop duration.
So this is a duration of the lifecycle.
So how long?
So this is going like 1111.
So if we set this to two,
one and two on and to set fires off
every that amount of seconds.
So I think we're right at leaving it for two.
And then the spawn count,
sorry, not the spawn count,
let's go for,
let's go for a number like.
Yeah.
Well you can see if you put in 100 and it's going to spawn
100 of them, you put in one, it's going to shoot one.
So let's put in
24 now and see how that goes.
We could add in more later, That's fine.
So after that,
the rest of this is not super necessary.
Let's move down to particles four.
So in here, this is the lifetime in the lifetime,
max, of the of the particles.
And that set randomly.
So we can set two numbers.
You can put like ten and 15, and those particles will last
for 10 seconds and a minimum of 10 seconds and a maximum of ten of 15 seconds.
And that's useful because our leads are going
to kind of float around through the air and down towards the ground.
So we'll need them
to have an amount of time on their life that's bigger than what was there.
Otherwise they'll just disappear as they're kind of floating through the air,
which is not what you want.
And then after that,
let's just have a scroll down through here
and see what we need to set next.
What do we need to set next?
Okay, so we need to add a few things here.
What we want to do is delete the add velocity in code.
Let's keep initialize particle because we need that one.
And then let's add in add velocity.
We don't need to add velocity and current, so we add velocity and
and this is going to add our velocity.
And then over here in this little chain bit,
click that and then you want to just type
random range vector
and then this will give us a minimum and maximum so that we can find
a random range in between these values and then add that to it.
And what we want to throw in here
are the five
lines, 73.
Okay.
So there's a bit of variation going on there, which is what we want.
And then next, what we want to do is apply
initial forces
and then just leave that as is
initial mesh orientation.
So we get some rotation on that.
So let's try that.
Sorry, not rotation, but position
and then we're going to leave that one as it is
and then go to what do we want to do next.
Yeah, at some rotational,
rotational velocity
and two to getting.
So I had something in here as well.
So for a random range vector
on that as well,
let's
keep this 1.5
and then do the opposite.
And then in sorry, in the orientation one above,
let's add some rotation there as well to the mesh and then give that,
let's give that to
and I should go up, let's add a
random range there
to the opposite.
And then what we want to do as a final thing in particle spawn.
So this is doing things to the particles, adding some position
and some position on the orientation and some rotational velocity as well.
You can't really see it too much because these are just dot particles.
But when you have a mesh on it, you begin to see things happen.
What we want to do lastly is just add on a a box
location, which is going to set them.
So at the moment they're all kind of dropping out of a point.
And when we set the box or you can see that sphere as well,
it's going to drop them out from points all over that box depending on the size
that you give the box.
So if we go to box location, you can also do a grade as well.
You can see now
they're all kind of coming out of this grid.
So what we want to do now is just go to give this a size as well
and to just think in a public we want to make this let's try thousand
the now.
Okay.
So you can see they're kind of falling from the sky now, which is nice.
This is near what we want to happen.
It's kind of like a light rain.
So it's not exactly what we want to happen.
And now before we start to look at particle up there,
I think what we should do is add in our
add in our mesh so that we can see what's happening in particle up there
because this is where we'll start adding things like rotation and stuff to it
so that you'll see them kind of floating around in the air.
And to see that working properly, you need to have the geometry on it.
So you can see down at the bottom under where it says render, We've got
Sprite render at the moment and we don't want Sprite render
because that's just going to render sprites,
which is those little white dots that you can see.
But what we want to render are if we delete that sprite render,
you see everything will be gone here if we're going to plus.
And then you can see that the context is changed here
so that you can only get these things you can put in mesh render.
So this will allow us to render meshes where those particles were being spawned.
So next you just go over here to mesh rendering and then hit the plus button
and we'll be able to add in a mesh to it.
So to do this we want to do is
just go and find our way.
Did we have them in mesh?
Find our falling leaf, click back and then just hit the use button.
The use button. Sorry. And now you see we have
many falling leaves.
What you can do at this point as well.
Now you can see the leaves.
If you browse to your particle hammer,
we can throw that in and now you can see all of these leaves
dropping terribly like this,
maybe put up a bit higher so you can see it.
Okay,
let's pull this over here as well.
So the first thing that you see is maybe we shouldn't
have scaled them up so big in the mesh, but you can drop that down here.
Let's change into like 0.3.
So that's just scaling the size of the mesh in render
and then mesh render, just scaling that there.
Now they are much smaller
falling from the sky like leaves,
which is awesome.
Okay, so now we want to start adding stuff to particle updates.
So this will be where you put in kind of what happens to you.
Can you can already see that they're falling in different rotations
and orientations and that's because of what we added in up here.
But what we're going to do now is adding things that allow the particles
or the little meshes to rotate as they're falling and stuff like that.
So I think the first thing that we're going to want to do really
is change the gravity, because right now it's moving too quickly.
So let's just drop that to something like 100
and then they'll fall a bit more like you would expect.
Leaves to fall
through the air,
which is sweet.
So now we have some cool falling leaves.
Now they just have no rotation or direction to them.
What we really going to want is for them to move
with the wind.
And you can see from the clouds that the means to move
the wind is moving over to the left.
We're going to want them to move over to the left.
So let's add in those things.
I think firstly, let's let's get the wind working first.
So if we just click on Particle up there and just type in wind,
you can add in a wind force.
And let's let's set it to two. Now
what should we do?
What should we do, 100 from here?
Yeah, let's go out there
and then push that.
So right now
try and let's see if you can see anything happening.
You shouldn't be able to.
And that's because wind force is not above.
So forces and velocity, which you need it to be for it to do that.
So you see now they start moving over to the left,
which is exactly what we want, although maybe,
maybe they're moving a little bit to
maybe bring this down.
But it's not happening above the trees.
They do.
So now we have these lovely leaves
falling in one direction,
which is great.
That's what we want.
So we need to make sure that we have wind force above so forces and velocity
so that it solves the forces in velocity and they actually work.
The next thing that we're going to want to do is to just add in some rotation.
So what we want to do for that is just to add
in a solver, rotational forces and velocity, which is kind of like that.
But yeah,
so, so
rotation
and now you'll see all of the rotation stuff
that we added in to add rotational velocity up here is now being solved
and we've got some leaves
spinning around in the wind,
which is great.
That's it.
Pretty much We've, we've kind of nailed it already, right?
We've got these sweet looking leaves floating through the air.
Now the next thing we want to do is add in the other leaf, Right?
So to do that,
we're just going to delete that comment box that I've managed to make.
We're just going to copy this one.
And where
we've got mesh render, we just find the other leaf
that in there
and then because they're bigger, they'll be a little bit heavier.
So let's give them some more gravity.
So let's give that like 300 and they should fall quicker
than the other ones.
And those should have two. Lots
of leaves falling through the sky,
which is great.
Now what you'll notice
we don't have is some collisions.
So these particles at the moment are just kind of falling through the floor and
considering considering their leaves and the rotation that they have and so on
and all these different factors is really
I mean, we're only going to be able to do so much here
without getting too in-depth into this.
So what I'm going to do is let's add in some collision
and then have them so that they come to a gradual stop
and then they'll leave for a few seconds before they disappear and die.
And the way that we do that is by just hitting particles up.
They and then just type in collision
and let's just pull that under wind force
and let's
do some things here.
So what we've what we've done should initially just give us some collision
anyway.
So you'll see that one, they're just rolling along the floor.
I'm trying to find another one.
There you go. There's another one rolling on the floor there.
The large ones are still falling through because we've not had a collision to them.
And there's another one there. So you can see them.
They just continue on along the floor.
So there are a few settings here that we can add in there, some bounce.
So there's like restitution.
If you add in zero, they'll stop initially.
Well, they won't have any bounce at all.
And if they have one, then they'll bounce
with exactly the same amount as force as they hit the ground with.
So let's give them
0.3. They shouldn't be very bouncy.
That leads 2.2, actually. Let's do that.
And then friction.
The friction coefficient defines how quickly a particle will slow down
as it slows across the surface.
So let's just give that one.
Let's make it slow down pretty quickly,
maybe 0.8.
Let's make it slow down very quickly that way.
And then all we do after that is
control roll on collision,
which should stop all of the rotational stuff
that we've got going on when it hits the ground.
So let's turn that on and then let's do that
for I mean, copy and paste over here.
We can be pulled out to force the wind falls
under wind force, and then let's have a look and see how that looks.
See if we can see you hit the ground.
So they hit the ground a bit, spin around and then stop.
So we're getting some leaves falling on the ground here, which is quite nice.
So I think
probably what we're going to want to do just to stop this being a constant
gust of wind is just reduce the amount that is happening.
So if we just make this big again,
go over to emitter update and then change this form,
count down to ten for each,
you should have half the amount of leaves
should feel a little bit more natural.
Perfecto.
So let's save that.
And here we have our falling leaves.
Next what we'll move on to is just doing a similar thing.
The rest of the systems work in a similar way. We're
just going to kind of hijack a system and then make it work for what we want.
But the dust motes and the little sprites work in very similar ways.
Just one we're going to have much more small and contained,
and the other one is going to be a very much larger area,
and then one of them will be a little bit massive and the other one won't.
But those two will be fairly simple.
But yeah, hopefully you've gotten a bit more to grips
with the Niagara system
and I would try some of the other forces as well.
They're really cool
and throw loads of particles in and then play around with the other forces
and see what kind of cool effects you can get.
You can make some really sweet stuff using this system,
but you can see how quickly it was just to make falling leaves, which is nice.