- It is VERY processor intense
Unfortunately, boolean operations in Blender are notoriously slow. For anything but the smallest scale examples, I'd even claim that it's basically unusable. The Fast mode on the Boolean modifier (as opposed to Exact) is more performant, but that also comes with its own problems regarding accuracy:
Duarte Farrajota Ramos' suggestion might be worth investigating, but it still requires boolean. If that turns out to be a non-starter, I think it'd be a good idea to perhaps look for a shader solution. There are many tutorials for foam or sponge-like shaders, it might not be that hard to customize one of them for chocolate. Or you might distribute and boolean some small amount of real mesh spheres but blend it with a shader to help bridge the gap.
- For some reason, even though I have a vertex group selected in my GN setup, it is also trailing the spheres down the side of the object (but for whatever reason not on the top, bottom, or back).
In your setup, you are distributing spheres on a vertex group ("This") of a big cube object ("Hole Node Setup"), then subtracting them from your Chocolate object. The vertex group of Chocolate ("Holes Here") isn't used anywhere in the setup. Chocolate and the big cube share their bottom and side faces, but not their top; that's why there are no holes on the top of your chocolate object. There are no holes on the back face because there are no spheres distributed on the big cube there as well:
That's fine, but why are some spheres distributed on the side faces of the big cube in the first place, when your vertex group doesn't include those faces? The technical answer is "domain interpolation". A vertex group is exactly that: a vertex group. If a face gets selected by a vertex group, that's only because all its constituent vertices are selected—it is a side effect. The Distribute Points on Faces
node, however, uses Face Corner as its domain (why not the Face domain, I've no idea). So, when you feed the Selection socket with your vertex group, you are giving the Distribute
node a bunch of vertices, not faces, and in turn it asks "Which face corners these vertices belong to?"—meaning, it interpolates values between the Point domain and Face Corner. The four vertices of the vertex group each belong to three corners of three faces, so those (side) faces get a bit of point distribution as well. Side faces have only half of their vertices/face corners selected though, so they get about half as many points as the front face (notice they get sparser towards the back). The back face doesn't have any of its vertices or face corners in the vertex group, so it doesn't get any points.
We can demonstrate this easily using a cube with its side faces subdivided a bunch of times. Notice how the distribution spills over to the neighboring side faces, but since those faces are smaller, points don't go that far back:
So, a vertex group might not be the best way to make a selection in this case. Depending on the specifics of the object and the setup, you can use many other methods to do that. Here are two examples where we filter by the direction of the face (using Dot Product
) and simply by its index:
Evaluate on Domain
used to be called Interpolate Domain
. Here, it instructs the Distribute
node to specifically consider the Face indices instead of using its default domain (Face Corner).