Transcripts
1. Introduction: Hello everyone and welcome to the man's flow fluid
simulation guide in Blender three-point one. In this course, you will
learn everything there is to know about the
fluid simulation. It can be hard to figure out how this complex system works and what every setting does without spending
hours of testing. That is why I have done it
for you in this course. The first section, I'm gonna be showing you the very basics of the fluid simulation and
how it works and the objects that you will need
in order to create one. After that, we're going
to be diving deep into all the settings and values and learning about what
each one does. There'll be examples on screen, so it's easy to understand exactly how it affects
the simulation. Section three will be about all the different
types of objects that you can add to
your stimulation, such as flow objects, obstacles, guides,
and much more. We will also be covering realistic water material
in both Aviana cycles. As a fun bonus project, we will also create
an ocean using the ocean modifier and learning
how to create this nice, satisfying animation in Blender. One of the best ways
to learn is to follow along and create
something cool yourself. That is why there are three full tutorials in this course. The first one is
an obstacle course for fluid particles
to go through. In this section, we will
learn the basics of modeling simulating particles
and creating a nice colorful material. The second tutorial,
we will learn about the rigid body simulation
and how to have fluid inside an object
while it's moving around. The end result will look
something like this. Finally, the last tutorial
will be a step-by-step guide on how to create a realistic
waterfall using mantle flow. We will first model the
waterfall, create the simulation, add particles and materials, and then finally render
it into an animation. If you are wanting to learn
step-by-step on how mental it works in Blender and how
to create realistic fluid. This course is for you. So go ahead, hit that Enrollment button and
let's get started.
2. Downloading Blender: in this video, I'll be showing you how to download Blender 2.8. Now what you need to do is go over to blender dot org's and you should see a big down the button right in the middle of your page. Go ahead and click on that button, and it will take you to a download page. You can come over here and change which version that you need. If you need a Lennix Mac windows, all the different versions go ahead and do that. You can also link your steam account if you want it to go to your steam. Once you figure that out, go ahead and click. Download a blender 2.8 and then we'll take you to this page and there should be a download that happens right here, and we can see it download. Once that is done, just go ahead and install it and you'll be ready to go
3. Blender Basics Overview: Hello everyone. In
this video we're gonna go over the
basics of Blender. And so if you are
completely new, this is the video for you. I'll be going
through step-by-step on the different render engines, the shortcuts that
we're gonna be using, all of that in
this video, right? When you open up Blender,
this is the default scene. You have a camera, you have a cube in the middle, and then you have a
lamp on the right side. If you ever get stuck on what button I press
throughout this course, just look on the
bottom right corner and you will see what I press. For example, if I left-click, you can see here it says
left mouse and it will also highlight the mouse button
on this sign right here. Same for the right-click, same for the middle
mouse button. All of that will be
displayed at this point. If you ever get stuck, just look down on
the bottom right. Let's first talk about
the render engines that Blender has to offer. Over on the right side, there is a lot of
different panels. And if we select
this one right here, this is called the scene panel. We will see that our render
engine is currently on EV. There are three
different render engines that we can pick in Blender, EV, workbench, and cycles. Ev is a real-time render engine, and this allows you to actually view a scene in real-time. It will calculate
the lighting almost instantly and display it for
you in your rendered view. Workbench, on the other hand, is basically just for modelling and
sculpting your object. You don't really use this
render engine for rendering because it doesn't really
display materials that well. The last one is Cycles. Cycles is blenders,
physically-based rendering engine. And this will provide
very realistic results. It will calculate the lighting all that pretty accurately. Before we get into
anything else in Blender, Let's go up to our
user preferences and change a couple
of settings there. To do this, we can go
over to the Edit menu. Down at the bottom, we can
go into our preferences. Underneath the K-map
tab right here. Here is a couple of things that we're going
to want to check. First off, we have the selective
mouse button right here. You can either select with your left-click or
your right-click. In Blender version
2.79 and below, the default was set
to right-click. Now at 2.8 and above it is set to left-click
as the default. I recommend staying with left-click because
that will help you with a lot of other
applications outside of Blender. These Spacebar button down here allows you to pick what
the spacebar will do. Currently it is on play and that is what I'm
going to leave it on. So what happens is if I hit
the space bar over here, it's going to play the
timeline down at the bottom. Underneath that we
have a couple of view options which I'm just
gonna leave at the default. The other thing we're
going to want to change is extra shading pine menu items. Make sure that is enabled. This will allow you to actually
see the different views. So if I exit out of this
window and press Z, we can see here we have a
couple of different views. Material view is one of
the ones that's added when you select the extra
shading pie menu items. This will allow you to see what the material looks like
without having to render it. We'll go over that in
just a little bit. Next up on our list
is selecting objects. To select an object you can left-click on the object
that you want to select. In this case, I selected
the camera and you can see it's highlighted
in that yellow outline. If I select the cube, It's the same thing. And then the lamp up top, it also highlights it. You can select multiple
objects by holding the Shift key on your
keyboard and selecting it. You'll notice that
once we do this, the other selections have an orange outline and
not a yellow one. This means that it's
not the active object. The active object will be highlighted in the
yellow outline, as you can see here
with the camera. If you want to
deselect everything, you can hold Alt and then press
a to deselect everything. You can also select
everything back by hitting a and double tapping a will
do the exact same thing. So a to select Alt
a to deselect or you can press a and then
double-tap a to deselect. Now let's learn about
moving around the 3D view. If I hit the middle mouse
button on my mouse, I can move around
and rotate the view around the object
that I have selected. As you can see here, our view is orientated around this cube. But let's say for example, I wanted to orientate
my view to the camera. I can select it and hit the
period key on my numpad, not the period key
on the keyboard, the period key on the numpad. And it will zoom in on the
object that we have selected. And now we are rotating our view around the camera
instead of the cube. If we select the cube, hit the period key
on my number pad, I can zoom in on the cube, and now our view is
back to the original. You can also zoom in by
using the scroll wheel. Zoom in and zoom out
with the scroll wheel. You can also do
like a pan or zoom. So if you hold Control and middle mouse button
to pen backwards, as you can see here, holding the Shift key and middle mouse button will pay
in the view to the side. If you don't have a
middle mouse button, what you can do is go
over to the preferences and emulate it by going
over to the preferences. Underneath the input tab, you can turn on emulate
three button mouse. What this will allow
you to do is hold the Alt key and then
left-click to pan the view. You can see here it's displaying I'm using my middle
mouse, but I'm not. I'm using the Alt key and the left mouse button to
actually rotate the view around. Just in case you don't have a middle mouse button,
you can turn that on. Since I do have one though, I'm going to leave that
off because I find it's much easier with
the middle mouse button. Now let's learn about scaling, rotating and moving
objects around. To scale an object up, you can press the Esc key on your keyboard to scale it up. As you can see here,
it's scaling up my cube. And if you want to see how
much you've scaled it up, look on the top-left over
here on the top left corner, you can see I've scaled
it up five times. You can also set a
manual number n. So let's say I wanted to scale
the cube up three times. I can hit three on my keyboard and that will
scale it up by three times. And now I can't scale it
up anymore even though I'm moving my mouse because we
set in a manual number, it's locked to that scale. I can hit the Backspace twice and that will get
rid of that selection. And now I can scale
it up or down, as you can see here, to rotate an object, you can hit the R key on
your keyboard and that will rotate it around
as you can see here. And it's going to rotate it depending on the view that
you are looking at it. So let's say I move my view over to this angle and
I hit R and rotate. You can see it's
rotating at that angle. If we go into the front view by pressing one on my number pad, it will put us into this view. And now if we rotate, it's gonna be rotating
it along this view. If we rotate it like this, I can go look at the side. You can see it's perfectly
rotated along the y-axis. I'm going to press
Control Z to undo that. And now let's learn
about moving an object. If I press it G, you
can move your object around and you can place
it anywhere that you want. You can also lock the
movement to a certain axis. So let's say I hit G and then y. And you can see here it's locked to the y-axis and I can't move it outside of that if I wanted to move it up
and down along the x, which is the red line. I can't do that because
it's locked to the y-axis. I can also backspace that and then hit the
X key and you can see it's going to move it along the x now instead of the y. Just like that. And I can also right-click
to cancel the movement. What I just did there is
I canceled the movement. So if I press R to rotate, I can right-click to cancel that action and it will snap back to its original position. This works with everything. So if I press S to scale, I can right-click and it will snap it back to that
original position. This is very useful
in case you want to look at a certain
part of your scene. I can just move my
object out of the way, view what I want to see, and then right-click
and it will snap it back to its
original position. Now let's learn about the
different views we already discussed front view by
pressing one on the number pad, it will bring us
into the front view. And if we wanted to view the
R object on the right side, which is this side over here, I can press a three on my number pad and it will
move me into the side view. Now we're looking at our cube, but from the side, let's say I wanted to look
at the top view. I can press seven on my number pad and it
will view from the top. And we can see our
camera is right there. And now we're looking at our
object from the top of it. Control one on the number pad will bring us to the back view. Now we're looking at
the back. Control. Three will look
on the left side. You can see here, this
is the right side. Now this is the left side and we were looking at it
from this angle. If you don't have a number pad, what you can do is
also emulate it by going over to your
user preferences. Underneath the input tab, you can enable,
emulate a numpad. And this will allow you to use the top row of numbers
on your keyboard. Let's say I press one on
the top of my keyboard. I'm now looking in
the front view. Same thing for the side view, the top view and all of that. Since I have a
number pad though, I'm going to disable this just like that and then
exit out to save it. Now let's talk about edit mode. Edit mode is the mode
that you're gonna be using to model
anything in Blender. To access edit mode. You can press Tab on
your keyboard or you can come up to this menu
and select Edit Mode. Once we do this, you can see our object has turned
into a orange color. Now we can select the
different points on our cube. This point that I
have selected right here is called a vertex. Every single mesh
is consisted of many vertices. As
you can see here. With our cube, we have
eight different points, four on top and
four on the bottom. You can select multiple
vertices by holding the Shift key and then selecting them as you can see here. Once I've selected four of them, you can see the inside of that has turned into
an orange color. And this means we
have a face selected. Let's talk about the
different selection types. Over in the top
left corner you can see where we are on
vertex select mode, which means that I can
select the different points. If I switch it over to
the edge select mode, I can select the edges
instead of the vertices. Then finally, the
face select mode will allow you to
select an entire face, as you can see here. You can also extrude
faces outward. If I select this top face
and price e to extrude, I can extrude it upwards. Now we have basically two
cubes on top of each other. Down on the bottom, you will see all of your scene details. And if you don't see this, you can right-click
and then enable the scene statistics
right there. We can see here we have four
vertices out of 12 selected. And then if I press a
to select everything, we can see here we have
12 out of 12 selected. You can also see the edges, the faces, and the
objects in your scene. This is a pretty useful
setting in case you want to check how many objects
that you have in your scene. There are many
different ways to add objects or delete
objects in Blender. To add an object, you can press the
shortcut Shift and a, and you can add an a
mesh and you can see all of the default
meshes right here. Or you can come over
to the Add menu, then click on Mesh, and then
add in a mesh over here. Let's say I press Shift a
and I add in an icon sphere. From here I can move it
over to the left side by pressing G and X
and dragging it over. If I want to delete this object, I can press the X key
and select Delete. Or you can hit the Delete
key on your keyboard or go up to object and then
down to delete right here. If I want to undo that and
bring that object back, I can press Control
Z to bring it back. This will undo the last action. If I want to redo the action, I can press Control Shift and z and that will
redo the action. You can also do this by
coming over to the Edit menu and selecting undo
or redo right here. Once again, to add an object, you can press Shift a and to delete an object
makes sure you have it selected the X key or the delete key or any of the other ways to
delete objects. And then you can select
it and there it's gone. Now let's talk about
the different views. If we come up to the top right, you will see there is
four different views, solid view, and
that's the one that we have selected wireframe. And this will allow you to
see inside of your mesh, as you can see here,
it's a now a wireframe. Next to that we have
in the material view. So let's say we've added
in a new material, it will display exactly
what it looks like. And then we also
have rendered view. This will be what it looks
like in the final render. When we render out an
animation or an image, it calculates the lighting
and does everything else. As you can see. You can also press the Z key on your keyboard and switch
to the different views. Most of the time, this is how I use it because it's very fast. I can just press Z,
go into wire-frame, z go into rendered view, and then material
view like that. There's also toggle
overlays and toggle x-ray. Toggle overlays will get rid of the grid and the outline
around the object. So if I select Toggle overlays, it will just display
what the model looks like without any of
the extra details. If we go back into solid view, we can press Z and
then toggle x-ray. And this will allow us to
see inside of our mesh. You can see by
looking at this view, we can see the ear right there. And then on the other
side we can see the eyes. And you can also select the of vertices on the
opposite side. If, if toggle overlays is
turned off, we can't do that. We can only select the
faces that are visible. Finally, let's press
the Enter key on our keyboard and look
at the properties. Here we can see a couple
of other details, the location of our object. And you can also
change this and you will move the object
as you can see, the rotation value, the scale
value, and the dimensions. The dimensions currently
say two-by-two, two-by-two. And we can change it depending
on what we type here. We can make it completely flat, stretch it out a little bit, and you can do all of that. Finally, the last thing
that we will talk about in this video
is the timeline. Down here we have a
timeline and this is the amount of frames
in our animation. Currently we have 250 frames. Now the default frame
rate in Blender is 24. So that means if we play, our animation is going to travel 24 frames every single seconds. On the bottom right
here we have a skip, a forward, and a play option. If we click this
button to play it, you can see our
timeline is now moving. So if we had any animation data, it would play once we
play the timeline. You can also press
the spacebar to play it automatically
as you can see there. And that is very useful. You can also press Shift
and then left arrow or right arrow to skip to the end or the beginning
of the timeline. And you can see on the bottom. And then the spacebar
to play it once again. You can also add in keyframes. So let's say I
added in a keyframe by hitting the I
key on my keyboard. And we can add in a keyframe to any of these
different properties. Let's say I added it
to the location value. What we can do then is
drive this upward and then skip to a different part of the animation and move the cute. If I skip to frame AT, then I can press G and
then X to move it along. I can move it to this location. Then I can hit the
I key one more time and add an another
location keyframe. Over 80 frames. It's going to travel from this position over to this
position that we just added. What we have to do now is hold Shift Left Arrow to
skip to the beginning. Or you can click the
backspace button. And then we can hit
the space bar to play. And you can see it moves over to that location over 80 frames. That is basically
how animation works. You can also add keyframes, do almost anything in Blender. If you hover over a certain
value and hit the I key, it will add in a
keyframe to that value. There you go. That is a full basic
overview of Blender. I hope this is useful if
you're completely new and now that you have a basic understanding
of how blender works, let's jump straight
into the course.
4. Mantaflow Simulation Basics: Hello everyone and welcome
to the first video. We're actually going
to jump into Blender and learn about the
fluid simulation. This video is meant to
be a basic overview of the stimulation and
the objects that you need in order to create one. To get started, there's always two objects that you need
for a fluid simulation. That is a domain object
and a flow object. A domain object is the bounding
box of the simulation. No fluid will be able to
exit outside of the domain. The domain is always going to
be in the shape of a cube. Even if you set a UV
sphere to be the domain, it's not going to work. The fluid will always
exit outside of the mesh and act like a cube. So it's recommended
to always use a cube for the domain object. The flow object will
either add fluid to the simulation or it
will delete fluid. And we'll talk about
those in just a second. The other objects that aren't
necessary for a simulation, but it can be useful
are effector objects. These objects are collisions. They can also be guides, which we will talk about
later in this class, but those are the three main
objects for a simulation. You can also add force
fields if you want to. This can also be useful
in certain simulations. Let's go ahead and
get started and we're going to create a
simulation together. So go ahead and open up a new blender file and follow
along with this tutorial. The first thing that we'll do is we'll scale up this cube. This is gonna be the
domain object that we use. Another thing to note about
fluid simulations is that it's important to make sure
everything is pretty large. If you try to add in a
domain about this size, it's not going to really work that great because the blender has a hard time simulating
at a small-scale. Make sure that you always have your objects pretty large
in your simulation. Next, we need a flow object. The flow object that I
will add is a UV sphere. You can press Shift a, go over to mesh and then select that UV sphere. To
see what we're doing. We can switch over to the wireframe mode by
clicking right here. Or you can press Z and
go into wire-frame. Let's drag this UV sphere up so it's above just like that. Then another thing
that you should get in the habit of naming
your objects. With this UV sphere selected, we can go over to the outliner, double-click on the name, and we can call this
object the flow object. Then we can click on our
cube, double-tap it, and then we can call this
one at the domain object. Just like that. Now with the domain selected, we're going to jump over to the Physics panel
which is located here. It has a circle with
a dot in the middle. And then we can click on the
fluid icon for the type. Since this is going
to be the domain, we need to set the type
over to the domain mode. Right now the domain
type is set to gas, meaning this is gonna be a
smoke or fire simulation. Since we are working with fluid, we need to switch the type
over to the liquid mode. You can see nothing's
really happened and that's because we need to add
in our flow object. Next, let's select
the flow object. Click on fluid. And then for this time, we're
gonna choose the flow type. The flow type is currently set to smoke and we need to switch it over to the liquid mode since we're dealing with fluid. So switch it over to liquid. And then currently there are three types of flow behaviors. Inflow will constantly add
fluid at to the simulation. Outflow will delete fluid. So any fluid that actually touches this object
will get deleted. And a geometry, which
is the default one, means that the amount
of fluid that's added is just gonna be the
geometry of the mesh. Let's go ahead and select
the domain and we're gonna change a setting to
refresh the simulation. If we change the
resolution up here, you can see it refreshed and now we have fluid in our scene. What we can do now is come
down to the timeline and hit play and we can see
what this looks like. That looks pretty cool. You can see all of the
particles are right there. The resolution controls how good the simulation we'll look and we'll talk about that in more detail in a later video. But what I want to
do is I want to scroll down over to the cache, and I wanted to talk about
the cash for just a second. You can see here
there is this folder. This is the this is the
default folder that Blender creates when you start working with the
fluid simulation. If you haven't saved
your blend fall yet, this is gonna be put
in a temporary folder, as you can see here, it's AppData local 10th, meaning that if you
close this project and open it back up
later, that cash, that fluid simulation data will get deleted and you
will have to rebate the simulation if you
want to save your data. And so when you open
the project backup, you still have the
fluid simulation. You need to send a custom
folder right here. You can do that by clicking
on the button right there and navigating
to a different folder. So what I can do is I can select this folder and
then click Accept. And now it's going
to place all of the information in this folder. Down here we have a couple of
different types of caches. The current one
is set to replay, which allows us to view the
simulation in real-time. If I play my simulation, we can see it playing
just like that. I can scroll up here, I can change the resolution. I'll restart the animation
and then play it. And you can see we can test out the settings very
quickly in real-time. The other option if we want
to bake in the simulation, is that the modular
or the all modular allows you to bake an individual
parts of the simulation. You can see here we can bake in the initial data and we can also bacon the
mesh down here. But first we have to bake in the fluid and then we
can make in the mesh. But you can also notice
this warning right here. Non resumable cash
and bacon mesh or particles will
not be possible. This means that if
we don't scroll back down and enable is resumable, we won't be able to bake into
the mesh or the particles. So whenever you have the
modular mode active, it's always a good option
to turn on is resumable. Is resumable also allows you to stop the bake and then
resume it at another point. For example, if I click on bake, you can press the
Escape key to stop it. And you can see you
can either resume the bake or you
can free the bake. I use this option a
lot because it allows me to stop the bacon then
see what it looks like. If I like what it looks like, I can resume it later. One thing to note
though, is that if it's resumable is turned on, it's gonna take a lot longer
to bake because it has to write more data in order to
stop the bake and resume it. It's recommended if you have a very high resolution
simulation to make sure is resumable is turned off and you use the all option. The all option allows you to bake in everything all at once. You can see the bake
button has disappeared. But now if we enable mesh, we can bake in everything all at once with only one click. What I'll do is I'll
scroll up to the top. I'll set the resolution to 64. And then I'll scroll
down here and underneath the mesh settings, I'm going to set
the uprise factor, which is basically the
resolution of the mesh. I'm going to set that down to one just so it makes it a little bit faster than we
can click on bake. All we can see here
it's starting to bake and what it's
gonna do is it's gonna bake all the
way to the end frame, which is 250 frames. You can see the
progress of the bake by looking at the progress
bar down here. Currently it's at 22%. I'm gonna go ahead and
stop the bank right there. And then we can restart. And now the domain has disappeared and now
we can see the mess. So let's go into solid view. And then I'll hit the
spacebar to play it. And we can see we now
have a fluid simulation. There you go. That
is the very basics of a fluid simulation. And in the next coming videos, we're gonna go into more depth. Learn about this
settings and how to create realistic looking fluid.
5. Quick Liquid Effect v2: Hello everyone. In this video I'm gonna show you a very quick and easy way to automatically add a domain and a basic material
with one-click. You can do this by having
the object that you want to become the inflow
object selected, then you can go over to
the Object menu down to quick effects and then
click on Quick liquid. As you can see here, it automatically added
a domain for us. It named it over
in the top right, and it went ahead and created
a basic water material. This material works great in at the Cycles render
engine, but with EB, there is a little bit
more that you need to do in order to get the
liquid to look good, which we will talk
about in a later video. I just wanted to
demonstrate how you can automatically add a domain. You can see here if we go
over to the Physics tab, all the settings
are right there. They're just the basic settings. If we select the inflow object, it has all the basic
settings as well. And we can play your
animation. From here. What you can do is you
can select your domain, scale it up however you want. You can scale it up this way, drag the objects up. And this will save you some time from having to actually add in the domain and adding in the domain
settings over here. The setting is pretty
useful because it automatically does
all the work for you. Then you can get into the
settings and figure out exactly the simulation
that you want to create.
6. Domain Settings: Now that we have a
basic understanding of how the mantle flow of
fluid simulation works. Let's actually jump into the
settings and get a little bit technical and figure
out exactly how it works. In order to do this, we're going to have our cube selected. We're gonna go over
to object down to quick effects and
then quick liquid. If you watched the
previous video, you'll know that this automatically
adds a domain for us. Let's drag everything up so it's sitting on top of
the grid floor. Let's go ahead and
select the domain. I'm going to jump over
to the Physics panel, which is this icon right here. It has a dot in
the middle and we can see all of the
domain settings. What we're gonna do in
this video is we're going to discuss all of
these settings, the border collisions
and everything above it. The first option that we
have is the liquid type, which we discussed
in the basics video. There is gas and liquid. The gas domain is
for fire and smoke, and of course, liquid is
for a fluid simulation. The resolution
divisions controls how good the
simulation will look. Higher resolutions will
make the simulation better, but it'll take a
lot longer to bake. You can play around
with the resolution and test it out for yourself. And it also depends on the scene and what you're
trying to achieve, how the resolution
divisions works is it breaks your simulation
into different cells. The size of these cells controls how good the
simulation will look. You can see the
size by looking in the bottom corner
of your domain, you can see a small cube. This is the size of yourself. If you increase the
resolution divisions, let's go up to a value of 64. You will see that the
cell has become smaller. Now we have a higher
resolution simulation and it will look better
if you decrease this, the cell will become
a lot bigger. For example, if I set this
down to a value of six, this is the lowest
cell that you can do. You will see that
the simulation has way less particles because the simulation
resolution is so low. If we then restart
and try to play it, you'll notice that it's
actually not really working because the simulation
resolution is so low, it's not going to really
simulate properly. Let's try a value of 16. If we restart the
simulation and we play it, you can see it's now simulating, but there are very
little particles and it's not going to
really look that great. Let's try a value
of 256 and enter. And you will notice
the simulation cell has become a lot smaller. Now we should get a
very high resolution and it'll look pretty good. The timescale controls the
speed of the simulation. Higher values, of course, will speed up the simulation and lower values will make the
simulation look slower and create more of
a slow motion look depending on the size and what
you're trying to achieve. You may want to play
around with the timescale in order to achieve
a realistic results. The CFL number, which is a
little bit more technical, it deals with timesteps. Timesteps is the amount of times the solver will
calculate per frame. This also depends on the
velocity of the object. If you have a very
fast-moving collision, you're going to need
more time-steps in order to be accurate. The CFL number controls how many timesteps is
going to be per frame. Higher values will result
in less timesteps, which means it'll be
a faster bake and a lower values will
mean more timesteps, which will create a more
accurate simulation. But it's gonna take a
little bit longer to bake. Normally, a value
of four works for most simulations and I haven't really ever messed
around with this number. Use adapted timesteps
will tell blender to automatically calculate how
many timesteps it will need. And you can see the
number is right here. The minimum is set to one and
the maximum is set to four. Meaning if you have a
very fast-moving object, it'll automatically
calculate that and probably use a maximum
of four timesteps. This number is useful if
you have very fast moving fluid or if your fluid
is kind of jittery, you can turn both
the time-steps, maximum and minimum values up, and that will help
smooth it out and also create more
accurate simulations. You'll notice that
the gravity option is currently grayed out and we
can't change the settings. This is because it's
using this scene gravity. You can disable this
by going over to the scene panel right here and opening up
the gravity option, you can see the number
is right there. You can turn this off and
then we'll be able to change how the gravity
affects the simulation. You can see here it's no longer grayed out and we can
change the settings. What we can do here is we
can set the z-direction to, let's say, a value of five. And instead of falling down, it'll actually go in the
positive z direction. So it's gonna hit the ceiling. We can test this
out by resetting the simulation will change
the resolution to refresh it. Then if we hit the spacebar
to play the simulation, you can see the fluid
is now floating. You can also set it
in the other axes. So for example, if I wanted to float on this side
of the domain, I can set the x direction to
a positive value like ten. We'll restart and play. And you can see it's
now on that side. Delete an obstacle, will delete the fluid that is stuck
inside an obstacle. For example, if I add in a
cube, I'll drag this up. We'll place it right there
and we'll click on fluid, set the type or Vo2 effector, and the current type of a factor is set to collision,
which is what we want. We'll select this will restart. And you can see some
of the fluid is still inside the collision. But if we turn ON delete
obstacle will restart. You can see all of
the fluid it has now disappeared that was
inside of this collision. Finally, the board
of collisions allows the domain to actually
collide with the fluid. If one of these values is off, the fluid will just
pass through it and act like nothing is there. For example, if I
turn off the bottom, which is the bottom
of the domain, I reset the gravity so it's
at a negative z direction. We'll restart and refresh it. Now if we play our simulation, you can see it doesn't collide, but it just passes
right through it. This can be useful if you don't
want fluid to build up in your scene or if you have like a river and fluid
is going across, it'll just go out the other side and not build up.
But there we go. That is all of the settings
for the top of the domain. In the next video, we're
going to be taking a look at the liquid particles.
7. Liquid Settings: All of the liquid
settings down here control how the fluid
simulation will behave. It controls the splashes, how it will look, and the number of
particles that will be added to the simulation. Firstly, we have a checkbox. If this is turned off, it will not create the particles
system as you can see. But with that turned on, you'll be able to visually see how the simulation will look. If we jump over to the
particle system tab, you will see the particle
system that it created. You can turn it off just in the viewport by clicking
that button right there. And you also have all of
the options for the render. You can render it as an object and you also have the
options for the viewport. We go through these settings
later when we actually create a project
using this method. But for now, let's
jump back over to the domain and talk
about the settings. The simulation method controls how the simulation will work. And there are two options, the flip method and the APIC. The flipped method will
produce a bigger splashes and the fluid will
go crazy in the air. And at the APIC is a
little bit more energetic. And as you can see, there
has a more stable behavior. They both produce
pretty similar results, but you can play around
with it and choose the one that is required for your scene. The flip ratio controls
the flip method. If I switch it over to APIC, that flip a ratio is now gone. So that setting only works
for the flip method. This controls how many
splashes are in the scene. Higher values will produce more and bigger splashes
and lower values will smooth out the fluid and create not as big of splashes. The system maximum controls how many particles are in
the scene with it set to 0. Blender will
automatically calculate how many particles it
needs for the simulation. But we can also
set this manually. If I go up to a value of 100, there's only going to be a
100 particles in the scene. As you can see, this
is useful if you want to save on baking
and render time, because a lot of the
time if you have a very high resolution division, there will be millions
of particles. And this can be a little
bit overwhelming for some PCs and it might
slow down quite a bit. So setting the maximum
value to like 100 thousand will prevent those millions of particles from being created. The particle radius controls the radius around each particle. Higher values will make the particles spread out
further from each other, and lower values will bring
them closer together. You may want to play around
with this value when you are dealing with a very high
resolution simulation. You'll notice in
the animation on screen at that this single cube, it turns into this
big bunch of fluid. The reason for this is
because there are a lot of particles in the scene and
there are spreading outwards. At the beginning
of the animation, all of the particles
are bunched together, but when it plays, they
spread out from each other. This is why the simulation
looks like it gains volume. In this case, I may want to turn the particle radius
down to probably around a value of 0.95
or even lower than that. It just depends. If you're stimulation, it looks
like it's gaining volume. Turn this value down. This will make the particles come closer together and it's not going to have as much
volume on the other side, if your simulation
tends to lose volume, turn this value up so
the particles will actually spread out further
and counteract that. Most of the time though, when
you have a high resolution, you're going to want to
turn this value down. The sampling controls how many times it's going to sample. Higher values will
increase the number of particles and lower
values will of course, decrease the number
of particles. The randomness controls where
the particles will spawn. With it's set to 0, you'll
get a very grid-like pattern, but with it set to a little
bit of a higher value, the particles will be
a lot more random, which in turn will
look more realistic. And the particle maximum
and minimum values controls how many particles
are gonna be in each cell. We talked about cells
In the last video. And the maximum you can
see here is set to 16. This is the maximum amount of particles that are going
to be in each cell. If you want more particles, you can turn this value up. The narrow bandwidth is a really cool option
to play around with. You can see if I play my
simulation at the particles will have a thin line at
the top of the simulation. This is the narrow bandwidth. With this set to three, you can see it goes down a little bit, but it doesn't fill the
bottom of the simulation. If I set this value higher, let's say a value of ten, it will increase the
number of particles in the simulation and fill out
everything in the scene. As you can see, we have
a lot more particles and it's actually filling out
the rest of the simulation. Basically, this value
controls the thickness of the band that goes
around the flow object. Increasing this will
add more particles to the scene and it will also
slow down the simulation. Unless you want more
particles in the scene, I don't recommend
turning this value up. Fractional obstacles
will allow a fluid at, to pass over obstacles
very smoothly. You will see on screen one
without fractional obstacles, N1 with it, you will see the one with fractional
obstacles turned on. The fluid will just pass
over the collision it very easily and it
doesn't get stuck. The obstacle distance
controls how far away the fluid will
be from the obstacle. You can see with it set to 0.5, there is a small
gap right there. But if I go even higher, let's say a value of two, there's going to be
even a bigger gap. Setting this value
higher though, does cause some problems
in the simulation. As you can see, it's
recommended to set this lower probably around a value of 0.5 or anything lower than that. The threshold value controls how smooth the fluid will
pass over the obstacle. Lower values will
make it look like eyes and it'll just go
over very smoothly. Higher values will make
it stick to the obstacle. You can see with a value of 0.5, the fluid is passing over
the obstacle very quickly. But if we set the threshold
up to a value of one, which is the highest
number that you can go. The fluid will stick to the obstacle and pass
a lot more slowly. There you go. That is all of these
settings for the liquid. In the next video, we're
gonna be taking a look at the viscosity
slider right here.
8. Viscocity Slider: Hello everyone and
welcome to another video. This one, we're
gonna take a look at the new viscosity setting and blender to 0.9 to if you haven't downloaded
the latest version, go ahead and go to Blender.org and download
the latest version so you can follow along with the introduction
of this new update. There is a new setting over
here called viscosity. This slider allows you to
easily add thickness to fluid. Beforehand. You would need to use the diffusion over here. And it was a little bit hard to figure out exactly
what it does. And it required a little
bit of guesswork. With this new slider, it's
very easy to add in thickness. Underneath the viscosity tab, we have a strength slider. The higher you set this to, the more thick the
fluid will be. You can see on screen the differences in the different
settings with a value of 0.10.40 and then there
are no viscosity at all. If this is turned on and then
the strength is set to 0, it will still add a little bit of viscosity to your scene. So keep that in mind. What you need if you don't want any viscosity is you
need to uncheck this. The cool thing about using
this method is it can also be animated this and create some
really interesting results. For example, if we go
over to frame 100, add in a keyframe right here,
I'm going to turn that on. Add in a keyframe by
hovering my mouse over this, hitting I. I can go to the
next frame, frame a 101. Uncheck this and then
add an another keyframe. It's going to be thick fluid for a 100 frames and right
when it hits 101, it's going to turn it
into regular fluid. The strength setting can also be animated and this can create some really interesting results
as the fluid comes down, it slowly turns
into regular fluid. This simulation method
also has a little bit to do with how the fluid
looks with a viscosity. You can see the differences with the flip and then with the APIC. They are very
minimal, but you will see a slight difference
between the two. Now that we know how this works, let's create a cool animation. If you want to follow along, you can download
this original scene right here with the monkey head, the domain and then
the flow object. Or you can just
create it yourself because there's
only three objects. This monkey had just has a
collision effector to it. The inflow is just
the basic settings with a flow behavior
set to inflow. And then for the domain, everything is exactly the same except for this
viscosity down here. I'm going to keep
the animation that we've added on frame 100. And I'm also going to be
animating the strength value. Let's go ahead and
get started by creating a really
cool animation. We're going to be animating
the strength value. So we're going to set it to 0.4 for the start
of the animation. And then I want it to
turn into 0.1 by the end. And then right at frame 100, I want it to turn
into regular fluid. Since we've already
animated this checkbox, we can leave that
keyframe in there. I'm going to jump
to the beginning of the animation and hit eye while hovering over
this strength value. I'm going to go all the
way to frame a 100. And I'll set the
strength down to, let's go with actually 0.05. Then add in another
keyframe over a 100 frames, it's going to go from a strength 0.4 all the way down
to a strength of 0.05. I think that will
look very cool. I'm also going to turn on Mesh. Do we actually get a mesh in our scene over in
the domain settings? I'm also going to set
the type over two modular so we don't
get that fluid right there and everything
will run a little bit smoother to give our scene a
little bit more interests. Let's also rotate our info
object to spin around. Now we could press I and add in a rotation keyframe and then
just animate it that way. Or we can add an a driver and it will automatically do it for us. To do this, select your
inflow object and press N underneath the item
tab and rotation. We're going to add a driver to the rotation of the z-axis. To add in a driver, you
can click in the rotation. And to do this, you can
press hashtag frame. And then you can go
divide by hitting slash and then type in
the number that you want. If we divide it around
30 and then press Enter, we'll restart R and
Player Animation. We can see it's rotating
just like this. You can set the speed. You can set the speed of the
rotation by going over to the frame and then dividing it by a higher or lower number. A higher number will
make it go even slower. So if we go with 50 will
restart and play it, you can see it's
moving even slower. But if we go a little bit lower, Let's go divided by 20. You can see it is
rotating a lot faster. I think a value of around 25 will actually
look pretty good. I'm going to go frame. I'm gonna go hashtag
frame divided by 25. And that will look pretty
good. As you can see there. It's rotating and it's
going at a good speed. Now that we have our
animation is set up, we are ready to bake. So I'm going to
select my domain, go over to the
resolution divisions and I'm going to
set this up to 64. Keep in mind that the
viscosity will add a little bit of
time to your bake. So I'm not gonna go too
high in the resolution. I'm going to scroll
down over to the cache setting and set the
end frame to 150. I'm going to turn on is
resumable and set the type over to all so we can bake
everything all at once. I'm going to set the end frame
down here to 150 as well. Then I'm going to save my
project and bake it out. And after the baker has done, just apply a little bit of
materials to your objects, add some lighting, and then
you can render the sound and create a really nice
satisfying animation. There you go. That is
the viscosity slider in Blender 2.92.
9. Diffusion: In the last video,
we talked about the viscosity in the
domain settings. In this video we're gonna be
talking about the diffusion. The diffusion is another way to add thickness to your fluid, but it's a little
bit more complex. How the viscosity
works is it's based on the base and the exponent
in the diffusion tab. First, let's talk about how viscosity is actually
measured in the real-world, is commonly measured by a
value called p a dot S, which stands for Pascal seconds. This is basically the mass, the length, and the time, and then it does
some equation and then figures out
a certain value. There is also another way of measuring which is called Cp. And one Cp is equal
to 0.001 p a dot S. So keep that in mind while we go through this video to figure out the values that we need to put in the base and the exponent. We need to do a
little bit of math. How blender works
is it calculates the viscosity a bit different. It uses what's called
kinematic viscosity, which is the PA dot S divided by the
density of the fluid. With this in mind,
let's figure out the equation for water. Water at room temperature
has a Cp of 1.002 or 0.00100 to p a dot S. And the density of water is about 1000 kilograms
per cubic meter. So with that in mind,
we can figure out what the value is to put in the
base and the exponent. How the equation works
is we need to take the PAADS value and divide that by the density of
water, which is 10000. That gives us this number. We can bring this down to
a scientific number of 1.002 times ten to
the negative six. Now we know the values to put in the base
and the exponent. We need to set the base to
one and the exponent to six. Let's do another
equation for lava. There are many types of
different lavas out there, but the one I'm looking
at has a PAADS value of 3,500 and the density is about 3,100 kilograms
per cubic meter. Now all we have to do
is divide it again. Let's take the PAADS value
and divide it by 3,100. That gives us a value
of 1.1 to nine. So let's just round it down
to a value of about one. In Blender, all we have
to do is set the base to a value of one and the
exponent to a value of 0. You can go on Google
and figure out the Cp values and the values for a lot
of different fluids. And then you can
figure out the density and do the equation
for yourself. Blender also has a
couple of presets right here that we
can take a look at. Ketchup has a base of
one, exponent of one. And that's gonna give us
the viscosity of ketchup. The last setting is
the surface tension. This will just add a little
bit of tension to the surface of the fluid and you can see what that looks like onscreen. But there you go. That is the diffusion tab
in the domain settings. In the next video,
we're gonna take a look at the particles.
10. Guiding Domains: hello over one. And in this video we're gonna look at the guides in the domain settings. The guides allow you to use an object or another simulation to give some velocity to the fluid. For example, if I turn this on, we can see here are a couple different values. We have the velocity source which can use a domain or can use an effect. Er so for this example will be using a smoke simulation and selecting that domain in this guide parent right here to demonstrate this. Let's first take a look at our fluid simulation right here. We have a flow objects. I'm going to enable fluid and set the type over to flow. And then the flow type is going to be on liquid. Here, we can see we have that. And then this is just a basic simulation. The resolution is at 32 so it just makes in a little bit faster. And these are all just the default settings. What we need to do now is set up a smokes in relation. To do this, I'm going to select the domain press shift D and then right click over in the outline er you can see I named the fluid domain and the flow object. So I'm gonna go ahead and double click on this and call this one smoke and then domain. Just so we're a little bit more organized and what I'll do next is all press shift and added a another cube. This is going to be our flow object for the smoke domain operas s and Z and scale it down just a little bit. And then over in the outline, er, I will also name this so we know exactly what we're doing Smoke and then flow. I'm going to turn on fluid and set the type over to flow, and we're gonna leave it as smoke, and we're gonna set the behavior as inflow. So how this works is the fluid will take the velocity of the smoke, and it will kind of guide it going upwards. So the smoke is actually going to catch some fluid as it flows up and carry it with it all the way to the top of the dome. Eight. I'm going to drag the flow object below the fluid so it actually goes through. And since we did that We also need to select the smoke domain and scale it up just slightly . So the flow object is still inside the domain. Also, skillet up just slightly so we don't get that jittery effect. And there we go. So with the smoke domain selected, I'm going to select the type over here to gas, and the resolution will leave at 32. That's fine. And the time scale. I'm gonna bring up to one now. Let's bake this in. So I'm going to uncheck guys because we do not want guides for this simulation and then over in the cast settings we need to set to custom folders. One is going to be for the smoke domain, and another one is going to be for the fluid. So since we're using the smoke, I'm going to select that button on the bottom and navigate to a folder. And as you can see here, I have two different folders. I'm going to select smoke and then click accept. Then we can bake this it. This should go pretty fast cause it's at a low resolution, and now if we play our simulation, we can see it's working, but it's not showing up because of the domain saw selected and breast h to hide. And this is our simulation. So now let's set up the guides in the fluid. I'm gonna press Ault h to bring back the domain and select it. This is our fluid domain, and I'll go over to the guides panel and open up this first off, we're going to set another custom folder in the cast sitting, So I'm going to select that button on the side and navigate to it. Since we're now dealing with the fluid, I'm going to select the fluid domain on the side and click. Accept the end frame. I will leave that 50 and then here in the guides panel, we need to select the parents. I'm going to select the smoker domain. We have three different values here. The weight, the size and the velocity factor. The weight is basically how strict the fluid will be to the smoke. So if you were to set this to a higher number, the fluid will lag behind the smoke. If you said it to a lower number, this the fluid will be mawr attached to the smoking. It will follow it a lot closely, so I'm going to set that to a lower number so the fluid actually stays close. The size right here is basically the size of the guiding, and if you said this to a bigger number, they'll beam or of the guide. And if you said it to a smaller number, it will be a lot smaller. All set it to a value of four, just so it's a little bit smaller. The velocity factor controls how much velocity the smoke will give to the fluid. So if you were to set this to a higher number, basically what's gonna happen is the fluid will shoot straight up really fast and collide with the top of the domain. If you leave it at a lower number, it will go a little bit more slowly up to the top. I'm going to leave it at a value up to, and I think that would work perfectly fine. And then we can scroll up and click on bake. I've noticed when bacon in the guides. It takes a lot longer than usual, so be careful if you're going for a very high resolution because you're baked can take a lot longer. So now let's restart the simulation and press the play button, and we can see this is how it looks. It's taken the fluid and bringing it upwards just like that. And when you're looking at the domain, if you notice a lot of red, that means you're particles are moving very, very fast. As we can see here, we do have a lot of red, so what we can do to fix that is free the data and maybe set the wait up to a value of two so the fluid does lying behind the smoke just a little bit will bake that in and see how that looks. The bake is done, and now it's player simulation and we can see that does look a lot better. It's a lot slower than it was, and now what we can do is just come over here to the bottom and bacon a lot more frames, but you get the basic idea. You can take a simulation and use it as some velocity for another simulation, and you can get some very interesting results
11. Guiding Effectors: The other cool thing that you can do with guides is you can switch the velocity source over to a defector and use an object instead of a domain. So to demonstrate this, I'm gonna press shift A and added a monkey head of right here. I'll drag it below the domain. And now we're going to animate this on frame one. I'm going to hit I and go location, rotation. Then that frame 30. I'm gonna press G and Z and dragged through the domain hit I and go location rotation once again. Now, if we go over to the physics have we can enable fluid set the type over to effect er and then for the effect or type weaken Select guide. Here we have a couple different settings is plantar. We've talked about this before. If you're using a plane, you are gonna want to turn this Ellen the surface thickness. This is the amount of thickness around the object that will be considered as a guide. And for this example, I'm gonna bring this up to a value of 0.5. So instead of just being at the monkey head, the amount the service around it will also affect the guiding as well, so it will probably be around here and then the velocity factor. This also is a velocity factor that will move the fluid a lot quicker. So if you want slower moving velocities, you will turn this down the guide mode. It takes the velocity of your monkey head and the velocity that you set here and then does a little bit of math to figure out exactly what it should do. So, for example, if this is set to override its going to override the velocity of this monkey head and just to use this value here, if this is set to average, is going to average out the velocity of the monkey head and the velocity that you put here and just use an average for this example, I'm going to set it to average. And now back over in the domain settings. Aiken, scroll down to the guides. Here we have a new button called bait guides. We did not have that when when we were using the domain. But now, since we're using a defector, we do need to bake the guides before we bacon the liquid up here keep in mind before you bake in the guides. You also need to set the resolution because once you bacon the guides, this will be great out and he won't be able to change it. I'm going to leave the default settings and I'm going to select bacon guides. You can see it went very fast down there, and now we can go over to the settings up top and we can see the resolution is great out. We need to select baked data right here for this to work. Since I am using a resolution of 32 this is going pretty fast. So now it's resource dissimulation and play. We can see this is what happened. So since the monkey head is moving pretty slow and the resolution for the guide is also set to one and it's averaging it out, it's not doing a lot of motion as you can see there. So if we wanted this to be a lot faster, what we can do is scroll down here, free the guide so we can change some of the settings. I'm gonna set the velocity factor up a little bit. Let's go with a value of six and we'll see how that looks will bake the data. We'll scroll up to the settings and baked the data up here as well. With that done bacon, we will restart and play this and we can see there is a lot more velocity now since we set the velocity factor up down here. So if you want faster moving fluid, you will set the velocity factor here. And you will also set the velocity factor over here as well. We'll restart this. You can view that one more time, and that's basically what it does. It just add some velocity using an object, you can create some very interesting results using this.
12. Spray Foam & Bubble Particles: Hello everyone and
welcome to another video. This one we're going to talk
about the particle tab. A particle tab
allows you to add in a couple of different
particle systems. They can either be a spray foam or a bubble particle system. And we're gonna be
talking about each one. How it works is
you first need to enable one of these options. If we select spray, it'll add in the
spray particles. You might be asking yourself
what the difference between these particles
and the particles up here when we actually
add in a liquid, you can see them right here. These are the original particles when we add in the
fluid simulation. And these particles are for the shape of the fluid and how the fluid will interact with collisions and the
overall behavior. These particles down here are specified for each
of these things, either the spray or the
foam or the bubbles. The spray particles are
exactly what you would think. It sprays out particles
when the fluid is splashes or it creates any
sort of fast movement, spray particles will be created. Foam particles are for foam. You can see they hover on top of the fluid as the
fluid moves around. And bubble particles are for the particle
system that's gonna be inside the fluid and they're going to
act alike bubbles. Jumping back over to these
settings if we enable one of these options and go over
to the particle system tab, you will see that it created a new particle
system called spray. We can then select it, open up the render tab
and we can render it as an object or anything else. We can also change
the viewport display. We'll be talking about
all these settings in a later video. If we can also jump back
over to the domain and if we enable foam and bubbles, this will also create three
other particles systems, as you can see here,
spray foam and bubbles. Each of these have the
exact same settings and you can customize
each one how you want. Let's say you did
not want to have three individual
particle systems, but you wanted to combine them. You can do that with
the combined export. Currently it's set to off, but we can either combine it, the spray and foam. Now what will happen is you
can see the spray and foam, our one particle system
and then the bubble one. We can also go
back over here and combine all of them
spray foam and bubbles. And now each of
those are gonna be combined into one
particle system, which can be useful if you want to just change the
settings on one end, it will affect all of them with that out of the
waitlist and back over to the settings and actually
talk about all of these different values because there's quite a lot of them. The upper is factor controls the resolution of the particles. Higher values, of course, will result in more
particles in the simulation. Basically how this
works is it takes the base resolution
up here at the top, which is currently at 32. And if it's at a value of one, it's going to have
a resolution of 32. But if we bring it up
to a value of two, it'll have a resolution
of 64 and so on. It just multiplies
the base resolution and then applies that
to the particles. Now let's go over the
rest of the settings. Here we have a couple of
maximum and minimum values. The wave crest
potential maximum, the trapped air, and
the kinetic energy. All these values control if the particles will be created
in those certain areas. The wave crest, for example, controls the particles
at the wave crest and the potential of particles
being created there. The trapped air is
basically when fluid overlaps each other and there's
eight trapped air pocket, that is the amount of particles that's going to be in that spot. And the kinetic energy is for
the speed of the particles. This is the threshold of if
a particle will be created. If the value is set very high, it's going to have
a high threshold. So there's generally going
to be less particles with it set to a lower value
like five in this example, there's gonna be a lot of
particles that are created. Normally all of these settings, if you just changed
them a little bit, there's gonna see, you're gonna see very little difference. Normally though, I will leave
all of these settings at the default ones because I don't see any reason to change them, but they are there for you if you want to play
around with them. The potential radius and the particle update
radius basically smooths out the
grid of particles. Higher values will be
a little bit slower, but the movement of
the particles will be better and it's
gonna be more smooth. If your particles are
moving around very chaotically and you have some glitches in the
particle system, you can try turning
this value up and that will help prevent
some of those issues. Normally though,
if you don't have any problems with
the simulation, you should just leave
this at the default value because higher values will
tend to be a little bit slower when baking in the wave crests at
particle sampling and the trapped air particle
sampling controls the amount of particles
in those grid cells. For example, you
can see on screen a value of 20 and
a value of 10000. So every time there's
a crest and the wave, the particles sample puts in 100 particles on
that exact spot. Same thing goes for the
trapped air particle sampling. The particle life and
maximum and minimum values controls how long the particles are going to last in the scene, It's set at a higher value. Particles will last
the entire animation and when it set
to a lower value, they will die out and then
new particles will spawn. Finally, we get into something a little bit more interesting. The particle, the bubble
buoyancy and the bubble drag. The bubble buoyancy will
either push the particles to the surface of the mesh or it'll keep it inside
lower values. We'll have them inside the fluid and it'll just go with it. And then higher values
will push them upwards. The drag does something similar, but it'll keep the particles
moving with the fluid. Higher values will keep the particles moving very
closely with a fluid. And then lower values will make the particles move slightly, but it's gonna have a little bit more of a loose movement. And finally, the particle in a boundary will either
delete the particles. So if there's particles
that are stuck inside a collision object, they will get deleted or
we can push them out. Some of the time the particles will exit out of the domain. So it'll either delete
them or it'll push them back into the domain if
you set it to push out. But there we go. Those are all of the
settings for the particles. With the spray foam
and bubble particles, they allow you to do
some really cool things. For example, you can check the foam checkbox and then
you can add some foam to the top of a river or an ocean and you can create some
really cool simulations. In the next video,
we're gonna talk about the mesh settings.
13. Mesh Domain: In this video, we're gonna be talking about the mesh panel. The panel is a way to visualize the fluid simulation
using a mesh. Normally with the
fluid simulation, if the mesh is unchecked, it's going to display the
particles as you can see here. But if we wanted to
display the mesh, we will need to turn this
on and then bake it in. Remember if you're using the
replay cache type down here, and you'll be able
to see the mesh in real-time if you
wanted to bake it in, make sure you switch
over to the modular mode and then make sure is
resumable is enabled. Then you'll be able to
bake in the data up here. And then you can
bake in the mesh. Once the first bake is done. With that out of the way, let's talk about these settings. The upper S factor
is the same as the oppressed factor
and the particles. It takes the base
resolution and then multiplies it to
give you the mesh, how your values will result
in a better looking mesh, but it's gonna take
longer to bake. You can see on the
animations on screen the different resolutions
and the oppressed factor. One thing to keep in mind, if you have a low
resolution divisions like a value of 32, but a high oppressed factor. It's going to give you
some strange results. The fluid is going to look a bit choppy and it's not
gonna look that great. What you would need
to do is set the base resolution
divisions higher, probably a value of 128 or 196. And then you'll be able to set the upper S factor
to a value of two. And that is going to
look pretty nice. The particle radius controls the mesh size around
each particle. How the mesh works is it
takes every single particle in your simulation and then
wraps a mess around it. And the radius controls
how big that is. Higher values will give you
a more blobby looking fluid, and lower values will
give you a sharper fluid. Normally for a high-resolution
at fluid simulation, I would set this value
to around 1.5 or 1.4 because I think
too is a bit too high, used to be vectors allows you to add in motion blur to the fluid. This is a bit more
complicated and it takes a little bit
of time to set up. So we're gonna be
talking about that in the next video, the
mesh generator. There are two options. Final end preview, final allows you to add in all of
these settings down here, you can change the
smoothing negative, positive and the concavity
upper and lower. If we switch this
over to preview, all of those settings
disappear and it'll just be the
preview of the mesh. I like to keep this on final
because it gives a better, smoother looking mesh and a higher-quality
looking one as well. Now let's talk about the
smoothing positive and negative. These values control how smooth
the mesh is going to be. The positive value will
smooth it out more. And the negative value, we'll do the opposite and it'll make it look a little
bit more sharp. You can see in the
animations on screen the different values
and how it changes, how the simulation will look. If you want a sharper fluid and bring the negative value up. If you want a smoother
fluid at bringing the positive value
up, the concavity. Upper and lower
values control how the fluid will look
in concave areas. Higher values of the
upper will smooth out the top part of the concave and a lower and the lower value down here will smooth
out the ones underneath. Normally you don't
want to go higher with the lower value or
it will distort the mess. As you can see on screen, usually the default values
work perfectly fine, but you can tweak
them how you want. And then of course, once you
are happy with the settings, you can click on it, bake mesh. This will then start to
bake the mesh down here. And if you wanted to stop
the bank by hitting Escape, you can preview
what it looks like. As you can see here, we now
have a mesh for the fluid. We can restart and play it. And this is what it looks like. As you can see there, the fluid simulation
is still going, but the mesh has stopped
because I stopped the bake. At this point, we
can resume the bake. Or if you don't like
how the settings look, you can free it, change the settings and
then bake it again. But there we go, that
is the mesh panel. And in the next video
we're gonna talk about the use of speed vectors.
14. Using Vector Blur: Hello everyone. In this video I'm gonna be
showing you how you can use the US speed vector option
over in the mesh panel. This option allows you to add in motion blur to the fluid. This is very cool
because it takes a lot less time to render than actually using real motion blur and you can customize
it very easily. How this works is
we first need to enable use speed vectors. And if you want to follow
along with this tutorial, you can download
this blend file. It's just a basic
scene with a couple of effectors and an inflow object that shoots water out this way. So going back over
to the domain, what we need to do
is make sure you speed vectors is enabled. And the other important thing is we need to come
down to the format and volume and switch it from
open VDB over to uni cache. Open VDB does not
support this feature, so make sure you switch
it over to uni cash. With that out of the way, we can scroll up to the top
and then bacon at the data. Once you've set up
all of your settings, just click on fake data and
it should go pretty fast. Once this has finished baking, then we can make in the mesh. Now that the bank has finished, we can scroll down over
to the mesh panel, make sure the US speed
vectors is enabled. Then we can click
on it. Bake match. As you can see here,
it's starting to bake. And once it's done, we will set up the rest of the settings. There we go. The
bank has finished. We can play our simulation and here is what it looks like. It looks pretty cool so far. But now what we need to do is go over to the render settings. Firstly, this feature only works in the Cycles
Render Engine. So make sure to
switch the Endrew. Make sure to switch
to the render engine from EB over two cycles. Then what you can do is go over to the render layers panel. There are two things
that we need to enable. We need to enable
the vector pass. This will allow us to add in motion blur in the compositor. Since we enable speed
vectors in the mesh panel, we need to make sure
the vector pass actually renders out. So check that box and then
also check the z box. This will also be
important later. Now what we can do
is pick a frame. Let's just go with this
frame, for example. Then I'm gonna hit F12
to render out an image. And there we go, it has
finished rendering. Now what we can do is exit
out of this and then jump over to the compositing
workspace up at the top here, make sure the US nose is enabled and then you should be able
to see the render layers. What we can do to actually see what our image it looks
like is if you hold the, if you hold Control
Shift and then left-click on the render layer, that'll bring in a viewer node. Now we can see what we're doing. The next step is to add
in the vector blur node, we can press Shift a, go over to Filter and
then select vector blur. Let's place that right here, will take the image plugging
into the composite. And now what happens
is if we take the vector from
the render layers, plug that into the speed, what it's gonna do is it's
going to blur the fluid. Just give it a
second to composite and then you should see
what it looks like. As you can see there, there is a little bit of motion blur. You can control this blurb
by changing the blur amount. Let's go up to a value of three. And there you can see
it's even more blurred. You might notice that some parts of the fluid look a bit strange like it's bleeding into
the effector objects. And to fix that, we need to take
these depth value, which is the Z pass over here. And then we need
to plug that into the Z pass in the vector blur. And that should fix
any issues that the fluid is bleeding into
the effector objects. At this point, you can play
around with the blur amount. If you wanted to go crazy, you got to a value of
2020 is the max value. And you can see the
entire thing is now blurred and it
looks really weird. One thing that we can do
is if we zoom in here, you might see some
repeating patterns. As you can see there, there's some repeating
patterns in the blur. This is controlled
by these samples. If we go up to a value of 128, it's gonna take a lot
longer to composite, but that should help some of
those repeating patterns. As you can see here, it's still begging, but there you go. Now that looks a lot better. I don't recommend this
though because it will take a long time to
render out because it has two composite every
single frame I value of 32 samples will
be perfectly fine. And then a value of about, let's say three, that
should look pretty good. And there we go. You can see we have nice
motion blur in the fluid. The Min and max values control the maximum and minimum amount of blur that's going to
be in the composite. For example, if you have a very fast-moving object and then very slow
moving object, if you set the max value, the same amount of blur is going to be applied to
both of the objects, even though one of them
is moving a lot faster. This just clamps down on the maximum amount of blur
that's gonna be in the scene. And also the exact same
thing for the minimum. But there you go. Now all you have to do is
just render this out into an animation and you will have some nice motion
blur in the scene.
15. Collections tab: Hello everyone. In this video
we're gonna take a look at the collections tab in
the domain settings, the collection tab allows
you to limit the amount of flow objects and effect or
objects per collection. Right here I've created
a basic scene where we have a flow objects
that to geometry, and then we have a
collision object down here in collection to what this tab
allows you to do is you can set the
collections that are going to actually
interact with the scene. For example, this flow
object is in collection one. If I limit the flow objects to be in collection
to which it's not in this simulation is not
going to work because there is no flow objects
in collection too. Now if we refresh the
simulation and restart, you can see it's not
working because there's no flow object in collection to same thing goes for
collision objects. I'm going to exit out of
this and then refresh it. You can see exactly
what happens. You can see it's colliding
with that collision. But now if we limit the
collection effect or objects to collection one which does not have the collision in it. It's not going to interact
with that collision. Now let's refresh it. Now let's refresh it
by changing a setting, will restart the
timeline and play it. And you can see it does not
interact with that effector. So this can be
useful if you have multiple objects and
multiple domains and you have a lot
of stuff going on, and you don't want some
collisions to affect another one. This is actually very useful. But there you have it. That is the collection tab.
16. Cache & Baking: Hello everyone. In this video
we're gonna take a look at the cache tab over
in the Domain Settings. Here is where we can
bake in the data set, the end frame and start frame. And then you can add in
some compression options over in the cache settings. We're gonna go through
it one by one. And the first option
here is the directory of where all of the data
is going to be stored. This is set in a
temporary folder when you first opened
Blender and add a domain, this means that when
you close the software, this cash is going
to get deleted. You can see here it's
AppData Local and then temp that we're attempt that means it's a
temporary file. If you want to bake in your
simulation and be able to close the software and
open it back up later, you need to set a new directory. You can do this by clicking on the button right over there, and then you can navigate
to a new folder. Let's do this real quick. I'm gonna go over to this folder here, the select this one. And then I will just
create a new one called cash and then put it
into this folder. If we click Accept now you can see it's located in this folder. Now all of the fluid
simulation data is going to be put
into this folder. Let's go ahead and
test that out by switching the setting up
here just to refresh it. Then we'll restart and play. And sometimes it doesn't
play and that means you just need to refresh
it a little bit more. We'll restart. There we go. Now you can see it's
actually working. We'll set that to 132. And then player simulation. Now some data is being stored. If we open up that folder, you will see two folders
right here, config and data. Let's go ahead and open this
and you will see all of the fluid information
right here in VDB files. That's because we set down here to be the format open VDB. Now that we understand that, let's talk about the
rest of the settings, the frame, start and end. These are the
options to set when the simulation starts and
when the simulation ends. There's also an option for the offset and this means
that it's going to offset. And when the simulation starts, you can see it's
currently grayed out because this needs to be actually baked in and to
bake in the simulation. We learned about this at
the start of the class. We need to switch it over
to the modular or the all. Again, replay allows us to view the stimulation
in real-time. We can change some of
the settings here. If we want to bring
up the resolution, it'll update it in
real-time and then we can hit the
space bar to play. But if we wanted
to bake this in, we will need to change the
type over two modular. Now we have a bake
button right here. You will also get an error
that says none resumable cash, baking mesh or particles
will not be possible. This means that if we try
to bake in at the mesh, it's not going to work. We can check this box, but the bake mesh is
going to be disabled. In order for this to happen, we need to make sure
is resumable is checked and then we will be
able to bake in the data, and then we'll be
able to bake in the mesh and the particle tab. So keep that in
mind whenever you have it set to modular and you want to bake in the mesh or particles or even the
guides for that matter, you need to make sure is
resumable is checked. If we switch it over
to the all option, will be able to bake everything all at
once with one click. You can see the bake button is now gone up here at the top. And there's only one big button down at the bottom right here. So this is useful if we want to make everything
all at once without having to go through each of these panels in baking
them individually. One thing I wanted to
mention if you have the ISR resumable
checkbox enabled, this is going to take a little
longer to bake because it has to write the information to actually stop and
resume the bake. So it's recommended to
make sure this option is turned off when you are
baking at a high resolution, or it's going to take
longer and it's going to take up more space
on your hard drive. Speaking of space,
fluid simulations, fire simulations,
all of those will take up a lot of space. So make sure when you're dealing with a very high resolution, you have the right amount of
storage on your hard drive, the fluid simulation to
actually bake through. I've had fluid simulations
take up to like 80 gigabytes. Sometimes if it's a
super high resolution or 40 gigabytes, it takes up a lot of space, so make sure you
have enough storage to actually store it. Now you can see here
when we switched it over to the all or the modular, we have an offset option. This allows us to actually offset when the
animation starts. For example, if I set
this to negative 25, then if we scroll up to the top, we'll just bake
this in real quick. We'll stop it right about
there and then restart. You can see on frame
one it's actually playing the simulation right
here rather than up here. Keep in mind, it's still has to bake in those extra frames because it doesn't know exactly when this happens
in the simulation. So even if you set
this to negative 25, it's still going to bake
those extra frames. You can see here
if I set this to a positive value like 25, for example, not
a negative value, we can read the data and
then bake it in again. We'll stop it right
about there and restart. You can see it's
not going to play until it reaches frame 25. Just like that. This is not when the
simulation starts to bake, is just when the
simulation starts to play. I'm going to set
that back down to 0. Next up, let's talk
about the file format. There are two options, open VDB and unicast. Unicast is blender's way
of compressing the files. And each object is going to have its own file in the
cache settings. Open VDV will combine all of the objects into
one single file. For example, if we select a unique cache and
we can make this in, we'll stop it right about there. Then we will open up the folder. And if we open up the data, you will see that we have
a PP underscore 007. And then if we scroll
down over here, we also have a val underscore
003 and then over here 007, it's taken each object and
giving it its own file. If we then free this
and then switch it over to Open VDB,
we'll bake this in. Now every single
object is going to be stored into one single file. So if we now open up the folder
and then select the data, you can see every
single object is now stored into one file. As you can see here,
fluid underscore data zeros 046 dot VDB. I've found that open
VDB does store a little bit better and the
caches are a bit smaller. And unicast is
pretty good as well, except it's gonna be a little bit bigger and it's going to take a little bit
longer to bake in. You can see on the
animations on screen that is very little difference in
the actual simulation. But you can see the
open VDB did take a little bit less time
than the unicast format. Another thing to keep in mind is that union cash I've found works a bit better for a
more stable stimulation. Sometimes whenever I
work with open VDB, it doesn't really work as great. And we have some
glitches in the cache. Unicast sometimes is the
better option if you want a more accurate
simulation underneath that. And we have the
meshes and there are two options, binary and object. Binary means that it's
going to have a bit of compression whenever
it bakes in the mesh. And then the object is just the standard one and there's not gonna be as much compression. So it's gonna be a
bigger file size. Normally I just leave it on binary and then for
the format volume, I'll usually stick
with open VDB. But if I have problems
with the simulation, I will switch it
over to union cash. There's also a Advanced tab
with the open vdb format. There is compression volumes and there are three
options here. Bosque is just a way
of compressing it. It's multithreaded. Zip is very similar, but it's a less efficient. And then non means
there's gonna be no compression and the file size is going to be pretty big. And then the precision
volumes is just the how precise the open
VDB file formats are going to be written as. You can write them as
half, mini or full. But there we go. That is the cash
panel in mantle flow.
17. Field Weights: In this video, we're
going to take a look at the field of weights in
the domain settings. The field weights allows
us to control the gravity and all of the strength of the force fields
in our simulation. If you didn't know,
you can actually add enforced fields to
affect the fluid. For example, if I
press Shift a and I'll add in a
turbulence force field, I can drag this up here. We'll set the strength
of it to a value of two. And then if we select
our domain and refresh it by
changing a setting, will restart and then play. You can see it's
actually affecting the fluid and you can see the particles are moving around. You also might notice that
it's actually gaining volume. The reason that's happening is because the fluid
simulation is going crazy and the
particles are being added and this joist and it's
going to be gaining volume. In this case, I would
need to turn down the particle radius
to counteract that. Since we already
talked about that, we're going to scroll back
down to the field weights. And this allows us
to actually control the strength of each
individual force field. For example, if I change the turbulence all the
way down to a value of 0, we may need to refresh it. So let's scroll up to the top, will change a setting
to refresh it. Then we'll player
simulation and you can see the turbulence force field is no longer affecting
the simulation. If we scroll down here, we'll set the strength
of it to a value of 0.1. We'll scroll back up,
we'll refresh it. And then restart and play it. And you can see it's affecting
it just a little bit. This is very useful if you
have multiple domains and you don't want the force
fields interacting with every single one. You can turn the sum of
the force fields down. You can also turn off all of the force fields by changing this value all the
way down to 0. And you can also
turn off gravity. Let's go ahead and
test that out. I'm going to grab
our inflow object, put it in the middle
of our domain. We will refresh it and then
restart and then play. And you can see there
is no longer gravity and it looks actually
pretty cool. There's also a effector
collection and this is exactly the same as the
collections up here. It allows you to select a
different collections with force fields in them to
affect the simulation. Let's go ahead and test
this out by moving this object to a new
collection collection too. We'll select the domain and set the effector
collection to collection one
which does not have the turbulence force
field will come up here. We'll refresh it,
restart and play. And you can see the
force field is no longer affecting the simulation. There you go. You can play around with
different force fields, find out what you like
and test that out. And you can create some really interesting simulations
using them.
18. Viewport Display: In this video,
we're going to take a look at the viewport display. This panel down here
allows you to display your fluid simulation
in a different view. You can change a
couple of settings. All of these settings right here are for the smoke simulation, so they're not going to
affect the fluid at all. But what will
affect the fluid is the grid display and
the vector display. The slides also
doesn't really work. You can see if I select it, it's not really working. And that's because it also deals with these
smoke simulation. We're gonna go ahead
and close that off. But what is really cool
is the grid display. If we go ahead and check that
box and open up this panel, you will see that
there is a couple of settings here.
We have the field. In this field, it
allows us to display certain attributes such
as the z velocity, y velocity, the pressure, or the fluid level set. The fluid level set
allows you to see where the fluid is
actually rising. So what we need to do
is first refresh this. So we'll change a
setting to refresh it. Then we'll then
restart and play it. And we can see that the
level is right here. We can see the level going
all the way at this level. It allows you to actually see a couple of different
attributes in your fluid. The other ones that we have
here is obstacle level set. The z force or pressure. Pressure is a bit interesting. We'll go ahead and restart. This doesn't work a bit finicky. What we need to do is
change something and then scroll up to the top
and just refresh a setting. Then if we can play, we
can see it actually works. And the pressure is just
the pressure of the fluid, as you can see it's
displaying right there. That also gives us a
interesting effect. The scale option
down here allows you to scale up the colormap. For example, this is, it's
set to one right here. Then we will set this
down to like point to, for example, will scroll up. We'll refresh a setting
just like this, restart and play it. And this is the scale at 0.2. You can see it's a lot
smaller than it was before. The vector display
also is a cool effect. It allows you to display certain fields with
different needles. For example, it's currently
displayed as a needle. We can set it over
to grid and we can see the grid values here. We can also change
it to streamline, which is very
similar to needles. Let's just go ahead and switch
it back over to needles. And you can change
the size of it by changing this scale value. So if I wanted them all
to be a bit smaller, I can change them like this. And then this allows
us to actually view certain attributes as well. For example, the field, the force field velocity, the forests are the
guide velocity. And this magnitude option allows the needles
to actually scale. So if I turn it on and we can see here some of
the needles are scaling down when there's not
a lot of velocity and when there is a
lot that's scaling up. This is just a way to
view your simulation in different attributes and you
can play around with them and create some interesting
Viewport Display. Again, this does not
affect the render at all. It only affects how the
viewport is displayed. But there we go, that is all of the settings in the domain. In the next section we're going
to jump into flow objects affect our objects and
learn about all of those. Go ahead and join me
in the next section.
19. Flow Objects: Hello everyone. In this section we're
gonna be discussing a lot of different things
about the fluid simulation. The first couple of videos we will discuss inflow objects, outflows and effect
effector objects and how they can interact
with your scene. And then we're gonna
be going over a lot of other stuff included with
the man supposed simulation. Starting out with, we're gonna
talk about flow objects. To actually add
in a flow object, you should probably already
know how to do this, but with your objects selected, we're gonna go over to fluid and set the type over to flow. Now there are a lot of different
options here to change how the flow object operates
in the fluid simulation. First, we need to
switch the type from smoke over to liquid. You can see there is smoke, fire and smoke and fire. All of these deal with
the gas simulation. Since we are working
with liquid, we need to switch it over
to the liquid simulation. And then for the flow behavior, there are three options. Inflow will constantly
add fluid to your scene in the shape
of the flow object. Outflow will delete fluid. So whenever there is fluid that touches the outflow,
it'll get deleted. And then of course, geometry
means that the only fluid that is added is in the
shape of the geometry. In this case it's a UV sphere. Let's go ahead and refresh the simulation to see
what this looks like. I'm going to change
a setting over here and then restart
and then play it. And we can see this
is the effect. We now have fluid
in our simulation. One thing to note about flow
object is you need to make sure that it's not super
close to the domain edge. I've had problems when the flow object is
really close to that. It doesn't work at all and
no fluid will get emitted. We'll talk about that
a little bit more in the next video when we
talk about inflows. But I wanted to mention
that real quick. Underneath that we have
the sample sub-steps. The sample subsets deals with very fast movie and
inflow objects. If I go over to collection to, I've created a simple animation to demonstrate how this works. If we select our cube over five frames and moves
across the screen. If I go into the Properties
panel by pressing N, we can see the location is
at negative five meters. Then if we jump
over to frame five, it goes to positive five meters. How animation works is it takes your keyframes and the distance
that you've applied it, and then moves the object to that location over a
certain amount of frames. In this case it is five frames. How this works is
if I go to frame one and then I go to frame two, you can see there is a
jump from this position over to this position
on frame 12. How the sample sub-steps works is it takes those two frames and then divides it up because you can see
there is a big gap. The origin point jumps
from here all the way over to here in
one single frame. In this case, there's
probably going to be some errors if there is fluid in this position because the frame jumps from
here over to here, what the samples subsets
does is it takes those two positions and then subdivides them into
different points. So it's a little
bit more accurate. Most of the time,
if you don't have a very fast-moving object, you don't need to bring this up, but in case you do
make sure you bring this up so your simulation
is more accurate. If we press Shift a and add in a plane object will
bring it up here. We'll set the type IV fluid
and send it over to flow. And then we'll set it to liquid
and then over to inflow. What will happen is if
we select our domain, we'll refresh it by
changing a setting. And then we try to
play our simulation. You can see the plane
object is not working. This is because
it's a flat object. What we need to do is give
this object some thickness, or we will need to make
sure is planar is checked. If we turn on is
planar for this plane, we'll select our domain, refresh it by
changing a setting, restart and then play it. Now you can see the plane
is actually working. This deals with non
manifold objects. Another example of
this would be a cubed. If we go into solid view
and go into edit mode, and then we delete
this face on top. This is a non manifold object, which means it's
a unclosed match. For this example, we
would need to make sure is planar is enabled to actually get this cube to
produce fluid in our domain. The surface emission
value deals with the area around the flow object. If this value is set to 0, it's just going to be the
exact dimension of your flow. If this value is up higher, it's going to bring
the fluid outside of the flow object and
it's gonna have some thickness going
around the entire thing. Initial velocity is super cool. What this will do is it will add some initial velocities here, fluid in the direction
that you want. There are five different options here we have the source value, which means that
if the object is moving quickly and the
source value is up, it's going to add momentum to the fluid when it
starts to emit. And you can see an example
on screen of that. The normal option deals with
the normals of your fluid. The normals if you
didn't know is the direction a
face is pointed in, you can see the direction
if you go into edit mode. And if we open up this
menu here and turn on the normals and bring
the size up a little bit. You can see the direction that
the faces are pointed in. They're all pointing outwards. What would happen if we bring the normal value up
to a value of one? We will select our object, we'll refresh it,
and then play it. And you can see they all shoot out in the direction
of the normals. We can see this a bit better
if we use a plain object. Here I've created a
simulation where the normal is set to a value of ten. And if we go into edit mode, we can see the normals are pointed in the upward direction. This is an inflow objects. So if the normal is set to 0, it'll just shoot down. But if the normal is set to ten, it's going to shoot upwards. Let's go ahead and test this out by playing our animation. And you can see that's
exactly what happens. The fluid shoots upwards rather
than going straight down. And finally, we
have the initial x, y, and z directions. This gives us more control over where we want the fluid
to shoot out from. If we bring the x value
up to a value of four, we'll select our domain and refresh it by
changing a setting. Now if we play our simulation, you can see the inflow object is shooting fluid out
in this direction. You can also have
multiple directions. So for example, if I drag this to the middle
of our domain, if I want the fluid to shoot
upwards at this angle, I can set the z direction
to a value of four. So the x is going in this direction and
the z is going up. So it's going to shoot out at an angle somewhere around here. Then if we select our domain, we'll refresh it by
changing a setting, restart and then play it. And you can see that's
exactly what happens.
20. Inflows and Outflows: In this video, I
wanted to look more at inflow objects and
outflow objects. Here I've created a
another simulation. We have an inflow object here and an outflow on this plane. Again, both of these
are playing objects, so I made sure that it is
planar option is checked. So how outflows work is if
you set it over to outflow, it'll delete anything
that the fluid touches. In this example, if I restart
my simulation and play it, you can see all of
the fluid is getting deleted right when it
touches that outflow. Let's go ahead and select
our inflow object. Here we have an
option to use float. The useful option allows you to turn off and on inflow objects. And this setting can
also be animated. Let's go ahead and test
that out by jumping over to frame and 60 right here. What I'll do is I'll check that little button on the sign
to add an eight key frame. Then I'm going to jump
over to frame 61, turn this off and then
add in another keyframe. Now it's going to emit
fluid for 60 frames, stop at 60, and then it's
going to be turned off. This is very useful if you don't want to fill your entire domain, but you still want
to use an inflow. You can animate the US flow. Same thing goes for
this plane here. Let's go ahead and
do that. I'm going to skip to frame 40. I'm going to turn it on. Then I'm going to skip
to the next frame, frame 41, turn it off, and then add an
another keyframe. Now this is not going to be
used anymore for the outflow and fluid will just pass right through it and hit the
bottom of the domain. There is also an option for the surface emission and this is the area around the outflow. You can see here if I go into front view that there is
a little bit of a gap. And one main reason for that
is because the resolution of the domain is at 34,
which is pretty low. So this means that it's
not gonna be as accurate. If we were to turn
the resolution up, it would get a lot closer
to the outflow object. Now let's go ahead and
test this out by changing the resolution to refresh it. I'll restart and play it. You can see it comes down and then it hits it right when it turns off and then this full
object turns off as well. Another thing I
wanted to mention in this video is the position of your inflows if your object is very close to the
edge of the domain, as you can see, this object is, it might look a
little bit strange. We can see here if
I play my animation for some reason the fluid
it shoots out this way. The reason that's happening
is because it's really close and at the resolution
of this is too low. If we take a look at the
resolution right here, this displays how big of the voxels are in
our stimulation. It's about the size. If we then take that cube and
drag it up to the top here, you're gonna notice
that it's actually intersecting into the inflow. This is causing the simulation
to look really strange. What we would need to do is either take the inflow object, drag it down so it doesn't
touch the top of the domain, or we would need to
bring the resolution up, the box down here
becomes smaller. If I select my domain, I can set the resolution to 64. And you can see
it's a bit better. But now if I drag my inflow object down
just slightly just to make sure that the box down here isn't the same as up here. I can then refresh my
simulation. I'll restart it. You can see it's now
working much better. Keep in mind if
your flow object is not working in the way
that it's intended, make sure your flow object is not super close to the domain, or you have to turn
up your resolution. So the box becomes
smaller and it doesn't intersect inside
of the flow object. Finally, the last thing
that we will discuss in this video is the initial
velocity down here. If you want more fluid
to enter your domain, you can set the
initial velocity in these values and more fluid will be pushed out very quickly. For example, if I set the z-direction to
a negative value, let's try negative
five, for example. I'll make sure this is
a little bit lower. I'll select my domain
and refresh it. Then we can restart. You can see a lot more fluid
is now being produced inside our simulation
because it's being shot out much more quickly. In this case, if you want more
fluid inside your domain, make sure to turn up
the initial velocity. That'll add a lot more fluid. But there we go. That is the inflows
and outflows.
21. Effectos & Collisions: Hello everyone. In this video we're going to take a look at effector objects and how to actually collide at
something with the fluid. You can do this very easily by selecting the object
that you want to be, the collision and jumping
over to the Physics tab, selecting fluid and setting
the type over to effector. Right now the effector
type is set to collision. There is also a guide which we talked about earlier
in this course. For now we're gonna
stick with collision. Now what happens if
we select our domain? We will refresh it by
changing a setting, restart and play it. You can see the fluid
is now colliding with the cylinder and
it looks really cool. Let's go back to the
settings one more time. Here we have the sample subsets, which we talked about
in an earlier video. Remember if you have a very
fast-moving collision, makes sure to turn these
samples sub-steps up. We also have the
surface thickness. If this value is higher, it's going to add
an invisible border around the collision, and that is going to be
the actual collision instead of the mesh itself. Use the factor if you wanted to animate when the
collision turns on, you can do that by clicking
the button right there, turning it off and
on and animating it. And then of course it is
planar is right here as well. If I drag this up, I'm going
to add in a plane object. I'll scale this up, drag it up, and then
add N D a factor to it. So we'll click on Fluid sets, the type or R2 vector. If we then select our domain, we will refresh it by
changing a setting, will restart and play it. You can see the plane is not
colliding with the fluid. The reason for that
is because it is a plain object and
we need to make sure is planar is checked. When it's checked, we can
then select our domain. We'll refresh them
one more time, restart and then play it. And now you can see it's actually colliding
with the plane. So make sure if you have a plane that is colliding
with the fluid, you check the is planar option. This also again works for
anything that is non manifold. And non manifold means it
can't exist in the real world. For example, a cube with
a hole in the middle. If I go into edit mode, select that top face and
then I will delete it. We can see this is a
non manifold mesh. It's not closed. If there is a phase on top. If I select that
ring and press F, Now this is a closed match, but with the face deleted, this is a unclosed mesh. So I would need to make sure is planar edge tagged for
this to work properly. The other thing I
wanted to mention in this video is the
fractional obstacles. We talked about this in the last section where we talked about the
liquid settings. And this will also
affect how the fluid interacts with obstacles. Here is what the
simulation looks like right now you
can see it collides with it and goes over and
slides off pretty easily. But if we were to turn on fractional obstacles
will restart the simulation and play it. You can see the fluid is
actually sliding off even more. So again, the fractional
obstacles allows fluid to pass over obstacles very easily
and nothing gets stuck. So this could be what
you were looking for, but if you want it to be more of a sticky collision and the fluid to bounce
around a bit more. You can turn that
on and you can see the fluid is acting like that. But there you go. That is how you use
collision objects in your fluid simulation.
22. Viewport Render Animation: Hello everyone. In this video I'm gonna
show you how you can view your simulation at full speed
without rendering it out. A lot of the times when
you're working with simulations and you try to
play it in the viewport, you can see my frame rate
is dropping almost to five FPS and it's
really slowing down. So I can't really tell
what this simulation is going to look like when
it's finally rendered. An easy way to actually
preview the speed and to see your
simulation in real time. What we can do is we can actually render
out the viewport. First, what we need to do
is hide the inflow object. If we play our animation, you can see the
inflow is right here and I don't want that
to show up in the view, so I'm going to hide it from the view and from the Render. The other thing I'm gonna
do is I'm going to press Z and select Toggle overlays. If you don't see
toggle overlays, that's because you probably
need to enable it. You can come over here to
the preferences underneath the K-map and make sure extra shading pie
menu items is turned on. Or you can come over here
to this button on the top. And that will also do
the exact same thing. What that does is it just
hides the cursor and the lamp right here
and the origin points and just shows
the actual models. At this point, we can
render out our viewport. To do this, we need
to set an output. So over in the Output tab, we can set an output over. We want our animation to go to. This is very similar
to rendering, but it's not going to render, it's only going to
render out the viewport. Selected this
button on the side, and navigate to a folder. Once you have found your folder, you can click Accept
and then also make sure you switch it
over to a movie file. I'm going to choose the mpeg. And then underneath the
container right here, we're going to choose MP4 and then switch it over
to the high-quality. Now to actually render
the viewport out, what we need to do
is come over to the view menu and then we have a couple of
options down here, viewport render image and
viewport render animation. What the viewport render image
will do is it'll just take a screenshot of your
viewport and now you actually have an
image that you can save. If we select that view
Render Animation, what that's gonna do
is that's going to actually render out
the entire animation. Viewport rendered key-frames. That's a little bit different. What that'll do is if you have any key frames in
your animation, it's only going to render
out those keyframe changes. For example, if you
have a cube that moves across the screen over a
certain period of time, it's only going to
render the frames that actually have the
keyframes on them. As you can see in this
animation, It's really jumpy. What we want to do is select the viewport render animation. What that's gonna do is
it's going to render out your animation is as a
viewport as you can see here. And then we'll be able to view
it in real-time so we can see the speed and how our
simulation is going to look. There we go. It's now finished. And what we can do is exit out of this render
right here and then go over to render and
then click on View Animation. Then what it's gonna
do is it's going to play your animation
and you'll be able to see what your simulation
looks like in real time without
even rendering. This can be very useful if
you want to spot any errors in your simulation or to
see how the speed is. It's very useful and
it saves you a lot of time from having to render
out the entire thing. One last thing that
I'll show you real quick is you can actually change the color of some of these objects and render
that out as well. If you come over
here to this menu and select at that
drop-down arrow, you can click on some
different options here. For example, if you
have any textures, you can switch it over to
texture to object to random. And that's going to
assign a random color to each of the objects. And then over here you
can turn on cavity. You can turn on a screen
space right here, depth of field, all of that. And that's also going to be
rendered out in the viewport. Whatever you see in this
viewport right here, that's gonna be
rendered once you select the viewport
render animation. But there we go. I just wanted to
give a quick video to show how that works. And hopefully that helps you
in your future simulations.
23. Apply Collision to Multiple Objects: Hello everyone. In this video I'm gonna show you a very quick and easy way to apply collision to a lot of different objects
in your scene. Here we can see I've created a lot of different cubes and all of them do not have the effector collision
applied to them. And it would be annoying
to select each one, click on fluid and set the
type over to effector. So what I'm gonna
do is I'm going to select all of them
by dragging a box, selecting all of them. I'm going to de-select my
domain object by hitting B and then drawing with the middle mouse
button to de-select. And we can see here
the one that I apply, the collision two is
the active object. The active object
is the one with the lighter orange outline, this yellow outline right here. Make sure that one
is the one that has the collision applied to it. Then what you can do is you can press Control or Command L. And that'll bring up the
link transfer data menu. Or you can go over to
object down to link transfer data and then
click on Copy modifiers. And that's going to apply that exact same modifier to
the rest of the objects. Now we can see here they
all have collision. And then that was much faster than going through one-by-one. This also works for all of
the different settings. So for example, if I wanted the surface thickness
to be up a little bit, I can set that to
0.5, for example. Then I will select all of them, de-selected Domain
Control or Command L, and then click on
it, copy modifiers. Now, all of those
will have these 0.5 if you have
animation in your scene. The other way to do that
is if you select them all, let's create an
animation real quick. We'll go through frame 30. I'll turn on use effector. I'll go to the next frame
and then alternate off. If I wanted to copy that animation data to the
rest of the objects, I would press Control L, and then we have
an option to link animation and data
if we select that, now they will all have the exact same animation
data for the US effector. Now let's go ahead
and test that out by selecting our object, we will refresh a setting, restart and play it. And we can see they're colliding and then it doesn't quite it anymore because the
animation turns it off. But there you go. That is a quick and easy
way to copy modifiers and fluid simulation
settings in mantle flow.
24. Water Materials in Eevee & Cycles: Hello everyone. In this video I'm gonna
show you how you can create a water material in
both EB and in cycles. We're going to be
going over how to create transparency and EV, and how to make it look good. Here I have a simulation
where there is fluid that is shooting out to the right and it's colliding
with the wall. To actually get this into a water material
with transparency, there's a little bit of
things that you need to set up in the EV render engine. First, we need to come over to the right side where
the render panel is. Ensure an honest screen
space reflections. If we open up this panel, there's also a refraction
that checkbox, make sure that it's checked. This will allow the
object that you have selected to have transparency
whenever you enable it. Then we can also turn
off half raise trace. This is gonna give us
the full resolution of all of the ray traces. Next we're gonna go over to the Material tab and we're going to create a new material. For this material,
we're going to come down to the transmission value. This is the transparency
and this will allow it to turn into
a glass material. We're going to set this all
the way up to a value of one. When we do this,
you can see this is the effect that happens. Next, we need to scroll down to the settings in the
material and then change the blend mode from
opaque over two alpha blend. Then what happens is if we turn on a screen space refraction, it'll allow transparency
to happen in the material. And as you can see,
that looks pretty nice. There are a couple of things that we need to change though. I'll go back into camera view. And one thing I'm
going to change is the show a back face. You can see here if I
zoom in a little bit, there's these weird jagged lines and that is the back
face that is showing up. If I turn show back face off, those jagged lines disappear. Next up, if we
scroll up to the top here we can see the
roughness is set to 0.5. This is giving us a
pretty rough material. Now this is, this
does look pretty cool and this could be the
look that you're going for. But if you want it to
be nice and glossy, you can set the roughness
down to a value of 0. That's going to give you
a very sharp reflections. But I do think a little bit of roughness looks
pretty good and EV, So I'm gonna bring that up
to a value of about 0.2. Let's go with 0.25 and enter. The other thing that we need
to change is the IOR value. The IOR stands for
index of refraction, and this is basically
how light enters the object and then
refracts outwards. The IOR of water is 1.333. And there are a lot of
different IOR values for other materials and
substances in the real life, the IOR of water in
this case is 1.333. We're going to enter that here. And that's gonna give
us the correct index of refraction for this material. And that is basically all
you really needed to do to create a transparent
water material and EV. From here you can give it
a color if you wanted to, maybe a slightly blue color, something like that, and
then you can render it out. Next up, let's take a look at the material in the
Cycles Render Engine. Jumping over to
the render panel, we're going to switch
the render engine from EV over to the Cycles
Render Engine. If you have a GPU, go ahead
and select that here, so it renders a bit faster than let's go over
to the Material tab. We're going to create a
new material once again. Then we're gonna come down here to the transmission value, turn that all the way up to one. And then for the IOR, we're also going to set this to 1.333 and enter the roughness. We're going to bring
that down to 0 and then give it a base color
somewhere around here, maybe a slightly blue color, something like that
will look pretty nice. Then because we're using cycles. This is a real, this is a ray trace
ever render engine. We don't have to do
anything else and we can go ahead and
render this out. And it's going to
look really nice. I'm going to set
the render samples right here to a value of, let's go with 50 and then make sure in
denoising is turned on. Then let's go ahead and press
F12 to render out an image. The render has finished. And here is our result. This is the Render in cycles, and as you can see, it
does look very nice. There's a lot of reflections. The water looks good. And then if we go
over to slot three, this is the Render for
the EV render engine. As you can see, it
doesn't look as good, but you can see this render
only took about two seconds, and this render took
about 17 seconds. So EV is a lot faster, but cycles is going
to look a lot better. But there you go. That
is how you create water materials in
both EV and in cycles.
25. Ocean Modifier: Hello everyone. In
this two-part series, we are going to be creating
the ocean that you see on screen right now using
the ocean modifier. Now the ocean modifier isn't a part of the fluid simulation, but it is a cool
feature in Blender and I wanted to talk about
it in these two videos. To get started, we
need to add this into our object right here. You can use any
object in Blender. In this case, we're
just going to stick with the DePaul cube. We're going to jump over
to the Modifier tab, click Add Modifier,
and then select the ocean modifier
on the right side. What this will do is it'll change your cube into an ocean, as you can see here. Now in this first video, we're gonna be talking about all the different
settings over on the right side and how to customize it to
exactly what you want. And in the next video, we're going to
actually be creating a material and rendering
out an animation in EV. Let's go ahead and get
started by talking about the setting on the top here
and working our way down. The geometry right
here allows you to generate a new ocean or
displace your ocean. If we click on displacement, it's going to try to
displace the cube, but it's not going to really
work very well because we only have eight
vertices on our cube. In this case, we will need
to subdivide this are adding more geometry or changed it to a plane or something like that. In most cases you're
probably going to want to use the
generate options. We will actually
generate a new ocean. Next up we have repeat x and y. So if you wanted your ocean to repeat along those
different axes, you can add more in or lesson
depending on what you want. In this case, I'm just
going to leave it at one. Then we also have the resolution in the viewport
and in the Render. If we drive the resolution
up on both of these, Let's go with a value of 16. We're gonna get a lot
more detail in our ocean, as you can see right here. The two options here. This is where the viewport
and this is for the render. If you're working
in the viewport and you don't want the scene to lag, you can change the view
port to a lower value, but keep the render
at a high-value. And you're gonna get all of that detail when you
render out the image and the time value allows you to change the time of the ocean. You can see if I
drag this value up, it's actually going to
play the ocean for us, as you can see right here. What we're gonna be
doing is actually animating this time value. Let's do that real quick by adding an a driver to change it. For us to do this, we can click on this
value and type in hashtag frame to
create a new driver. And then we're
going to go divided by using the slash key. And let's go with
a value of five. Now what happens is
for every five frames, the time value is
going to go up to one. You can see here
if I skip over to frame five, we now have one. If I skip over to frame ten, we now have a value of two, and so on going
across the timeline, this is way too fast though. So if we play our animation, you can see this
is way too fast. The ocean is going crazy. So let's slow this
down quite a bit. If we click on this value, we can change the speed by increasing the value
after the divide. Let's go with a value of 25. If we go with 25 now
you can see it's moving a lot slower and
that looks a lot better. The next couple of
settings that we have here is the
depth of the setting. And this is basically
the depth of the ocean. If we set this to a lower value, it's going to create
smaller waves. If we set it to a higher value, it's going to
create bigger waves because the depth
is much larger. We're going to leave
that at a value of 200 because I do
want larger waves. And then for the size this is basically scaling
down the ocean. If I drag this value down, you can see it's going
to scale it down, but drag it up, it's
going to scale it up. These spatial size is basically
the ocean size in meters. You can see here, if I
drag this value down, it's going to change
how the ocean looks, but it's going to try
to keep those settings. We're gonna leave this
spatial size at a value of 50 and the size up to one, the random state
is pretty easy to understand that
this basically just changes the seed of your ocean and gives you a different
random pattern. For example, if you don't
like this wave right here, I can drag that up to one
and it's gonna give me a random variation
just like that. I'm just going to
leave that at 0. The generate normals option
allows us to generate the normals of our
ocean right here, which we can then plug into the material and
change it how we want. We're going to leave
that off for now. Next up, let's open up
the waves option here and here we get into a lot of
more interesting settings. If I drag this scale up, is going to scale up the
height of our waves. As you can see there, we
have much bigger waves. Now, if we play our animation here is
the result that we get. The smallest wave option
right here allows us to set the smallest wave that's
going to be in the scene. This is gonna really get rid of a lot of detail if you
drag this value of, because now the smallest wave is going to be
what you set here. If I want the smallest wave
in the ocean to be one meter, it's going to really
smooth out everything. I like to set this
down to 0 so we get the most detail
in our ocean. The choppiness is
also a cool setting. What this will do
is it'll sharpen the edges of your ways. If I drag this value up, you can see all of the waves
are a lot sharper now. We'll play it right there. And you can see right at this
peak it's a lot sharper. If I drag this value down, it's going to smooth
out the top there. But if it's up higher, it's going to sharpen
out those peaks. I like to set this up to 1.5
for most of my animations. And I think that
looks really nice. The wind velocity also controls
the size of your waves. Higher values will make the waves a lot bigger
but lower values like a value of three, for example, it's gonna give
us a much smaller ways. Now that the waves
are much smaller, the scale is incorrect. So we will need to bring
the scale down to actually match the wind
velocity. There we go. Now we have a much
shallower ocean. I'm going to bring
that back up to a value of 34, the
wind velocity. And then for the scale,
Let's go back up to 2.8. Next up is the alignment. The alignment controls the
alignment of the waves. If this is all the
way up to one, you can see all the waves
are going in one direction. If this is down to 0, the waves are just
going to go all over the place and there's not
gonna be any alignment. I do like a little
bit of alignment. So we're going to bring this
up to a value of about 0.3. And I think that's going
to look really nice. If you don't like the
direction of the ways, you can also change that here. So if you wanted it to
go at a 45-degree angle, you can go like that. And now they're
going at this angle rather than going left to right. And the dampening value, what this will do if it's
all the way up to one, there's gonna be
no dampening and the waves are gonna
go in this direction. But if the dampening
is set down to 0, the waves are going
to hit each other and bounce in the
opposite direction. You can see here this
wave is going to come up, hit there, and then go
back down this way. Now the waves are
bouncing off of each other and going back in the direction that
they came from. But with the dampening it
all the way up to one, they're not gonna do that
and they're just going to go in one single direction. I like to have this
value at around 0.5 and I think that
looks pretty nice. Next up, let's check
the foam checkbox and open up this panel. Here we have a data layer
name and what we need to type in here is the word
foam or any other word. And this will allow us to take that foam information and plug it into the material later, which we will cover
in the next video. The coverage right here controls the amount of foam that's
going to be in the scene. If you set this higher, it's going to cover a lot
more area on the ocean. If it's set to lower,
it's going to cover a lot less. With it set to 0. It's actually a pretty
good amount of foam, even though it's set to 0, there is still going to be
phone in the scene right here. So we're going to leave
that at a value of 0. The spray option here
is similar to the foam. It allows us to add in
some spray particles. You also have another data
layer name right here, which you can put in. For now though we're just
going to leave that off. Next up is the spectrum. The spectrum is
basically presets for the ocean right now
it's on turbulence. So that means there's gonna
be a lot of high waves, very chaotic looking ocean. If we switch it over
to shallow water, the waves are gonna
be much calmer now, in this case, we would
need to bring down the wind velocity to
make sure it looks good. And then also this scale, we'd have to drag
down as well to actually get these shallow
water to look good. There's also established ocean and then establish
ocean with sharp peaks. What this is is if we select it and then we bring the
wind velocity down, you can see the waves
have now sharp peaks. But if we set it over to
the established ocean, just like that, there
are a lot more smooth. This is for more of like
a lake or an ocean that there's barely any wind and all the waves are
very, very small. That's probably what you're
going to want to set it to. But since we are going for a high turbulent ocean and
we're gonna set that back over to turbulent and then we're bringing the wind
velocity up to 30. And finally, we have an
option to bake in the ocean. And what this will do is it
will actually export all of that information that we
select here as textures. We can select the
generate normals and we're gonna
get a normal map. We can also generate
the foam map, the spray map, and at
the displacement map, we can set the end frame
of how many textures we want to export and
also the foam fade. So if we want the film to
fade out quickly or slowly, we can set that here. And then all those textures are going to be put in this folder. If you click on bake ocean, all those textures are gonna
be put into a single folder. As you can see here, we have all of the displacement textures. And I've actually already moved the textures into
different folders. Here we have the foam, and then here we
have this spray and inverse spray
folders right here. If we open up these
EXIF files into an editing program like
Photoshop for example, here is what the displacement
texture will look like. This is an RGB file. So if we take this texture and
plug it into the material, it's going to give us
that same displacement as the ocean in
Blender right now, we can also take a look
at the foam EXE file, and here's what the
foam looks like. We can also take this texture, plug it into the material, changing up however we want. There's a lot of
customization that you can do with the
different textures. Baking in the ocean is not necessary for creating
an ocean in Blender, it basically just exports those textures and allows
for more customization, but you don't need to do that in order to
create a notion. You can just check
the foam checkbox, put in a name here, and already plugged that
into the material. And that's actually
what we're gonna do. We're not gonna need
to make the scent. Bacon in the ocean is more for customization
with the textures. And also if you wanted to submit your blend file to a render
farm or something like that, then you would probably
want to bake it in. But for most scenes you actually don't need to bake this end. We're just going to
close that off for now. Now one thing that needs
to be mentioned is we have a driver
for the time value, and this controls the
time of the animation, as you can see here,
it's moving across. Now, this is not going to work when you
bake in the ocean. You actually need to
manually animate this value. It's not going to work. If
you click on bake ocean, you're gonna get the
same texture for every single frame
of the animation. So drivers do not work. You need to actually
manually animate this value. But since we're
not vacant it in, we can use the time and that's going to
work perfectly fine. There we go. We've now covered all of the different settings
for our ocean modifier. In the next video,
we're gonna be taking the ocean and actually
adding a material to it.
26. Ocean Material: Now that we have
our modifiers setup with all the different settings, Let's go ahead and create
a material for this ocean. To do this, we're going to open up a new window by dragging the top and switching it
over to the shader editor. We're going to press Enter
to close up that panel. And now let's
create the material to actually see
what we're doing. Let's go into rendered view. I'm going to press Z and
go into the rendered view. And we don't need
the light up here. So go ahead and
select the light, press X and delete it. Next up, let's add in
an HDR to our scene to actually see and give us
some lighting for our ocean. To do this, go over to
the world settings, click on Color and switch it over to an environment texture. If you click on Open, you can now navigate to an
HDR and open it into Blender. And the HDR that I'm gonna be
using is off of HDR haven. Hdr haven is a great website
for free HDR that are very high-quality and good for
scenes just like this one. The one that we'll be
using for this tutorial is **** underscore road for k. So go ahead and search that
in HDR haven and download it. Once you have it downloaded, go ahead and select
it and open image. And there we go. We now
have opened it in our CNN. It is looking pretty good. Let's actually set
the background to transparent so we can
just focus on the ocean. So to do that, go over to the render settings
underneath the film tab. Turn on at transparent. Now the background
is now gone and now we can actually focus
on creating the ocean. I'm gonna go ahead and toggle overlays by selecting
that button right there. And that's gonna get rid
of the grid and we can focus on creating
the ocean material. The first thing
that we need to do is set the roughness down to 0 so we get some
nice reflections. And then the transmission, I'm going to go all
the way up to one. Then for the base color, we're gonna go with a nice
blue somewhere around here. Darken it quite a bit. Something like that is going
to look pretty nice already. Our ocean is looking
pretty cool. The next step is we need to
add in the foam to our ocean. To do this is actually
pretty simple. Let's add an input and
then an attribute. If we go over to the
Modifier Tab, once again, we can see here we
have a data layer and the word that we
have here is foam. What we need to do is take that exact word will
control C to copy, and then we'll paste it over
in this attribute node. So underneath the name we're
going to press Control V or Command V on a Mac to
paste in that foam data. We are now exporting the
foam information from the ocean modifier and
plugging it into the material. Next up we're going to
press Shift a go-to shader and then add an a mix shader
and place it right here. We're gonna take the
factor from the attribute, plug that into the factor
of the mix shader. Then we'll press Shift a and
we need to plug in something in the bottom here to
actually add in the foam. We're going to add in
another principled shader. We'll place it right there. Then take the BSD f and plug
it into the mix shader. Once we do this, you can
see here it takes a minute and now we have a little
bit of foam in our scene, but it's currently
not very visible. To control this a bit more, we're going to add in
a converter and then a math node and place
it right here. If we then switch the
mode over to multiply, this now controls the
brightness of our phone. If we bring that up to,
let's say ten, for example, we can see we have a
lot more foam coming into our scene and that
is looking pretty cool. You can also control
the amount of bone by adding in a color ramp. So let's press Shift a, go over to colorRamp, will place it right there. Now this black handle
controls the amount. If we drag this lower, it's going to clamp down
on those foam values. And that's going to look a lot
better because you can see here with it all
the way down to 0, there's quite a bit of foam. It's like there's
too much in here. If we drag this lower, it's going to clamp
down on those values. Then of course, if
you wanted it to be brighter or not as right, you can change the
value in the multiply. You can see here if I drag
that up or drag it lower, it's going to decrease the amount of foam
just alike that. As for the shader, we're going to set
the roughness down to 0 and the transmission value, we're gonna go up to 0.3. So there's a little
bit of transmission. And also the other
thing I forgot to do in the principled
shader right here, the IOR, which stands
for index of refraction, which we talked about
earlier in the course. We're going to set that to 1.333 to match the IOR of water. There we go. That
looks pretty good. You can then change the base
color if you wanted to, if you wanted a bit
more blue or a bit brighter or something like
that will look pretty nice. The cool thing about using this method for the
foam is now we can change the base
color to whatever we want and that's going
to affect the phone. For example, if I
wanted blue foam, I can drag that up or red foam, green foam, all that. It's very customizable
right here. We're just going to leave
it at White though, because white is
what foam looks like and I think that is
looking pretty nice. There we go. We've now created the material for our ocean. We can go ahead and close
this off by dragging this across and closing
off that window. Now if we zoom in on the
ocean and you're gonna notice we don't have a lot of
detail in our ocean. And that's because
the resolution in the modifier is
currently too low. We're going to set
both of these values, the render and the
viewport up to 32. Once we do this, it
might take a second, but now we have
much more detail in our ocean and that is looking
at much, much better. For the final render
though I'm actually going to set the render amount to 40, but I'm gonna leave the
viewport at 32 just so we can work in our
scene a bit faster, but we have a higher
resolution when we were actually render
out the animation. What we're gonna do now
is placed the camera. I'm going to position my
viewport right about here. Then I'm gonna hit
control and then Alt or Command and Option on
a Mac and then numpad 0, Control Alt numpad 0. That's going to place the camera to wherever we are looking. From here, we can select
it in the outliner, press G and then
middle mouse button, and drag it backwards till
we get the full view. But you might notice
that this happens. And the reason this is happening
is because the clipping is currently at 100 and
the camera settings. So anything past 100 meters
is going to get clipped off. Let's set this up
to one thousandths. We can get the entire scene in our camera. And there we go. Now the ocean is back. From here. Just position the
camera how you want. I might actually drag
it down a little bit. You can double-tap are
and move it upwards. Something like that is
going to look pretty nice. Let's go to the Render Settings. I'm also going to turn on
screen space reflections, so we get some nice
reflections in the ocean. And then underneath the color management tab and
the Render Settings, Let's set the look over
to medium high contrast. That's going to just give us more contrast in our
scene. And there we go. That looks pretty good. If you think the world
settings are a bit too dark, you can go over to
the world settings, maybe bring up the
brightness of the world, something like that
might look pretty nice. 1.2, I think is looking good. Let's go ahead and render
this out into an image. I'm gonna press F12 to
render out an image. And since we are using EV, it's gonna render very
quickly. And there we go. It's already done
in three seconds. Now this material
also works in cycles. If we go over to
the render settings and switch it over to cycles, it'll automatically work
as you can see there, we can use the GPU
and cycles and EV both work exactly the same and the ocean is going
to look really nice. But since I want to
render this an eBay, let's go back over to
the AV render engine. Now finally, before
this tutorial ends, I wanted to show you
how you can add in the blue background as you saw at the beginning
of this tutorial. What we're gonna
do is jump over to the compositing workspace
and then click on Use notes. I'm going to press N and then I'm going to drag this down. So we have a bit more room. The compositing workspace
takes to render and then you can add some
post-processing effects to it. In this case, we're
gonna be adding in a background to actually
see what we're doing. We're going to press
Control Shift and then left-click on
the render layers. This is going to add
in a viewer node so we can actually
see what we're doing. What we want to do. I'm
going to press V a couple of times to actually zoom out so
we can see the full thing. I'm going to press Shift a, go over to color and then
add in an Alpha over node. We're going to place
that right there. If we take the image and plug
it into the bottom input of the Alpha over now the top input is going to
control the background. In this case, I want it to be a blue color and then
a very dark blue, something like that
will look pretty nice. There we go. We now have a background
and then we can take that image and plug it
into the composite. Now when we render
the animation, every single frame is going
to have that blue background. To actually render out
an animation in Blender. What we need to do is go
over to the Output Settings. We're going to click on
the Output folder right here and navigate to where we want our animation to
save to the file format. We're going to switch it
over to a movie file. Now normally if you
render out in animation, you should probably render it as an image sequence and then
sequence it out later. But in this case, since
we're rendering an EV, it's gonna go very quickly. So I don't really see
a need to render it as PNGs and then sequence it out later is just going
to go quickly. So we're going to render
it as a MP4 file. As for the container, we're going to switch
it over to MPEG-4. And then the output quality, we're gonna go with
high-quality. There we go. At this point, we can
save our project, then go over to render and then click on Render Animation. But there we go. We've
now created an ocean in Blender using
the ocean modifier. Thank you for watching and if
you created your own ocean, I would love to see it
so you can post it in the assignment after this
video or in the discussions.
27. Fluid Particle Animation P1 Modeling: Hello everyone. In this section we're
gonna be creating the animation that you
see on screen right now, I'll be showing you how to model this course and add
in the particles, create the fluid simulation
and render it out in cycles. Let's go ahead and get started. The first thing that
we're gonna do in this video is create
the obstacle course. This is just gonna
be a couple of different planes and sum
cubes laid out in a scene. So first off, let's figure
out the dimensions that we want for our domain object. Let's go into front view by pressing one on the number pad, and then I'm going to press S, then x and scale this cube. It's pretty long,
something like that. Then we're going to press
S and Z and scale it up. So it's pretty tall as well. Somewhere around
there is pretty good. At this point, we can go
back into front view. I'm going to press Z
and go into wire-frame. And then let's add in
the rest of the objects. Let's add in some stairs on the left side going
down at an angle. And a very easy way to create stairs is if we
add in a new cube, we're going to go
into edit mode and delete the bottom
half right here. So I'm going to box
select that bottom half, press X and delete it. So now we have this right angle. Then I'm going to select
that top corner and press Control or Command
B on your keyboard. And then we can just left-click. If we open up at this
bevel panel down here, we can now set the bevel amount. If we drag this value up, you can see it's going to bring that bevel all the way down. And then if we open up the profile types down here
underneath the custom, we can actually set a
preset for the bevel. Then we can see right here
we have an option for steps. If we check this box first, we need to add in a couple of more segments so there's
more vertices in the bubble. So if we drag this up, you're gonna see that we
now have stairs and very, very easily, just like that, I'm going to go
with a value of 16, so we don't have that
one in the middle. And there it is. We'll look at that. We now have stairs. We can go ahead and
exit out of edit mode. And then I'm going to press S, then x and scale it up this way so it's a
little bit longer. Then we'll go into front view once again and then place it in the top-left
somewhere around here. I don't think I want
this part of the mesh. I'm going to go into
edit mode box selected that part on the bottom and you can press X and delete it. So we just have this flat
surface right at the top there. Next up, let's add in
the other objects. I want another plane
to be right here. Going across this way, we'll add in a plane object, will place it there, rotate it a little bit, and then you can
press S, then x. And you can scale it on the X. And if you press
X one more time, it's going to scale
it along this way. We're going to drag that
up somewhere around there. You can press X twice
again, scale it out. Something like that
would look pretty nice. Then finally, the other
object that we will add is a object down here That's
going to be rounded out. What I'll do is I'll just
press shift D on this plane. We're going to rotate it, place it right about there, then go into edit mode. And let's add in a loop cut
in the middle of this plane. I'm going to press
Control or Command R, add another loop cut,
and then right-click. Let's go back into
front view and drag this down so
it's at an angle. Then we're going to bevel
this edge once again. So it's a lot smoother. So press Control B,
drag it outwards. Then you can left-click
right about there. Right now you can
see we're still using that stair preset, which is not what we want. So we're going to
switch it back over to the super ellipse custom
profile right there. There we go. Now we have
a nice smooth transition. We could then drive the width
up so it's a bit smoother. Somewhere around there
is going to look nice. And finally, the last
object that we will add is a cylinder and we're going
to place it right over here. I'm going to scale
it down, rotate it, scale it along the z, scale it down a bit and just
place it right about there, I think will look pretty nice. So this is just going to be another object for the
fluid to collide width. Now let's give all of these
plain objects some thickness. I'm going to select
the one up top here. We're going to go
to the Modifier Tab and add an a solidify modifier. So click Add Modifier and
then choose solidify. We're going to zoom in
here and then we're going to turn on
even a thickness, so everything is
even throughout. And then we'll just drag
this up a little bit so we get some
thickness in our plane. Let's go ahead and add
in a Bevel modifier as well to smooth out the corners
so they're not as sharp. So click Add Modifier
and choose Bevel. The other thing
that you need to do whenever you apply a solidify or a bevel modifier is you
need to apply the scale. If we press N and we
look at the scale, you can see the X is
at a weird number. So this means it's actually
going to be scaling out the bevel according
to this number. What we need to do
is press Control or Command a and then
click on Scale. And that's going to apply
the solidify modifier and the bevel modifier evenly
throughout the object. Now you can see the scale
numbers are back down to one. For the amount in the bevel, we're going to drag this
down so it's not as much. Then we're gonna
turn up the segments up a little bit,
something like that. It's going to look good. Let's apply these
exact modifiers to the rest of the objects. I'm going to select
it the plane down here and then the round plane. And then finally we'll
select these stairs. Last, you can press Control L and then click
on modifiers right here. Copy modifiers. Make sure you press
Control a and apply the scale to all of
these objects as well. There we go. We now have some thickness
in the rest of our objects. Finally, before this video ends, let's add in a border
around our domain object. To do this, let's add in a new cube and then I'm
going to go into edit mode. I want to leave the origin
point at the center right here because we're going to mirror the object on the right side. So to do this, go into
edit mode and then move it along the x by
pressing G and then x. And you can see the
origin is still there. If you move it in object mode is actually going to move
the origin point. So make sure you move
it in edit mode. Next, we're gonna go over to the Add Modifier and
then click on a mirror. And you can see it mirrored
it along the right side, which is what we want. We're going to scale
this down along the x, scale it up along the
z, something like that. We'll select that bottom half
at the bottom e to extrude. And then we'll box selected
at the bottom right there to select that face and then
extrude it out this way. Let's turn on clipping
in the modifier and this will make sure that we actually
clip inside the mirror, which is good just like that. And then we can
press X and delete that face just like that. There we go. We now have a border
for our domain object. And in the next
video we're actually going to be setting
up the simulation.
28. Fluid Particle Animation P2 Simulating: Now that we have
our scene setup, let's create the simulation. First. We need a flow objects, so let's add in a new cube, will scale it down
a little bit and place it in the top left corner. I'm going to press S
and then z and scale it down so it's a little bit
thinner and just like that. And then place it
right about here. Make sure it's not
super close to the domain or it's not
going to work properly. So just probably around
there is going to be good. Next up, let's select the
domain object and we'll create the simulation
over in the physics tab. We're going to
select fluid and set the type over to domain. The domain type we're
going to choose a liquid and then further
resolution divisions. Let's go all the way up to 96. The other thing that we're
going to want to change is the timesteps and maximum
and minimum values. Currently there at 41. And with these values, some of the particles
are actually going to pass through the
collision object, which is not going
to look the best. So to counteract this, to help prevent any particles from exiting the collisions, we're going to set
the maximum up to six and the minimum all the
way up to a value of three. That's going to
look a lot better. Next up, let's come down
here to the liquid settings. With this simulation, I've noticed that the particles tend to gain a lot of volume
when simulating. So to help prevent that, Let's set the particle
radius down to a value of 0.7 and Enter. Next up, we're going to set the narrow bandwidth
all the way up to ten. And this is going to fill out the entire simulation
full of particles. You'll notice with
it set to three, there's gonna be a
thin layer on top. But if you turn this value up, there's gonna be
more particles and it's going to fill
out the entire fluid. With that down, we're
going to go ahead and select that
the flow objects. We're going to choose fluid and set the type over to flow. As for the flow type, we're going to select a liquid. And then for the flow
behavior, let's choose inflow. The other thing that
we're going to do is animate when they
use flow turns off. I want it to simulate
over 50 frames. And then on frame 50,
I want the use flow to turn off Frame affording nine, we're going to check
little button on the side to add in a
keyframe to the US flow. We're going to skip to the
next frame at frame 50, turn this off and then
add an another keyframe. And just like that, let's also turn on
initial velocity and set the z direction
so the fluid will shoot downwards a
little bit faster. Let's go with a
negative 0.5 and Enter. Next, let's add in collision
to the rest of the objects. We're going to select the
object with the stairs. We're going to select fluid, set the type over to factor, and then make sure
is playing R is checked because this
is a plane object. We're also going to jump over to the Modifier Tab and makes sure the fluid modifier is at the very top of the
modifier stack. This way it doesn't take into account the solidify
or the bevel, but just the plane. Let's do that same thing for
the rest of the objects. I'm going to select the plane, go over to the Physics tab, select to fluid, and
then select effector, and then make sure is
planner is checked. Then over in the Modifier tab, we're going to drag it all
the way up to the very top. As for the cylinder, we don't need to
add the is planar, but we do need to
add in the effector. As for the curve, we're
going to select it, choose fluid and then of course effector and then
make sure is planar. Then over in the Modifier tab, we're going to drag it all
the way up to the very top. There we go. That's basically
all we really need to do with the domain selected. We're just going to
double-check that everything else looks good, which I think it does. So over in the cache settings, we're going to set the
type over two modular. Turn on is resumable just in case we want
to stop the bake. With that done, we're ready. I'm going to save our
project and then I'm going to click on a vague data.
29. Fluid Particle Animation P3 Materials: The simulation has finished baking and here is our results. I'm gonna go ahead and restart the simulation and play it. And we can see here it is. As you can see, that
does look pretty nice. One thing that we have an
issue with is there is a very large gap between the fluid and the
collision objects. Now one way to fix that
is to actually invert the solidify modifier because currently it's going downwards, but we can actually make it so the solidify is moving upwards. To do that, select your object, go over to the Modifier tab, open up the solidify
modifier and there is an offset which is
currently at negative one. If we drive that all the
way up to positive one, it's actually going in
this direction now. Now if we play it, you
can see it's much closer. If you want to, you
can drag this up even further to get even
closer to the fluid. Somewhere around there is
probably going to look nice. Let's do that for the rest of the objects will
select the plane, open up the solidify, set the offset all
the way up to one, and then drag it up just a tiny bit so it's a bit
closer to the fluid. We're going to select
this object as well. We'll player stimulation
right about there. Looks good. Open up these, solidify, drag it up to one, and move it up
just a little bit, and there we go, That
looks much better. The next step in this
tutorial is we need an object to be the particle. To do this, we're going
to add in an ecosphere, select the ecosphere
and then open up the menu down
here at the bottom, and then set these
subdivisions down to one with it's at T2. There's gonna be a lot
of geometry when we represent this object
as each particle. So to help them
memory of the scene, we're gonna set
this down to one. You can drag it over to
the left so it's out of the way and then select
the domain objects. Jumping over to the
particle system tab, we can see we have a
liquid particle system. Go ahead and select that, and then open up the render
and the viewport display. The Render. We're going to
render it as an object. And then for the
incident objects, we're going to select
the ecosphere. If we play our simulation, we can see exactly
what this looks like. And as you can see, that is
actually looking pretty cool, but currently the
particles are way too big. So let us play or
stimulation until we find a nice frame somewhere
around there. And then let's scale down at the particles to what we want. Probably a value of 0.02, I think would look pretty good. Something like that. You can play around with
it and set the exact size. I might go a little
bit smaller than that. Let's go 0.015. There we go. I'm liking how that looks. The other thing that
you're going to want to turn off is the show emitter. With this turned on, you're going to
render a solid cube. So make sure this is turned off. So it actually renders the
particles that are inside, but not the cube itself. Same thing goes
for the viewport. Let's turn it off in the
viewport so we can actually see the particles in solid view, because if this is turned
on, we can't see it. You can see it's the solid cube, but if we turn it off, we
can now see the particles. Next up, let's add in a
background I'm going to add in a plane object will
rotate this 90 degrees, place it in the back of
the scene just like this, and scale it up pretty big. I'm gonna move it right here, so it's right next to the
fluid, just like that. Now let's create the
material for the particles. We're going to go over to
the render tab and switch the render engine from
EV over two cycles because we're gonna be
using a node that is only supported in the
Cycles Render Engine. And then for the device, we're going to choose the GPU. To open up the node editor. We're gonna come up here to the top-right click and drag to split this view and then switch it over to the shader editor. I'm going to press
N to close off that panel and then
select it the ecosphere. Whenever you apply a material
to particle systems, you need to make
sure you apply it to the original particle mesh. In this case, it's
the ecosphere. With it selected,
we're going to click New to create a new material. Let's go into front view,
zoom in a little bit, and then press Z and
go into rendered view. We can see here is
what it looks like. There's not that much
lighting in the scene. So let's go ahead
and select the light and then actually move
it towards the front. Just like this. Then for the world settings, we're gonna go
over to the world. Drag this up so
it's a little bit brighter so we can see
everything that's going on. Then let's select the
ecosphere once again. For this material,
we're gonna be using a node called the
particle info node. If we press Shift a
and go over to input, there is a particle
info node right here. Go ahead and select that. With this node, we
can either take the random output and
this is gonna give a random value to each particle. So you could set it
into a color ramp. Every particle will
have a random color. You can also change
the Age of it, the lifetime, all of that. But the one that we're gonna
be using is the velocity. If we control shift. If we take the
velocity and plug that into the base color of
the principled shader. It's going to look like this. Now what this is doing is
it's taking the velocity of each particle and
giving it a certain value, and then that's gonna
be the color of it. The red particles means
that it's moving very quickly in the black particles, the blue and black particles, that means it's
moving very slowly. We can actually change this
by adding in a new node. We're going to add in
a hue saturation node. We'll place it right here. If we take the value, Let's bring that up to 15, so it's a lot brighter. Now we get a very colorful
looking particle system. If we then play it, we can
see what it looks like. Let's go ahead and skip
to a different frame. And you can see this is
actually looking pretty cool. If we want it to use one single color and just
a shade of that color, what we need to do is
add in a new node, we're going to add
in a color mix RGB. We'll place it right here. And it's currently
lagging quite a bit. So I'm going to skip to a
frame where there's not that many particles. Frame 40. There you go. You can see
actually there it is. The lender has now updated. What we're gonna do is
switch the mode from mix over to color down here. And then for the color, we're going to select
any color that we want. In this case, if we
switch it over to blue and set the factor
all the way up to one. Every single particle is going
to be that shade of blue. If we then skip to
a different frame, we can see that is the
effect that we get. You can change it to whatever
color that you want. You can also add
in a color ramp. If you wanted to add in multiple colors to your particle
system, you can do that. For now though, I
think I might stick with a nice orange color. I might drag this over to like a reddish orange
somewhere around here. For the principled shader, I'm going to bring the
roughness down just a little bit so the particles
are a bit more glossy. Let's go with a value of 0.1. Then for the rest
of the materials, we're going to select the plane. We're going to give
it a new material. Let's also restart
the simulation so it renders very quickly. The base color. We're
gonna go with a nice dark gray somewhere
around there. And then for the obstacles
and the rest of the objects, we will select the border, give it a new material. This one is gonna be a blue. I'll set the roughness
lower and then maybe darken it just a little
bit, something like that. Now if I want to
apply this exact blue to the rest of the objects, what we need to do is first
select each one of them. I'm going to select the curve, the plane of the
cylinder, the stairs, and then holding
Shift, I'm going to select it the border once again, this is the object
with the blue color. We're going to press
Control L or Command L on a Mac and then click
on a link materials. Now every object that we
have selected is going to have that exact color
that we set up here. If we press the Z, go back into rendered view, there it is. Now they all have
the same color. I'm going to select the cube up here and then I'm going
to turn it off in the viewport and
in the render by clicking the buttons in the
top right and the outliner, because I don't
want it that object who show up in the render. So we're going to turn it off. Then finally, what we're gonna
do is set up the camera. I'm going to go into
front view once again, press Control Alt numpad 0 to
snap the cameras to place. You can also go up to View, down to Align View and then click on Align active
camera to view. That's gonna do the
exact same thing. Then you can select the camera, move it backwards and
position it how you want. As for the Render Settings, we're going to jump over
to the render panel, scroll down to the
color management tab and set the look
too high contrast. This is gonna give us more
contrast in the scene. And as you can see, that
looks a lot better. Then for the render sampling, it's currently at 4,096, which is way too much. So let's bring this
down to a value of 25. I'm going to press
Control S to save my project and then head
over to the output tab. We're going to be rendering
this as an image sequence. And then I'm going
to show you how to sequence it out later. And the reason we
are rendering it as an image sequence rather
than an MP4 file, is because we can
stop the render at any point and then resume it
right at that exact frame. If you render it as an MP4 file, you can't stop the render
a halfway through. You have to let the entire thing finished to get
the final result. But if you render it as a
PNG, you can stop at N. Resume it. If overwrite is unchecked. If overwrite is unchecked, it's going to resume at the
frame that it left off of. If overwrites checked,
it's going to restart and overwrite every
image in that folder. Make sure if you do
stop the render, you uncheck overwrite
so it doesn't restart over on the right side. Make sure you click
on this button to set an output to where you
want your frames to go to. I'm just going to put
it in this folder and then click accept. With that done, we're
ready to render. So make sure you save
your project once again, you can change the
rest of the settings. You can change the color, mess around with the lighting,
do whatever you want. It's all up to you. Once you are happy
with your scene, you can go over to render and then click on
Render Animation. This will open up a new window and it will start to render out. In the next video, I'm
gonna show you how you can sequence it out
into a movie file.
30. Fluid Particle Animation P4 Seuqencing: Alright, the render has finished
and here is our result. As you can see, it
does look pretty good. If you want to view
the entire animation, what you can do is exit
out of this window, go over to render and then
click on view animation. This will bring up a new window and it might
be a little bit laggy right now because it's calculating all the
different frames. But once it's done calculating
it will play smoothly. So you can see here
once it reaches the end and now it's
going to play smoothly. And as you can see, the
material does look pretty nice. It's changing colors as the
particles are moving around. The higher, the faster moving particles have
a parameter color, the slower moving particles
have a darker color. And it looks really nice. Now what we're gonna
do is sequence all of those frames into a MP4 file. You can see here if we
open up that folder, all the images are
located right here. We're going to take
all of those images and sequence them out. To do this, head over to
the top corner right here, click on that plus sign, click on video editing and select the video
editing workspace. On frame one, we're going
to click Add and go over to image sequence and then
navigate to those images. Mine are right here. And then we're going
to make sure a frame one is at the very top. If for some reason
it's on modified date, you can see 250 is at the top, is going to play backwards. So make sure you come
up here and sort by name rather than modified date. Then you can press a to select everything and go
Add Image strip. There we go. We can
see it in our scene. And now what we're
gonna do is we're gonna come over here
to the output tab. We're gonna change the
file format over to mpeg. And then underneath
the encoding, switch it over to mp4. And then for the output quality, let's go with a high-quality. The other thing that you
might notice is there is a lot of contrasts
in our scene. The reason that's
happening is because the color management over here
is set too high contrast. And we already applied the
high contrast to the images. It's applying the high
contrast again over top. If you don't want it
to look like this, just set the look over to none. But I think it does
look pretty nice, but I think it's a bit too much. I'm going to set it over
to medium high contrast. With that done, we're
ready to render it out. I'm gonna save my
project once again, then go over to render, and then click on
Render Animation. That's going to take
all of those images and sequence them together.
But there you go. That is how you create a
particle fluid animation in Blender using mantle float. Thank you for making
it all the way to the end of this section. And if you create
something cool, makes sure to post
it in the assignment or in the project
and discussions.
31. Fluid Cube Simulation P1 Rigid Bodies: Hello everyone and
welcome to a new section. In this section we're
going to be creating the animation that
you see on screen. We're gonna be covering a lot of different topics including
rigid body simulations, fluid simulations, effectors, and a bunch of other things. So let's go ahead
and get started. The first thing that we're
gonna do in this video is create the rigid
body simulation. To do this, we're going to
be animating this cube, falling down on a
couple of platforms and then landing on the ground. What I'll do is I'll go
into front view and they'll place the cube over in the
top-left, somewhere over here. Then I'm going to press
shift D on this cube, drag it below, and this is going to be the first platform. I'm going to scale
it along the z-axis, so it's a little bit smaller,
Something like that. Then I'll press shift D,
I'll drag it over here. And then one more
time we'll drag it over right about there. And then I'll just
drive them all up so they're a little
bit above the ground. Next up we're going to
select this cube and we're going to place it about
halfway across here. So when it falls down, it hits the side and then rolls across the different platforms and then lands on the bottom. We also need a plain
objects I'm going to add in a plane and then
I'll just scale it up so it fits the
different platforms. There we go. So now let's go ahead and set up the rigid body simulation. I'm going to select my cube
up here and go over to the Physics tab and then
click on rigid body. We're going to leave
the type on active, but now we need to
add the rigid body to the rest of the objects. We will select
this object first. We will go with rigid body, and this time we're
gonna change the type from active to passive. Passive means that it's going
to stay in its exact spot, but it's still going to
interact with the scene. Now an easy way to copy that exact rigid
body to the rest of the objects is if we
select the plane, selected the bottom platform, the middle platform, and
then select it this one. Last, we're gonna go
over to object down to rigid body and then
click on copy from active. This means it's
going to copy all of the settings with
our active object. Currently it's at passive. So now every single one of these will have
that passive type. There we go. So now let's go ahead and play the simulation to see
what it looks like. We can see here the cube lands, it goes like that
and then falls. And I think that
looks pretty nice. There we go. You can play around with the
position of the platforms. If you want them to be a
little bit more vertical, you can move them like that. And so now what happens is
it will look like this, which could look pretty cool. What I might do though is
it might just go a little bit that right about here. And so it's a little bit more vertical and the
cube will actually fall down a bit faster and
roll a couple of more times. Let's check this out. And that looks pretty nice. With that done, we're ready
to bake in our simulation. What we're gonna
do is go over to the scene panel and open
the Rigid Body Worlds. How this is gonna work
is we're going to bake in the rigid body and then convert all of those
baked files into keyframes. Because the rigid body does not work with the
fluid simulation, we actually need to
apply keyframes to this. So what I'll do is I'll go
back over to the scene panel. We're going to bake in. Let's see, let's see how
long our animation is. Then it stops right about there. Let's bake in a 100 frames
over any cash panel. We're going to set
the end frame to 100. Then we're just going
to click on bake, and it should bake very quickly. At this point, we need to
convert this over to keyframes. To do this, go over to object
with the cube selected, go down to rigid body
and then click on it, bake two key frames. We're going to set
the end frame to 100. Then we're gonna click on OK. You can see here is all of
the different keyframes. And if we play our
simulation now, it looks like that. Not too bad. We can go ahead and get rid of the rigid body
for the other objects. We don't need them anymore,
so I'm just going to delete it off of all of
these platforms. And then we'll delete it off
of the plane just like that. And there we go. We've now set up the rigid body. And in the next
video we're going to create the fluid simulation.
32. Fluid Cube Simulation P2 Simulating: Now that we have a rigid
body simulation set up, let's work on the
fluid simulation. The first thing that we need
to add is the domain object. I'm going to press Shift
a and add in a new cube. We're going to scale this
cube up, drag it up, and then press S and Z to scale it up so it's
the correct height. And we want to make sure
that this cube is inside the domain object at all
points in the animation. We're going to scale
it along the x-axis so it's the correct width
as you can see there. Then we're going to jump
over to frame 115 or so. And we can see there
is a big gap here. We don't need to
make it this big, so I'm going to scale it
down and drag it over. We'll restart the animation,
drag it over this way. Then I'll press S and Z, this scale it up just a
tiny bit, just like that. We're going to skip to the end
and make sure it's inside, as you can see, it's currently
outside of the domain. So I'm going to scale it along the y and drag it
over just slightly. You can scroll through
the animation and make sure it works correctly,
which it does. Perfect. Now let's add in the domain. Over in the physics panel
we're going to select fluid and set the
type or R2 Domain. We're going to change
the domain type over to a liquid simulation, and then we'll leave the rest of the settings as default for now. Next up, let's add
in the flow object. To do this, select your cube. We're going to press Shift S
and go cursor to select it. And then let's add
in a new cube. Let's scale this cube
down a little bit. Press S and Z. And then we're going
to scale this to be about half the size of
the collision object. So right about there
is probably good. Over in the physics panel, we're going to
select fluid and set the type or R2 flow where the flow type we're going
to choose liquid and then the flow behavior we're
going to select inflow. Now for the collision object, go ahead and select it, then go over to the Physics tab, select fluid and set the
type over to effector. Now if we try to simulate this
with the default settings, if we try to simulate it, I'll just refresh the setting. You can see there is no
fluid that is showing up. The reason for this is
because flow objects inside collision objects don't really work that great
using mantle flow, there is a couple of
things that we need to set up in order to get
this to work properly. One of the main
reasons why this is not simulating is
because blender is treating this object as
a completely solid cube. If we go into edit mode and
it's come over here and enable the normals by clicking
this button down here. And I'll just drag up the size a little bit so you can see it. You can see the normals are pointed in the
outward direction. This means that
blender is thinking this is completely solid. In order to get the fluid
to actually simulate, we need to invert the normals. So blender thinks this is an empty object rather
than a solid cube. To do this, press Shift N. And then over here in this menu, make sure you turn
on the inside. And now the normals
are pointing to the inside of the object
rather than the outside. There we go. The other thing that we
need to do is create a whole is somewhere
in this cube. If we refresh the setting
and play the animation, you can see the
fluid is simulating, but it's not colliding
with the collision. And also it looks like this is set to a inflow, which it is. So let's bring that
over to geometry. We don't want to use
the info setting to get this to actually
stay inside the cube. What we need to do is
turn on is planar. If we do this though,
you're gonna notice that it doesn't simulate all the
fluid has disappeared. What we need to do now
is actually create a hole somewhere
inside this cube. What we're gonna do is
go into edit mode and we're gonna select
the top face here. So go into the face select mode, select the top face. We're going to press I2 and set. Then I'm going to press
X and delete that face. Then what I'll do
is I'll go into the vertices select mode, select that loop right there by holding Alt
and selecting it. And we'll just press G, Shift Z and you can move it across. The phase will just drag it over here so it's in the top corner. You need to make sure
the hole over here is bigger than the resolution
of your domain. You can see the cube
here is pretty large. The resolution that we're
gonna be using is actually a 160 over in the
resolution divisions. Let's go up to 160. And once we do this, you can see the fluid is actually
now simulating. And then the cube is that small. So we can actually
bring the size of this hole down
just a little bit. Somewhere around there
is probably good. Let's make sure this is working properly by
refreshing a setting. And you can see the fluid is
still there, which is good. It's the fluid has disappeared
and make sure you have a bigger hole in your
collision object. Finally, the last
thing that we're going to add is an outflow to catch any fluid that exits outside of this
collision object. I'm going to press Shift
a and an a new cube. We're going to scale this
cube upwards just like this. So it's a little bit bigger
than over in the physics tab. We're going to select fluid and set the type over to flow. And then for the flow type
we're going to choose liquid. And then for the flow behavior, we're going to select outflow. Again, we need to
invert the normals because right now this is
a completely solid cube. So it's going to delete all of the fluid
that's inside it, go into edit mode and press Shift N and then select inside. So the normals are
actually pointed to the inside and it doesn't
delete the fluid that's inside, but only anything that
touches it on the outside. The other thing that
you need to turn on is the planar makes sure that is enabled and then set the surface emission
up to a value of 0.1. Let's bring up the
sample stuff steps up to a value of three. And then also to
get this outflow to actually follow the
collision object, make sure it's selected. Then you can hold Shift
and select the collision. We're going to
press Control P and parents at to the
collision object. Now you can see the outflow is actually following
the rest of the cube. And there we go. We've now created
the simulation. And if you've done
everything correctly, it should simulate properly. Over in the time-steps maximum, we're going to bring
that up to a value of five and the minimum
up to a value of two. This will make sure
that no fluid exits outside of the collision. And if it does, the
outflow will delete it. Over in the rest
of the settings. We're going to bring the flip
ratio up to a value of one. This is going to
create bigger splashes over any fractional obstacles. We're going to enable it and set the obstacle distance
down to 0.1. This will make sure
the fluid is very close to the collision object. Next up we're going to
enable foam over here. So this will create some
foam particles on the top. And then we're also
going to enable mesh and set the
particle radius down to a value of 1.3 and enter
for the end frame, I'm going to set this
lower to a value of 180. I think that is all the settings
that we need to change. Let's go back down over to the
cash at setting and switch the type over two modular and
then turn on is resumable. We're gonna bake the particles first just to make sure
everything is working properly and the particles
don't exit outside of the collision object
or anything messes up. What that done, save your
project and then click on it. Fake data. I would probably stop
it at about frame 50 just to make sure it
is working properly, then you can resume it. My stimulation has finished baking and here is the result. If we play it, you can
see all of the fluid stays inside the collision
object at all times. If it exits out, it gets
deleted from the outflow. I really like how that looks. So I'm gonna go
ahead and bacon at the particles and the mesh. So go ahead and select
your domain object, scroll down to the particle
tab and then click on bake. Once this is finished bacon, we'll begin at the mesh.
33. Fluid Cube Simulation P3 Materials: The simulation has finished baking and here is our results. I'm gonna go ahead and play the simulation and you can
see what it looks like. As you can see, the fluid
stays inside the cube as it's simulating and
it looks pretty cool. Now in this video, we
are going to set up the particle system and create the lighting materials and
then render it out using EV. To get started, let's
do the particle system. I'm going to press Shift a
and add in an IPO sphere. This is going to
represent the particle. Make sure you open up this
tab right here and set the subdivisions down
to a value of one, just so we don't have a lot
of geometry in the scene. Let's move it over
to the left side, scale it down a little bit, and then we can
select our domain. We're going to jump over to
the particle system tab, which is right here. And then we're going to
turn off the liquid one. We're not going to need that and turn off it in the
render as well. Let's open up both
of these tabs. And then over in
the render panel, we're going to select Render as halo to render as objects. And then for the
Incident Object, Let's select the ecosphere. Let's find a frame where we can actually see all
of the particles. Let's skip to frame 50 or so. And then we'll zoom in here. It might be a little
bit hard to see, but you can notice that the
particles are very large. Let's scale them
down a little bit by changing the scale value. Let's go with a value of 0.01 and we'll see
what that looks like. There we go. I think that looks a lot better right now are seen as
ligand quite a bit. So what I'll do is I'll
just turn it off in the viewport so it doesn't
show up in the view. And we can actually move
around the scene a lot better over in the outliner. Let's go ahead and hide it, both the outflow and
the collision object. Select it and then click on the little eye right there
to hide it from the view. And let's hide it from
the render as well. If we select our outflow, you'll notice that
it's not showing up in the outliner over here. And that's because it's actually
a parented to this cube. We need to open up this cube and then we can see
it located there. So make sure you hide that from the viewport and from
the render as well. So we don't see that, but we
just see the fluid itself. And as for the flow object, Let's go ahead and select
it and then hide that as well from the view
and from the render. If we take a look at our fluid, you're going to notice that it doesn't really look that smooth. You can see there's a lot
of jaggedness in our fluid. What we can do to make
that look a little bit better is add in a
smooth modifier. Jumping over to
the Modifier tab, Let's click Add Modifier and select these smooth modifier. On the right side we
have a factor and mount, and this controls
the strength of it. Let's set this, let's set
this up to a value of two. Then as for the
repeat option here, it will just repeat that factor. Let's go up to a value
of three for this. There you go. You can see that looks
a lot more smooth. We can also right-click and
shade it smooth as well. Now if we skip to
frame like 70 or so, we can see that looks
a little bit better. This is with it turned on and then this is with it turned off. You can see there's
a lot of jaggedness, but if we enable it,
it smooths it out. There we go. That
looks pretty nice. Now let's create the
material for our fluid. Jumping over to
the Material tab, we're going to click on Add
New to create a new material. Then we're going to
scroll down here to the transmission value and turn that all the way up
to a value of one. This is gonna make our
fluid looked like water. If we press Z and go
into rendered view, we can see what it looks like. It might be a bit hard to see. So let's add in an HDR over
in the world settings. Let's click on the color and
select environment texture. Let's use the same HDR that we use for the
ocean tutorial, which is **** road forks. Go ahead and select
it and open image. That's the one off
of HDRI haven. We can set the strength of
this to a value of two. There we go, we now
have some lighting. Let's go ahead and
select our fluid once again and go back over
to the Material tab. I'm going to set the
roughness of this down to 0. And then the IOR, I'm
going to set that to 1.333 to match the IOR of water. As for the color, Let's bring it down
a little bit and just give it a
slightly blue color. And then it over here
in the settings, we need to make sure
we use Alpha blend. Then also make sure that the screen space
refraction is turned on. Now jumping over to the
render settings in EV, we're going to enable
screen space reflections and then make sure
refraction is turned on. And now we should be able
to see through the object. There we go. That looks a lot better. As for the other materials. Let's select the cube right
here and we'll go over here and then we'll just change the
base color over to a blue, and then we'll darken it to
be a nice grayish blue color. I'll set the roughness
down to a value of 0.1 so we get some
nice reflections. The other thing I'm
going to add to this platform is I'm going
to bevel out the edges, jumping over to the
modifier tablets, add in a Bevel modifier. Make sure you press Control
a and apply the scale to it as well so the
bevel works correctly. And then we'll set the
amount down here much lower, somewhere around 0.02. And then we'll bring up
the segments up to three. Select the object down here and then select
the middle platform. And then finally the
one with the bevel last and let's link
them together. We'll press Control L and
click on Copy modifiers. And then make sure
you apply the scale as well to both
of these objects. And that will look pretty nice. There we go. As for the particle material, Let's go ahead and
select the particle. Let's also right-click
and shade it smooth. Over in the material tab. We'll give it a new material, and then we'll just leave
it at the white color. I think that will look the best. I'm going to position my
camera right about here. And when you find the
view that you want, you can press Control
Alt and numpad 0, and that'll snap
the camera to view. Or you can go over
to view down to a live view and then select
a line camera to view. And that'll do the
exact same thing. Select your camera.
You can press G middle mouse button
to zoom outwards. Place it somewhere around here. And then you can
play your animation to see what it looks like. If you want to, you can
also animate the camera. So if you wanted to
place the camera right about here on frame one, you can hit I and go location rotation and
then skip to frame a 180. That's when the simulation ends. You can drag the camera
down and then zooming in on this object right
about there and then hit I and add in another
location keyframe. Then what you can do is
just skip through here. You might notice that
the camera doesn't follow it to that spot. So what I usually do here is I'll just move the camera down. I add an another
location keyframe. And there we go. That looks a bit better. I also don't want to see
the background here. So one thing that you can do
to prevent the background from showing up is with
this plane object, you can go into edit mode and select those two
back of vertices. If you extrude them upwards, that'll hide the background. You can also select
this edge again and you can bevel it
so it smooths it out. This will give a nice gradual
look to the background. What I'll do is I'll press Control or Command V automatic. Scroll out a little
bit and then use the scroll wheel to
add in more geometry. Once you're happy
with it, you can left-click and then
go out of that mode. And if we look in
the camera view, we now have a nice transition in the background as
you can see there. That is a trick that I use quite often when rendering
out scenes like this. We can also right-click
and shade it smooth and that will
smooth it out even more. I'm gonna go ahead and
pause right about there. And let's render out
this frame to see what the particle
system looks like. I'm going to save my
project and then hit F12. And there we go. It finished rendering
and about two seconds. And if we zoom in here, you
can see the particles there. You can see a lot of
particles inside the fluid, and that looks pretty nice. It's gonna be a little
bit hard to see the particles because
we're using AV and it doesn't really work that great with
reflections and glass. If you render this in cycles, it'll probably look better, but it's gonna take a
lot longer to render. So I'm just going to
stick with, with EV. One final thing that
I'll do before we render this out is I'm
gonna come over to the color management
and I'm gonna set the look too high contrast. This will just give
the overall contrast to the scene a little bit. And then for the
background plane, I think it's a bit too bright. So we're going to create
a new material for that and just bring
the color of it, it down just a little bit
somewhere around there just to make sure it's not
so blown out and the camera. As for the roughness, I will
also turn that down just a tiny bit to give us
some nice reflections. But there we go. From here you can go over to the output tab, set an output folder, and then render this
into an animation. We covered how to render
animations in the last tutorial. So we're gonna go ahead
and skip that for now. But there we go. That is how you create a fluid simulation
inside an object. Thank you for watching
this tutorial and making it to the end. And if you created
something cool, makes sure to post
it in the assignment or in the discussions
after this video.
34. Creating a Waterfall P1 Modeling: Hello everyone and
welcome to a new section. In this section we're
going to be creating a waterfall using
Blender and Mansa flow. We're gonna go through
step-by-step on how to model the waterfall. We're gonna be
adding in a plane, extruding it, changing
it up a little bit. And then we're gonna be
adding in some rocks, then creating the simulation
and rendering it out. And I'm gonna be showing
you exactly how to do that. So with that out of the way, let's go ahead and get started. We don't need the default cube, so I'm going to press
X and delete it. Then we're going to add in
a mesh and a plane object. This is going to be the
basic waterfall shape. What I'll do here is
I'll rotate it by 90 degrees along
the x-direction, so it's standing up like that. I'll go into edit mode, press G and Z and
drag it upwards. So the origin point
is right there. Let's scale it along the x, so it's a little bit
longer, just like that. And now let's add in
a lot of geometry, I'm going to press Control
R to add in a loop cut, and then using the scroll wheel, let's drag it up a little bit. So we get around like eight cuts or so,
something like that. Then we can left-click and then right-click,
just like that. Next, Let's hold Alt and select that top row just like that. And let's extrude
it along the Y. So press E to extrude, drag it out this way. Then we will press
E to extrude again, we'll drag it upwards
and then E to extrude one more time and
we'll drag it backwards. This is the basic shape
of the waterfall. There's gonna be a small drop and then a bigger
drop right here. Now currently this
is very boring and flat and it's not going
to really look that great. So let's give it some randomness and change it up a little bit. I'm going to go into
edge select mode by hitting that
button right there. Or you can press to
on your keyboard. And then let's
press O to turn off proportional editing or you can click right here to
turn it on as well. I'm going to select that face in the middle and press G and then y and drag it backwards,
just like this. And you can use the
scroll wheel to drag the proportional
up or down. Let's give it a little
bit of roundness. And then also I will select that face right, or that edge, I mean, right there, G and Y
drag this back a little bit. And we're basically giving this waterfall some randomness. I'll select this face, maybe I'll drag that
back a little bit. Selected this one,
drag it forward, and just kind of doing
something like that. Then over here in the back, we will select these,
these couple of phases. I'll select all four of those, maybe that one as well. We'll move this back
just like that. Something like that looks good. We'll go back into
edge select mode. We'll select that edge and that edge, drag that backwards. Maybe we'll drag this forward a little bit so there's a drop. And then maybe I'll
grab this edge, drag that one back. Then over here I'm
going to hold Alt and selected that edge loop. And then I'm going to press
Control V to bevel it. Let's drag it out,
something like that. It looks a little bit better. Let's do the same thing on top. So going back into edit mode, I'm going to hold the Alt key, select that edge loop, press Control or Command B and just bevel it,
something like that. And you can use the scroll
wheel to add in more geometry. We'll just go
something like that. Looks fine. Same thing down here. I'm going to hold Alt,
select that edge Control B. And then we'll go something like that. It's probably good. We'll add in two loops. And there we go. That's not too bad. If you want to. You can also add in a little bit of geometry in the middle here. So if you press Control R, add in some geometry, maybe drag that part
down a little bit. Drag this part up,
something like that just to give it
even more randomness. Then in the back here we'll
do the exact same thing. Adding a couple more. Luke cuts, select a random bit, drag it up, or drag it down. Something like that.
It's probably good. Alright, there we go. I'm liking how that looks. Now for the rocks, I'm going to press Shift a
and add in an ecosphere. Then we're going to open
up this menu and set the subdivisions up
to a value of four. Then from here I'm going to
scale this along the z-axis, so it's more of
like an egg shape. Then let's add in the
displacement modifier. So jumping over to
the Modifier Tab, I'm going to click Add Modifier
and select displacement. We're gonna give it a new
texture by selecting New. Then over in the
Texture tab down here, we're going to change
the type from image or movie over two clouds, will drag the size up so the displacement
is not so small. Something like a
value of 1.3 or so, we'll probably be good. Then jumping back over
to the Modifier tab, we're going to bring the
strength down just slightly. Maybe scale it along the x and just kind of
play around with it. The other thing we're
gonna do is for the coordinates it's
currently set to local. So that means it's using
the local coordinates. If we switch this
over to global, if we move it around, it's going to change how
the displacement works. This is very useful when
we duplicate the rock. It's not going to use the
same coordinate texture, so it's gonna be different. Let's go ahead and set these
shrink down a little bit. I think it's a little
bit too strong. And then also I'm going to select the bottom
half down here, select just the random edge. And I'm going to
press G and Z and drag it up so it's a
little bit more flat. And I think that looks
a little bit better. It's more of a rock shape. It will do the same
thing on top here. And yeah, there we go. That
looks a little bit better. Now what we can do is scale this down and place it like
in the middle right here so the water will hit
it and go on either side. Maybe drag it down
somewhere like this. Let's also right-click
and shade it smooth. Then we will select the plane right-click Shade
Smooth as well. We can select this one,
Shift D it double-tap ours, we rotate it around, scale it down a little bit, drag it up, something like that. Then we can select this one
will shift D it over here. And you just want to place it in random spots along
the river just to add more variation and randomness that will make the
simulation look pretty cool. Something like that
is probably good. There we go. So the
water is going to hit it and split on either side. Well, the Shift D, this one, drag it down here so the
water will hit this object's, place it here,
something like that. Maybe scale it up a little bit and then place it on that side, I think will look pretty
cool. And there we go. I like how that looks. We have some random
rock spread out. The water is going
to hit them and splashed all over the place. And it's going to
look pretty nice. Now in the next
video, we're going to set up the simulation.
35. Creating a Waterfall P2 Simulating the Fluid: Now that we have our
waterfall setup, let's create these simulation. Let's first add in an inflow. So I'm gonna hold shift and then right-click to place
my cursor in the back. Then let's press Shift a
and add in a plane object. We're going to rotate this
plane 90 degrees along the x, so it's standing upright
and then scale it down. And then we'll scale it
along the x so it's longer, just the like that
scale along z. So it's a little bit thinner,
something like that. It's going to look good and then we'll place it in the back. I'm also going to give
this some randomness. So we're gonna go into edit
mode and press Control R and add in a couple
of different luke cuts right about
there looks good. Left-click and then right-click. Then jump over to the
face select mode by hitting three or you can
press the button up top, and then let's select
some random faces. So let's say these faces, that face and then maybe, I
think that's probably good. We'll press X and
delete those faces. Then we'll go into
the edge select mode. We'll drag this edge
this way a little bit, something like that. Maybe we'll drag this
edge up slightly, this edge this way, just kind of
randomness like that. And then from here
let's also add an another
displacement modifier. So over in the Modifier tab, we're going to
select Add Modifier and choose displacement. We're gonna give
it a new texture. Then jumping over to
the texture panel, Let's change the
type over to clouds. Then we'll go back over
to the Modifier Tab and bring the strength up,
something like that. There we go. Now the other thing
we're going to add is an object to move
this texture around. We can do that by
adding in an empty, let's just add in a plane axes. We'll drag it backwards
so it's out of the way. What we're gonna do is go into the Properties tab by hitting N. And then underneath
the location, we're gonna have this
object move over time. To do this, let's add in a
driver to the x location, on the x location. To add an a driver, we're going to
type hashtag frame and then divided by 800. Now what's going to happen is this object is going to move. You can see here if I
set this lower like 100, it's gonna move faster
as you can see there, so that 800 sets the speed. Let's go ahead and select our object here we're
going to change the coordinates from
local over to object. And then for the object, we're going to select the empty. As this empty is moving, it's going to move
the texture around and the inflow is
going to change. And it's going to give the
fluid a lot more randomness. You can see that's currently
what it looks like and that's moving
a bit too fast. So what we can do is
select our object and I'm just going to set
the strength up higher. Let's go with 500. Let's try that. There we go. I think that's actually
moving a bit too slow. Let's go down to 350. This is going to give us some
randomness in our inflow. The water is going to
be shooting out at different points as
you can see there. And that's going to
look really nice. Next up, let's add
in our domain, I'm going to press Shift a at an a new cube will
go into top view, drag it this way. Then you can press S and
then x scale it outwards. We'll go into edit mode and
then go into side view. And then we'll select that face. We'll drag it all
the way across. And then we'll drag this
all the way down here. Just like that. There we go. Let's
make sure that this is actually inside you. Make sure the of it
is on both sides, which it is, That's good. Let's jump over to the
Physics panel and select fluid and set the
type over to domain. We're going to set the
domain type over to liquid. And then let's select
our object here, the envelope object,
we will go fluid, set the type over to flow, and then for the flow type
will choose a liquid. And then the behavior, of course we're going
to choose inflow. We're going to turn on the planner option in
the flow source. So open up this
tab and turn on is planar because this
is a flat object, then we're going to turn
on initial velocity, so the fluid actually shoots
out in a certain direction. We're going to set
the y-direction down here to negative one. As for the other
objects in the scene, let's go ahead and select it the waterfall object
here we'll select fluid, set the type over to a factor, and then make sure it
is planar Edge checked. We're also going to select
all of the different rocks, will select all of them at once. There we go, we'll
de-select the plane. And you can do that by hitting B middle mouse button
to de-select an object. We'll go fluid, set the
type over to effector, and then we don't
need to use is planar because these objects
actually have some thickness. Then you can press
Control or Command L and go copy modifiers. Now, each of the rocks should
have that exact modifier. Let's go back over to our a
domain settings right here. And what we'll do first
is we'll scroll down to the cache and change
it over to modular, and then we'll turn
on is resumable. The other thing
that we're going to change is the format volume. We're gonna switch it over
to uni cash because we are gonna be using the
US speed vectors in the mesh to add
in motion blur. That only works with
the uni cash format. So make sure you switch it here. Let's go up to the
top here and set the resolution of this to 160. That gives us a nice
high resolution. And again, if you
have a slower system, you can go with a value of 128. And that will still give
you a pretty nice results. If you're, if you're a
computer can handle it, you can set that up to 160. As for the other settings, we're gonna turn
off collision in the front and the
bottom of the domain. When the fluid
comes out this way, It's going to splash and then exit out of the
domain over here. We don't want it to fill up. We wanted to exit out
the other settings here. We can just leave
them as the default. We don't really need
to change any of them. We can open up the particle
tab and we're going to enable both spray
and foam particles. We're going to leave the
default settings here and then open up the mesh settings. We're going to set
the upper as factor. We're going to leave it at two. And then for the
particle radius, we're going to bring this
down to a value of 1.35. And then turn on
use speed vectors. One last setting
that we're going to change is the timescale. I've noticed in this simulation that the fluid
moves very quickly. So let's bring this down to
a value of 0.65 and enter. And that's just
going to slow down the simulation
just a little bit. With that done, you can save your project and then
click on baked data. I'm going to probably
stop the bake around frame like an 80 or 90 or somewhere in there just to see how the simulation looks. I've stopped the breakout
around frame a 100 and now B players simulation
here is what it looks like. As you can see, it
does look really nice. The fluid is going over and
I'm liking how that looks. So I'm gonna go
ahead and bake out the rest of this simulation. What I can do here
is just click Resume and it's going to resume
right at that point. And then it's going to
finish out the simulation. Now that the main simulation
has finished baking, we're going to go
ahead and bacon at the particle system with it. Both of these spray and the
phone particle selected, let's click on fake data. Once this is done baking, we will also bacon
the mesh down here. And finally, we're gonna
bake in the mesh down here. So make sure
everything looks good. A value of 2.351, you speed vectors is turned on, then we can click on fake match. With that out of the way,
we're going to jump into the next video and create the particle system
and materials.
36. Creating a Waterfall P3 Materials: The simulation has
finished baking. Now we're going to set
up the particle system and the lighting and materials. First off, what we're gonna
do is add in the particle. And for this, we're actually
going to be using a cube this time since there are
a lot more particles, I don't want there
to be an ecosphere because that is more geometry. We're going to drag this over to the left side and scale it down. And then also make
sure you press Control or Command a and apply the scale to the cube so the particles
actually work correctly. Then we're going to
select the domain object, head over to the
particle system tab. And we can see we have
three particles systems. We don't need the liquid ones. So go ahead and turn that off in both the render
and the viewport. And then let's select the
spray particles of stomach. We're going to set the render
as to render as object. And then for the
incident object, we're going to select
the cube right here. So click the Eyedropper
tool and then select the cube
over on the left. Let's skip to a different
frame and we can see how big the cubes are, and you can see they are
currently very large. So let's bring the scale of
them down by quite a bit. Let's go with a value of 0.007. We'll see what that looks like. There we go. I like how that looks. Those are pretty small. And then for the
scale randomness, this will give some
random variation. Let's go with a value of 0.3. As for the amount of particles, we're actually going
to bring this down. We're gonna go with 50% of the particles because there
are a lot of spray particles, especially in these
later frames, we're gonna set that lower. Then let's do the same
thing for the foam. We're going to select the foam, we're going to select
Render as object, and then for the
Incident Object, select the cube 001. Then of course for the amount down here are for the scale, we're going to drag this lower. Let's go with a value of
0.007, just like before. Then we're gonna leave
the amount at 100 either want there to be a lot
more foam particles then spray particles, then also to make our scene
and not like so much. Let's turn it off
in the viewport by clicking into those
two buttons right there. There we go. Let's select our water. We'll right-click
and shade it smooth, so everything is
nice and smooth. And that's it. We have created the
particle system and now let's work on the
lighting and materials. As for the lighting, we're
going to jump over to the world settings and
then open up the color. We're going to switch it over
to an environment texture, click on open, and then
navigate to the HDR. Hdr that we'll be using
a seed or bridged for k. So go ahead and select it
and then go open image. And this is linked
in the resources or in the article
to this section. Let's go into render
view by hitting Z and going into rendered view. Currently we're using
the EV render engine. So let's go over
to the render tab and switch it over to cycles. Since we're gonna be
using the vector blur that only works in the
Cycles Render Engine. So make sure to switch
it over and then use your GPU for the device. We're going to come down here to the color management
tab and set the look over too high contrast so we get more contrast in the scene. And then also I don't want
to see the background. Let's turn it off
by going over to the film tab and turning
on transparency. Now let's create
the material for the water with it selected, we're going to jump over
to the Material tab and click on new. We're going to
scroll down here to the transmission value, turn that all the way up to one. And then for the IOR, we're going to bring
this to 1.333. As for the roughness, we're gonna set that down to 0. And then for the base color, we're gonna drag this
lower and then give it a slightly green color,
something like that. Let's get to a different frame just to make sure
that looks good. And there we go, That
does look pretty nice. If you think it's too dark, just drag it up just slightly. And there we go, Not too bad. The texture that we're
gonna be using in this tutorial is
this one right here. It's rock, boulder dry, and it's on poly haven. The link is in the Projects and Resources or in the
article to this section. Make sure you click on that
and then make sure you have the blend file
right here set to blend. And then you can use the 2k. Once you have that downloaded, we can jump back into Blender. And a quick way to import
that material automatically is if we go over to
File down to append. And then what we can do is navigate to where
that blend file is, where that folder is right here, the rock boulder dry, select it, select the blend file, and then underneath
the material, go ahead and select it
that material right there, and then append it
into your scene. Now if we select one
of the boulders, actually let's select
all the objects. There we go, all of the rocks, and then we're gonna come over
here to the material tab, select the drop-down
menu and then choose the rock
boulder dry material. If we then link all of those to share that exact material, will press Control L and
click on that link materials. Now if we press Z and go
into material preview, we should be able to see
all of those objects. Now this object here
is very stretched because we extruded it outwards. So go ahead and select
your waterfall, go into edit mode, press a to select everything. And then we're going
to unwrap this again. To do that, press U
and choose unwrapped. Now, it should unwrap correctly and the material
should look good. There we go. The other thing
that we're gonna do is change the color of this. I'm gonna come over
here and split the view and switch it
over to the shader editor. Here we can see the material
and also in the normal map, make sure you select
it, the UV map and that shouldn't make sure it
applies it correctly. What we're gonna do is
change the color of this. I'm going to press
Shift a and go over to color and then add in
a hue saturation node. And we're gonna place it between the base color and the
principled shader. Underneath the
value, we're gonna go lower to a value of 0.2. And then we're going to
bring the saturation down a little bit so it's
more of a gray color. Let's go into a rendered view to see what that looks like. And there you go,
you can actually see it looks pretty nice now. You might be able to go
a little bit brighter. Let's go with a value of 0.4. And that looks pretty nice. Then finally, the last
material that we will do in this video
is the particle. So go ahead and select it, create a new material. Then we're just going to leave
the default white settings with the roughness at 0.5. But there we go. We've now created
the material and in the next video we're going to
set up the render settings.
37. Creating a Waterfall P4 Rendering: To actually render this out, we're going to position
the camera right about this angle so we get the
full thing in the view. Then we're going to
press Control Alt and numpad 0 to snap
the camera to view. Or you can go over to
view down to Align View and then align active
camera to the View. Select it and then you can double-tap are and
if you hold Shift, you can position
this how you want. We'll zoom out a little bit and then place it right about. There. Looks pretty good. So we get the full
waterfall in the view. From here, we're
gonna go over to the render tab and then
set the render samples. We're gonna go with
a value of 50, so it renders pretty quickly. Also, I don't want to
see that particles, so I'm just going
to drag it upwards. And then over in the
render layers panel, make sure we turn on the Z pass and the vector
paths we can enable motion blur later saved your project and
then we're going to render out a single frame. Let's go with this frame, frame 140 to save your project before you
do this and then hit F12, the render has finished. And here is the result. As you can see, we have a lot
of particles and it looks pretty good to actually
add in the motion blur. We're going to exit out
of this window and jump over to the
compositing workspace, turn on and use nodes
and then we can press N, and then we're
going to drag this down so we have more space. Over on the right side when your cursor turns
into a plus sign, click and drag to drop that view to actually
see what we're doing. We're going to press
Control Shift and then left-click on
the render layers. This is going to add
in a viewer node. And the other thing I
like to do when I'm working like this
is if I hold shift, I can right-click
and drag over this. And that's going
to create another little node right here.
It's closer over here. And now we can easily add a nodes between
these two points. And it's going to
automatically add them into these Viewer and composite. Over on this side we're going
to add the vector blur. We're going to go
over to Filter and then choose vector blur. Let's place that right here. We're gonna take the vector
and plug that into the speed. And once we do this, it
might take a minute to load, but we should have some
blur in the scene. As you can see right
there. It's quite a lot. We're going to turn the
blur amount down to 0.3. Then we're also going to take the depth value and
plug it into the Z. And that should help give us better blur amounts right here. Now there is a lot of
blur in these areas, but there's not a lot
of blur over here. So what I'm going to
do is actually set a maximum amount of blur because it's
currently down here. There's too much. But over here it's like
just the right amount. At the maximum, we're gonna
go up to a value of 120. And that should
really clamp down on some of those
values down here. And as you can see,
that looks much better. There might actually
be even too much. So I might go with
a blur amount of 0.2 and we'll see
what that looks like. And actually I like
it better before. So we'll go back up to 0.3. As for the background, I'm going to add in
an Alpha over node. So press Shift a, go over to color and then add in
an Alpha over node. We're gonna take
the image and plug it into the bottom input. And then now this top infant
controls the background. We're going to set this over to a nice gray color,
something like that. Then the last thing that we will add to the scene as a vignette, so we're going to
darken the corners so the focus is in
the middle here. I'm going to press
Shift a and go over to Filter and then
add in a blur node. Then we will also add in a
Distort and a lens distortion. We're going to take the image, plug it into the
image down here. We're going to set the
distort up to a value of one. This is going to distort
the edges over here. And then we're
going to blur that. And then we're going to add
it over top to darken it. So we're gonna go over to color and then add
an a mixed node, replace it right here. If we then take the image, plug it into the
image right here, we should have blackness
on all of the corners. We can then blur those
corners by changing over to the fast Gaussian
select relative. And then underneath
the why aspect ratio, Let's go with a value of
15% for both of these. And then we should get
some nice. There you go. And as you can see,
that looks much better. To get rid of the white values, we're going to switch
it over to multiply. And now this factor value controls how dark
those edges are. If we bring this lower
like a value of 0.7, it's not gonna be as strong. And there we go. That looks much better. If you want to, you
can add in a color and then a color balance node
and you can place it here. Then we can change how
the color balance works. If we want darker shadows, we can drag that
down just slightly. Or if we want to
brighten the highlights, we can drag it up,
drag up the gain, and that will brighten
up the highlights. Then if we wanted
to give everything a slightly blue color, we can drag the gamma, which is the mid tones,
over to the blue. And that's gonna
give us a nice look. But there we go. That is basically all the
compositing that we need to do. From here, we're going to
go back over to the layout. And we're also going to
hide the object right here. We don't want to show the
info object in the render, so let's turn it off in both
the viewport and the render. At this point, we're ready to render out our final animation. Jumping over to the
scene panel right here, we can set an output of where we want our frames to go to. I'm just going to put
them in this folder and then I'm going
to click Accept. Once you've done that,
we're ready to render out our entire animation. Now again, we're
going to be rendering it as an image sequence. And then I'll see,
then we're going to sequence it out
later and make sure if you want to solve
the render halfway through that you
uncheck overwrite. Because at that
point it's going to resume at the frame
that you left off. If overwrite as checked, is going to resume at
frame one and overwrite all the images that are
already in that folder. So with that done, we're
gonna save and then go over to render and then click
on Render Animation. Once this is done rendering, we're going to jump into
the video sequence editor and I'll show you how to
sequence it into a movie file.
38. Creating a Waterfall P5 Sequencing the Render: The render has finished, and if we want to
view our results, we can go ahead and exit
out of this window and then go over to render and
select that view animation. This will bring up a
new window and it will start to grab all
of those images. And it is a little bit
laggy at the start, but once it cycles
through all the images, it'll be nice and smooth
as you can see here. But there we go. As you can see, there
is a lot of particles. It looks really nice. There's lots of foam, and overall it looks
like a nice river. So now in this video
I'm gonna show you how to sue cans all of
those images together. To do this, you can
click on this plus sign, go down to video editing and select the video
editing workspace. We're going to select
Add Image Sequence. And then we're going to select the folder with
all of the images. Make sure frame one
is at the very top. And you can do that by checking your sorting by the name
and not the modified date. Then you can press a to select everything and go
Add Image Strip. This will add in the image strip right here and we
can play through it. Then all we have to do
now is come over here and set the output to
be a movie file. In this case, I'm going
to choose FFmpeg. Then in the container
I'm going to choose MP4. And then for the output
quality, Let's go with high. If you notice that there's a lot of contrast in the scene, That's because over
in the render tab right here underneath
the color management, it's using that the high
contrast that we used in the other when we
render it out the images. So it's applying it over top of the already contrast image. To fix that, all we have to
do is set this over to none. Or if you like how it looks,
you can actually keep it. I'm going to go with
medium, high contrast. With that done, you can
save your project then go over to render and
select Render Animation. That's going to grab
all of those images and put them into a movie file. But there you go. That
is how you create a waterfall fluid
simulation and blender. Thank you for watching
and thank you for making it all the way to
the end of this course. And if you create
something cool, I would love to see it
so you can post it in the discussions or tag me on Instagram at blender made easy, but that's gonna do
it and I will see you guys in the next one.