hello everyone and welcome back to
another blender made easy tutorial today
we're jumping into blender 2.82 and
learning how to use a mantaflow will
be animating the thickness of the fluid
but not only that we will animate the
material properties as well
blender 2.82 just came out and with it
came a pretty big change to the fire and
fluid simulations this also means that
all of my old simulation tutorials are
now obsolete but anyways let's get
started with the tutorial so the first
thing that we need to do is actually
create a domain so with this cube
selected we're going to scale it up
we're not going to delete it this time
bring it up along the z-axis and scale
it along the X do we get something like
this from there we need to add in our
flow object in this case I'm gonna be
using a cube so press shift a go over to
mesh and then cube you can use a UV
sphere and icosphere do whatever you
want for this video I'll be using a cube
from there go into front view by
pressing 1 and G to move it and place it
in the top-left corner
something like this will look pretty
good now to give the simulation a little
bit more interest let's add in some
obstacles down at the bottom of the
domain
now that we have all of our objects in
place let's go ahead and start
simulating so with the domain selected
I'm gonna go over to the physics tab and
give it a fluid simulation now the fluid
and smoke simulation are now in the same
panel and if I check the type and change
it over to domain it's currently set to
gas we need to change the flow type over
to liquid so change it to liquid and
we'll do the same thing for the other
objects so our flow object is going to
have a fluid simulation set the type
over to flow and then for the flow type
we need to go with liquid if you want
your object to continuously bring fluid
into your domain you can change this
over to inflow keep in mind if you
change it over to inflow make sure your
object has a little bit of thickness I'm
gonna keep it on geometry and then I'm
going to select the collisions so select
the objects down here and give it a
fluid and set the type over to
effecter make sure the type is set to
collision and do the same thing for the
other objects now that we have all of
our objects with the simulation settings
let's go ahead and work on the domain so
I'm going to select it and then over in
the resolution divisions I'm gonna turn
this up to a value of 96 this will give
us a nice high res fluid from there the
time scale you can change this if you
want to this will slow down or speed up
your simulation another thing that we
need to change is the maximum time steps
and minimum time steps basically what
this does is it will smooth out your
animation and make your fluid look a lot
better with really thick fluid I noticed
that the fluid is very jittery and moves
around quite a bit so what we're gonna
do is change the minimum steps to a
higher value so it smooths out and it's
not as jittery I'm gonna go with a
maximum of seven and a minimum of five
steps from there we can scroll down over
to the mesh and check this box to enable
us to have a mesh in our fluid the up
res factor I'm gonna set up to a value
of 4 so this will give us a really
high res fluid basically what this does
is it takes your base resolution right
here and multiplies it I'm not exactly
sure on how it multiplies it I just know
that the higher you set this to the
better the fluid will look I'm also
going to set the smoothing up to a value
of two just to smooth out the fluid a
little bit more if you want to add in
some particles you can by open
up this tab and enabling foam spray or
bubble particles for now though I'm just
going to leave them all off the thing
that we will change is the diffusion
here is where we can animate the
thickness of the fluid right here we
have a base and an exponent and there's
a pretty complicated mathematical
equation to figure out exactly what
these do if you're like me and you don't
really like doing math we can go ahead
and jump over to the blender manual and
look at this
cheat sheet right here I will link this
down in the description what we have
here is a bunch of different materials
we can see water there's honey there's
melting glass and with this comes the
equation for the base and the exponent
here we can see the base is set to 1 and
the exponent is set to 6 for water if we
jump back over to blender you will see
that exact mathematical equation over
here if we want melting glass which is a
lot thicker fluid we can see the base is
set to 1 and the exponent is set to 0 so
with this knowledge in mind we're going
to set the base up to a value of 6 and
the exponent all the way down to a value
of 1 this will give us a really thick
fluid from there we can set the real
world size and this is the size of your
domain I'm gonna set this up to a value
of 4 which is 4 meters another thing
that we need to do is the surface
tension and this will give the surface
of your fluid a lot more tension and it
will make it a lot more stiff I'm gonna
set this up to a value of 12 from there
we can start animating so I want this
animation to be a hundred and fifty
frames long so for the end frame in the
cache I'm gonna set it to 150 and then
in the timeline I'm also gonna set this
to 150 from there we can jump over to
frame 70 and then add in a keyframe to
all of these values so for the base
adding a keyframe by clicking that
little button on the side and then go
over to frame is 71 I want this to be
back over to water so underneath the
presets select water and we can see
those values are now back to the default
settings add in another keyframe the
surface tension we're also going to set
that back to zero so add at zero and
then add in another keyframe now that
we've done that we can go ahead and bake
in our data so I'm going to save my
project just in case this crashes and
scroll up to the data up here and click
on bake data once this is done baking we
will bake in
the mesh now let's scroll down over to
the mesh data and bake this in so go
ahead and click on bake. The baking is now
done and we can play our simulation by
hitting the spacebar and this is what it
looks like so the fluid is very thick
once it reaches frame 70 it will become
thin fluid just like that and spread out
through the entire domain now that the
bacon is all done let's go ahead and
work on the rest of the scene and add in
some materials so the first thing that
I'll do is add in a mesh and then a
plane so we have a ground I'll go into
front view and then I'll play the
simulation a little bit and drag this
underneath the fluid just like that and
I'll zoom in and place it right about
there
from there I'll press s to scale and
scale it out pretty big so we have a
ground just like that now let's work on
the material for the fluid so I'm going
to select my material and make sure
we're using evey for this animation
because this will render a lot faster
and underneath the evie settings let's
turn on as screen-space reflections and
then turn on a refraction just like that
so we actually can see through the fluid
I will also turn on ambient occlusion so
we get some nice shadows on the cubes
and then underneath the color management
I'm gonna set the look to high contrast
jumping over to the material this should
already have the default material since
we use the cube and then I'm gonna
scroll down underneath the settings and
turn this blend mode over to Alpha blend
so we get some nice reflections and we
can actually see through it I'm gonna
turn off a show back face and then turn
on screen space reflections
let's press Z and go into render view to
see what this looks like and then
underneath the transmission turn this
all the way up to a value of 1 the IOR
which stands for index of refraction is
basically how light passes through the
object let's set this to one point three
three three because that is the IOR of
water now we're going to animate the
base color and the roughness so I'm
going to jump to frame 17 just like this
and I'm gonna turn the roughness all the
way up to a value of about point seven
or so and then I'm going to hit I for
the base color I'm gonna give this like
a slime looking color or something like
that and then hit I while hovering over
that base color now depending on how
long you want your transition to be you
can change that here I'm
with around 80 or so so 10 frames long
and I'm gonna set the base color over to
a blue something like that
brighten it up a little bit and then hit
I while hovering over the base color and
then for the roughness I'm gonna bring
that all the way down to zero and then
hit I one more time so now if we play
our simulation we can see that it turns
blue just like that and it looks pretty
cool for the rest of the scene I'm going
to select my cube and open up at this
panel right here and turn on the camera
icon I don't want to be able to see this
in the rendered view so I'm gonna turn
it off in the viewport and in the render
for the ground I'll select it give it a
new material and for the base color I'm
just gonna go with a gray color
something like this but now this scene
looks really dark so let's go ahead and
add in an HDR going over to the world
settings underneath color select
environment texture and give it a new
texture navigate to an HDR I'll put a
link in the description of where you can
get some really high-quality HDR's once
you have found one that you like go
ahead and import it in for the cubes I'm
going to select them give them a new
material and for this I'm just gonna go
with a nice blue color once again one
more thing that I'll add is a Sun lamp
so I'm going to select my lamp that's in
our scene turn on Sun and give it a
strength of about five or six something
like that and then I'll go into top view
by pressing seven and rotate this around
so it's facing the cubes something like
that will look pretty good and
underneath the shadow turn on contact
shadows the last thing that I'll do in
this tutorial is disable the particles
because I don't really want them so what
I'm going to do is select our domain go
over to the physics tab and turn off the
liquid if you want to enable these you
can go ahead and turn that on go over to
the particle system tab and select that
particle system right here underneath
render as halo you can turn to render as
object and you will have a lot of
particles in your scene since I don't
want them though I'm just going to
disable that for the camera I'm gonna
position it right about here and hit
ctrl alt 0 to snap it to place we are
almost done with this tutorial the last
thing that we need to do is set a folder
of where we want our frames to go to and
then we can render it out so over in the
output section select a folder by
clicking this button right here and
navigating to it
from there we can save our project and
go over to render and click on render
animation our render is now finished and
to view the animation we can go ahead
and exit out of this window go over to
render and click on the view animation
once you do that a window will pop up
and you'll be able to see your animation
real quick before this tutorial ends
I'll show you how to sequence this out
into a movie file to do this go back
over to blender and over in this panel
select the plus sign video editing and
then video editing right here make sure
you're on frame 1 by hitting that skip
go over to add image sequence and then
navigate to where your images are mine
are right here you can press a to select
everything and go add image strip from
there just change the output over to a
movie file of your choice I'm gonna go
with MPEG underneath encoding I'll set
it to mp4 setting it as high quality and
then go over to render render animation
and it will prioritize the video
sequence editor and render this out so
there you go that is how you animate the
viscosity thickness of your fluid using
mantaflow in blender 2.82 thank you
for watching if you enjoyed this
tutorial make sure you give it a like
and comment down below what you would
like to see next
