Geometry Nodes

I don’t believe that would work, as it would have to carefully target only certain areas of the noise texture and not others. Of course I could use a custom displacement map, but that’s not the point of this exercise.

We need the modeling nodes to output attributes for the parts they change or create, until then it’s gonna be guesswork. But no worries as it’s part of the plan for geometry nodes (check d.b.o)

2 Likes

The flower_scattering demo file uses a Point Separate node fed by a texture to create a mask of points. Maybe that can help in some form?

As for smooth shading, any “new” geometry created inside the modifier should have its shade_smooth attribute set to true. Use an Attribute Fill node, set the Domain to Face and attribute type to Boolean, the attribute to shade_smooth, and the value to True.

I tried a different approach, and got some ‘not bad’ results. With some additional noise, and some fine-tuning, this could be the thing you are looking for. More importantly, it doesn’t use a boolean, so you can move the cursor without burning down the building.


It uses an attribute proximity node to take a set of points and use the distance between each point and use that to displace craters in the asteroid. an attribute curve map creates that “ridge” you were looking for.

The displace nodegroups are just a simple nodegroup I created so I didn’t have to recreate it every time I need to displace.


asteriod 2.blend (1.2 MB)

5 Likes

This is awesome!!! Let me dive into it and see how you worked your magic.

1 Like

One more note on something I thought out after the fact:
If two craters get too close to each other, some non-manifold geometry can be created. Because of this, I recommend using poisson disk instead of random on your point distribute so that you can avoid this, and set a maximum distance between your craters.

1 Like

So I was just wondering what the point of the Bounding Box node is? What could it be used for?

Also, are you not able to save geometry node groups to the startup file?

Thank you. Yeah, I looked through your file and there is a lot to unpack there. Also it needs Blender 3 right?

I’d love for a walk-through of how each node does what, but I can also figure it out with some reverse engineering. Thanks again!

1 Like

You can use attribute proximity if you want a mask for the edges
image

4 Likes

The only time I found the bounding box node useful was to get the dimensions of an object. Also, you can do stuff like this easily-

1 Like

Ok. Let’s see if this helps.
An icosphere is created and displaced randomly to give it the base shape. The displace group is your displacement. The one major change is a “noise offset”. This transforms the sphere so it gets a different pattern (the texture is applied differently) and then moves it back to it’s original position after the displacement is applied. This allows for more seeds and randomization. Another additional node is the attribute remove node, so the nodegroup can be reused without a previous one interfering with it.

Points are then distributed on the mesh. An attribute proximity stores the distance between the points on the base mesh and the newly created points. This attribute is then mapped using a curve to make the crater shape. You can try experimenting with the attribute curve map to get different shapes like deeper, shallower, or flatter etc.

It then uses that attribute to displace the mesh as usual. The mesh is then subdivided and another level of noise is applied. To add more detail, you could do this as many times as you like.

And finally, the mesh is shaded smooth.

And yes, this is blender 3.0, because the attribute curve map is not available in 2.93. I guess you could use a color ramp if you like, but I like the visual interaction of the curve widget.

I would also recommend remeshing it, because you will notice a few errors in the mesh. (Just a by-product of displacing on oddly shaped surfaces.) It also adds a nice organic look, and makes the asteroid look more realistic. And while a remesh is slow, you don’t have to use it in the viewport, and it’s still faster than booleans.

Oh, and sorry about my wierd setup and workspaces. I save a default startup file because I find these layouts more useful to me than the default blender ones. I also by default setup collections that I use frequently, all with color codes.

1 Like

Sure this particular case can be solved, but generally speaking modeling nodes are meant to output attributes concerning the geometry they modify or create, which doesn’t necessitate an additional node and is free computationally speaking. So far I haven’t seen this applied to the few modeling nodes present.

cf https://developer.blender.org/T74967 in “Selections / clusters”

1 Like

Shouldn’t the geometry they modify or create be based on an attribute in the first place?

For instance, edge split. Rather than selecting the edges in the node itself, it could use an attribute, and have a separate node e.g. “attribute edge angle” that stores the edge angle in an attribute. That could then be used to drive the edge split node.

This same attribute edge angle node could also be used to select edges for beveling, and other purposes.

1 Like

Another feature I have been thinking of for a while, is having attributes that store values in a result attribute, to output the string of that attribute in a socket. Rather than having to rewrite my attribute every time, I could just drag the socket into the attribute inputs of my other nodes.

RCS:

Please vote!

I desperately need this. I neither understood or remembered anything from math class until did programming on khan academy and started learning blender shader nodes.

2 Likes

That’s exactly how it is planned to work yes.

1 Like

A full boolean-based workflow gets closer to reality as Howard just committed a patch that greatly speeds up the operation for non-manifold objects (if they need to be ‘hole tolerant’).
https://developer.blender.org/rBa1556fa05ca96e43b70aa4f6b6284eb581701e4d

Erik (the developer) also has two other patches, both of which commit great speedups to boolean operations (not committed yet though).
https://developer.blender.org/D11433
https://developer.blender.org/D11432

17 Likes

Yes you are right, modelling nodes outputting masks would be very useful. Right now there aren’t many examples, though sometime ago I needed a mask for the new verts generated by a subdiv node but had to do crazy modulo math to achieve the same result.

Better Icospheres using Geometry nodes

Made this node group for @gemn 's toolkit. It generates icospheres without the icosphere primitive node and supports non-exponential subdivision. Also with vertex index!

14 Likes