0
$\begingroup$

So i've been following a tutorial SKIP TO 20:08 -> on how to make a burger in Blender, and the guy uses geometry nodes to make the sesame seeds on the top bun. However I know that geometry nodes have changed a lot since this video, and I haven't been in the loop. How do i make it so that the points are flush to the surface of the bun, following the curvature. My node setup What the burger bun looks like There must be a solution but I've looked around and haven't found anything.

So far I've been working around the differences, but I'm stuck when he makes the seeds flush to the surface of the bun using the "Align Rotation to Vector" node. I've used the new "Align euler to vector" but there's no option to use the normal attribute as the vector value. So how do i do this? I've tried using the normal node as you can see in the image but this hasn't worked.

My current node setup What the burger bun looks like

$\endgroup$
1
  • $\begingroup$ As well as @GordonBrinkmann's great answer below, it's also worth watching the geometry nodes section of Blender Guru's donut tutorial here. $\endgroup$
    – John Eason
    Mar 10, 2023 at 10:11

1 Answer 1

5
$\begingroup$

The answer to this is quite simple: the points which are distributed on the surface come with a rotation according to the face normals automatically. So what you can do is use the Rotation output of the Distribute Points on Faces node and plug it into the Rotation input of the Instance on Points node (I used some simpler geometry for this example):

rotate instances

This would also work with an Align Euler to Vector node, in this case the Normal output of the Distribute Points on Faces node will be the Vector and the axis to align would be Z:

align euler to vector

I just changed my distributed discs to cuboids as I realized it's better to show their orientation... Now for the random variations of placing the seeds it does not matter which method you used to align them with the surface.

Just between the Distribute Points on Faces (and align Euler to Vector in case you are using it) and the Rotation input of the Instance on Points node you add a Rotate Euler node set to Euler and Local. In the Rotate By socket you plug a Random Value node set to Vector for varying the rotation.

Be aware that the output of Random Value node is in Radians, i.e. a full rotation is not -180 to 180, but -Pi to Pi. So make sure to keep the values much lower in the Min/Max fields than what you want in degrees. The Z rotation will be rotating around the face normal, so a range of -Pi to Pi would be okay. The X and Y however is how much the seeds are sticking in and out of the surface, so you shouldn't use too high values there.

This is the setup if you are using the Rotation output of the Distribute Points on Faces node:

random rotation directly

And this is the setup when using the Normal output with an Align Euler to Vector node. Notice by the way that although this works just as good as the other method, not all seeds are rotated in the same way than before. That is because with both methods the Z axis is aligned correctly to the face normals, but the X and Y rotation are different.

random rotation after align euler

$\endgroup$
5
  • $\begingroup$ Hi Gordon, I'm not sure this merits an extra post, but if you don't want your bun look as if it's freshly back from the hairdersser: imgur.com/a/yKsnpKC $\endgroup$
    – Robin Betts
    Mar 10, 2023 at 9:43
  • $\begingroup$ ..... your answer fixed, while I was commenting :) $\endgroup$
    – Robin Betts
    Mar 10, 2023 at 9:53
  • 1
    $\begingroup$ @RobinBetts I fixed it about half an hour ago, you commented quite slowly ;) Well, at first I thought the question is mostly about how to get the alignment to the face normal with newer GN, then I realized that the randomization cannot be done like in tutorial anymore as well, so I added it. But instead of using the Axis Angle like your setup I prefer the Euler method with random vectors instead of floats, because then I have more control on the individual axes. I also rotate on X and Y because I think each seed being perfectly flush with the surface looks a bit unnatural, too. $\endgroup$ Mar 10, 2023 at 10:01
  • $\begingroup$ There's a huge delay on post updates, for me .. Yes, Poisson Disk and all-flush heads you off in a toon direction :) $\endgroup$
    – Robin Betts
    Mar 10, 2023 at 10:13
  • $\begingroup$ Wow thank you this is a really detailed answer, I'll give it a go now! $\endgroup$
    – finnsquid
    Mar 10, 2023 at 16:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .