Distributing sprinkles using Geometry Nodes in Blender | Blender 4.0 | Beginner Tutorial
278 views
Nov 8, 2024
Learn how we can make a Geometry Nodes setup, that can distribute sprinkles. Check the detailed tutorial on my website. https://usamababar.com/blender-geometry-nodes-distribute-instances-like-particle-system/ Skip to 05:09 to see the full Geometry Nodes setup. #geometrynodes #3d #blender
View Video Transcript
0:00
we will be scattering sprinkles using
0:02
geometry nodes just like in this image
0:05
skip to the end of video to see the full
0:07
geometry node setup let's distribute
0:10
sprinkles onto the ice cream top just
0:12
like a particle
0:14
system select the ice cream go to
0:17
Geometry nodes Tab and add a geometry
0:20
nodes modifier by clicking new button in
0:22
the geometry nodes editor when we add a
0:25
geometry nodes modifier for our object
0:28
we see that there are two nodes already
0:30
present group input and group output
0:33
these Define our mesh and all of our
0:35
working should be between these two
0:37
notes we are going to distribute points
0:40
on faces so that we can later instance
0:42
our object on
0:44
them this can be done using the
0:46
distribute points on faces node add it
0:49
by clicking add Point distribute points
0:52
on
0:53
faces place the node between group input
0:56
node and group output node change the
0:59
distribute type from random to pant dis
1:02
this way we can keep some distance
1:03
between the points we see that we have
1:06
distributed points on the faces but the
1:09
mesh has disappeared this is because we
1:12
have replaced the mesh with the new
1:13
distributed points to solve this issue
1:16
we will use join geometry node as it
1:19
will join the mesh and distributed
1:21
points add node by clicking add geometry
1:24
join geometry the input of the join
1:27
geometry can be connected with multiple
1:29
notes connect distribute points on faces
1:32
node and group node to the join geometry
1:34
node for selection-based point
1:37
instancing we can use vertex groups so
1:39
that points only instance on a specific
1:42
area we only want the points to instance
1:44
on the upper half of icecream part to do
1:47
this we add the pre-made vertex group to
1:49
the geometry notes connect the selection
1:52
input of distribute points on faces node
1:55
and connect it to the group input second
1:57
output socket this will add a Boolean in
2:00
selection in the geometry nodes
2:01
modifiers
2:03
panel click the toggle button on the
2:06
right side of selection checkbox this
2:08
will convert the checkbox to a text box
2:11
in the text box enter the name of vertex
2:13
group in this case
2:16
top now we can instance the sprinkles
2:19
using the instance on points node add
2:21
this node by clicking add instance
2:25
instance on points place it after the
2:27
distribute points on faces node now we
2:30
need to add the object that is going to
2:32
instance in our case the sprinkles this
2:35
can be done using the object info node
2:38
add the object info node by clicking add
2:41
input scene object info in object info
2:44
node choose the object which you want to
2:46
instance we have already made sprinkles
2:49
for this scene the object should be
2:51
present in the scene connect the
2:53
geometry output of the object info node
2:55
to the instance input of the instance on
2:57
points node the Orient ation of the
3:00
sprinkles is not correct this is because
3:03
they have instanced with their default
3:04
rotation and all of them should have
3:06
their rotation according to the shape of
3:08
the ice
3:09
cream connect the rotation sockets of
3:12
distribution points on faces node and
3:15
instance on points
3:19
node this does correct the issue but in
3:22
the wrong angle we can correct it by
3:24
adding a rotate instance
3:28
node
3:32
add a rotate instance node and place it
3:34
after the instance on points node change
3:37
the angle of Y AIS to
3:39
90° all of the sprinkles have same
3:41
rotation which is unnatural so we will
3:44
add some
3:46
randomization we will randomize only the
3:48
xaxis so first we will separate all the
3:51
three axes using the combine XYZ node
3:54
added by clicking add utilities Vector
3:57
combine XYZ connect it to the rotation
4:00
input in the combined XYZ node change
4:04
the Y angle to 90° but we have to enter
4:07
the value in radians which is
4:09
1.57 we will randomize the x axis
4:12
between 0 and
4:14
360° add a random value node by clicking
4:18
add utilities random
4:20
value keep the minimum value to zero and
4:23
maximum value to 6.28 in radians and
4:26
connect to the xaxis of combin XYZ
4:34
now the sprinkles look a lot more
4:36
natural when we turn the shading on we
4:38
can see that using the same principle we
4:41
can change scale of
4:52
sprinkles add another random value node
4:55
set the minimum to8 and maximum to 1.2
4:59
and connect to the scale input of
5:00
instance on points node thanks for
5:03
watching comment your thoughts about
5:05
this video see the detailed tutorial on
5:07
my website link in the
5:12
description this is our geometry node
5:19
setup subscribe for
5:24
more