Transcripts
1. 01 Introduction: Hello, and welcome to
this Houdini course. My name is hazard Amer, and I will be your instructor
throughout this course. We will start this course off by first creating the
terrain and then we will prepare our Jeep model for RBD Bullets and we are going to be using Houdini RBD Kari to dynamically animate our Jeep, and here we will see
how to animate friction over time to create Jeep
wheel sleeping effect. Then I will give you
a brief overview of Houdini MPM solver before
creating our actual effect. And then we will start creating
our APM mud simulation by first creating proper source and initial state of our mud. And after that, we will
see how we can fix our collider mesh
pad topology that you might face when
creating dynamic collider. And once we have our
APM mud simulation, then we'll see how
we can generate wet map for creating
wet mud effect, and I will show you
different techniques for generating wet map. And after that, we will scatter some grass and rocks
for our environment, and we will finish
our course of by importing all of our
acid into Solaris for rendering and we will use
Kerma xBU to render and finish our project. And I, We got a lot to cover. So without further ado, let's dive right in. And I will see you in
the very first lesson.
2. 02 Download Assets: Let's download some assets that we are going to need
for our project, and I am in here in the
site called Polly Haven. And in here, we are going
to download the HDRI, some of the textures as
well as some of the models. And for the HDRI, I am going to use the HDRI. This one, a horn Stag. I don't know how to
pronounce it correctly. A horn stage, a horn stag,
something like that. Can search this by
typing this Ahn, and here you will
see a horn stage. And let's go into the HDRI, and in here, we can
select the resolution. Right now, it's set to four K, and we do not need
that four K because we are going to just light
our scene using this HDRI. So downloading the two k is
enough for us, and in here, we can select the file
type and EXR is good. You can download the
HDR if you like, but EXR is fine as well.
Let's download this. And for the material, I am going to use this material. Let me find. Let
me scroll it down. First one, this one,
brown mud leaves 01. And I am also going to use this forest ground 01,
these two material. Here we have this brown
mud lead 01 material. And in here, right now, we selected the blender file. I can change this to zip. We need the zip
file. And in here, we can set which file
we want to download. And we do not need
this blend file, and we also do not
need this GLTF. We only need these maps for all materials and
Amboclusion JPEG, you can select the EXR or PNG. And for this one, JPEG
works fine for us, and I am only going to select the EXR for the normal and for the roughness only because these are the material
that will actually contain some of
the values that is needed for creating the normal
as well as roughness map. So let's change this to EXR. And four K resolution is good,
and let's download this. Same thing with this
one, Forest ground 01. Let's change the file type
from blend to Zip and four K, and we have all of these maps selected. Let's download this. And for the model, I'm going to use this model
called Rock Moss set 01. We have the blend
file in here as well. So let's change this to
Zip and we can uncheck the blend file as well as GLTF and we are going
to use the FPX models. And here we have the materials, and all of these
materials are just fine in the JPEG format, only the normal and
roughness into EXR. I'm also going to use
this one cross Medium 02, and you can download
this again by changing this to Zip and FBX. And lastly, we need
the Jeep model, and I am using the Jeep
model from Sketchfab. I will provide you the link.
You can download this. And if I scroll down, here we have the
option to download this three D model.
Let's click on it. And here we have
some of the formats. We have the FBX, as well as USDZ I am
going to download the USDZ format because
it's an very lightweight. It's only 11 megabyte, and it will work fine for us. Let's download the USDZF let's download all
of these assets, and I will see you
in the next lesson.
3. 03 Create Terrain: Let's start this
project off by first creating a new project, and for that, let's go
into the file in here, let's click on this new project, and here we have this
new window, and in here, you can set the
path where you want to create all of
these folder and Houdini will create this
geometry as well as all of these folder for
organizing our simulation, as well as our whole project. And in here, we
can set the name. I'm going to name
this 1:00 P.M. MUD. That will be our project name. And in the path, I'm using this T for my
documents file, and in here, I have created
this folder called Houdini prorojects in here, we are going to create
this MPM MUD project, and let's hit Accept. And now that we have set it
this project file directory, we can now save this
HIP file as well. And for that, let's
go into the file, and let's change this one save. And here as you can see now
onto the doll assign job, we are in the folder where we
have created this project. And I'm going to
create this HIP file in here onto the root folder, and I'm going to
call this 1:00 P.M. MUD as well. So let's
type MPM underscore Ud. And let's hit except to save. And now we have
our Hip file save. And let's start
creating our terrain. And for that, I'm going to
first create an Ajomtr node. Let's add an ageometry
and let's dive inside, and now we are in the
geometry context. And in here, I'm going
to use the height field, how doin height field built
in height field nodes. So let's in here,
type the height, and here we have the height
field. Let's add this. And by default, it will
create a very large size. So onto the viewboard, press F, and that will frame
our entire this grid. And onto the height field, let's enable the
parameter by pressing the PK and onto the inhere, we have the orientation as well as all of the
initial height. We can set the initial height
if we want to move it up. But all of these default
values are fine. I'm going to leave them as is. And onto the size,
here you can see, we have the thousand
meter by 1,000 meter, which means that this
height field patch is 1 kilometer long. And let's leave it
as is because all of the height field
node are designed to work with this large scale. And if we are going to
scale it down later on, we will have some problems. So let's keep it as is. And in here, let's add an A noise by typing an
height field noise node. Let me type this correctly. Height field noise. Let's add this and connect this in here and
view the result. And if I zoom in, let me
hide the grade for now right now and we can see our
noise has been added. I can increase the
amplitude to create an A more high amplitude
of these mountains. Now we have bigger
peaks and valleys. But for our project, we do not need
that big mountain. We only need an aground. And for that, I'm going to change my amplitude
to a very low value. I'm going to keep
lowering this down. And where we have an slide, all of these pumps
and not too much. And I'm going to change
this value to 107. And right now it is
very hard to see. And we can change, actually, it's visualization by
clicking on this i button. And let's go into our
material section. And here we have the diffuse, and I'm going to change
diffuse to a very light color. Let's close this,
close it in here. And here I think you can see that we have
some of the noise introduced if I increase this. And now, here you can clearly see that we have
this noise working, and I'm going to lower
this value down to 107. And we also need channel in here where our
water will be flowing and our Jeep our Jeep will go through that water and
for creating this channel, let's add height field paint
node to paint this channel. And for that, let's add
height field paint node. Here we have t field paint
node, and let's add this, and maybe we are going to
add this first in here and let's let this node
and hover over to the viewport and press Enter to activate it this brush size. I'm going to paint this
mask so right now, the size is not our
size is very small, and to increase the size, I'm going to
increase the radius. Let's increase this, and
I'm going to paint it. And right now we have
a very soft brush, and for that, I'm going
to open up parameter. And onto the soft edge, I'm going to lower
this value down. Let's paint this and maybe
let's increase this 20.5. And let's add an A
stroke into the center. And right now I think it
is an A too thick stroke. So maybe let's lower
down the radius. I'm going to lower
down the radius to value of 100.
Let's paint this. And I think that value is fine. And now it will create an a
layer that will call mask. If I middle mouse
button here as can see we have a new layer
that is called mask, and here we can define the
name, and that is the mask. And now we can use the
height field noise. Not to apply the
noise onto this mask. And the second input
is for the mask input. If I attach this inhere onto
the height field noise, and right now, hers can see
where we have the mask. Our noise is only going to be applied wherever we
have this value red, and we need the invert of that. And for that, we have anode called Height field mask invert. Here we have height
field mask invert, and that will invert our mask. And I'm going to
connect this inhale. And heres can see we
have an A inverted mask, and now, which
means I can connect this in here and hers can see. Now I can apply the amplitude, and hers can see where
we have the mask. We are not adding
any noise in here. And for that, I'm going to lower this value down to
107 by default. And in here as you can see that this mask is right
now a bit boring. We do not have an much breakup. It's in a very straight line. And to actually
break up our mask, we have node called
height field distorted. Right here, if I type distorted, and here we have
this node called height field distorted by noise. We have this one called
distorted Bayer, and we have the height
field distorted by noise, and we need this one
distorted by noise. Let's add this, and I'm going to add this in here and
view this result. And right now it is distorting our height layer, and
if I enable this, and right now it is hard to see, but it is distorting
this height, but we want to distort
this mask layer. So onto the layer,
it says, height. We are going to
rename these two mask because that is the layer
we want to distort. And here as you can see we
have some distortion going on. And right now it is a very
high value and we get in some large breakups and
we do not need them. So let's keep lowering
this value down. And I think I'm going to
lower this value down to 24. And that will give us some
of these nice breakups, and that will create
natural looking channel. So now let's rearrange
these nodes graph, and I'm going to remove
all of these wires. We are going to
connect them again. And first, I think
we are going to use the height field
mask invert node where we have inverted our mask, and now I'm going to add
height field distorted node. And here as you can see we
have the distortion going on, and by the way, you can add this in here as
well if you want. And then you can add
an A mask invert node, but I'm going to add this
after we have inverted this, and that way we do not
get this breakup in hair. And now, Hears can see the
height ful distort node has added the distortion
onto our T corner as well, and we do not want that. And to fix this, we are going to add another height
field paint node. So let me grab this and add this height field
paint node in here, connect this and I'm
going to press Enter, and let's increase
the brush size, where we have the radius. Let's increase this, and I'm
going to fill these values because we don't want
distortion in here. We want all of these values
to be completely red, which means that our noise will going to be applied in here, and we want the
noise to be applied. And let's fill all of these. And now we can finally add
the height field noise node. Let's connect this,
and by default, it will add the noise where
we have all of these, where we have onto
all of our geometry, if I increase the amplitude, here is can see and to
actually add the mask, we need to connect the
mask input as well. That is the second
input, and it is coming from the same input. Heres can see now we are only adding the noise where
we have this red mask. Let's go back and I'm
going to lower down the amplitude to our
value that we like, and that is the
hundred and seven. Now that we have
added this noise, we are going to need
this center mask later when we are going to create
an A water and for that, I'm going to add an A
mask invert node again. Let's add a height
field mask invert. Let's set this and connect this. That will give us
the water line, and we are going to use this to extrude this piece to
create an A water. And onto the height field mask. W node after that,
and by the way, if this looks too wide for you, you can add a shrink
node in here. So in here, I'm going to
add an mask shrink node. Here we have the
height field mask. Shrink node. Let's side this
and connect this after that. And heroes can see we can
add the shrink amount. And I think we might need
to add a little bit of shrinkiness and the
default value is fine. Let's keep it as it is. And the only thing
now left to do is to let's move this water line down. Right now, hers you can see, we have a flat surface
and we want this to be and move down version. And for that, we have
a node called clip. So let's add height
field clip node. Here we have the
height field clip. Let's set this and connect
this into this clip node, as well as let's add the
mask input because we are going to only want to
clip this mask section. Let me enable the parameter, and onto the clip here, we can define the max, but
we want to move this down, which means we need the
values in the negative. So if I were to let's
change the two minus two, and here is can see, let me keep lowering
this value down. Let's lower this down, and Hers can clearly
see that now we are moving these values down. So maybe let's not
move them that much. I'm going to let's
change this to -26. And I think that will create
an enough water line for us. That is the I think
that depth is correct. And with that, this
terrain has been finished. And so now let's scale this or whole terrain back because right now here as you
can see we have this A. Here as you can see,
we have the size, and that is 1,000 in X
as well as 1,000 in Z. So we have an A 1 kilometer
long or this train, and we do not want that
much. That big size. And for that, I'm going to use an A transform node to scale
down our overall transform, scale down this overall terrain. Let's connect this in here. And by using this transform, we can increase or decrease our height field uniform scale. And I'm going to lower this
value down to lower value to 0.0 15 and press
F to frame this, let me zoom in and here you can see now we have an
A manageable scale. Because later on we
are going to use the MPM simulation
as well as RBD, so the scale is important. And if I were to
middle mouse button, now here as you can see, we have a 15 meter by 15
meter of this terrain, and I think that is
an manageable size. After that, let's
create null at the end. I'm going to rename
this our height field. In here, let's type
this out height field, and that is an volume
representation of this terrain. And we are going
to use this null to reference in the RBD to create to add this as an
collider and after that, Loon let's convert this into geometry because
for rendering, as well as adding
some water line, as well as some of the
extrusion and mud, all of these we need this
in geometry because we are also going to shade this
and we also need the jus. And for that, we need
the polygonal geometry and not this volume
representation terrain. And for that, we have a
node called height field. Convert node. Let
me type this again, height field, convert
height field. Let's add this and
connect this and now this height field convert
node will convert this into polygonal geometry, and here as you can
see now we have this polygonal geometry
and we also have UVs, and that will be our
terrain for rendering. So in here, I'm going to
create another null node, and I'm going to call
this one out terrain. And that will be
our terrain mesh.
4. 04 Import And Prepare Jeep: Now that we have
this model finished, now we can import
our Jeep model, and let's rig and animate our Jeep model using
the RBD bullet solver. And first, let's
import our Jeep model. And if I go into my
folder, here's can see, I have already downloaded all
of the assets that we need. And here we have the Ville Jeep. If I double click Here's CC we have this one, Ville Jeep USDC. And when you download this, you will only get this USDC and you do not have
this material folder. And to actually extract the
material from this USDC, we can open this
USDC using the VNR because USDC is
actually an A zip file, which means Winaar
can open this. So if I right click and
here we have the open with, let's open this with
WinRar archiver. Let's open this,
and here as you can see we have this SN file, which is an AUSTC and in here, we also have folder named zero. And in here, we have
all of these material. So you can just
click and drag this, and I'm going to I
just click and drag in here and I rename this folder
from zero to this material. And here we have
all of these maps. Now let's import
this Village USDC into our Houdini scene file. So let me open up my Houdini
file, and here we are. And to import this, we have
an node called USD Import. So if I add an A
USD import node, here you can see, we have
the USD file import. And let me import
this onto this side because we are going to create many more nodes. So
we need this space. And onto the USD file import, let me view this
and onto the file, let's pick up our file. And I already have
stored into this emrfle. Let's go into the Geo, and here we have all of our assets. Let's go into the
Ville Geb and let's import this USDC and hit Accept. And here you can see our
model has been imported. Let me enable back
this view plane grid. And right now the
size is too large. So let's scale this down. And I'm going to add an A
transform node for that and let me view our transform
and onto the uniform scale, let's scale this down to 0.1, and I think it is an A
still very large scale. So maybe let's lower this
down to even lower value. So zero point double 06 and press F. And if I were
to middle mouse button, and here you can see,
we have the size, and that is an A 1.8
meter by four meter, and I think that
is an A good size, that is manageable
size for our RBDcm. So let's keep it onto the 0.06. And now let's orient
this Jeep as well. Right now, it is facing
onto negative Z, and I'm going to rotate
this onto the Y by 180 to actually face into
this positive Z direction. And if I were to
middle mouse button, here you can see now we
have this packed USD file and we also have an A name
and the path attribute. And let's visualize
our name attribute. If I were to click on this one, let me find there.
We have the group. Let's click on it, and in here, we can actually click
on this gear icon, and we can select the attribute
and let's view the name. And into the name, we
only have this scene. So maybe let's change
this to a path. Let's click on it, and we also get this one only scene file. And to actually access
this name attribute, we actually need to unpack this USD file geometry and let
me hide this group option. Let's go into the transform. Onto the USD import, I'm going to click on
this unpacked node, and that will unpack this into
regular packed primitive. So if I were to
middle mouse button, hers can see now we still
have the packed USD, but now we have 20
separate pieces, and we also have
the name attribute. And we can check. Let's go into this
one display group. And here you can see now
we have access to all of the individual pieces
of this Jeep model. And we are going to create
the group because we need the access to its heel for
the animation and the body. So let's start grouping
first this body. And if we were to actually check the naming
scheme of this model, if I click on it, and let me see if we are viewing
the correct attribute. We want to view the
name attribute, and here you can see we
have this name attribute. And in here, we have
this one, the front LH, which means the left hand side, that is the tire
and wheel and we have the front tire and wheel. So all of the names starting
with front underscore, we need to group them separately because these are
our wheel for that. Let's add an A blast node. I'm going to disable this. In here, let's add
an A blast node, and I'm going to connect
this into the blast, I can add an A expression
if our at name if that is equal to front FRO and
D front and underscore, and I'm going to add an A star, which means that include everything that start
with front underscore and all of the name
that is above this. Let's click on it, and
here you can see now we have our wheel has been
deleted this front wheel, but we have these back wheels, and we also want to remove these wheels as well because we only need the body and we
can add another expression, and first let me check the name. Pattern of these wheels. So let's click on it, and here you can see we
have this one rare. So these are our rear
tire as well as wheel. So let's remove all of these that start with rear underscore. So let me hide this again
onto the blast node, and in here, we can
add another space, and I'm going to call this one. Let's add another
name attribute. So at name, if that is
equal to our re underscore, let's add an A star.
Let's add this. And now, s can see we have these back
wheels gone as well. And we do need this back wheel, this spare wheel because that
is an a part of the body. So let's keep it like that. And that is our body
separated from V. And I'm going to create
an A group in here. Let's add a group
name, group node. Let's at this, and I'm going
to name this one our body. That is our body group, and I'm going to
just move it here. Maybe let's move
it onto this side, and let's add
another blast node, and this time we are going
to extract our wheels. So let's add blast
node and connect this, and we know that we have
the front wheel and they start with this name front. So I'm going to just copy this. Path in here at this expression, and I'm going to just paste it, paste it in here, and that will just
remove these wheels. But we want the
opposite of that. So let's click on this
lead non selected. So these are our front wheel and these will be
our steering wheels. So I'm going to create
an A group in here. Let's add an A group node, and let me connect this. And I'm going to call
this one S wheel and that means that these
are our steering wheels. And let's add duplicate
this plus node, press and hold the
old key and drag, and that will duplicate
this plus node. And we just need to rename this ad name
from front to rear. So let me remove this
front expression, and let's type this one rare. And if we view this and that
will add these pack wheels. And now we can merge both
of these wheels together. So let's add an A merge node. And I'm going to merge
both of these plus node, and here we have these wheels. And now let's create
a group named wheels. And for that, let's
add an a group node. And let's connect this and I'm going to call
this one our wheels. These are our wheel
group wheels. And now we can merge our body
as well as wheels together because now we have
grouped and extracted all of these different pieces that we are going to animate. Let's merge our body
with our wheels, and now we have
our original GPA. But now with some groups, if I were to middle
mouse button, now we have three primter
group, we have body, we have the steering wheel, and we have these back wheels. These all of these wheels. And now we can add an A RBD configured
node to rig this chip. So let's add an
RBD car rig node. So let's add this, and I'm
going to connect this, let's connect this onto this RBD car rig
node and view this. And in here, we have
the wheels group, and we have created our
group for the wheels. So let's click on it. Hers can see we have the
wheels. Let's select. So now that we have
selected all of our wheels, now we need to define the steering wheel and we
also have the group for that, and in here, we have the
S wheel. Let's click. And Here's can see now we have the steering wheel as well. And in here, we can configure this RBD car rig for our
RBD bullet simulation.
5. 05 RBD Car Rig: Now let's animate
this cheap model with using our RBD car rig
and pullet solver. And in here, first, heres can C, we are using the Pac geometry. And if I were to middle
mouse button heres can C, we have the packed USD
primitives and to actually create the attribute as
well as rig or this model, this RBD rig require
the polygonal geometry, and for that, we
need to unpack this. And in here, let's add
an unpacked node, first. And I'm going to
connect this and let me enable the parameter
of the unpacked node. And if I were to
middle mouse button, and here is can see now we have the polygonal
piece of geometry, but now all of the groups are gone because we
are unpacking and now we do not have the
name attribute as well as the groups
that we have created. And for that, let's go into
the transfer attribute, and we want to transfer
our name attribute. Let me select this. We also want to transfer
all of our groups as well. For that, I'm going to type Star and that will just output
all of our groups. If I were to middle mouse
button and Hers can see we have our group
three primitive groups. Now Hers can see
we have the green, which means these are
our steering wheels. We have this blue and that
is for our suspension. Now that we have
this visualization, which means that this
RBD car is working fine. And if I were to
middle mouse button onto the unpack and Heres can C, we do not have the UVs. And when you import
the USD format, the UVs are called the ST zero. Here's Ken C, we
have the ST zero, so that is the UVs and Heres ken C. Houdini is
recognized them as UVs. And we actually need to rename this into UV to
actually visualize. And for that, I'm going
to add an A attribute, rename node, and after that, I'm going to add the
attribute rename, and I want to rename the point attribute
from ST zero to YUV. Let's add this. And Heres can C our view port has
recognized the UV attribute. And if I were to middle mouse
button Hes can C we have successfully renamed
this ST zero attribute. So maybe let's remove all of the attribute
that we do not need. Here as you can see, we have
the primitive attribute. We have the USD path and all of these
that we do not need. And for that, let's add
an A attribute, let nod. And I'm going to click on this Plet non selected to get rid of all of the attribute, but we want to keep
the name attribute. So let's add an NM, and we also want to
keep the UV attribute. And we also want to sorry, we actually added the normal. We we do need the normals, but we do not have
the name attribute. So so the name attribute is
an a primitive attribute. So let's go in here and here's
can see we have the name. And now if I were to
middle mouse button, now we have the name, normal UVs and we have these
three primitive group. Now that is good and
optimized geometry in terms of attributes because we do not have all of these
unnecessary attribute. Now onto the RBD car rig, we can add an A RBD
bullet solver in here. So let's add the
RPD bullet solver, and we can connect
this geometry and constraint because that node will generate our
constraint for us. It will also generate the
proxy geometry for us as well. And we can go into the
RBD bullet solver, let's visualize this, and we need the ground plan
for the collision. And for the collision, if I go into the RBD bullet solver, we have some parameter. Let's go into the collision. And right now on the
ground collision, we have the ground
type set to none. We can change this
to ground plane, and that will add an
infinite ground plane, put in add default ground plane. But we need our own terrain
mesh that we have created. And for that, let's use
this as an height field, we want to add the
height field collider, and let's find our out
null that we have created. Previously for adding
the collision, hers can see we have
this height field. Okay. So we are going to use this height
field for collision, and I'm going to enable
the parameter of my RBD bullet solver onto the collision and onto
the height field, let's click and trag
this null in her, and now we have added this
height field as an A collider. Let me view my RB. Bullet solver in here and
to actually visualize this, let's go into the RBD bullet solver and onto
the visualization, and let's enable
this ground option. And right now, if I just
click and enable this option, that will cause the Houdini to refresh the viewpot
and Hearers can see now we are visualizing
viewing our collision ground. And here you can see the
orientation is not correct. Our Jeep is not in
the correct location. And to actually move this, we can add an ARBD
transform node in here, so that will take care
of these orientation. I set this, and I'm going to connect this in between
after the RBD caring. Fiber to view this, and here you can see we have this
basic transform, but that is for this
RBD rig that we going to adjust the position of our
original higher geometry, constraint geometry, as
well as the proxy geometry. So we do not need to create the additional these
three transform for all of these
different geometries. This RBD trans node will going to take
care of all of this. And we just need to align
this on this bullet solver. And I'm going to view
the bullet solver. And first, let's rotate
this onto the Y, and I'm going to rotate
this onto the 90 degrees. Okay. And I want let's
move this back as well, and onto the translation X. Let's move it back, and let's start this
right about here. Maybe let's change this to minus six round this
off to minus six. And here as you can see
we have these wheels. They are penetrating the
ground, and that is not good. So we are going to add an A offset into the
Y just a little bit. So let's increase the offset and maybe let's lower
this value to 0.1, and it's still not enough. Maybe, let's add an 0.14, and that is looking good to me. Okay, now we have this
collision taking care of. Now, let's go into the
RBD Bullet solver. Let's enable the
playbr and click on this real time option to
enable the real time playback, and let's view our simulation. And here as you can see
our car is bouncing, but it's not moving. And let's adjust some
of the attributes. Let's go into the RBD
car gnode and in here, we can define the speed
right now the speed is zero, and to actually get
the car moving, we need to increase the speed. So let's start this with
value of ten maybe. So let's play again, and here we should see that our car will going to
move and heres can see. Sure enough, our car is moving. And here I have simulated this 100 frame to
view the result. And if I were to go back, the viewpoard
performance is not good. So maybe we need to
create an flipbook to actually view the
animation of this car. And for that, let's click
on this flipbook option. Let's flip book this
with new settings. And onto the size, let's
enable the resolution. And what that will
do, it will use the entire viewpod size
as an A resolution. So let's go into the output, and that is right now, we have the frame range, which means it has the
expression RFN which means we are going to create the flipbook for all
of our 240 frame, but I only simulated
the hundred frame, so let's maybe let's
change this to only 100 and let's start
generating our flipbook. Okay, flipbook is done. Let's view our simulation. And right now Hearers can
see our speed is too fast. I don't want that
fast animation. So maybe let's lower
down the speed, and also the car feel rigid, which means we need to adjust the suspension
attribute as well. So I'm going to just close
this flipbook generation. Let me go back onto
my very first frame. First, I'm going to
decrease the speed. Let's change this to five. And let's go into the configure, and here we have the option for this suspension and all of the tire friction,
all of them. And what I want, I would like to lower
down the stiffness. So maybe let's change
this to half value. The default value is 40, so let's half this to 20. And now let's create our flipbook of our
hundred frame as well. So maybe because we have we have lowered down
the speed of our car. We need to create an A. We need to simulate
more frames to actually view the result
because the speed is slow, and I'm going to
create an flipbook with new setting, and this time, let's create an
flipbook of 150 frame. Let's start this. Okay, flipbook is done. Let's review our simulation. And now hers can see that
this suspension is working, and I think the speed
is good as well. Let's adjust the
animation right in here where we are
crossing this waterline. I want the car to
slip a bit because we have an mud in here and right
now it is going just fine, but we want to add
the slipperiness in here to actually create an animation of that this Jeep is going through
mud and it is slipping. And for that, we can actually
animate the friction. We have the friction
attribute onto the wheels and if I were to
lower down the friction, that will cause these wheels to actually slip
onto the ground. Let's see how we can do that. I'm going to close
this flipok window in here and if I were going into the RBD carrid and
Hears can see we have this star bounces and
we have this tr friction. If I were to lower
this value down, let's slot this down to 0.1. And if I were to hit play
and here you will see that our wheel is spinning and
Hears can see, let me zoom in. Let me zoom in onto this wheel. Let's rewind and hit play. And here you can see
our wheel is spinning, but it's not moving because the friction value is very low. So let's animate this value. I'm going to change the
friction value to one, and to actually animate this, we cannot add the key frame onto the soap level RBD car g because we are in the
dynamic simulation. And in the dynamic simulation, all of our geometry is going to be initialized
onto the first frame, and after the first frame, all of the updates
will not going to be updated into this bullet solver. And to actually animate
our friction over time, we need to actually dive
inside the RBD bullet solver, and in here, we can add
an A geometry wrangle. Let's add an A
geometry wrangle and let's connect this
onto this pre solve. And in here, we can create
adjust our friction attribute, and this emt angle will going to be executed
on every frame, and that will going to any male. So let's add our
friction attribute. So that is an A floating
a point attribute. So let's add an A F, which means the float
and the add sign, and we are going to add
the name of the attribute, and let's set this onto give him an A
slider, and for that, we are going to
create an channel, and let's type this CHF which
means the channel float. And now in here, we need to type the
name of our slider. And I'm going to call
this one friction. Let's at the semicolon,
and let's click on this, create the spare
parameter option to actually add the
friction slider. And now we can animate
this friction to actually animate this or this
slipperiness over time. So by default, at
the very first, I'm going to start
the friction at one, which means the full friction
and after the few frame, let me see which frame we want to actually
adjust our friction. Let me simulate few frame. Let me stop this and here's can see I have
simulated few frame, and we want to animate
our friction right where we have these
wheel into the muds. I think the wheels
are in the mud at right here at the frame 75. So onto the 74, I'm going to add an a key
to actually add an a key, press and hold the old
key and click that will add an a key frame and here can see our parameter
has been turned green. So let's go and at
the frame number 75, and I'm going to lower down
the friction value to 0.1, which means a very
low friction value. So let's add another key, and I'm actually
going to disable the dynamic simulation because I want to go into
the few frames. So after I think the
frame number 140, I want to keep the
friction value of 0.1. So at the 140 frame, I'm going to add another key, which means that all of
these between these frames, we have this friction
value at 0.1. And after the 140 frame, I want to actually start
increasing the friction. And I want to increase
the friction, I think, at the frame number 163 maybe. Let's keep increase the
friction value to one. And let's add an even
and add an A key frame. So now, after the
hundred and 40 frame, our tire slowly start to move and they will stop slipping and they
actually start to move. At the hundred and 63 frame, we have the full friction
and our car will going to be just fine
after this frame. So let's review our animation. So let's hit rewind
and I'm going to enable this dynamic simulation by clicking on the
sprain icon again. Let's go back and
let me zoom out. And this time, let's create the flipbook of our
hundred and 68 frame. Let's add in 168, and
let's start the flipbook. Okay, flipbook is done. Let's review our animation, and here we have the
suspension working, and here as you can see now
we have the slipperiness. And I think this slipperiness
is working fine. You can adjust it
to your own liking, but it looks fine to me. So I'm going to say that that
is an A okay simulation. And first, I'm going to
adjust the frame range. Right now we are using
the 240 frame range. Let's increase this to 275. Let's increase this and let's case out our simulation
onto our disk. And for that, let's add
file cache node in here. Side this and we want to
connect this last one. That is the simulation point. And we are not going
to actually case out this geometry because that will be a very high
cache onto our disk. So what we can do, we can only cash out our simulation points, and then we can transform our original geometry with
this simulation point. And for that, I'm
going to just add the simulation point in
here on to the file cache, let me enable the
parameter of it, and onto the base name,
we have the expression. The first, we have the
dolosine hip name. I like to just remove
the dolosine hip name, and I want to use
the dolosine OS, which means the
operator name itself. And I'm going to call
this one our Jeep SIM. So RBD G SIM. In here, we have the base folder where we want to actually
store the cache, and I want to store the
cache into my SIM folder. Let's go into the dollar sign. Hip file, and let's go into
the SIM and hit Accept. I want all of the simulation
to go into my SIM folder. And in here we are simulating the 275 frame, and
that is correct. Let's click on this
save to disk option to actually case out
our whole animation. Okay, all done, the
simulation has been done, and now if I were to
visualize our cache and view, and heres can see we
only have these points. So we only cashed
out these points. They have all of the
necessary attribute. If I were to middle
mouse button, hers can see we have all of these VW as well as the
orientation attribute, and we are going to use
these points to actually animate this higher geometry that is coming from
this RBD car ring. For that, we have an node
called RBD car transform. So if I add an RBD
car transform, and here as you can
see, let's add this, and it requires the geometry, and we want to connect this transform geometry where we have actually
oriented correctly. So that is our geometry
and the constraint. These are constraint
and the proxy geometry, and that is our proxy. And for the simulation points, we are going to use
this cached animation. I'm going to just connect the output or this
file cache onto the simulation point now if I were to visualize the
RBD car transform, and Hears can see if I were to scrub my playbr and heres can see how this animation is now being applied onto
this static geometry, and we are using these
animation points, which is a very
lightweight cache to actually animate our
original Hiras car. And at the in here, we have the geometry
that is hirasGeometry, fiber to add an a null. Okay. And here you can see
that is our highs geometry, and we are going to use
this for rendering. And for that, I'm going to
rename this out his Jeep. And later on, we are
going to reference this null for importing
into Solaris for rendering. So that is our high ras piece
of geometry for our GP.
6. 06 MPM Solver Overview: Let me walk you through
the MPM solver if you haven't used before there, let me show you how
you can set it up. I'm going to come in here and
create an A Geometry node. Let's dive inside
the geometry node, first we need the source. You can create any geometry
for source of your emission. I'm going to add
an A this geometry that side effects has
provided the squab. Let's add this and we have
our lovely squab geometry. Let me enable the parameter of this geometry and let's move
this geometry up a bit. And for interesting motion, maybe also let's add
some rotation as well. Now to create the
MPM simulation, first, we need the MPM
solver. Let's type there. Here we have the MPM solver, and like all of the solver, it requires the PM source. The middle pun is for the collider and the last
one is for the container. First, we need to
add the source, and by the way, you cannot add this like
this, it won't work. We have an node
called MPM source. If you type PM, let's add an PM source node. Let's add this and
we can connect this in here, let's visualize this. Right now the MPM
source is throwing an error because the
MPM source require actually the container to set the resolution of
our source geometry. First, let's create
the MPM container. Going to add an MPM
container node. Let's add this and the
last one is the container. Now we can connect this
into our MPM sources. Let's view the MPM solver, and here as you can
see the PM source is still throwing an error
if we enable the parameter, and here we can define
the PM container. Let's click and drag this PM container onto
the MPM container field, and now the error is
gone and now we can see our geometry has been converted
into these particles. The MPM simulation is
basically an flip simulation. We have this particle
and we have the volume. If you work with flip, it's
more like flip simulation, and I think it is flip the
extended version of the flip. Here onto the PM solver
onto the solver type, we have some basic attributes. We can set the gravity and
air drag wind velocity, and we also have the option
for the surface tension if we are going to create
an water simulation, you can enable the
surface tension. Now if we hit play, let's see how the default
behavior looks like, and here is can see right now
that's how it looks like. We can go into the MPM
source onto the MPM source. Here, we have the
material preset. Right now we are using the snow preset and the behavior
is set to checking key. We have lot of different
presets we can use. Let's say if we want to
create an A water simulation, we just need to click on this
water and if we hit play, here you will see that
our simulation will behave like water and
here you can see. Now it looks as if we are
simulating the water. And onto the MPM container, we can define the bounds because it is an A
flip simulation. So we need the bounds and to actually
visualize the container, we need to go into
the MPM solver and onto the visualization, and we have the show
container option on, but I cannot view this. Let's see why. Now I'm
in the MPM container. I'm going to lower down
the size of our container. Let's lower this down
to three by three. And the reason we cannot see our domain are these
or the container box, and that is because
we are currently using the boundaries
as an A open. If we were to click on this, that will use this option
for all of the axes. We can click on this to closed, and now heres can see because we are using
the closed bounds, now we can see the
container bounds. So all of the
simulation will going to be live inside
of these bounds. We can increase the size
of our bonding box. Let me move this up a bit
onto the translation. Y, and let's play here
you will see onto the bounds at these boundaries or this container box will
act as an a collider. I can actually set
this to delete, which means that if the
particle leaves these bounds, they will simply
going to get deleted. And here you will
see here can see. Now, all the particle that
try to leave the bound, it simply just get deleted. Let's keep it as closed, and we can actually
set the container bound if we define the
input geometry in here. For example, if I create an A box in here,
maybe let's set this. And we can scale this box to our liking and we can actually use this box
to set the bounds. Let me increase the
size onto the X. And now, if I just connect
this onto the domain geometry, now the PM container will use this geometry
to set the domain. Now we can go into the
PM solver node again, and here you will see we are
using these same bounds. I can just click and drag to actually increase the bound because our squab
head is cutting off, and I'm going to increase it
a bit more and let's play. And that is our container. And we actually do have an preset for the PM solver to quickly set
up our simulation. If we type MPM configure, let's add an PM configure node. Here you can see, we have the PM configure.
Let's add this. And what the Houdini will do, it will add these basic nodes required for setting
up the MPM simulation. We have the solver,
we have the source, we have the coldr and we have the container
all ready to go. Sweet. Now, we just need to. We don't need them just
remove all of these nodes, and onto the PM
source where it says, I can just remove this sphere and I can connect my own source, and I want to connect
the squab in here. And let me enable my
Vetool and let it play. Here you will see that we
have this snow like preset, the default snow like preset and our squab is looking
like we have an A snow. I can go into the MPM source tab and onto the material
preset here as you can see, we have the snow option. I can change this
to let's say water and now we have the liquid
behavior. Let's see. Sure enough, we have
water like simulation and we can add another type
of simulation in here, for example, we can mix multiple material
into this simulation. I'm going to add an A, let's say Rubber to in here. Let's add the Rubber geometry. And let me template this. Let's enable the parameter, and let's move this
geometry a bit up. I'm going to move this up. Okay. I'm going to add
another PM source node or we can just duplicate
this PM source. Just press and hold
the old key and drag and we can effectively
duplicate the source node. Let's connect this in here and to actually add
them both together, we can add an A merge node. Let's merge them both of these sources together.
Let's add this. And the first one, I'm going to convert this rubber
away into water. So let's go into the MPM source, and right now it is set to
water and liquid, it is good. And onto this squab, I'm going to change
this into sand. So let's go into the
material preset, and in here, I'm going
to change this to sand. And we have the sandy behavior. Let's see the result.
And here you will see uptp we have water
and down we have the sand and we are going to mix both of these
materials together. And here you will notice that this simulation is getting slow because when we are working
with multiple material, the simulation will get slow. I'm going to stop this and to actually create an A
visualization a better. I'm going to add an A
color onto our particles. First, let me template
our rubber toy. After the MPM source node, I'm going to add
an A color node. Let's add this. And
because that is a sand, let's create an
sandy looking color. Maybe let's change the two
more lighter brownish color. That is our sand.
And same thing. Let's add a color node onto
our rubber toy as well. In here, let's set this
to a lighter blue color. Let me change this a saturation value,
something like that. Now we can differentiate
in both of them. Now let's play again. And here as you can see, we have the sand on down and
up we have the water. Maybe we can adjust the
bounds of our MPM container. I'm going to use the size
that we have onto the domain. I'm going to close
the boundaries. So let's enable this
and all boundaries, I want this to be
closed in a closed box. And let's move this a bit up. Maybe let's move
this five unit up. Let's try this again. Okay? The bound is still too big for to actually create the
collision onto the water. Let's go into the container, and let's lower down
the overall size. I'm going to lower
this down to maybe five in both of these axes. And now let's move this down. I'm going to move this
down to maybe unit of two or maybe three.
Let's play again. Okay. So here you
can clearly see that we have these two
simulation working together and you can
actually control the resolution of
your simulation. Right now, the simulation is very low as to actually create the higher simulation to add more points set the resolution onto the MPM container node. Let's enable the parameter
of the MPM container, and up here, we have the
particle separation. So if we lower down this
particle separation value down, let's change this to 0.01. And here you can see, now we
have a lot more particles. Now we are creating a
more highs simulation. And you can keep
lowering this value down to create high rise simulation. And in here to actually add
the convert this into mesh. For example, we have the sand and we actually do not
need to convert the sand into mesh because we are
going because you will going to use these points
to render the sand. So we do not need
the mesh onto sand, but we do need the
mesh onto the water. So after the PM solver, we need to separate
both of these sources. And actually, the
sources name is controlled by the actual
this node name PM source. Let me show you if
you go into the PM solver and middle
mouse button here, you will see that we have
the source name attribute. And here you can
see it is string, and we have these
two unique name. And we can check if we go into the PM solver
geometry spreadsheet, and that is an A
point attribute. Let me find the name attribute. Here we have the source name. The first one is
set to PM source and because we are using this PM source and
this 1:00 P.M. Source one. So let's
rename them properly. I'm going to rename this to
sand and the PM source one, let's change this to water. And we actually need
to hers can see onto the source then we have all of these changes reflected. Now let's go back onto
the sin view again, zoom out, and let's play again
to simulate a few frames. Let me stop this in here. We actually do not
need to simulate this because we know how
this simulation looks like. Now we just need to
separate these sources. Let me stop this because we are using an AI very high
rise simulation. That is why the simulation
was taking too long to simulate so I just stop this
at the frame number six. And after that, to actually
separate the sources, we can add an blast node in here at the end
of the PM solver. Let's add the blast node and enable the parameter
onto the group, we can say change
these two points. Let's inhere type
the attribute name. And if we middle mouse button, we have the source
underscore name. So in here, let's
type at source name. And if that is equal to water
because that is an string, we need to type the name, water, and the colon and now here you can see the
geometry has been deleted. We can just click
on this delete, non selected to actually
invert the selection, and now we can rename this
to our water geometry. Sorry, that is not
water geometry, but that is our water particles. I can duplicate this
node again and I'm going to uncheck this
delete non selected node, and this side, we have the sand. Now we have both of these
sources separated onto the Water node to actually convert this
particle into mesh, we do have an node
called PM surface node. Let's type an PM surface. Here you can see, we
have the PM surface. Let's add this and we need to connect this onto
the very first input, which is the MPM particle. Let's view the MPM surface node, and here's can see we
have this mesh generated, and right now it
is an A VTB mesh. Here's can see, we are
creating the surface VDB that is not an
polygonal geometry, but we can go into
the output type and change this to polygon mesh, and now we have the
polygonal mesh, and we have some option. Let's go into the surface tab. And if we enable the
filtering option, here we can dilate or smooth. So maybe let's enable
the smooth option, and I'm going to just increase the smoothness value to actually
create an a smooth mesh. And maybe let's change
this to an smooth shading. So let's click on it here and we have this
option, smooth shaded. Let's add this. Okay, now
we have the smoothness. And that's how you can
convert this into an A mesh. So that's the basic of MPM
solver so in the next lesson, let's learn more
about the MPM solver, and let's continue
our project and create the MUD simulation
in the next lesson.
7. 07 MPM Source Mud And Water: Now let's create
the MPM simulation, and first, we need to
create these sources. Let me zoom out and in here, let's go back where we
have the terrain node, let me view my this
geometry node out terrain. Now, let's extract the water
line that we have created. If you remember, we
have the mask in here. If I were to let me say height field mask
shrink. That means oo. Here's can see,
we have the mask, and we will going to be using this mask to create
the waterline. So let's go into the terrain
and press F to zoom in. And if I were to
middle mouse button, we should see the
mask here we have the mask and we can
actually visualize this. We need to hower over the node, click on this eye button and click on this mask
to actually visualize. And here is can see,
we have the mask. And when we converted this by using the height
field convert node, this node, it will
actually transfer all of the masks as
well, which is good. I'm going to first let me height the visualization
of the mask node. So let's disable
the mask option. And down here, we can
add the Blast node, and we can say remove if at mask I sop from
mask red value. Let's say if at mask dot or
if that is equal to one. Let's add this, and we need
to change these two points. And here you can see we
have this water line gone, and we need the
invert selection. So let's click on this let non selected option to actually
invert the selection. Here we have our
water line extracted. And if we zoom in, you can see we have some of these
unconnected points. So they will create some
problem down the line. Let's add an A clean
node to actually remove all of the points that
are actually disconnected. Let's click on this and
the clean node will going to create an
A clean geometry, and it will remove all
of the unused points. Now we need to add the
thickness because right now it is an A flat
surface geometry. For that, let's add
an poly extrude node, and I'm going to add the distance value maybe
let's add the value of 0.1, and I think that
value is enough. And down here we do not
have the output back. So let's click on
this output back to actually create solid
piece of geometry. And now, it's just a matter of creating the MPM source node. And for that,
first, I'm going to create an A MPM configure because that will set all of the basics barebone node
that we actually need. Let's add MPM configure and we have all of
these basic nodes. I'm going to remove all of them the MPM source sphere as
well as the MPM collider. We have the default box. So let's remove both of them, and let me go back and we are actually at the frame
number 37, so let's hit Rw. We must be at the frame number. Very first frame. Let's
go into the MPM source. I'm going to connect
this in here after the Polyxtrude and
onto the MPM source. I'm going to rename
this to water. So let's type water onto the MPM source and onto
the material preset. Let's change this to water and the liquid preset and
this liquid behavior. And we are fine with that. We can actually
set the resolution onto this MPM container, and we will adjust
the resolution later. But now let's create
the actual mud because now we have the water line and to maybe actually
visualize this better, maybe let's add an egg. Or node in hair
to actually color our particle to bluish looking. So let's go into the color node, and let's change the color
to a light blue color, and I think that color
is looking fine. And now let's create the mud. And for that, I'm going
to make the selection because I want the
mud onto this edge. So let's isolate the part which we want to
convert this into mud. And for that, I'm going to add an A attribute paint node
to actually paint the mask. So let's add this, view the attribute paint mask and hover over to the
viewpot and press Enter. Now we can visualize this mask because we already have the
mask attribute present. So let's go into there and
the attribute set to mask. Maybe we can actually remove
the previously created mask. Let's inhere add an
attribute let node, and let's remove all
of the attributes that we actually do not need. Let's click let no selected to remove all of the attributes. Do not need any
attributes in here. So let's go into the
attribute paint, press Enter. Now we have an A perfectly
clean mask geometry. Now, let's increase the brush, and we have some shortcut in here to actually
increase the brush. We have the control shift, and we need to press and hold the left mouse button
of our mouse and drag, press control shift and
left mouse button and drag to actually increase
the size of our brush. And I'm going to increase the brush size and make a
selection onto these edges. Maybe let's lower this
brush size a bit down, and let's make a selection. I'm going to select this
edge boot very roughly, and let's make an selection
on this in here as well. Let's keep selecting.
Let's select this part. And let's also maybe
add this part as well. And let's add this
piece of geometry. And let's add this
one in here as well to maybe let's increase
this pot a bit bigger. Let's add this. Okay. Now that we have the mask created,
let's extract this. For that, let's
add an blast node. So let's add the blast. And by the way, right now, we have the mask onto
our point level. If I were to visualize, here you can see our mask
is on the point level. Let's promote this onto
primitive level and that way we do not have
all of the unused points. So after the
attribute paint node, we can add the
attribute promote node. And let's promote
the mask attribute on this mask into an ape
primitive attribute. And that way, we do not
have to worry about all of the unused points now because
it's a primitive attribute, so all primitive
that are red will going to be extracted cleanly. So after the attribute remote, let's go into the Blast node, and now we should
be able to select. Let's change this to primitive
and let's click on it. And right now I cannot see the attribute, but that's fine. I can say at mask if
that is equal to one, which means the red value. And here we have it.
Et's click on this, delete non selected option. And right now heres can see we have some of the
missing patches. So let's go back onto the
attribute paint node again. And if we zoom in, Hers can see, we can just click where we have Let me view the blast node, and here we have another.
Let's click on it. Let's view this.
Okay, we have some of the hole there as well. So let click. Let's
click and select. Let's select this so that
we do not have any holes. Okay. I think now that
it is looking fine. We do not have any holes. Now let's add some
thickness onto this geometry because right
now it is a thin surface. So let's add an extrude node. And let's connect
this onto polyextrude and let's add the
thickness value of 0.1. Let's also enable
the output back option to actually create
this thicker geometry. Or maybe let's increase the
distance value a bit higher. 0.2, now we have this and
that will allow us to add more points onto the source because we are using
bigger thickness value. And after that, let's
convert this into VTB because right now it is looking
more rough hers can see. The geometry is not organic looking to create the
organic looking geometry. Let's convert this our
polygonal geometry into VDB. For that, let me adjust all of the node graph and
let's move them down. So after the polyetrude, let's convert this into VTB. So let's add VDB from polygon node and connect
this and I'm going to set the resolution to an A 0.02 to create a more high
resolution variant of our BDB. Let me zoom out, and at the end, let's see, we have
this our geometry, and if I were to
template this Heskonc, we have this
geometry at the end. So maybe let's clip this part of geometry
so that we do not have particles falling down because we are not actually going to
see this geometry anyway. So let's maybe add an
A clip node in here. So after the polyetrude, let's add an clip node. And let's connect this and maybe let's clip this
onto Z direction. Right now we are using the
X, so let's zero it out. Let's use the minus
one as our axis. And here as you can see, we
are clipping our geometry, and let's adjust
the distance value, and we actually need to set this one to Maybe let's
change this to minus seven. Okay, so now we
are just clipping just a little bit
of our geometry. And we can also click on this fill polygon as
well because right now, if I were to template
this here as you can see, it is creating this
hollow geometry. So let's add an A fill polygon, and that will take
care of this hole. Now, we can convert
this into VDB and maybe let's introduce
some organic noise onto this VDB as well. Right now, it is perfectly flat. So let's add volume noise in here because we are
working with volume. So let's add a volume noise SDF because we have
the SDF geometry. Let's add this.
Let's connect this and view the volume noise node. And we have the zero centered, and that is correct. So let's increase the
amplitude to a higher value. Maybe let's change this to
0.5 and let's see the result. Okay. Now here you can see, we have our geometry
deformed quite a lot. And it also looks organic. So let's keep it like that. And first, let's move this source up because when
we are going to simulate, if I were to view this or
maybe template this terrain, here you can see we have
our source going down, going below collider mesh, and that will create
some problems. So let's move this a bit up. And that's at the
transform after that, let's move this onto
the Y axis onto the Y. Let's maybe move this one
unit up and right now we are above we are rising
above our ground, and that is fine because we are going to use the simulation
or this MPM Solver, dynamic simulation to
dynamically fall down this mud and settle down
onto our geometry because that will create the
natural looking this mud. So after the transform node, we can add an A MPM source node. And for that, I'm going to just duplicate this MPM source. Let's click on it, press
and hold the key and drag. Let's click in here and we are going to call this one mud. Let's type d, and
let's view the result. Okay. Now we have these
mud particles added. Maybe let's add a
color in here to actually visualize
this as an A mud. So after that, let's
add an A color node, and I'm going to change this to a brownish color,
dark, brownish color. Let's desaturate this. Okay. That is looking fine. Let me move all of
these node down. Maybe let's move
this color node up. And now we just merge
both of these sources. So let's add merge node in
here and merge this with that. And onto the MPM collider, let's add this terrain
geometry as a collider. So first, here, as you
can see onto the train, we do not have an A thickness. So let's add the thickness
onto our train geometry, and for that, I'm going to
add the extrude volume node. Let's at the extrude
volume node in here. Let's pick up wire and connect this at the end.
Maybe let's move this up. Let's view the result of our extrude volume and heres can see this will add the thickness
onto this train geometry. Let me enable the
parameter of it, and right now we are using
the depth of minus one. And maybe that depth
is a little too high, so maybe let's lower this
value down to 0.2 maybe. Okay. Now we have this
enough thickness. We do not need that s -0.2
value is looking fine. So after that, we just need to connect this onto
this MPM collider. Let me move this
node a bit up and let's connect this onto
our MPM collider node. Let's view our MPM collider node to see the
collision mesh generated. Here we have the VTB
mesh as a collider. Let's go into the MPM collider, and here we have the grade
VTB from polygon option. That is correct because we are inputting the
polygonal mesh, and we can actually overwrite
the boxel size as well. Let's enable this and maybe let's lower this value
down because right now, this SDF representation
is very coarse. So maybe let's give some
resolution to add detail. Let's add the value to 0.07 and I think that is good
looking collision mesh. We do not need to create more high collision SDF more than that. That
will work enough. Now, let's go back and let's
view our MPM Solver node. And here we have it. And I cannot see water. Let me see why is there. We have the water node added. We also have the emmert. Why I cannot see the water line? Maybe let's go into the solvent node and
let's simulate this, so it will update. Okay. I still cannot see it. So let me stop this in
here and heros can see. First, we need to adjust this behavior as well
because onto the mud, right now it is
behaving like water. So let's go into the mud node because we are using
the water preset. So let's change this to soil
because that is an soil, and we do need the chunky
behavior. Okay, that is fine. Let's hit play again, and here you can see now we are settling down
this mud geometry, and now it will look organic because we are dynamically settling down this mud geometry, and I think now it
has settled down, but I cannot see my water. It's going to the
water node in here. We have the container
correct preset water, and that is correct, too. So then why I cannot see it. Maybe let's adjust
the container. So we have the size ten by ten. If I were to close this, that's at the closed boundaries, and let's see, okay, our container box is fine, too. So I think that is because
of the ground plane. So maybe let's go
into the MPM Solver, and onto the collision tab, Harris can see we
have the ground plan, and we actually do not
need the ground plan because we do have
this rain mesh. So let's disable this, and now Hears can see
I can see my water because the ground plan was actually removing
this our waterline. And right now, our simulation is cutting off. Hers can see. So maybe we need to
adjust the bounds. Or maybe let's go into
our MPM container. Let me zoom in. And for now, let's uncheck this
closed boundary, and that will actually
disable these bounds. And now we have all
of our geometry back. So let's simulate this few
frame to actually settle down our water as well
as this M geometry. Correctly. So let's
simulate this few frame. Let's settle it down. And maybe I think at the frame number 30. And right now here
as you can see we have some of the particles escaping and we also have the Mud escaping
in here as well. So maybe we do need
to adjust our bounds. And for that, I'm going
to add an A box node in here and I'm going to use
this box as by bound. So let's select this
and press Enter. And I'm going to
increase this excise. And also, let's increase this
excise on the axis as well. Let's let me increase this size. Let's increase the Z size onto negative size as well
and move this up. And also maybe let's increase
this down. Let's rewind. Now we can use this
as an A container, and now we can go into the
MPM container and say, please close all
of our boundaries. And now the water as well as this mud won't go
beyond these bounds. Let's hit play again and
now let's settle this down. Here you can see this
simulation is now working fine. So let's simulate this
few frame until we have this settle down
version of our simulation. Let's keep simulating this. I think the frame
number 38 is fine. Let me enable my camera. YouTol maybe let's play around with our resolution as well onto our MPM container. And right now we are using
very low simulation, and as you can see, I can still see that these particles are leaving the area. Let me go back and let's go
into the box and press Enter. Let's adjust the size. Okay. I think now that's fine. Let's go back our view tool
and onto the MPM container. Let's lower down the particle
separation to actually create a little bit more high
version of our simulation. So maybe let's start
this 20.01 for now, and let's see the
result. And let's see. Okay, here we have, we have a bit higher resolution, but keep in mind that 0.01
is still a very low value, but I think we can
work with that. So let me simulate few frame, and let's settle
down all this mud.
8. 08 MPM Initial State: Now let's create the initial
state of this mud geometry, and here I have
simulated few frame. And here as you can see
we have this water is flashing with the mud because we are actually falling
down the mud down here. And actually, to create the
initial state of this mud, we actually do not need to
simulate this water as well. So let's hit rewind. And what I'm going to
do, I'm going to just not import the water
geometry for now. So onto the merged node, I'm going to just delete this water line and
onto the MPM Solver. Now we are only just
simulating the Md. So let's simulate
this and let's settle down these particles
onto these grounds. Okay, I have simulated
a few frames, and now I think this mud
has been settled down, and now we would like to create the initial
state because we want the simulation or this
mud to be initially start like that and to actually
create the initial state. After the MPM Solver, let's add an file
cache node in here, and I'm going to connect
this onto the file cache. And here you can see we have these mud particles
only and that is good. I'm going to rename this
to our initial state. And onto the file cache, here we have some of
the option based name. We have the hip name and the OS. I like to just
remove the hip name. I'm only going to just keep the dollar sign OS expression, and we are going to simulate
this only N. Sorry, we are going to write out this cache only
this current frame. So onto the evaluate, let's change this
to single frame, and that will use only
the current frame that we are on and we actually do not need this time dependent cache option because
it is an A steel frame. So let's disable the
time dependent option. Now we are ready to save
out our initial state. Here we can define
the base folder, and right now we are storing
this onto the geo location. And I think the
geolocation is good or maybe we can change this
onto our SIM folder. Let's go into our
dollar sign job, and here we have the SIM. Let's cept let's save to disk option in here
to save the cache. Okay, now we have
save out the cache. Now, let's remove
this from here, and we need to let's go back onto our where we have
this MPM source node. What that node will do, let me press escape. Let's rewind onto
the very first frame because we were at
the frame number 24. What this node will does, it will just create some
of the attributes that this node or this MPM Solver
node needs to simulate. So what we can do,
we can actually transfer the source attribute
onto this initial state. So we can add an attribute
transfer node in here, and I'm going to just transfer the attributes from
this mud source onto my initial state. So let's go into the
attribute transfer. Let's enable all
of the attribute. So if nothing is defined, which means all
of the attributes will going to be transferred. So let's view the
attribute transfer node, and if we were to middle
mouse but and here you can see we have all of the attributes present in here. Let me view the mud. And here we have the
source name and source ID. Let's see. Okay,
we do have some, I think, additional attribute. We have the JP and JE. Let's see if they
are present in here. Okay, so they are not
present in there. So what we can do after
the initial state, I can add the
attribute delete node, and I'm going to
just remove all of the attribute by clicking on
this delete non selected. So where we have
the initial state, we are stripping off
all of the attribute. So if I middle mouse button, we have no attribute. Now we can use the
attribute transfer to bring back all
of our attribute. So after the attribute transfer, here can see we have
our attribute bags, and we can connect the
color node now in here, and now that will be
our initial state. So let's connect
this color node, and now we can view
our MPM simulation. Now here can see we have our initial state and we have our water ready
to be simulated. And now we only need to
bring our Jeep geometry, our Jeep collider, and we are ready to simulate
this mud simulation. So let's bring our Jeep in
here in the next lesson.
9. 09 Repairing Collision Geometry: Now let's bring in our Jeep
model as an a collider. Because right now
we have the mud, we have the water, but we do not have our Jeep as a collider. Let's go back where
we have animated our Jeep and we have
animated in here. We have the RBD Jeep simulation. We have this out
high as Jeep model. Let me find where it is. We are looking at like
that. Here we have it. Let's bring it onto
this collider as well, where we have this
collision geometry. Let me move this onto this side that is our
collision geometry. I'm going to just duplicate
this MPM collider node, and I'm going to add an merged node in here as
well because we are going to use both of them as an a collider or
this train geometry, as well as this Jeep model. And right now, we do not have Jeep model in here, so
let's connect this. So to bring this geometry or
this out high as geometry, what I would like to
do, I would like to add an A object
merge node in here. So at the end in here, I'm going to add
an A object merge, and that way we can avoid
any large of these wires, and we can keep this
network graph clean. So onto the object merge, we have the option to
import our object. So let me zoom in and let's
drag this null in here, or out highers null. So let's click and drag. And now we should see our
animated our geometry in here. Okay? And here as you can see, we have let me view this. Okay. I think let's disable this because when we
are going to connect this, it will actually
going to animate. So dynam simulation disable let's see, and let's scrub this. Okay. I'm going to connect
this into the PM collider. And let's hit rewind at the very first frame and let's view our collision geometry. And heres can see how this MPM collider
has been converted into SDF volume because we will be going to use the
SDF for the collision. And right now the resolution
is not very good. So let's go into the MPM collider and we can lower
down the axel size. So let's lower this down to
value on FA 0.01 and hers can see we have a much
better representation of our collision geometry. But it's not perfect.
Hers can see. We have all of these holes if we were to zoom in
and here is can see. We have nothing in here and
we have nothing in here. This happen when we
have the bad geometry, so VDB does not know how to
actually interpate this, and we need to repair
this collision mesh for this SDF
to work properly. Because when we are
going to simulate this, our water and as well as mud will going to move
through these holes. As you can see, we
have these holes, and we will have an
problematic simulation. So let's fix this
collision geometry first. Onto the collided type
right now is set to static, but we have the animation to actually bring the animation. Let's change this
to animated git because we have the
animation present in here. So let's see if the animation
has been brought it. Okay. That is working fine. We have our animation, so let's hit rewind. Let's uncheck the
move it to centroid. Let's see. Okay. Let's keep disable this move
it to centroid. That will create some problem. So now let's repair this mesh. Let's go back where we
have our highs geometry. Here we have our
out his geometry. To actually view this, let's unpack this first. So what I would like to do, I'm going to add time shift node in here and let's
connect this into the time shift because
this animation is because it's an
animated geometry, and we want an static geometry. We do not want the animation
for repairing our model. So let's go into the time
shift node and onto the frame, let's delete the channel. And now we are at the
frame number one. Now we should see
our static frame. Okay, that is fine.
That is good. Now, let's start to see
what's the problem. First, we need to add an unpacked node in here
because right now we are using the pack geometry and to actually access the polygons,
we need to unpack this. Let's add an unpacked
node, and let's view. And here you can see, we have
some of the thin surfaces. And maybe if I were to visualize
this, if I'm going to, let's see, we have
tin pack faces, polygon, and here's can see. Here on to the glass,
here is can see, that is an a thin
piece of geometry. So whenever we have this
thin piece of geometry, it will create the problem in the VDB mesh in
creating the SDF mesh. So we need to add the
thickness in here. Just a little bit of thickness, we're going to fix the problem. So first, I'm going to
add fuse node in here to actually fuse out all of the points that
maybe not connected. So after the unpacked node, let's add a fuse node, and I'm going to increase the SNAP value to
a higher value. So we'll change this to 0.01,
and here as you can see, we have this this visualization weird
visualization going on, but that's fine
because we are going to convert this
into surface VDB, we do not need to care about
this shading artifact. 0.01 value is fine. After that, to add
the thickness, let's add a polyetrude node, and I'm going to connect this in here and onto the polygon, we only need the little
bit of extrusion, let's add just a slight
bit of distance. The value of 0.1 maybe too high. So let's lower this down to
maybe an A value of 0.01. Okay. And I still see
this weird visualization, and I think that is coming
from because we are using the connected component
as an A extrusion method. So let's choose the
individual elements, and here you can see,
because we are now using the individual
elements as an extrusion. Now this extrusion
is working fine. And now if we were
to create the SDF, and we also need to enable the output back because
I can still see that we do not have the thickness to actually
add the thickness, we need to enable
the output back. And now we have the thickness, and I think that will
create an correct mesh, and we can check
if I were to add an A VDB from polygon node. Let's add this and let's connect this after
the VDB from polygon. And I'm going to lower
down the Waxel size to 0.01 to actually view, and now hers can see. We have our SDF volume
representation, and we do not have any holes. So that will be our
correct SDF collider. So now let's import this. First, we need to actually animate this repaired
mesh because right now, Hers can see we do not
have any animation. Because we are using
the Tshift node. So let's use the RBD
car transform node again to actually transform
this geometry as well. We are going to render this out highs geometry where
we have this null. So we are going to use
this as an render, but this one will going to be
only act as an a collider. So we also need to
animate this as well. To actually make this
RBD car transform work, we need some attribute because this RBD
car transform load, look for the attribute to
actually match these points. Here as you can see, we have
these animated points to actually match these points
onto the pieces of geometry, the original pieces of geometry
to move them correctly. And for that, we
need the attribute. So after the unpack, let's go in here and we were to transfer the
name attribute in here. Let's click on
this select option and let's transfer
name attribute. We need this attribute. Let's go into the
unpack and here we have this where we have our original polygonal geometry. Let me disable the
point visualizer and middle mouse button. And now here as you can see, we have the name, and now
we have two name attribute. We have one name on
the primitive and we also have the name
onto the point level. And we actually do not need this primitive name attribute, so maybe let's add an
attribute, let node, and let's remove this
primitive name attribute. Let's select this
and view this and we do not have the name on our
primitive. That is fine. And now we need to
pack our geometry. When we have fixed that, we have the fuse node, and we have the
poly extrude node. Now we just need to
pack our geometry back because we need
the pack geometry for transformation.
So let's pack this. And if we were to
middle mouse button, here you can see we
have one pack geometry, and we need the
individual pack geometry. Remember, we have these wheels separate because we want
these wheels to spin. So we should have five unique name
because we have four of these wheels and
one for the body. And we need to actually
go into the pack node, and inhere, we need to enable the name attribute
to use the name. It will look for
the name attribute and pack the geometry. And here as you can see
it is throwing an error because it cannot find
the name attribute. And if we were to go into the Polyxtrude and
middle mouse button, here you can see, we
have the name attribute, but that is onto
our point level, and the pack node require
the name attribute on the primitive level to actually
brack out this geometry. So let's promote this. So
let's add an attribute. Promote node in here,
and we are going to promote this name attribute
from point to primitive. And let's uncheck
this slide original because we do need the name
on the point level as well. Because later on when we are going to use the
RBD car transform, this node will require the name attribute onto the
point level to actually work. So here we have the name
onto the primitive, let's add a pack node. So now the error is gone. And if I were to
middle mouse button, now you can see we have
five packed fragments. But we do not have
the name attribute, and we also lost our
access to groups. So let's go into the pack node, and let's transfer
the name attribute, and let's transfer
all of the groups. Let's add an star in here, which means we want to
transfer all of the groups. So if we were to
middle moose button, and here is can see we have
our name attribute pack, and we have the
primitive group pack. We have steering
wheel, wheel and body. So that is ready to be animated using the RBD
car transform load. So what I would like to do, I'm going to just duplicate
this node in her and where we were using the original geometry
from this RBD transform, we are going to use
this repaired geometry. So after that, I'm going to add an A null inhere
and I'm going to call this one repaired Jeep. Okay. And to actually avoid these messy looking wire,
what I would like to do, I'm going to add another
object merge node in here, and onto the object merge, I'm going to just click this repair jeep
onto this object. And that way, we have the
access on hair as well. So which means I can just
connect this into my geometry, and all of these will
remain the same. We have constraints SM proxy
SM and the animation point, all of these will be same. So let's go into the
RBD car transform and let's view the result. And here is can see we
have our animation back. Now we have this repaired mesh, which means I can add
an null at the end, and I'm going to call this
one for our collider jeep. Let's type this
one collider Jeep, and let's go back where
we have our object merge. This one, where we are
using the high ras Jeep, we just need to replace the null with this repaired
one. Let me go back. Go back and let
me find this one. Okay, here we have our collider, so let's click and
drag this in here. And now it should work fine. So we can check. Let's go back. Here we have collider, we can view the MPM collider and let's see how our
collision mesh is looking. Okay. Now the collision
mesh is looking fine. We can scrub to
actually confirm. Okay, here can see. We have our collider
working as we want. So let's go back. Now we
have our collider fix. Maybe let's zoom out and
let's organize this graph. And I'm going to select
all of these nodes, and I'm going to create
a network box around it. I'm also going to type this in here that that
is our RBD curing. So for that, I'm going to
create an sticky node in here. I'm going to just
increase the size. And let's call this one RBD RBD curing and we can
right click on it, and we can say hide
the background. But first, I'm going
to just increase the size of this font. So let's lower this
sticky node size. Let's place it in
here and I'm going to just click on this hide background to hide
the background. And now we can just click
and drag and place it. Okay, here we have our RBD
car eg nicely organized. Now, let's view this
with our collider. So let me enable
my simulation bag, and I'm going to just
template this collision box. Let's go into the MPM solver, and here can see we
have our car back. And if we take a look, because our car is actually far away from
this collision source, we can actually save ourselves some of the
simulation frame by actually adding the
animation offset onto the Jeep because let's say if we were to
simulate this right now, if I were to hit play,
what will happen? Let me see if we
were to hit play, our car will going to be move
down, it will settle down, and then it will start
to move forward, and that will be our waste
of calculation time. So let me stop this and let's see I think we have some of the weird problems
going on with our wheels. So maybe let's go into the MPM collider and let's
click on this one, move Pivot to centroid to
let's see if that fix there. Okay, still did not fix this. Let me see why it is happening. Okay, I think the error is coming from this
RBD car transform. So if I were to enable the parameter where we have
the RBD car transform load. Hers can see we have the
option realign wheels. So let's uncheck this and
that should fix the problem because it was realigning the wheel and the
alignment was not correct. So now the animation
is looking fine, which means we need to actually uncheck this realign
wheel in ha as well because it will I
think going to create problem on our original
highs geometry as well. So if I were to view my his geometry, that
is looking fine. So make sure go into the car transform and uncheck
this realign wheel option. So let's go back and check
our simulation collider. Okay, here we are at
the MPM collider. Okay. So what we can do, we can add the offset in here where this car going to
collide with our mud. So let me see at which frame
we are going to collide. So on to this one color node, I'm going to just
template this geometry, and I think it's going to be attaching right at
the frame number 52. At the frame number 52, we want to start animating. We want to start
the simulation from 52 of this animation
of this chip. So onto the object merge, I'm going to add an A offset. So for that, let's add an
timeshift node in here. Let's add this. And in here, we have the Dloine F expression. So we can say DloineF, please add 52 offset. How which mean if we were to go back at the
very first frame, the 52 frame will going to be actually I first
frame for this cheap. So now we can properly
create our MPM collider, and it will convert this
into SDF geometry and we can go into our MPM solvnt
node and let's view. Okay. And now here you can see
when you start simulating, we are not going to wait for our car of this cheap
to actually arrive at the simulation point
because we have added the offset at the
very first frame, and so we are not
wasting any of our time. So maybe let's also optimize this simulation by actually not simulating all of this water as well as this
whole mud particles. Let's isolate the particles where we only have the
interaction going on. So for that, I'm going to
create another box in here. So I'm going to just
duplicate this box, and for this one, I'm going to, let's say, visualize and I'm going to just not simulate this where we do not have
the interaction going on. So let's reduce the
size of our domain, and I'm going to
increase this size. Let's view our MPM solver, and I'm going to just template
my this box geometry, and I'm going to
just increase size because we have this
Jeep going forward, and let's visualize
our Jeep model as well by setting the
display flag in here. Let me scale this down, okay? If we were to view,
let's see that we are only adding the Jeep where
we have the Jeep. Okay? Maybe we can lower this
domain size even down, okay. I think that is looking fine. Let's see if that is cutting anywhere and I think
it's not. It's working fine. So let's rewind at
the very first frame. And now let's use this
as an A our domain. Let's go into the
MPM solvent node, and this will recalculate
because now we are only utilizing less
of the simulation. And here you can see we have all of our particles outside of these bound
are now cut off. So onto the MPM container, let's check that closed on. Okay, so that is closed. So let's only simulate this area where we have the
actual interaction going on. And that way, our
simulation will be way faster and we are not going
to be wasting our time. So after the MPM solver, let's add an A
file cache node in here to actually cash
out our simulation. So let's add an file cache node, and I'm going to call
this 1:00 P.M. Sim. And onto our file cache node, I'm going to just remove
the dollar sign hip name, and I'm going to store this into my doll assign job
to my SIM folder, head accept, and that
will be our simulation. We need the simulation,
275 frame, that is good. So let's go back. And before we actually
write out our caches, let's remove all of the unnecessary attributes
that we have present. If we were to middle
mouse button. Here's can see we have all of these attributes that we
actually do not going to need let's remove them
and we will going to be saving ourselves a lot of
disk space onto our cache. So let's remove these
that we do not need. For that, I'm going to add an A attribute let node in here. Let's connect this let's enable the parameter of the
attribute let node, and let's click on
this let non selected, and that will remove
all of the attribute. So into the point attribute, let's type the name
of the attribute that we actually
want to preserve. So in here, we want to
preserve the P scale because we need the P scale
for creating the mesh. So P scale is
necessary attribute, and we also require our source name attribute
to actually separate our mud from water
because we are going to use the separate VDB
mesh for both of these. So let's add the source name, and maybe let's transfer
our velocity as well because we are going to
be using the motion blur, so we need the velocity
attribute for motion blur. So let's add on these
three point attribute, and now we are ready to
cash out our simulation. So let's click Save to disk and write out
your simulation. And before I actually write
out all of my caches, there is one last thing
that I'm actually missing, and that is if we go
into this collider jeep, on onto the MPM collider here where we are
creating this one, this animated this jeep here, you can see we have the
option for stickiness. So that will adjust the
stickiness of collide this material stickiness
with the collider because I want the mud to stick
with these wheels. So I do need to adjust
the stickiness. So onto the stickiness,
let's adjust the value of stickiness
to higher value. So maybe let's change
the to 20 and that way, we will get the effect that when our collider or these
wheels pass through the mud, the mud will going to actually be sticking onto the wheel. So make sure to adjust
this stickiness. And with that, we are ready
to write out our caches. So let's go into the MPM sim
and write out your caches.
10. 10 Meshing MPM Simulation: Okay, simulation is done, and we have written
out all of our caches. Now let's start meshing
our simulation. And onto the file cache, we have our written out cache. And first, we need to
split our water and Mud because right now we have both inside of this
one single file cache. So let's add an
split node in here, let's split them both
of our simulations, our water, as well as the Mud. So let's add the split node. And I'm going to type
this one at source name. Let me see if we can
actually pick up. We cannot let's change these
two points and we cannot. Let's manually type
the attribute name. The attribute, we
know that we have created the solar node
itself that I have created. That is the at source
underscored name, and if that is equal to water. And we need to end this
inside of this colon. Let's add this and we do
not get any geometry. Let me see what's the problem. Let's go into the MPM and
here we have the source name. Let me go into the
geometry spreadsheet. And we have this one
called mud surface, and we have this one
called water height. Okay, so we need to type
this one name, water height. Let's go back onto
the split node, and we can save water, add an star, which means everything that
is above the water. Okay, we have our water, and onto this second, we should get our
mud. So let me check. Let's add an null
and let's view this. Okay. That is our mud, and onto the split onto this
side of the split node, we have our water. Now, let's start meshing both of these
simulations together. And first, I'm going to
add an timeshift node, let's set a time
shift node in here. And the reason I'm adding
the time shift node, let me remove this null andlt
this and add this in here. Time shift node is that
is because, remember, when we were adding this Jeep geometry has an
ecdr here you can see, we are adding the 52 frame offset onto this
original Jeep animation. Which means that
because we are not going to render this geometry, but rather we are
going to render this original highrise geometry there we have hot highrise. Let's view this because this
one and the collider one, we have the 52 frame offset. So the simulation
won't match up. The animation won't sync
up together because this will going to be
starting at at very back, but if we take a look
at the collider, here as you can see we
have this Jeep onto the different position because it has an a 52 frame offset, and to actually fix this, we need to subtract the offset
value from the simulation. So let's go into
the time shift node and onto the expression
here we have the Dlo sign F. We just need to subtract the amount
that we had added, which is pass the 52. We can confirm let's go
back onto our time sheift. Here's can see, we have
the 52 frame offset. So now we are subtracting
this from our simulation -52. Here by adding -52, we do not have our
water particles, and that is because we do not have any simulation data
onto these minus frame. So what we can do, we can say that clamp at
the very first frame. Onto the clamp, we can
say clamp to first. What that will do, it will clamp any value if it going below one, we are going to just
simply clamping this onto frame number one,
which is the first frame. And once we have reached
the frame number 52, our animation, simulation will start start to
simulate and animate. And that way, we can sync up
with this cheap animation. I hope that makes sense now that we have
added the offset, now we need to bring back the other half of our particles, these water particles because that is not our
whole water mesh. We are not going to use
this as a water mesh because if we were to view
our terrain geometry, template this and
here is can see, we have the water particle
missing because we were using this as an A bound. And to actually bring them back, I can actually bring my this source where we
have created this water. Let me see where we have
our water particles. So let's bring
this node in here, and I can add this
by adding the object merge to avoid any messy wiring. I'm going to just drag this in here and that will be the water. And right now it
is an A animated, and I think the PM source is creating this into
an A animation. So let's get rid of
the animation that the PM source was creating by
adding the time shift node. Let's add this and let's
connect this inhere, and onto the time shift, let's delete delete
all of the key frames, the expression, and now
we have the single frame. So basically, we are using these static or the
static source particles, and we need to subtract the animated one to do
that, we have the animated. We want to keep these as NA and our simulation and the particles that are not being simulated, we are going to use
this as an static sim. So first, we need to
actually subtract the part of the particles that
we actually had simulated. And we can add this. We can create this by
adding the delete node, and I'm going to delete
some of the particles. And right now, it says,
delete by pattern. We do not need
this disable this. Let's change this
to bounding volume. Right now it is
removing the primitive, but we want to remove
the particles. Let's change these two points and it will remove the points. So onto the bonding
volume, let's enable this. Now we can define this bounding box to actually
cut off our particles, and we can use our
same bounding box that we actually have created
with your PM container. Let's copy copy this parameter, and I'm going to go into the
elite and onto the size. I'm going to say paste
relative reference. And we also need to reference
the center as well. Let me go back onto the box, and here we have the center. Let's copy this parameter, and let's add relative
reference in hair. Let's click on it. Okay. Now
we have linked up together, and these particles
now get deleted. Now we can fill this gap with the simulated one
that we have in here. Okay? So let's add merge node. Let's merge both
of them together. These are our static and
these are our simulated, and now we have our whole
particle stream together. And now just now let's start actually meshing
out these particles. And we can use the
MPM surface node. We can add the MPM surface to actually generate
the surface. But I'm going to
use the VDB method to create the mesh because it will give us good
result if we were to add our own
meshing with the VDB. So let's add VDB
from particles node because we have this
particle as an A input. So let's connect this and let's go into the
VDB from particle, and we need to lower
down the axel size. So let's start this with 0.01. Let's see, and we
cannot see our mesh because our voxel size
is still too high. So let's lower down
this axel size to add more resolution. So maybe let's start this
by adding the zero point double 05 and let's see
if we can see our mesh. Okay, here we have here we have our SDF represented
mesh, and right now, I can see that we have these
particles looking mesh, and right now it's not smooth. So let's add an A
VDB reshape node. Let's add an A VDB
reshape SDF node. Let's at this and
connect this after that. And I'm going to
first dilate this and it will just fiber to
enable increase the offset. Here you will see
that we are just simply adding the dilation
on our original mesh. I think the value of default
value of one is good. Now we can add another VDB
reshape node VDB reshape STF, and now we can actually erode the same amount
that we have dilated. So, this VDB reshape node, I can change this to
erode and onto the erode, we have this renorm accuracy. So maybe let's change
the different algorithm. We have the second
order of binding. Let's change this
to fifth order. Let's see. And I cannot see a whole lot of difference in both
of these method. And right now, we do not have
the smoothness in our SDF. So maybe let's add an
A VDB smooth SDF node. So let's add an A VDB smooth
here we have VDB smooth SDF. Let's add this and maybe
let's add after we have added the reshape
onto the erosion level. And now here as can see we
have smooth out this mesh. Let's go into the smooth SDF. Maybe let's change
this renom accuracy. Let's change this to
second order of binding. Let's see if that give
us some good result. And it looks the same to me. So let's keep it as is. And now we just need
to convert this into polygonal geometry
because right now we have the SDF and we need the
polygonal geometry. So let's add an A
VDB convert node, and we just need to convert
this into our polygons. In here, right now, we're
converting this to volume, but we want to create
an polygonal geometry. Let's add an a polygon soup. Convert this into polygon soup. Polygon soup is
more efficient way of generating the mesh, and we are going to use the polygon soup.
So let's add this. And here you can see we
have an very dense mesh. So maybe let's play
around with the value of adaptivity to actually not
create that dense mesh. So let's change this to
maybe value of 0.01, and here you can see now we
have an a very light weight. Mesh, we do not have resolution where we actually do not need, and that will create a
very light weight cache. So let's keep it like
and now on top of that, let's add an some post
animation because, you know, this middle
section is simulated, but this section is not. It is an attic. And after that, maybe let's add an as windy noise animation so that it won't
look just static. So for that, I'm going to add an mountain node after we have converted this into polygam soup and
let me view this. And right now, we are getting
this very chaotic noise. So let me play around with
the perimeter of the noise. First, we have the zero
center that is correct, and the amplitude is
set to very high, so maybe let's not use
that much amplitude. Going to lower this value
down to very low value, maybe 0.08 and let's see. Here, as you can see, we will have just a little
bit of deformation. Now let's animate this by
animating this offset. And right now, if I were to enable this here
as you can see, we are adding the offset
on all of our axes. And we want to animate
this Z axis only. So let's separate this offset by clicking on
this X Y Z button. Now we have offset on this
separated on X, Y, and Z. In here, I'm going to use an A dollarge time expression by adding the dolosignT
which means the time, and now we can view this. It was actually
generating this again. So maybe let's go back and now we are ready to
generate our mesh. I'm going to just move, sorry, not this one, but only these
two node onto this side. And I'm going to
just duplicate all of the setup where we have converted and
generated the mesh. Let me rewind to
very first frame, press and hold the
old key and rag. And we just need to
connect this in here, and all of these
things will work fine. We do not need to
change anything. Let's going to the
convert VDB node, that will generate our mesh. Okay, that is our mud mesh. Now we need to create
the water interior. And for that, I'm going to just after we have
added the merge, where we have these particles, I'm going to add
this one the VDB from particle node again that we had just
created previously. So let's add this, and I'm
going to connect this in here. And this one, now I'm not
going to use the surface VDB, but we are going to use
the fog DB because we will going to be using this as an
A interior for rendering. So we need the fog VDB
and I'm going to lower down the axel size or maybe let's load this down
to value of 0.01. Here you can see, I still cannot see any of the volume
and that is because the particle scale because we have the P scale and
that is very low, that is too low than this ax
or resolution to fix this, maybe let's increase
our particle scale. I'm going to let's
change the value to two and let's
see if we can see. Okay, here you can see,
we have this volume. Let me zoom in, and here can see that
is our interior volume. So after that, let's add
another file cache node, and let's write out
this cache as well. I'm going to connect this. This will be our water interior. Same thing. I'm going to just remove the toll sign
hip name expression. And now, at this point, we are ready to write this water mesh as well
as the water interior. But right now we
are not going to writing our cache of this mud, and that is because I'm going
to add an wet map in here, the wet attribute
onto my this mesh. So when mud hit the water, I want this to get wet. And for that, we need to
actually create the wet map. And once we have
created the wet map, then we can write out our mesh. So first, now you can write out your water mesh as well as the water interior
because that is done. And in the next
lesson, let's create the wet map for this mud.
11. 11 Generating Wetmap Demonstration: Let me demonstrate
you the method that we are going to use
to generate wet maps. Let's go into the
node editor and let's add an EMT node, dive inside. First, I'm going to
create an A grid. Let's say that that is our
mud or this ground plane, and I'm going to increase
the size of my grid. Let's increase this onto
the rows and column. Let's change this to 100 by 100 to add bit more resolution, and I'm going to create
an a sphere in here. Let's add an primitive sphere. And let's say that
that is our water, and we want to transfer the wet attribute from the
water to this grid mesh. First, I'm going to
animate my sphere. Right now, it is
just sticking here. I'm going to add an
A transformed node and not on the grid
but onto the sphere. Let's enable the parameter. Let me view the
transformed node. And I'm going to use the sine function to actually create an
circular animation. For that, onto the
translation X, let's use the sine function. And for that, we are going to input this with
the dollar sine F, which means the current frame. And I know that the
doline F will going to give us a very low
frequency sine wave. So maybe let's multiply this
by five to actually generate a very high frequency sine wave. And we also need to add the cosine onto the Z to generate actually
the circular animation. Onto the Z, I'm going to
add the cosine function, and same thing, I'm going
to use the Dlo sine F, and let's multiply
by this by five. Let's view the result.
Okay. Now our sphere is spinning in the circle, but right now the
amplitude is too low, so maybe let's increase the overall amplitude
for the sine function. I'm going to just
multiply by this by five. And that will just increase the amplitude of
our sine function, and we need to do the same
thing for our Z as well. So let's multiply
by this five to actually generate high
amplitude sine function. Okay. I think now that we have a good enough
circular animation, the amplitude is good. Now, let's create an
wet attribute in here. I'm going to create an
attribute wrangle node in here and maybe
let's connect this into before we have
animated this and that way we are not going to just animating this attribute
wrangle every frame. Well, not that it matter
because it's just a one point, but I think it's a good idea to just add this before that, and I'm going to create
an A wet attribute. So that is floating
point attribute, so just type F at
the attribute name, and I want to create
an wet attribute, let's set this value to one. And I'm going to just duplicate this attribute wrangle
onto the grid side as well because we need the wet attribute on
this grid as well. And for this one, I'm going to set the wet attribute to zero. Now we just want to transfer this wet
attribute onto this grid, and we can do this by using
the attribute transfer node. Let's add this and
it has two inputs, the transfer to and
to transfer from. Let me view the
attribute transfer node and to actually visualize
this wet attribute, let's have over the
attribute transfer. Click on this high
button and click on this wet attribute to
actually visualize. Okay, that is our wet attribute, and right now the
radius is too big, let's go into the attribute
transfer onto the condition. Let's lower down its
distance threshold to maybe let's say value of one, and right now we have
these jagged edges, so let's maybe smooth them out by increasing
the blend width. Let's change the 21 as well. Now we have a very smooth
fading of this wet attribute. Now if we were to hit play, and here can see wherever
we have our sphere, our wet attribute
is transferring. But it's not sticking. It's actually
moving with sphere. If I were to template
this transform node, here as you can see it is
moving where our sphere is. But we want to leave an
a trail because the wet map it just not going
to disappear like that. We do have some trail and
to actually add this trail, we can use the solvent node. In here, if you type the
solver, here we have it. And this is a dynamic node, which means that it
needs to be simulated. So it's basically an a solver. I will going to be simulated. So let's connect this onto our initial geometry and
onto the second input. Let's add this into
our auxiliary, and I'm going to just
remove this from here. Let's remove this and let's go into the solver node
and dive inside. And in here, we have
some of the nodes. First, we have these inputs. We have this input, four inputs, and these inputs actually
correspond to these guys, these inputs, we have
one, two, three, four, we have the input one,
two, three, and four. And the main thing that
we have is this one, this stop node that is
the previous frame. It will remember the attribute. It will remember
what happened on the previous frame and it
will accumulate over time. So it this node
basically has a memory. This node remembers what
happens on the previous frame, and we can use this to actually
accumulate our attribute. I'm going to rest
attribute transfer node in here and I'm going to just connect this onto
the previous frame, and I want to import
from my second input. Remember, our sphere is in the second input. Let's
connect this in here. And let's connect this
onto our out node and let me set the display flag to be
out and let it play again. And here as you can see now
we have the accumulation. Now this node is
remembering wherever it has passed through and
it's not getting deleted. Now it's remembering them because it's getting
the information from the previous frame and it knows what happened
on the previous and it's add that and same thing onto
the next and to the next. And actually keep
remembering this and keep adding this onto our current
frame. That is good. Now we can actually fade this because right now here as can see the attribute is not fading, which means I can basically add an A attribute adjust node. That is an a float. So let's
add an attribute adjust floor and I'm going
to add this in here. Right now, it's
using the B scale, but we want to adjust
our wet attribute. And onto the operation,
I'm going to, let's say, multiply this our value
with an A some lower value. Until right now the
constant value set to zero. That is why we do not see
anything because we are multiplying our t attribute with zero, so we do
not get anything. I'm going to create an L
exchange this two value of 0.9. And that way we are multiplying 0.9 our current
wet attribute with 0.9. So which means that
we will going to be getting an fading effect
if I were to hit play, and hers can see we have this fading effect
because at every frame, wet attribute is going to
be multiplied by 0.9, 0.9, and hers can see the
first at the very first, where we have the solid
wet attribute, over time, it's going to get
faded and we have this fading effect,
and that is good. This setup is clean
and neat and simple, right, but we cannot use this
in our situation as to why. Well, that is
because we have this our Mud geometry is
animated as well. And right now, the
grid is not animated. And let me show you if I
go back onto my this grid, let's say if we were to add an A animation,
let's animate this. And I'm going to animate this
by using the mountain load. Let's add a mountain let me connect this and view
the mountain node. I'm going to just increase the amplitude or also the
element size as well. Let me keep increasing
the amplitude, and let's also animate this
onto the attribute noise. Let's enable the
animation. Flats hit play. Okay, now we have the
animation on our grid as well. Now let's see what happened. If we were to view
the solvent node and hit play and
here as can see, we do not have our animation. Our animation is
gone. Basically, we are getting the
very single frame. And that is because onto
this first geometry, when it go into the solver, this previous node will always look for the previous and it's not updating what's happening on the current frame at
the first geometry. It's updating the second because we are basically
importing the input to but the first input that
we have actually there, input one, we are
not using this, but we are using
the previous frame. So it always look for the previous frame and
it does not know what's happening at the
current frame with the first piece of geometry
with this geometry, if I were to go
back and this one, it does not know what's
happening at the current. So we basically get
our static geometry, and our animation is gone. And to actually bring
back our animation, we actually do not need to use this previous frame to
actually transfer to, but we are going to use
this one input two, and we are going
to leave the top important in here for now. And now because we are using the input and not
the previous frame. And if I were to hit
play, here as can see, now we get the same result
basically that we had on the hop level
because right now, are actually not using
the previous node, which means that we do not know what happened on the previous, so it's actually just updating what's happening at
the current frame. And to actually get the information back this previous frame
information back, let's import this
from the dub input. And the way we can do that, we can basically add an
attribute copy node. So let's add an attribute copy or maybe attribute combined. Let's add this and I'm
going to add this into there and from the
previous frame, the second input and onto the attribute combine the destination
attribute we need to define and the destination is wet and the source
attribute is also wet. Let's change this to wet. And here it says,
what is the source? The source right now is
using the first input, which means that it's
going to look wet from the first
input and at this. But we want to look
at the second input because we want to import the wet from the previous frame. So that is our correct input. Let's go into the
attribute combine. And let's change the source, and that is not the first,
but the second context. Okay, now let's view the
result and heres can see. We have our animation back, and we also getting
this fading and this fading is actually coming
from the attribute just if I were to disable this
and let's view the result. And heres can see we are
accumulating over time. So we are remembering what's happening and we have animation. And that is well and good, but we cannot use
this method as well. I mean, we are going
to use this method, but it's actually not enough. We need to adjust a
bit more as to why. And that is because
right now we are using the geometry that its point
count is not changing. So every frame, we have the same piece of
geometry and we have same number of
points if we were to view have same number of points. So the topology of our
mesh is not changing. It's the same on every
frame. There are points. They are just moving around, but the geometry itself
is actually not changing. It's deforming, but it's
actually not changing. But in our case, our
geometry is varying. Our point count is varying. And let me show you how I'm going to duplicate
the solver node, this whole setup, and
I'm going to replace this with the mesh that we have. And for that onto the grid, I'm going to let's remove
the mountain for now. I'm going to add an
extrude volume load to actually give this
a bit thickness, this grade a thickness. Let's add this and we are
using the extrude old node, but let's remove this and let's add an extrude volume node. Let's add this and let me go back and
connect this in here. And that will give us the
volume, and here we have it. I think the thickness is enough. We do not need to adjust this. And now we just need to
convert this into VTB volume. So let's add an VTB
from polygon's node, and I'm going to connect
this and let's use the surface VDB and
for this example, we do not need that
much axel size, so maybe let's
increase this 20.4 to create very low
resolution of VDB, and that will just very
fast to calculate. And after that,
let's add some noise to add some breakups
onto this mesh. And for that, I'm going to use the volume nose noise node. Let's add a volume noise
and volume noise SDF because that is our
volume SDF volume. Let's go into volume noise, and right now we are using the zero centered value,
and that is fine. Maybe let's increase
the element size. Let me keep increasing this, and let's also keep increasing
the amplitude as well. Let's keep increasing
this until let me see. And it's not animated,
so let's go into the animation and let's
enable the animation. And here as you can
see, we have the noise that is actually
changing over time. We have this mesh topology
that is changing. Now we just need to convert this back into regular geometry. Let's add an convert VDB node, that's SD and I convert, VDB, connect this, and I'm
going to change this to polygon soup and polygon soup
will a bit more efficient. So let's go into the adaptivity, and maybe let's change
this to 0.1 because we do not need that much of
geometry. Let's view this. Let's hit play. Okay. I think
that mesh is good enough. Here you can see
the point count, the topology is actually
changing over time. It's not staying the same. In that case, if we were to, let's add an wet value to
zero and maybe let's connect this after when we have animated so that we are not going to calculate this attribute
wangle over time. Now if we were to visualize, here we have the
wet attribute and now let's see what happens when we go into the solvent
this and let's it play. And here as you can see, we have this wet attribute that is
jumping all over our Her mesh, and that is because the
point count is not changing. And if we were to go into the solvent node and this attribute combined
node that we are actually using to import this wet attribute from the second input from
the previous frame, it actually require the
same number of points, same number of count of
points to actually work. But we do not get the same number of point
count on every frame. The mesh that is on
the frame number one, it's actually not the same
at the frame number two. So that's what actually confusing the attribute
combined node to actually jump over
this wet attribute. We need to fix this. And to actually fix this, we are not going to use the
attribute combined node, but let's use our own x
node, good old attribute, wrangle node to actually import the attribute
from the previous frame. Let me connect this in here and let's connect this
onto the second input. And, you know, to
actually import the attribute from
the second input, we have a node we have our
x function called point. So I'm going to just, let's say that create an A float
variable and I'm going to call this one float wet and float
wet from the second input. So I'm going to call this one
float, wet, maybe previous. Float wet P, which
means the PVs. And let's import this
from our second input. And we can use the
point function. So let's add a point node. And in here, we need to define
where we want to import, and we want to input
from the second, which means we can say 10
mean first, one mean second, and the column the
attribute name, we want to import
the wet attribute. And we need to define
the point number from which point actually
we want to import. And we can use, let's say, add PTNum. Let's add this. And let me close this point function and
let's add an A sem column. Now we have the variable, float variable, the wet P, and now we just
need to add this. So let's inhere, I'm going
to say that our F at wet, which means that look for the wet attribute,
and let's add this. Look for the current
wet attribute, and let's add the previous frame wet that we are actually
going to import. So in here, we just need
to type the variable name, which is the wet P, and I'm going to just
add an SEM column to actually the argument.
And now let's see. And here as you can see, we are getting the same
thing that we were actually getting from our
attribute combined load. That is because we are
still using the same thing. We are using the at PT nu, which means that look for
the current point number and the current point number
is actually not the same as we have at
the previous frame. And that is why we
actually need to replace this with
an A near point. For that, onto the
attribute wrangle, we have the Near point function. If we were to type in here, we have the Near point
function and we can also take a look at the point Cloud lookup if we were
to type Point Cloud, we also have the
point cloud node. Let me type. And right
now, I cannot see that, but we have the
point cloud lookups, all of these wax function to
actually get the near point. But in here, we also have
an node called proximity, if you were to add this, and this node will actually create the same result with the wax function, we
have the near point. It will look for the nearest
point if I were to add this. So that is our first
geometry, this geometry, and we were to cure the nearest point from the
second piece of geometry, which actually happened
to be our previous frame. So let's connect this in here. And onto the proximity node, that will give us
the nearest point, which means that this
point, for example, if I were to enable
the point number, let me enable the point number. So let's say we have
the point number 5770 that will going to look for its nearest point
onto the next frame, and that way we are not
going to break this at PT num because the point
number is actually changing and we are updating this
with this proximity node. It will look for the
nearest point and it will store into the
nearest point attribute. That is a big name, so
let's change this to NRP, which means the nearest point. That will give us
the nearest point from the previous number, which means now we just
need to replace this at PT num with our
at NRP attribute, which means the nearest point. At NRP, and let's view
this and right now it's throwing this error
because it does not know that it is an
float or integer, so let's help this
by typing the I, which means we are
explicitly telling that that is an
integer attribute. So let's add and Hers can
see we have this error gone. By the way, that
was not an error. It was just an warning now if we were to hit
play, and hers can see, now it's working fine
because we are looking for the nearest point and that
this near point won't break on every frame because
we are not actually setting that look for 577 point
because 577 point, that is right now, let's say, in this corner on
the next frame, it might be on this corner, so that's why it was breaking. But because we are looking
for the nearest point, this attribute always changes according to the mesh location, and that's why we are
getting this stable result. So we actually need
to use this method. And right now we are adding the wet attribute
onto every frame, which means if we were to go into the geometry
spreadsheet and take a look, here we have the wet attribute. And if I were to
scrub my timeline, let me click on this to actually
view the maximum values. And here as you can
see these values are actually keep
adding on every frame. So that is not good because we are seeing in our
x that add this. So we actually do not need
the values beyond one. So what we can say, we can actually limit this wet attribute with
adding the clam function, or we can actually
say that bring the max attribute from this
from this second point. So the max attribute
is actually one. It does not go beyond
one, as you know, because we are setting this value attribute
angle onto the one. So that is an A maximum value. It won't go above then that. So onto the solver, let's say we want to say that please do not add this on current frame, but give the maximum value. And for that, we are
going to just, let's say, our F at wet, and that is equal to we
need to get the max value. So in here, we need to
type the function max. And I'm going to say, please look for current wet attribute. So I'm going to say at wet, which means that look at the current wet attribute
and also look for the wet P, which is actually coming
from the second input. And let me give what's the max. And I just need to add the bracket the ending braces in here now if we were to see. And here is can see because every frame when we are going to import this
with the attribute angle, changing this value to one and now because one is
an a maximum value, so it's actually picking
from the one so that way, we will not going to be getting values any higher than one. If I were to go back, let me into the Solver
node and scrub, and if I were to change
this He's can see, we have these value zeros, and we will only get one. We are not getting above one, and that is the setup that we
are actually going to use. Okay? So now, let's implement our setup in
our actual project. Let's do that in
the next lesson.
12. 12 Creating Wetmap: Now let's generate wet maps with the method that we have
previously learned. Here I have this mud
mesh and I want to add the wet attribute or this mud
hitting the water for that, we need the water. If I were to view this merge, where we have actually
these water particles. If I were to zoom in
and here is conceit is a water particle,
these are not mesh. We have this mesh here in here, but we are using these
water particles. So I'm going to just add an
attribute wrangle in here and I'm going to connect
this at the merge where let me connect this
onto the first input, and maybe let's
move this up here, let's call this one
attribute wrangle to set wet to set
the wet attribute. In here, I'm going to generate an floating point attribute, so F at wet, let's initialize this
to value of one. And now we just need to
duplicate this wet node, so present hold and hold key
and track and snect this onto the convert VDB where
we have this mud mesh. And onto the Mud mesh, I'm going to set the value to zero. So now let's transfer this wet attribute from
water onto this mesh. And I'm going to add solver
node in here for that, and I'm going to connect
this one to the first input. That is the mesh, and
onto the second input, let's connect this wet. And maybe let's add an A null in here and I'm
going to connect this. Maybe let's place this and
make these lines straight. And I'm going to call
this one water particles because they are
water particles. Let's view the solver node,
and let's dive inside. Let me click and
let's dive inside. So now here we are
in the solvent node, and here we have the inputs, these different inputs, and
we have the previous frame. And let's bring the
previous frame down here and let me move the
out node to the down. We need the input one
and the input two. Let's add an attribute
transfer node. And let me connect this one and let's transfer this
from the hackin input. Remember, these are
the water particles and let me connect
this at the end. That way we can go into the
attribute transfer. I here. I will transfer all of the
primitive endpoint attributes. So maybe let's uncheck
this and onto the points, let's specifically
that we want to only transfer the wet attribute because if we do
not set the wet, if we leave this field empty, it will transfer all
of the attribute, but we just want to transfer
only the wet attribute. And now let's visualize this. Let's go into the geometry
node and onto the solver, let's click on this I button, and onto the wet, let's click on it, and Houdini
will add an A visualizer. And here as can see we
have an A value of red, which means that
the mesh particle of all of the mesh is
getting the value of one. So let's go into the solver node and onto the attribute transfer, let's go into the condition and adjust this distance threshold. And for this, I'm going to just zero out the
distance threshold. And instead, I'm going to use the width attribute,
blend width. So let's add the blend
with to an a value of 0.5. What that will do, it will
give us a very smooth fading this wet attribute
and that will look natural. And here you can see
where we have the red, which means that this mud mesh is actually submerged
in the water. So we have the wet value of one, and when the water moves
and the mesh will actually going to be moved around
with our vehicle, it will touch the water
and it will get wet. So let's keep it at 0.5 and to actually make these
values to be remembered. By the previous frame,
we actually need to take care of this
previous frame, this top import node. For that, we know that first, we need to add the
proximity node because our mesh is
changing every frame. And we want to get
the near point from this previous frame. Let's go into the
proximity node, and it will give us the nearest
point on this attribute. Let's change this one to NRP for an a short
of near point. And after that, just add an
A attribute wrangle node, and we want to import the attribute from
the previous input, which is the second input. Let's go into the attribute
wrangle and in here, I'm going to create an A
float variable, the previous. Let's type in an A wet P and we want to import the previous t from
the second input. So let's use the point function, and I'm going to import
this from the second input. The attribute name, that is
the And for the point number, we are going to use the
NRP that we had created. So I at NRP nearest point that this proximity load is
actually outputting. Let's go into the
attribute angle, so that will give us
the previous wet. Now, we need to set
our wet attribute. In here, I'm going to say at
wet this new wet attribute. That is going to be an A max. Let's add an Amax function
max of our current wet, current wet attribute, and the wet P that we are actually importing
from our previous frame. Let me type the wet P
and let's end this. And with that, we are done
with creating our web maps. Let's go back onto the geometry, and after the solver, let's add an file cache node. Let me connect this,
and I'm going to call this one our MUD mesh. And let's go into
the file cache, and let's remove this tool
sine base name expression. I'm only going to
use the dol sine OS. And before we actually
write out this mud mesh, we now only need
one last attribute, and that is the rest
attribute because later on we are going to add
the texture on our mesh. And right now we
do not have UVs. If I were to middle mouse
button here as you can see our mesh does
not contain UVs. So I'm going to use an
triplanar projection to project our texture and to actually make our texture stick
onto our moving mesh. We need the rest attribute. So let's create the rest
attribute in the next lesson.
13. 13 Create Rest Attribute: Let's create the rest attribute onto this mud mesh because later on we are going to create the triplinar projection to create the material
for our mesh. So in order for the material to actually
stick onto the mesh, we need to create
the rest attribute, and for that, I'm going to
go back up here where we have the simulated particles
onto the merged node. Here you can see we
have these particles, and right now they are animated. Here you can see we
have this clock sign, which means that we
have the animation and this simulation animation. So let's first strip out this animation by adding
the time shift node. So let's add at shift. Add this and connect this in
here and onto the timeshift, I'm going to just remove the
expression from the frame, so let's click on it and
let's say lead channel. And that will remove
out the animation. Now we have a snapshot
of an a single frame. Now, we need to create the rest attribute
onto these particles. So let's add an rest attribute, and that will create the rest position for
us. Let's add this. So this rest nude will
actually just store the current point position
in attribute called rest. And now let's convert
this into VTB. So let's add an A VTB from particles node because we are using the
particles in here. So let's add this onto
the VDB from particles. I do not want to create this surface VDB.
Let's uncheck this. But we want to convert this
rest attribute into VDB. So let's go into
the point attribute and click on this plus icon. And in here, we can set A point attribute
to create the VDB. So onto the attribute,
I'm going to just pick the rest position where we have rest that is called
actually the rest. Let's set the VDB
name to rest as well. And onto the vector type, we can say that that
is an A position. So let's change
this to position, and let's view the result
of our PDB from particles. And here as you can see if I
were to middle mouse button, we have the rest VDB, but we have the zero resolution, which means that our
boxel size is too big and our P scale
value is smaller. So let's slow this value
down to an A value of 0.06, and I still can't see that. So let's other zero in here. Okay, now Hers can see our rest attribute
has been generated. I can see with this cloud, this fog looking that is
basically the rest volume. And if I were to middle
mouse button Hers can see, we are right now using
very high resolution, and we actually do not
need that peak resolution. So in here, maybe let's
add an VDB resample node, VDB resample, and
let's connect this. Okay, onto the VDB
resample, right now, it's using the
transformation from the transform from the to
match the reference VDB, which means we need to
set into this rest one. But I can say that I want
to use the axel scale only. So onto the auxel scale that we are going to use
this value of a two. So if I were to
middle mouse button, and heres can see we are drastically lowering down
this auxelRsolution. And that will create an
manageable resolution because we do not actually need that
fine detail of this VDB, we only need the position, and that will just
work fine for us. And now we just need to transfer the position information that is actually in the rest
onto this mesh, where we have our mud mesh. Let me visualize
here we have this. So to actually import
the attribute from the volume because here is can see that is
another volume, and that is our mesh. We can add another
attribute wrangle, and I'm going to
connect this in here. Let me connect this and
let's connect this onto our second input and move this down to create
this straight line. I'm going to call
this one Import rest and onto the angle, let's create an rest attribute. So that is an a vector. So we add rest and to actually import the rest
because that is a volume, we have a node called
volume sample. So let's use the volume
sample volume sample. So volume sample
mean that sorry, we are using the
volume cubic sample, we do not need the
cubic interpolation, but we only need
the volume sample. Here we have the volume sample V. I can add the
bracket in here, mean that we want to sample
the vector attribute. If I were to remove the V, we have the volume
sample function. That is used for importing
the floating point attribute, but because position
is in a vector, so we have function called volume sample
V. Let's add this. And now we need to say that from which
input we want to import, that is the second input. So
let's change this to one. And in here, we want to we need to define
the name of the VDB, and that is called the rest, and we need to
define the position. And we want to sample these voxel at our
current point position. So in here, I'm going
to just type the at B. Let's close this at this with our semiclum now if I were
to view my import rest, and if I were to middle mouse
button and here is can see, we have the rest attribute. And that way, now we can import this rest later
on in the solas, and we can create
our material and make our texture stick
onto this moving mesh. Now, at this point, we are ready to write out this
mud mesh cache. So let's go into the
mud mesh, and in here, just save two disks to write
out all of our caches.
14. 14 Painting Mask For Material Blending: Okay, I have written
out all of my caches. Now let's go onto our terrain where we have
created our terrain mesh. Here we have this terrain. Now let's generate the mask for our texture for the terrain
because onto the terrain, we are going to use the two different material and for that to blend these
two different material, we need the mask because I
want the first material for these tracks where we have
the way for our jeep. Let me find where we have this, where we have HirasJep. Let me template this Jeep mesh here can see if I were
to move this Okay. So wherever we have this moving, we want to create
a mask to actually set different material
for these tracks. And for that, let's
go onto this outing. And from this null, I'm going to create an
texture print mask. Texture mask paint. Let's add this node.
And on this one, I'm going to connect
the null where we have our out rim.
Let's add this. Let me go back. And let's visualize this texture
mask paint node, and onto the viewpoardH to
the viewboard press Enter to so that we have the
access to its manipulator. And now I can just
start painting. And here can see when I
paint nothing is happening, and that is because
for this node to work, it requires the UVs on the mesh. And if I were to middle mouse
button onto my out terrain, and here as you can
see, we have the UVs, but they are at the point level. As you can see, we have the
UV as an point attribute, but it requires the UV onto the vertex level as an
a vertex attribute. Here, let's add an A attribute, promote node, and
let's connect this. And I'm going to rearrange this onto the attribute promote, the original class is
point. Let's set the name. That is the JUV
and the new class, let's change this to vertex. And now our texture
paint mask should work. Now, let's select the
texture mask paint node, how to the Vpot and press Enter. And now if I were
to start painting, and here is can see now
I am able to paint. Press control Z to undo, let me hide by this
view ple and grid, and let me adjust
the viewing angle, and I'm going to play
around with my brush, where as you can see,
we have the radius, control shift and left
mouse button to drag. So let's press Control
and Shift and left mouse button press and hold the left mouse button and
drag to adjust the radius. And I'm going to set
the radius like so, and I want to just start
painting from here. And right now, hers can see
the stroke is right now, the stroke is too hard and
we do not have the fadiness. So let me undo this. Let's go into the
texture mask paint. And here we are painting the mask name attribute is mask, and that is good. Here we can define
the resolution. The resolution is fine, too. We do not need any more
high resolution than that. And I want to play around
with these soft edges. The soft edges is
right now half. Let's change this to one
to create more soft edges. And here can see we have the softness and maybe let's play around
with the opacity too. So let's change the opacity
to 0.5 and let's see. Okay, I think that will
give us a good fadiness. So wherever we have the wheels, I know that the wheels
are starting here, so I'm going to just click and draw like so at the
end and like there. Let's add another stroke
where we have these wheels, let me click, and let's
keep adding this. And that way we
have these tracks, we are going to use the mask to create blend these
two materials, and I'm actually going to add a different material
onto this corner. So let's add a paint and
also add the mask in here. I'm going to use
the same material, so that is why I'm
actually mixing the mask. I'm adding the same mask because I want to add onto
this white part, same material and all of this
gray part, other material. Maybe let's continue
painting this. I'm going to paint this where
we have all of these edges. And maybe let's paint this onto our inside as well
because where we have the or the ground where
we are water or flowing, I want the same material, too. So maybe let's
fill out this with this our mask and I'm going to keep dragging this,
adding these strokes. Let me view. Okay. That is fine. Let's fill out all
of the interior. And that we're going to use
this to blend material. Now that we have our mask, let's save this
out onto our disk, and then later we will going
to import this mask into our material for blending and to actually
route out this mask, we can use this a height
field output node. Let's at a height field output, we have the height field
output. Let's add this. And that is because it will generate an A volume if I
were to middle mouse button, and if I were to,
let's say visualize, that is the first input, that should be our original mesh. Hers can see, nothing is
changed, we have the mesh. Onto the second input,
we have the volume. Hers can see, I can see
this as an A plane. But if I were to
middle mouse button, hers can see we are using
the actually axel size, which means that that
is an A mask volume. And it is similar to
the height fields. So which means that we can use the height field output node to actually write out our mask. And here I can see that we have some leftover this gray stroke, which means that we need to go back and actually fix this. So let's hit Enter
again and let's fix where we have
missing. Let me see. Let me click and drag click and drag in here so that I can we
have this full white, and here I can see some of the blackiness let's paint
this in here as well. Let me zoom in change the angle. And now let's view this
again onto the texture mask. Let me activate my camera
view tool and let's zoom in. Okay. Now, let's
connect this onto this height field output
node because it is expecting the volume and the
second input is the volume. Let's maybe remove this onto the height field output.
Let's go in here. We need to define the file
name as well as the location. So let's pick up the location, and I'm going to go into
the I dollar sign job. Let's save this onto
this texture folder. Let's click on it, and I'm
going to call this one mask. And in here, we can
type the mask dot PNG, and I want to store
this mask as an APNG. So let's type this and hit
Accept and format is the RGBA, which means that it is red, green, blue, and Alpha. But because it is
a single value, we can change this
to a single channel. And the type is 32 bit
floating point and we do not need that much precision
for this simple mask. So let's change this
to eight bit fixed. That will work fine for us. And onto the red channel, we need to define
the volume name. And if I were to pick
Herscnc we have the mask. So let's click on it,
and that will pick the mask attribute and store
it onto this first channel. And now I can just press
save to Discption. Let's click on it, and Houdini will start
to create our mask. Okay, mask generation has
been done. We can confirm. Let's go into the
project file directory. Let's go back and here's can see we have this
texture folder. Let's dive inside and here's
can see we can see the mask. Let's double click
to open this and let me make this window a bit smaller so that it fit
on my recording area. Let me select and let's
make this window smaller. Here's can see we have
our mask generated, and this will going to be used
in the rendering process. Let me close this window
and now in the next lesson, let's add the grass onto this
terrain onto this terrain. Okay, so let's do that
in the next lesson.
15. 15 Scatter Grass: Let's scatter some
grass onto our terrain. Let me go into our terrain
and we have this terrain. And after we have created this attribute promote and added the UVs onto this vertex level, I'm going to add another texture mask
paint node because I want to paint where I
want the grass to grow. Let's add a texture mask paint, and let's connect this and let's view the
texture mask paint. Select the node, press Enter
to access its manipulator. And in here, let's start painting where we want
the grass to grow. First, I'm going to
increase the brush size. So control shift click and rack that we can
increase the size. Let me see the brush
parameter, soft edges. Let's change this to one. Maybe let's lower down
the opacity to 0.5 to create a very
smooth smooth mask. So let's start painting. And I want the grass
to grow in hair. Like so let's create
an patch in here. Something like that. And let's create another patch
right in front of it. And also, we actually need to avoid where
we have this track. So I think that our track line is in here in the
front of the wheels. So we need to stay clear of them because we do not want
the grass to grow onto where we have this way
where we have these tracks. Let me start painting, and I want to add some of the grass patches
in here as well. And because that is the actual area that
we are going to see, our camera will be like here. So I think this mask is good. We do not need to
paint in hair as well as in hair because we are
not going to see it anyway. Okay, so these are the patches where I want the grass to grow. Now we have the mask on
the texture mask pane. Now let's add an A scatter node. So if we type the scatter, here we have this scatter that is used to scatter
onto our geometry, and we also have this one
scatter in texture mask. So let's add this
node because we want the scatter node to actually consider our mask
that we have drawn. And the first input that
is for the geometry. So that is our geometry that is coming from
our texture mask. The second input is the mask, so that is our second input. Now if we were to view the scatter texture mask,
that is ring and error. Let's see, why is that, that is because it is looking
for the texture path, which means that we
can select the texture that we might actually
have onto the disk. But because we are
using the live node, so let's go into the
scatter in here. Let's change the mode from texture parts to actually
texture primitive, which means that look
for the mask primitive, let's click on it, and
Hers can see we are using the mask primitive and that way we can actually
make the live connection, and Heres can see we
have these grass points. And we are getting some
of the clumpiness, which is actually good. But we can go into the
texture mask and we can lower down the
relax iteration to actually add the randomness. So maybe let's
change this to one, and that way we have this enough randomness
and also the clumpiness. But the point count is too high. So maybe an A density of
thousand is too high. Let's change this to
an A value of 300. Okay, so the density
of 300 value is fine because we do not want to
create that dense grass, and that will work fine. And now just import our
geometry the grass models. And for that, I'm going
to use the file node. Let's bring up the grass models
that we have downloaded. Let's go into the Dlo sign job. They are in the assets. Let me find they are actually in the Geometry
node, not in the assets. So here we have the grass
medium. Let's go in here. We have this FBX, let's grab this and
hit except let's view the result and the grass
came in a very huge size. So first, let me template this Jeep geometry by clicking on this button
and clicking it again. And now I'm going to add an A match size node to
actually lower down the size. So let's click on it and
justify Y set to center. Let's change this to minimum, and that will make sure that
grass it onto the floor. Let's also click on this
scale to fit option to scale this onto
this one by one size. Now, if we were to zoom in and here as you can see we
have our grass imported. So now let's start grabbing
the grass one by one because we want to add all of these different
variations on the grass. So let's start grabbing them. We can add an A. Let's say, let me add
plast node in here. And I'm going to, let's say blast this
with our name attribute. Okay, here on to the
name, we have the cross. So maybe let's start this with an very last value T. Let's
click context non selected. And here we have this big cross. And right now, hers can see it is slightly offset
it from the origin. So after that, let's add
another match size node. And for this one,
that will just center out X Y and Z and onto the
YS chain is to minimum. And now we will get our
grass close to the origin. And that is important because
the Houdini will look for its origin to actually
scatter them onto the point. So we need to make
sure that they are sit onto the origin
as close as possible. And after that, let me see okay. So here we have some of the unnecessary attributes
that we actually do not need. So let's add an A attribute. Delete node after the mesh size or before doesn't really
matter. So let's add this. Let's click on this
delete nod selected to actually remove
all of the attribute, and we want to preserve
the let's say, which one? Let me middle mouse button. So we want to only
preserve the name and UVs. So let's go into the
the name attribute that is an formative attribute. So let's click on
this let's select name and onto the vertex,
let's select the Ubis. These are the attribute that
we actually care about. And now if I were to
middle mouse button, we have the name and UIs. Maybe let's add normal
in hair as well after we have created this blast node where
we are isolated. Let's add the normal, and
now we have the match size. Okay. Now I'm going to just
duplicate this another time. And for this one, I'm
just going to go into the Blast node and just start
typing out this reference. The D, now let's go back
onto the value of E. Let's change this. So now we
are using the E variation. Let me select all
of them and blast. Let's use the C value,
the C variation. Let's click and drag
and this one to be our B and let's click this
track this one more time. And this one, I'm going to use the first variation,
the variation A. Okay. That will give us
a very good variety. Let's add an emerge
node to actually merge all of these variation together, select all of them. That means select all of
them and connect this onto the merge,
select and connect. Let's view this.
Okay, now we have multiple variations on
top of each other to actually make these copies
differently onto these points. We need to transfer the name
attribute from the geometry, this name attribute
onto the points, and for that, we
have the node called attribute from PCs node. So let's add this and that
require the point cloud, that is the point loud
and the geometry library. That is the Geometry library. And it is already set to
transfer the name attribute. Right now, the mode
is set to cycle. So maybe let's change
these two patches because I want to create
different patches. So maybe the first patch, we have the variation
one and onto the second patch we
have the variation B. So all of these
variation will come in patches and not
actually cycling. And you can define the
patch size in here. So maybe now let's add
copy to points node to see that which value we
should be using of the patch size onto the
attribute from pieces node, and it requires the geometry. These are our geometry, and these are our points. Onto the copy to
points node, first, I'm going to enable the pack and instance because we
need the pack geometry. Let's enable the BS
attribute as well. Now if we were to view
the copied points and here's can see right now
the scale is very too low, so maybe let's add
a P scale value. So let's add an attribute
randomized known. Let me click on it. Right now we are randomizing CD, but we want to
randomize the B scale. Here's can see, I can
start to see the grass. Let's change the
distribution from uniform to let's say uustum ramp now we can actually just define
our ramp maybe let's create this random
looking ram to actually create
the varying scale. And the scale is still too low, so let's go into the
global scale and let's increase the overall
scale value to four. Okay. And now the orientation is still in orientation
is not correct. That is going onto
the same direction. So to actually at
the orientation, we can add we have and node called scatter and
align node. Let's type. Here we have this
scatter and align. So this node, it
requires the surface to scatter the geometry will scatter as well as align them. But because we already
have scattered point, we just need the attributes. So which means we can
connect this one, this constraint point cloud, this one, and that way, we can use this to just add the attributes onto our currently generated
points that we actually have. Let's go into the
scatter and align. Right now the mode is
scatter point on geometry, but we only want to add the attribute to existing point
cloud. So let's add this. And in here, we
have the rotation. So onto the rotation
around normal, we can define the mean and max. Let's change the
minimum 20 and max to a full resolution
of 360 degrees. Now we can connect this and let's view the result of
the copy two points node. And Hears can see now we have
the orientation correct. And onto the attribute, it is actually creating the
P scale attribute as well, but because we are generating the P Scalon by the
attribute randomize, we actually do not
need to create inhere, so let me uncheck this radius
attribute, check this. That way we are only generating the orient to set
the orientation. Let's go into the orientation, and here can see by
adjusting the max angle, we can adjust the orientation. Let's change this to 360, and now it's just a matter of going onto the P scale and
play around with the ramp. And here as you can see, we
have the smallest value, so maybe let's not change
the smallest to zero, but maybe a value of 0.1, because I don't want the
grass to be completely zero, and we can just play around with that value to
create a random scale. So you can adjust the
ramp to your locking to create the randomness
in the scale, and we can go into the
attribute from PCS node, here we have the patch size. And here as you can see, as we are making the patch
size bigger and smaller, we can start to see
the different clumps, the different variation. So we can adjust the patch size. So maybe let's increase the
patch size to higher value. Let me view where we have
a good looking variation. I'm going to change
this to a value of 1.9. That will give us a
good randomization onto our grass patches. Now we are ready to write out. We are ready to actually create an a null let's connect
the copy to point in here and I'm going to call
this one out grass.
16. 16 Placing Rocks: Now that we have scattered
some of the grass, now let's import the rocks
that we have downloaded. So maybe let's add the rocks
in our terrain as well. And for that, I'm going to
just create an file node in here and let's load
out our rock model. So let's click on this
two double dot folder. That way we can go back. And here we have the mos set. Let's dive inside, and let's
open this rock moss set. Let me view the result. Here you can see the
rock size is too big. As always, let's add
an match size node. Let me connect this and
I'm going to just click on this scale to fit option to scale this onto a
value of one by one. And after that, we have all of these
unnecessary attribute. Let's add an attribute, delete node, and after that, I'm going to just click
on this non selected, but onto the vertex, want
to keep the normal and UVs. To the primitive, we do
need the name attribute. So now let me create an APAC geometry
because right now errors can let me select this. Hers can see we have all of these polygonal
piece of geometry, and to make this a
bit more efficient, I'm going to create
an APAC geometree. So let's add an APAC and connect this I'm going to click
on this name attribute. That way we can use the name attribute to actually create these packed fragments. So if I were to
middle mouse button, Hees can see now we have
these six packed fragments. And now we can just select some of the rocks
that we actually want. So what I would like to do, I'm going to just click on
this selection and I'm going to select this and press delete and that
will just blast that. I'm going to click
on non selected. That way we only have this
one that we just selected. And now I can just add
an A transform node, and I'm going to
connect this transform, and let's see let me see
my train by adding this, templating this, and
now I'm going to just select let me see where we
have this transform load, just select by pressing Enter. So maybe let's move pivt
onto the center as well. So let's go pit to center
and let's click on it. That way we can move this one. Let me place it
around maybe here, I'm going to let's increase
the scale a bit higher, and I'm actually going to rotate this onto my Y
direction as well. Maybe let's change this and I'm going to place it somewhere. I'm going to pick and place the. Let me move this down. Okay, we are too far down. Let's move this up and
place this up bit back, rotate this like so and let's also create another
geometry onto the front. So let's go onto the back, and I'm going to make
another selection. For this one, I'm just
randomly going to select model by pressing
the delete node. Just move it onto this side and click on
this delete non selected. Same thing. I can add
the transform node. And I'm going to connect
the transform in here, move P two centroid, and press Enter and move
this into the front. It's adjust the overall scale by adjusting the uniform scale. Now we can just place it to manually place it
wherever we like. Okay. Let's merge both of these rocks together
to better view them. Okay, so right now they
are facing each other, so maybe let's go
into the trans sorry, not delete, select the node and press Enter and move
this in front of it. And now we can create
the null at the end, and I'm going to call
this one our rocks. So let's type in here out. These are our rocks. And later on, we are going
to use this out to actually reference this one we are going to import
this in Solaris. These are our rocks.
17. 17 Setting Up Solaris Scene: Let's import all of our assets and geometry in
Solaris for rendering. And first, let me zoom in. Here we have the outgrass. Let's create some other of these out null
that we are going to use for referencing when we are going to
import them in Solaris. One, let's create an null
we have the mud mesh. I'm going to create
an null after that. So it's actually not this one. Let me select and
drag and connect this after the muds mesh, and I'm going to call
this one out mud. And same thing.
We need to create the null for our water interior. So let's add another null, and I'm going to call this
one out water interior. And lastly, let's create
for the water mesh. Let's add another null, and I'm going to connect
this at the end, let's rename this out water. I'm just naming this two water. Now we are ready to
go into Solaris. And let me you can actually create an lob
Net in here if you want. I can just right
click and in here, I can create an lob network, add this in here and now we
just need to dive inside. And now we are in the Solaris, and we can start
building our scene by importing our geometries
from soap into Solaris. Or, let me remove this
lop net or we can go back at the scene level and we can create
an elopNt in here. Let's add an elop network. And you can also go into
your stage context, and you can start building
your scene in here as well. But I'm going to just create the lop net here at the scene
level because I think it would be easier for us to find where we have
this lop net scene. So I'm going to just create
an A onto scene level. Here we have the geometry, and I'm going to maybe call
this one Sim maybe let's call this one to be our
Mud and Mud effects. And now we just need to
import this into lop net. So let's dive inside
the lop net and let's start importing
our geometries. Let's add an op import node. And let's connect
this and first, let's bring up our Jeep model. And out here we
have the outcross. Well, by the way, the order doesn't really matter. I just like to
import it like this. So first, I'm going to
add import the Jeep. So let me find where we have out high ras Jeep except and I'm going to rename
this accordingly. That is our Jeep, because that is an
APAC formative, we actually need to adjust some of the attributes
onto the sap input. So if we were to, let's say, we see the scene graph tree of this Solaris.
I can view this. If I click on this plus icon, let's go into the new
pin tab and we can go to the Solaris and let's
enable this syn graph review. Let's click on it,
and here can see we have the syngraphte
here we have the Jeep and if I were to collapse
this here can see right now we have this
prototype and this prototype, we have this one, all of these this geometry that
actually has the name attribute, and we have this transform. So basically, if we go into
this import definition, and here we have the option for the pack primitive,
let's enable this. And right now it is using
the native instances, which mean that the
Houdini will going to import the mesh
in the prototype, and then it can add this transform to actually
place your model. Let's say if we have
these multiple instances, then it will just
use this transform. But in our case, because we only have
a single Jeep model, we do not have any
multiple copies. So we do not need to create this as an A native instances, but we can just create the create transform.
So let's click on it. Let's go into the
scene graph tree, and now here you
can see we do not have prototype that is gone, we are only left with transform. And that way, it will be very lightweight to
actually work with, and it will be easier to actually assign the
material as well. And with that being imported, let's add another
sub import node. And this time, I'm going
to import my terrain. So let's click on
this out terrain, and I'm going to just
rename them accordingly. Let's rename this train. Let's duplicate this soap
import node, and let's import. Let's see what do we have? We have this one, the gross. So maybe let's import the
gross after the train. So let's rename this to our gross and let me
duplicate this again. And let me pick up my selection. We have the outcross. The height field is actually the volume representation
of our terrain, so we actually do not
need this height field because we already
have our terrain. And now let's
import the out mud. And I'm going to rename
this to mud as well. Let me duplicate this
again. And let's see what. Let's maybe import these rocks. Let's rename them accordingly. Rocks. Let me click and
present all to duplicate. And rain we already
have we need the water. So that will be our water mesh. And now we need the
Word inward interior. Out water interior, that
is actually the volume. So let's hit except, and we just need to type
this from water interior. And we are going
to use the volume shader to actually create
the water interior. Now that we have all
of these imported, I'm going to maybe
select all of them, and let's go into the layout. Let's distribute these
nodes horizontally. And that we have even
spacing between them. And now let's add an
A merge at the end. Let me select all of them
and merge them together. Let's view the result,
and here Houdini will import all of our assets
in the Solaris context. Let me activate my
camera view tool, and here as you can see. We have our assets imported. And now let's create
an A light in here. So I'm going to
add a dome light, and I'm going to
just connect this after that and to
the dome light. Let's go into the
base properties and let's add the HDRI that
we actually downloaded. So that is actually I
think in the Geofolder, let me see where I placed
it. So it's not in here. I think it should be let me
see where I placed that. Okay, so I actually forgot
to extract my HDRI. So I have extracted my DRI
in this project folder. So now we can go
into this folder, this texture, and let's
pick up our HDRI. And here I am placing my HDRI into the root folder
of this project folder. So let's load this a horn stage under square two K, and accept. And we do not need to adjust any of these properties.
The default is fine. Let's view the dom light. And here as you can see we
have our dome light imported. And if you don't want to see the dome light in
your put background, I can just click
on this ie button, and we just need to go
into the background, and we just need to uncheck this display
environment light background, and now we should not see
the environment light. Let me close this
window in here, and maybe while we are here, let's change the color
scheme to dark as well. And maybe let's see dark gray. Okay, dark gray is fine. Now, I just need to pick up
the camera angle that I want. Let's create a camera in here. So I'm onto the new came. Let's click on this
and let's click the new camera button to create the camera at
the current view. I'm going to enable my view, this camera view tool and
lock button is on now, which means that I can just start placing my camera
where I would like. Well, maybe let's
place it like that. And let's click on this
log button to unlock this. That way we can
freely move around, and we have this
camera position. And if we like to view
this through the camera, I can just click
on this Snow Cam and click on this camera one. And that way we are
back with the camera. And after that, let's add an Karma setup node to actually set up our
Karma render settings. And here we have this one. Here is a tip pre
compile render kernels. That is fine. We can
just click on this. That is our input stage, and I'm going to just view the Kerma render
setting that way when we are going
to use this one Karma XPU Houdini will going to use this
Kerma render settings. Let's go to the Karma render
settings and in here, we can define the resolution. So let me change the resolution
to an full HD resolution. So let me pick the
preset 1920 by 1080, the HD resolution
and the engine, we are right now using
the CPU as our render. Let's change this to XPU. We are going to use the XPU because it will be very
fast for rendering. And now we are ready to
create our materials. And for that, I'm
going to create a material library in
here and connect this. And now let's dive inside, and in here, let's start
creating our materials. Let's do that in
the next lesson.
18. 18 Shading Jeep Model: Okay, let's start
creating our materials. And first, let's create
the material for our Jeep. And if we go into the scene
graph tree and take a look, here as you can see on the Jeep, we have the material
for our wheels. We have the back, left, front, right, and we also
have the body. And if we were to collapse this, and here as you can see, we
have material for our body, the other that we
have the front glass, headlight, panels,
panel glass, and seats. So all of these
different materials that we actually
do need to create. So let's start with first creating this one material that will be for our main body. So in here, I'm
going to just right click in the material
library node. Let's go into the Karma, and let's add an A
Karma material builder. And let's add this in
here and I'm going to rename this material
to be our body, and let's dive inside. And in here, we have
the material X. Let me remove the inputs
as well as all of these displacement and
these we do not need them. And for the body, I'm just going to use the
base color only. So for that, I'm going to import the material lacks image node to actually import our
material. So let's add this. And onto the file name, I'm going to just
pick up my material. Let's go into the Geo
and onto our Ville jeep, let's go into this folder, and here we have this
cheap base color. Let's hit Accept, and we just need to connect this
onto our base color. So I'm going to connect this
onto the base color and we are just going to use this
as an A, our body material. We do not need to create any more complex material than that. And after that, let's maybe create an A material
for our wheels. So let's add another
Karma material builder, and I'm going to call
this one to be wheel. And by the way, if we collapse, this wheel or this
node transform node, as you can see, we have
these two different objects. We have the tire and
we have the wheel. The tire will going to be the rubber part of our
wheel and where it says, wheel actually the rim and
all of these meta like parts. So we actually need to create these two different materials
for this whole wheel. So for that, first, I'm going to create the
material for our tire, and that will be
this rubber piece. And let's duplicate this again. And this one, I'm
going to rename this wheel because that's
what it says. It says wheel. So we have the tire and wheel. Let's dive inside the tire. As always, let's remove all of these displacement
and these nodes. And this time, let's use
the PBR texture set. We have this one
material PBR texture set node. Let's add this. And in here, we can
actually define our base color metalness all of the PBR maps in
here and that way, it will be easier to
import all of them. So let's start with
the base color. Let me pick this base
color, and here, let's start with our Let me see here we have
the spare tire. Let me scroll down. Okay, here I can find
the tire base color. Let's add this and we have the metalness and the
specular roughness. Let's maybe add this one because we do need this roughness map. Scroll down, here we have
this tire metallic roughness. Let's head accept, and now we need to go
into our bump map. And here we are using
the normal map. The normal maps are provided. So onto the bump style, let's change this to normal, and I'm going to just
increase the scale to one. And in here, we need to
define the normal map. Hit Let's click on this button and choose
this tire normal. Let me find. We have the tools, and we have the toy normal
headapp and now we are done. Let's go into the
base color and let's connect this onto
the base color slot, and we have the
specular roughness. Or let's click on
it and click on this with this specular
roughness slot. And lastly, we have the normal. So let's click on this normal, going into the
geometry section of the materials, material X. Let's click on this normal
to actually add the normal. And with that, this
tire material is done. Let's go into the wheel, and I'm going to just
delete all of them. Let's add another material
X BR and onto this one, this base color, we need to do the same
thing for the wheel. Let me find, here we have
the wheel base color. I'll accept specular roughness. Let me find the heel
metallic roughness. And let's go into the bump. Let's change this to normal, change the scale to
one to the normal map. Let me scroll down here
we have heel normal. Now let's start plugging them base color to our base color, the specular roughness to our specular and
specular roughness lot. The normal let's go into the geometry and onto
the normal input. Let's go back. We have
finished our tire and wheel, and maybe let's duplicate
this heel node. And that way we have all of the PBR set and all of
these things connected. Now we just need to rename this. And for this one, I'm going to rename this maybe headlight. Let's create a material
for headlight. Let's dive inside, and we just need to replace
this in here. So onto the bump map, let's go into the
normal and let me find the headlight here we have
headlight, normal, it accept. Let's go into the
texture and base color. Let's find the
headlight, base color, let me find the headlight
metal like roughness. Accept. Let's go back. Let's create another
material, and let me see. Let's go into the
scene graph tree. So we have created
materials for our wheel. We have the body. We have the headlight, and let's create the
material for the seeds. So I'm going to rename this
one sets. Let's dive inside. And let's start with
the base color. Let's click on this and we should see the seeds base color. Here we have it except. Let's go into the
specular roughness. Let me find the seeds
metallic roughness. Let's hit accept. Let's go into the bomb
and onto the normal, let me find the seeds
normal and hit accept. Let's go back and let me
duplicate this again. And this time, we
are going to create the material for our let me
see this one, the sideline. So let's rename
this two sidelight. And let's dive inside. Of this node and
onto the normal map, let me find the side light node. We have this one, the seed
seeds side headlight. So we only get the base
color for the sidelight. We do not have any maps. So maybe let's remove
this normal map, and let's remove the
specular roughness. Let's click on this base color. And side head light base color, except, let's remove
all of these wires. So let's select the wire tilt, select this wire antilt because we only have
the base color, so let's connect the base
color only. Let's go back. And now let's create the
material for our front glass. And I'm going to create
very simple material. So let me sorry, go back, first, rename this to our glass. Let's dive inside. Let
me remove all of them. And for the glass, I'm going to just use a very darkish color. I'm going to maybe let's use
this an A 0.2 value of gray. Let's go into the specular. That is all the way up to one. We just need to lower
down the roughness to create an a full
reflective material. So let's zero out the roughness. And that way we
have this darkish glass looking glass material, and that will be fine. And we also have
some material for the tools and the panel. And these are for the interior. Hers can see we have
material for this interior. But since our camera angle
will going to be like this, we actually do not
need to create the additional material
for the interior. So these materials
are just fine. So let's go back and let's start assigning
these material. So let's go into
the material ibrary onto this scene
level and in here, I'm going to create an
A material linker node to actually link these
material onto geometry. Let's add an A
material link node. Let's connect this in between if we were to enable
the parameter of the material linker and here can see we have the materials
that we actually created. Have the body, glass,
and all of them. So these are for our Jeep. So let me expand this one. Here we have the jump try
tree that is our Jeep. Let me collapse this. And
here we have the wheel. Let me collapse this in here. And I'm going to assign this. Let me see the tire material
onto the tire and the wheel to the wheel Okay, so here I have assigned all of the material onto these wheels. Basically, I just
click the tire and drag all of the tire onto the tire and wheel
onto the wheel. So the tire material is done. Now we need to
collapse this wheel. And now we are in the body. Let's assign the material for the body. Here,
we have the body. Let's assign this onto
the body of the jeep, and let's also assign the
material for this glass. So the glass will go into
our panel glass front. So let me track this in here. Onto the panel, that is the I think that was
for the front panel, but we actually need to set this on toward this front glass. That is our front glass. So let me add this in here, and here as you can
see now we have added. Now let's go into the
headlight and let me find. Here we have the headlight, that is the side headlight, and we should see
the front headlight. Headlight headlight headlight, that is
the front headlight. So let's click on this
headlight that is for. These guys, can see,
we have the material. Now let's assign onto this side headlight and here we
have the sidelight. Let's click and
drag onto this one. And here we have the
material for our sidelight. Now let's add the
material to the sets. Let's click and add this onto the seats. And we have that. And with that, this
Jeep has been finished. Our material has been added. Now let me collapse this window, maybe make this
window a bit smaller. Let me press the
PK to hide this. Now, let's go into
the material library again and let's start creating our more material for
this whole project.
19. 19 Shading Terrain: Let's create the material
for this terrain. I'm in the material Library, and in here, let's create
an Karma material builder, and I'm going to rename this to our terrain and
let's dive inside, and I'm going to delete
all of these inputs, the displacement, and we are going to use these
two different materials. Remember, we have created the mask where we
have these tracks and onto the interior onto where we have water
flowing and onto the side. So let's see how we can actually create these
two different materials. First, I'm going to import all of this texture, and for that, I'm going to create
an A material X PBR textured set node, and onto the texture set node, let's enable the parameter. Let's start creating our
material onto the base color. I'm going to let's go
back and let me fine. Let's go into the first
one, forest ground. Let's click on it. And here we have the diffuse that
will be our base color. Hit Accept, and let's go
into the specular roughness. Let's pick up our forest
ground roughness. And let me, okay, we have the roughness,
head accept. Let's go into the bump map. Es change these two normal, change the value of
this one, two, one. Onto the normal. Let's see, we have the forest
ground normal. Let's head accept. And now, we need to create
another material. So first, maybe let me
connect all of them. So let's connect
the base color to the base color and the
specular roughness onto the specular roughness lot and the normal to our
geometry and normal load. And because I know that we are adding
this onto our terrain, so we do need to actually
tile our material. And for that, we need to
create the texture coordinate, and we actually have the Us
to actually import the Us. We have this one, here we have the material texture
coordinates. Let's add this. And if I were to enable here, we have this one but vector two, which means that U
is a vector two. So that node will
actually bring up our Us in our Solaris context. And we can actually connect
this like so, and that way, we are importing the UVs and connecting them in here and we are nothing actually
adding that. So to actually create
the repetition, we can add the
multiply node in here. So let's add material
X, multiply node. Let's connect this in between. And now, we can actually
multiply the X and Y, the U and V to actually create
the tiling because I want to scale out my tiling in
both on on the the same way. So I'm going to just double
click and just click and drag onto there and just click on this relative
channel reference, which means that I can just type the two and this
one will be linked. So that way, we can actually create the repetition
equally on both and, and that is fine. Not right now we are only using the tiling of the value of two, so let's keep it like that.
We can change this later. And now we just need to
duplicate all of our setup. That is our material, and these are our texture because we are going to use these two different materials. So let's duplicate all of the setup by selecting
all of them, press and hold the
Alt key and drag. That way we have
another this material. Let's go into this one and
just replace this texture set from forest ground to let me go back this
brown mud leaves. Let's click on it, and first, we need to define the diffuse. Head accept and now
let me go back and brown mud leaves and we need
the roughness, head accept. Now finally, we need
to define the normal, let's double click and let's go into the brown mud leaves, and we have the brown mud
leaves normal and text set. And now we just need to blend
both of these material, and we can do that by adding
the material X mix node. So here we have the
material X mix. Let's add this and
here we can define the foreground and the
background material. And now we can use the mix to
actually mix both of them. And to actually mixing, we can import the mask that we actually painted previously. And to import this, let's add
our material X image node. So let me find here we
have material X image, and we just need to
open up our mask. So double click,
double click on it, I think that was in this folder, here we have the mask. Let it accept and the
signature is color. So maybe let's change this to float because that is an
A floating point value, we only care about
this black and white, so that is not color value. So let's change this to float, and I'm going to connect
this onto the mix. And that will be
our material out. So I'm going to connect
this one onto this one. That will be our output. And let's go back onto
our lop N. Let's go into the material linker and let's
find where we have terrain. Here we have terrain material, and now let's assign this onto our terrain geometry.
Here we have it. And now, heros can see
we have our material, and that is working fine. Where we have the
mask, hers can see, I can see the
different material, and that is working
well and good. So let's start creating
different materials. So in the next lesson, let's create the material for our Mud. So let's do that in
the next lesson.
20. 20 Shading Mud: Let's create the material
for this Mud mesh. So let's dive inside
the material Library, and I'm going to create an
Karma material builder. Here we have the Karma
material builder. Let's add this node in
here and I'm going to rename this one to be our ud. And now let's dive inside this material and just
intelet all of them. And we actually need to
connect this into our out. And let's add the
material X PBR node to actually import
all of our maps. So let's add this. And onto
the base color, let's go. And we are going to
be using this one, this brown mud leaves. So let's add an diffuse. Here we have brown
mud leaves diffuse. Let's add this. That will be our base color and the
specular roughness. Let's click on it, and we have
let me find the roughness. Here we have the
roughness, head except. Let's go into the bump. Let's
change these two normal, set the scale to one
onto the normal, let me find bump normal. Here we have it. Head except. And now we just need
to connect these maps. So let's change
the base color to base color and let me find
the specular roughness, the specular roughness to specular and specular roughness. And lastly, normal onto
our geometry normal. And right now onto
this material set, if we enable the parameter, hers can see we have
the projection type. Right now we are using
the UV projection, which means that
Houdini is looking for the UVs to actually
project our maps, but we do not have
UVs on our mash. Instead, we are going to use
the triplanar projection. And for that, let's change
the projection type from UV to triplanar. At this, and here you can see, we can start to see
these maps applied, but right now they
are stretching. So let's add the rest position that we had just
created previously. So we are going to use this one. Here we have the position
for the triplanar. So let's import this
and to import this, we can add the USD
prim war reader. Sorry, not the UV texture. I accidentally added
the wrong node. Let's add an USD
primar reader node. This one, let's set this and we just need
to set the name, the attribute that
we want to import, and that is called the rest. That is the rest attribute, and that is an a position. So let's change
the signature from flow to let me say vector. Be position is a vector, let's change this to vector. Now we can just connect this
onto our triplanar position. And we should see, okay, right now, it's
still stretching, and I think we need
to actually control the tiling for this triplanar and to actually
control the tiling, we can add the multiply node. So let's add material X
multiply, let's connect this. And let me connect this. Okay, that is input one. And right now we are using the tiling value of
one in all xs so maybe let's link all of these parameter because later it will be going to be
easy to adjust the tiling, and we just need to
adjust this input one and all of them will going
to be adjusted accordingly. So now let's see how the tiling of this material
actually looks like. So let's change the render
engine to Karma XPU. Okay. And here you can see
how this material is working, but I think the tiling
is a bit too high. So I'm going to let's go into
the material X, multiply, and let's lower down the
tiling value because right now our texture is
actually repeating a lot. So I'm going to
change the value to an A value of 0.3 maybe
to a very low value. And I think that this
repetition is looking good. So let's keep it at
the value of 0.3. And maybe let's adjust the tiling of this
ground material, this rain material as
well because right now, I think that this ground
material has the less tiling. So let's increase
the tiling value. So I'm going to change
this one to 50 wiki again. So let's go back
onto our terrain, and I'm going to go
into this material X multiply and enable
the parameter. And right now we are choosing
the tiling two by two. So maybe let's increase
the two, three by three. And since we are going to use the tiling for both of them, so maybe we just need
to connect this onto the texture coordinate of this
texture set and that way, we will only need to just adjust the multiplication in
here and that way, both of the tiling will going
to be controlled from here. Now, let's see the result again. Let's click on this Karma XPU. Okay, so I think that this
tiling value is looking fine. But this the first material that this one it's actually
looking a bit lighter to me. So maybe let's bring in our ambiden collusion
and let's also let's multiply the
base color with the ambide collusion
that actually came with the material. So let me see that is
the forest ground. So want to adjust the material
for the forest crown. So let me first, let's maybe
change this to dik VK, and let's go into the clusion and bring up our embonclusion. So let's go back and we need
to go into the forest crown. Let's go back forest crown. And the abon clusion is
actually in the arm. So it has three maps. A, the first one is the bonclusion R is the roughness and M
is the four metallic. So let's add the arm in here. And now if we take a look,
this one, occlusion. So it will output the
very first input. So the very first is
the embed clusion. So that is actually the map
that we are interested in. So let's add a multiply
node in here and let's multiply our base color
with the embed clusion. Let's add this to a collusion, and that should be
our base color. And let's see how
this looks like. Let me change this
to Karma XPU again. Okay, it's looking
much better now. By adding the ambien occlusion, I think it looking good now. So let me change this back
to Houdini wiki again, and now we just need to bring in the wet maps for our mud. Right now, as you can see, we are not actually
importing the wet maps. Let me go back and let's go into the mud material in here and let's bring the wet
map to actually adjust the wetness
of this color. And for that, we are going
to adjust the roughness. And where we have the let's say, or this mud is actually
touching the water, I want this to be very
reflective because when the material gets
wet, it gets shiny. So we can adjust the shinness by use adjusting
the specular roughness. So let's import first
import the wet attribute. So for that, I'm going to add the USD prime war
reader, and in here, I'm going to type
the attribute name, and that is called the wet, and it is an A float. So let's keep it like that. Now we just need to multiply
this with our roughness. And where we have this, I know that this range is in zero and one, so that is good. Let's change these two in here. And I'm going to connect
the specular roughness as an A multiplier. Sorry, not this, the
specular roughness. Let me connect this,
and that should be our new specular roughness.
Let me add this. And where we have
the value of zero, we will get roughness
value of zero, and where we have
the one, we will get the full roughness that is
actually coming from this map. And we also need to
adjust the base color. I want to create the
base color darker, where we have our wet mud. So for that, we need to create the we need to multiply our base color
for the darkish color. And for that, I'm going to create the constant
node in here. So let's add constant. Sorry, not this constant, but that should be called
the material X constant. Material X constant.
Let's add this. And signature, let's
change this to color. And I'm going to say where
we have the value of zero. I'm going to where we
have the value of one. I want to change the value
to all the way up to one, which means the full base color. And let's create
another this node. And where we have the wet map, I want to create a
slightly darkish color. So maybe let's change this
to a value of 0.6 maybe. And that way, we will get
a Tarkish looking result. And we can actually
mix these together. So let's add a
material X mix node. Let me find material X mix. That is the foreground, that is the background. Let me see where does it go? Okay, I'll connect this and let's use the wet as
an A mixing value. And now we just need to multiply our base color with this value. Let's add an material
X multiply node again. Let's multiply this
with our base color, and that should be
our new base color. Let's connect on the
spas and base color. And now, heres can see
let's say if I were to maybe let's disconnect
this specular node. And maybe maybe for now, let's only use this
material mix none, and I'm going to use the
base and base color. And I cannot see it correctly. Let's change this to black. Okay, now I can see. And here you can see right
now the values are reverse. So basically, where
we have the wet, it's getting the white and
where we do not have wet, the values are zero. So we need the opposite of that. So we can actually fix this very easily by adding the
material invert none. So let's type the
material X invert. Let's invert the
incoming values. So I'm going to just connect
both of them to our out. That is the out and
for the in this one. Okay, now s can see how
these values are correct. So where we have the wet,
it's getting the black, and where we have the dry, it's getting the white,
and that is correct. Now, we can just connect this
one into our base color. Let's bring this roughness back. Let me connect this one to our specular and
specular roughness. And right now we are
using the full black. That is why the base color is
getting this full blackish. So let's go into the material X, and let's not use
the full black, but change the value
of 0.5 to create the darkish color or maybe 0.6. Let me see. Slightly
increase that. Okay, so that way, we
will have the feeling that this mud is actually wet. Now, let's see the result,
how it looks like. Let's change this to Karma XPU. And if I zoom in, let me zoom in on it. And here you will see that we
have this wet map working. And as you can see, we have
this transition between the dry as well as this
wet looking mud. And now in the next lesson, let's create the
material for our water.
21. 21 Shading Water: Let's create the
material for our water, and I'm going to
create the material X. Let's go to the Karma
material builder, and this one, I'm going
to type the water. Now let's dug inside. Let me delete this and
delete both of them. Now onto the base color. We actually do not need any of these maps because this is going to be a very simple material because it's going
to be a transparent. We do not need any base color, so I'm going to just
zero out the base, add on to the specular
and actually, I'm going to zero
out the roughness because we do not need the
roughness in our water. So let's change the
roughness to zero, and let's keep this specular
all the way up to one. And on the index of
refraction, let's adjust this. The index of refraction of
water is 1.33, let's add this. And let's go into
the transmission, and this one will going to be a fully transparent material. So let's enable the transmission to all the way up to one. And with that this water
material is finished, and now we need the material for the interior of our water, and we are going to use the
uniform volume for that. So let's click on
it. Let's go into the Kerma and onto the pyro. Let's add the Karma
uniform volume material. Let's add this. And I'm going to call this
one the water interior. And now let's dive inside. Here we have the
Karma pyro shader. That is an volume shader because
we are going to be using our density volume that we have created to create the
interior of our volume. And here we can
adjust the density and we can adjust
the smoke color. So maybe let's create a
muddy looking smoke color. Let's maybe create
more light light and let's desaturate it a bit. And we can play around
with this later, and that will just give
us the interior color. I think that looking fine. I'm going to just
close this window, and I know that we
need to increase the density because right now, this will be will going to
have a very low effect. To actually add the depth, we need to increase the density. So let's start this
in a value of ten maybe now let's go
back to this one. Let me hide the parameter of
this onto the Solaris lever. Let's go into the material
linker, and let's assign this. And we need to
assign. Let me see. Let me collapse this
window a bit bigger, make this a bit bigger, and we have the material for water and the water interior. So let me find the water. So that is our
material for water, and let's use the water interior on the water interior section. Now let's see the result
how it looks like. Let's change this
to Karma XPU again. Okay. And here as can
see we have our water, and right now this water
looking like an rea in water. So we can actually play
around with the material. So let's go into the
material library, add on to the water interior. We can just adjust the color. So maybe let's create
more darkish color. Let's play around
with this value. Let's create even more darkish. Let's keep adjusting
this to our liking. And here you can see by
playing around with the color, we can actually adjust the
color of this water interior. And with that, this
water material is done. So now in the next lesson, let's create the material
for our rocks and grass. These are the final materials. So let's do that in
the next lesson.
22. 22 Shading Rocks And Grass: Let's create these
two last material, the material for our rock, as well as these grass. So let's dive inside the
material library node, and I'm going to create the
Karma material builder, and I'm going to
name this one rock. First, I'm going to
add the rock material. So let's dive inside this one. And delete maybe
these two nodes. Delete this one to. Let's
add the PBR map node, this one, material BBR. And let's start bringing our
map onto the base color. Let me go into our back, and we have this
one rock mouse set. Let's go into the folder. We have the diffuse. Let's
add this and the roughness. Have this roughness,
the last one, and we have the normal. Let's go into the bump.
Let's change this to normal, change the scale to one
onto the normal map. Rock more sat normal.
Here we have it. Now, just connect them
base to our base color, our roughness to
specular roughness, and lastly, normal to
the gem to normal. Let's go back and maybe I'm going to just
duplicate this node. And this one let's create
the material for our grass. So let's rename this to grass. Let's dive inside,
and we just need to replace these maps. Let's go into the normal
map, start with that. Let's double click to Goba and let's go into
the grass medium, and let's add this
normal decept. Let's go into the texture and let's play around
with the base color. Let's click on this to go back, gross medium, and let's
bring up the diffuse. At the roughness, let's go back the cross medium texture or you have this
one, the roughness. I'll accept now we need to go back onto
the Solaris level. Let's go into the
material linker and let's start assigning them. First, we have the rock. So here we have
the rock geometry. So let's click and
drag onto the rock. And here we have our rock
material that is working. Let's go into the grass
and let me find grass. Here we have grass. Let's
add this, let's see. Okay, our grass material
is working fine now. Now, let's see how
it looks like. Let's go into the perspective
change to Karma XPU. Okay, here as you can see our
grass material is working, but we are actually
not using the opacity, the Alpha mab that
actually came with it. That is why it's actually
not looking right. We have these funny
looking grass blades, and that is because we are not actually importing
the opacity. And to actually import the
opacities onto the grass, we are not going to use
onto the material level. So let me unclick and let's dive inside the material library.
Let's go into the grass. And here you will see
onto our geometry, we have the option
for the opacity. We can add the map to
actually adjust the opacity. But by doing so,
it will going to be very hard on the rendering, so it will be very slow to
render and to actually add the Alpha maps onto all of these instances
very efficiently, we have a new way. So let's go into the lop net back where we have
imported our grass. Let me find here
we have the grass. So there we have the grass, and I'm going to add the render
geometry setting in here. So let's add geometry settings, and let's connect this into the grass and let's
open up the parameter, and in here, we
can adjust all of the different settings
for our render geometry. But we want to go into
the shading tab and here we have the new option
to add the stencil map. So right now it is grade out, so let's click on this button, and let's click on this
set or create option to actually enable
this tensil map. And we are going to use the OPASiT map in here
onto this tensil map to actually cutter out our mesh where we have the
black and white mask. So let's go into
this tensil map, and let's find onto our cross. So here we have the
cross medium Alpha. So let's add this. And by doing so, now
we will going to be cutting off or mesh
and it will be very fast. Let's render this again
and with the result Okay, to maybe actually
better view this, let's zoom in into our grass to see if that
is actually working. Okay. So here you
can see right now, it's actually still not working. So maybe let's click on
this tensil threshold. Let's enable this
to set or create, and that way we can adjust this tensil threshold and
let's render it again. Okay. I can I can still see that this mask is actually not being working, so let's maybe adjust the stencil threshold
and a value of one. Let's see the result again. Okay, still not working, so maybe let's refresh this. Let's go into the Houdini and I'm going to let's see that if we are working on the grads. Okay, so that is the grass. We are adding this. Let's see why it's not working
properly then. So let's see Karma
render settings. Okay. Let's render this
again and view the result. Okay, it's still not working, so maybe let's change this
to ten k. Let's go in here. The threshold, I think it should suppose to
go into the zero. Let me click on
this and let me see that if we are actually
working on the correct map. So gross medium texture, Alpha. Let's check this
again, roughness. Alpha. That is the correct mask, so it should supposed to work. Maybe we need to
refresh this again. Let's click on this Karma XPU and let's try rendering
this again to see. Okay, it's still not working. So maybe let me close and reopen my project file to see that
it's actually working or not. Maybe we are getting the cache. So the cache is actually
causing the problem. Let's see. I'm going to change this two k and let me reopen
this scene again. Okay, I have reopened the scene and it still does not
seem to be working. So let me change this back to DNIVK and let's see what
seems to be the problem. Let's go into the Sab Import
node, and let's view this. Let's go into the
primitive definition. And right now onto
the pack primitive, I think, let's see
what we are using. So if I were to go
into the new pen tab and let me enable the Solaris scene graph
tree, let's see the grass. And here as you can
see we are using the prototype and Houdini
is creating this transform, so it is not very efficient. So maybe let's click on these packed instances and right now we are creating
the native instances. Let's click on this
point instancor. This point instancor will
going to be very fast because we are only going to
be importing the variation, the A, B, CDE, all
of these variation, and then Houdini will
going to be using these actually transform to actually
create these instances. This one will going to
be way more efficient. So maybe let's see if that point instancors
actually fix the problem. So let's go into the
scene view again and I'm going to render
it one more time. Let's change this to paramyx I think that fixes the problem. Now I can see that the stencil
map is actually working. Okay. So let me
select my camera. So let's click on this camera to view through our reserve. And right now, the grass
location is not correct. So let me first
disable this grid. And to actually fix this, we can actually go back onto
the soup level and let's paint some of the area
back to create more gross. I'm going to just change
this to ten Wk again. Let's go back onto
our mud effects. Let me see where we are
creating the grass. We are creating
the grass in here, we have the texture mask paint. Let me view this, select
these node and hit except press Enter to
actually view it manipulator. Maybe let's start painting, adding some of the more of area. So I'm going to add the
grass in hair as well. Let's start painting this
and maybe let's paint this area as well, and
something like that. And now let's go back. We can actually go back onto our lop net and see how
this actually looking, and here can see we
have the live update. Let me change this
to Karma XPU again. Let's see. Okay, so now I think the grass
is looking fine. So at this point, we are actually ready to
render out our effect. So I'm going to just let me go onto my Karma
render setting. And let me make this
wind pane a bit bigger. Onto the output picture, I'm going to select
the location, and I'm going to
select this onto the dollar sign job and
onto the render folder. I'm going to call this
one render underscore. V one for the Version one. And after that, dollar sign F, which means the
current frame number because if we do not add
the dollar assign F, we are going to
render the animation. So this will going
to be overwritten by the next frame because we are going to be
using the same name. So if we add the dollar sign F, which means we are going to stepping the current
frame number. So we do need the dollar
sign F. Now we just need to at the file extension
that we want to render, and I want to render
the EXR sequences. So let's type dot
EXR and hit Accept. Now at this point, we can go into the
USD render up, and in here, we have
the valid frame range. Right now we're using
the current frame. Let's change this to
specific frame range. And by doing so,
we are going to be rendering our whole sequence, all of these 275 sequences. So let me change this
back to Houdini k and now press render
to disk option to render out all of
your sequences.
23. Conclusion: Okay, all done, I have rendered
out all of my sequences, and here is our end result. And here as you can see, I might have adjusted this cross. I have adjust the painted area, as well as I readjusted this painted area where we have these tracks to actually make the
tracks a bit bigger. And other than that, I'm using all of these
same settings, and also I have adjusted
this color of our water and we have all of the
settings are the same, and here as can see our Jeep is actually coming into the mud, and in here, it's
actually slipping. And after slipping, it actually grips the ground and
start to moving. And with that, all of our effect actually come together and I think
it's looking good. So that's it with that course, and I will see you next time.