3

I would like to bevel my data. The problem is that the data starts at roughly 0 so the bevel distance is very short. If I undo clamp, the first bits of data appear chunkier than they should.

enter image description here

enter image description here

I would like to create a vertex group where any cube shorter than a value is placed in a vertex group.

These cubes

enter image description here

So I have my output node here set to go to 'Group' vertex group.

enter image description here

But when I restrict my bevel to the Vertex Groups nothing happens.

enter image description here

I've tried changing the output from boolean to float. Inverting the Vertex Group. Changing it to weight. None of these yield results.

Is this possible?

TheJeran
  • 2,601
  • 1
  • 8
  • 24

1 Answers1

6

Yes, you can actually solve this with Geometry Nodes (at least in version 3.2).

The Basic Idea

For this you would just have to use Store Named Attribute to store a boolean value into the geometry (in the point domain).

But you have to create a vertex group in the underlying geometry first, because only then you can select the vertex group in the bevel modifier.

enter image description here
The gray cube is the existing geometry, and the green cube was created with GN

Important:

However, the whole thing only works if at least a single vertex of the original geometry also ends up in the Group Output!

If this step is not observed, some stupid bug probably comes into play once again, which apparently prevents the geometry created in Geometry Nodes from being processed correctly by the subsequent modifier as well.

Also, the node Join Geometry must first be fed with the original mesh, and then with the geometry created in GN. The order is also crucial here!

Bug reported: https://developer.blender.org/T100042

Solution 1

If you take the above approach, then you can solve this as follows:

enter image description here enter image description here

Here I first instantiate cubes and scale their height with some random values.

To be able to select the edges, however, I have to subdivide the mesh with Subdivide Mesh, because otherwise I can't exclude the lower edges in the selection.

With a little boolean logic I can filter out the edges that should be rounded.

To avoid the bug described above, I built all this on a canvas, which I put into the node Join Geometry before the generated geometry.

Solution 2

However, there is a simpler solution, as I have just discovered:

enter image description here enter image description here

This works very well if you can live with the fact that the cubes have no faces on the bottom.

Here I simply extrude a square.

Since you also want to have the side edges rounded, all edges are simply put into the vertex group and then rounded with the Bevel modifier.

The remarkable thing about this solution is: It is simple!

The strange thing about this solution is: Here the bug described above does NOT come into play! ...please don't ask me why, that's Blender.

PS: By the way, you don't even need a "Vertex Group" here (see comments), because with this solution you simply switch to Angle for the bevel modifier and the edges are then rounded based on their angles (thanks to @RobinBetts!). But I'll leave the answer here anyway, because it also serves to illustrate the "bug" that is currently being discussed at https://developer.blender.org/.


(Blender 3.2)

quellenform
  • 35,177
  • 10
  • 50
  • 133
  • Hmmm.... It must have something to do with the instances. I tried a simple test with a grid of instances and tried to bevel 50% but it's not working. Anyway to bevel specific instances? – TheJeran Jul 28 '22 at 10:49
  • @TheJeran Yes. Please share your blend-file. – quellenform Jul 28 '22 at 10:51
  • https://blend-exchange.com/b/2Lx1rQyb – TheJeran Jul 28 '22 at 10:56
  • Thank you my guy – TheJeran Jul 28 '22 at 11:20
  • @TheJeran Please give me some more info, I think I have a solution: Do you want to round the side edges as well, or only the top edges? And what should happen with the cubes that have a height of 0 (or below a certain value)? Should they not be rounded at all? – quellenform Jul 28 '22 at 12:47
  • Side as well. Ideally every cube will be rounded and the small ones rounded as much as they can handle. – TheJeran Jul 28 '22 at 13:56
  • @TheJeran OK, if you don't mind about missing faces at the bottom, I have found another solution for you. – quellenform Jul 28 '22 at 15:42
  • @quellenform In your second solution, why bother with a vgroup? Just revert to bevel by angle? – Robin Betts Jul 28 '22 at 16:27
  • 1
    @RobinBetts Thank you! You are as always completely right! That remained here actually from carelessness inside, but on the other hand it was also about the fact that there is obviously a bug here, which occurs only with the other variant, although it should actually also exist with the second solution ...it does not ;-) – quellenform Jul 28 '22 at 16:44
  • @quellenform I only mentioned it because it was the solution I was about to post! :D The second case stores all True, so maybe that's some inherited default? – Robin Betts Jul 28 '22 at 17:01
  • @quellenform Hey Man, I love what you've done. But I figured out a solution. Can you update your answer to include this method too so I can select it as the answer? I found if you do a join geometry with the instances and the original geometry then it works as expected. You can use a transform node to shrink or move the original geometry so as not to be visible https://blend-exchange.com/b/NBSsO59n – TheJeran Jul 29 '22 at 10:05
  • @TheJeran Yes, correct, that is what I have already described as a note: The original geometry must be transferred in some form with Join Geometry. This only requires a single point, because you don't even have to transfer the whole geometry. You can of course use Transform to move the mesh, but you can also use Merge by Distance to reduce the geometry to a single point. You can also use Delete Geometry to delete all but a single point. Do you really think I should edit the answer for this, or is it enough if we leave it in the comments? – quellenform Jul 29 '22 at 10:52
  • @TheJeran But I would prefer the second solution anyway, because it manages without these workarounds. ;-) – quellenform Jul 29 '22 at 10:53
  • Oops my bad, then in the future i will use a vertex until they add the bevel node. – TheJeran Jul 29 '22 at 10:57