How to make Grass field with Geometry Nodes in Blender 2021 (+ Grass animation )

Decor Design 3D
20 followers
AI Generated·May contain errors
Video Summary
AI GeneratedThis tutorial demonstrates how to use Blender's Geometry Nodes to scatter and animate grass across a landscape. The process covers creating low-poly grass models, using distribution and instance nodes to populate a terrain, utilizing weight painting for precise placement, and implementing keyframed rotation for a wind-like animation effect.
Hello guys and welcome back, in this tutorial,
we will learn how to scatter grass over any area,
and animate it using Geometry Node.
To work with me you can download this scene from the description,
or open any work file you have, and let us start with it.
What we need first is a grass model, a low poly like this one.
You can make it by adding a simple plane
and use the proportional editing to add some curves to it.
Then use any grass texture for the shading.
This file also is included in the description down below.
So, if we copy this shape around,
we can get a similar grass to the one we have.
Now back to the landscape scene, go to file,
append, and import the grass file.
Here they are.
You can find the Geometry Node Editor
in the Types window.
If you can't see it, you should consider updating your Blender version.
I will add a new workspace
and name it Geometry Grass.
In it, we can change the timeline to Geometry Editor.
Then, if we select the mesh for the grass,
and hit New, two nodes will appear.
After that, to scatter the grass over the selected mesh,
hit shift A and go to point,
then select distribute,
and just drop it between the input and the output.
Once you add it, you notice some weird shapes appears
in the terrain place, and the mesh
is now invisible, don't worry, we will bring it back in a minute.
With the distribute node,
we can increase the density for those shapes you see.
We can also change those shapes to our grass
by adding a second node called point instance.
With this last node, just take the pen from the object field,
and select the grass model.
And here they are.
It's quite big as you see, so we need a node to control the scale.
From the add menu, go to attribute,
and select attribute randomize.
In the attribute field you need to write the word scale as shown,
then with the minimum and maximum values,
we can control the range for the grass scale.
To bring back the terrain mesh, add a new node called join geometry.
This one have two inputs, and it works like a mix,
so we will mix the group input
and the point instance to get both the mesh and the grass.
And as it obvious,
we don't have that much
grass, so jump back to
the density field and
increase the number.
We will do 1000 just to get a feeling of what we have.
And as you see, the scale need a bit tweaking,
so I will make it 0.1 for the max value.
Here in the river bath, we need to clean the area from the grass.
To do that, we will use weight paint, and it is as easy as it gets.
The weight paint need a vertex group
which will be assigned here in the density attribute,
so to make a new vertex group,
just hit the plus icon from here, and name it something nice.
Then, if we switch the mode to weight paint,
the terrain should appear blue with zero weight.
From the density attribute field, select the vertex group we made.
The grass disappeared
because the vertices have zero weight on the entire terrain.
So now, with any brush, we can adjust the weight value,
the radius and the strength from the top,
and just paint over the mesh, simple as that.
Once you start drawing,
the grass will appear according to the color gradient.
Red means full weight, blue means zero.
Between them is bunch of color
which indicate a variation of the grass distribute.
Now normally, you won't need that much grass and it's always better
to just add the ones visible in your camera frame,
but for us, we will keep it just
to learn everything around this method.
Once you done playing with the brush,
You might need to set the weight back to zero,
and fix any area where the grass shouldn't
appear.
In this area along the river path,
we will have a smaller grass, how to do that you ask,
easy.
In the same geometry node tree,
copy those three node with shift D, connect the geometry
to the second point attribute.
We also need an extra join geometry node,
as I said it works like a mix, so we can connect
the second point instance to the group output.
In the second object field,
take the pen and select the small grass model.
We also need another vertex group,
so add it from the plus icon, and
assign it in the density attribute.
Now as before, we can enter the weight paint mode,
and just draw over the area along the river path.
Once you done, drop the
weight back to zero,
and fix the gradient
until it seems fit.
Increase the density number to around 3000 for the second grass.
For a terrain this big, the numbers we added is quite low,
we will increase it just to get a
feeling
of how should it looks.
And it will for sure add some
loads on the scene, so once you
done with one grass type, you can select the grass model
and just change the display mode to bounds,
this will make it disappear from the viewport along with its load.
As I said before, normally you won't need that much grass
and you will work inside your camera frame.
And also, once you finished with one grass model, you can always set it
to bounds and it will disappear from the viewport.
So for the
animation
part, I will
bring down
the density
number
to keep the
work smooth.
For the animation, we need a rotation movements in the grass,
and we can do that by adding another attribute randomize node,
so just drop it right here before the scale node, put it on vector,
make the attribute on rotation, and you will notice
the grass rotate a bit, that's because the max value is set to 1,
we can fix that by adding a new node called value,
and set it to 0, then connect it to the rotation max input.
So to start animating, open a new timeline,
and put it on the first frame.
It's a bit messy I know,
but we need those three windows.
We need to keyframe this value node to get the grass animation,
so in the first frame,
hit the I key over it to add a keyframe in zero rotation,
then go along the timeline, increase the value number a bit,
then hit I again to add another keyframe there, and so on and so forth.
I will increase it a bit to the middle of the timeline,
then I will bring
it back to finish
with zero
rotation, and here
is the animation.
You can after that copy those rotation nodes to the small grass,
and animate it in the same way.
With this simple method,
you can add grass, stones and
trees to your scene easily,
And animate them and live the dream.
So that's all guys, stay sharp, goodbye.
