9
$\begingroup$

Is there a way to decimate geometry in Geometry Nodes in the same way the decimate modifier does when set to planar?

I want to have less decimation near the edges. So I am planing to put the edges in a vertex group and use an inverted selection of those in Geometry Nodes. I don't think it is possible to control the distance from the edges in the modifiers (I will probably mix up the provided answer with some proximity stuff).

I am experienced with Geometry Nodes but don't know where to start for when it comes to planar decimation.

$\endgroup$
0

2 Answers 2

9
$\begingroup$

Yes.

There are not many ways to do this, but one way might be to disassemble the mesh, remove the excess edges, and reconstruct the missing parts.

It might look something like this:

enter image description here enter image description here

Here I first split the mesh at those edges where the edge angles are not equal to $0$. This way I get planar surfaces as single elements.

Afterwards I remove the inner edges in these elements, so that I only get the "frame". I transform this into curves, so that it is possible for me to remove also the points lying on a straight line.

Then I simply instantiate along a mesh line a few curve circles with the same number as curves. This allows me to resample them further, with exactly the same number as the number of vertices in the original faces.

By then applying the node Fill Curve, these are converted to faces for me, whose points I move back to the original positions.

Finally, I only have to transfer the original normals back.

Of course, you can also add additional custom vertex groups at the beginning when splitting the mesh so that no decimation occurs at certain edges.


(Blender 3.6+)

This answer is basically based on an answer given earlier, however the solution shown here can be applied to any mesh even if it has tris or n-gons:
How can I delete edges/edge loops that are on a mostly flat surface using geometry nodes?

$\endgroup$
2
  • 1
    $\begingroup$ ...sorry, small mistake: At the end when transferring the normals, the Compare node should not be set to Less Than, but to Less Than or Equal! $\endgroup$
    – quellenform
    Commented Aug 17, 2023 at 14:46
  • $\begingroup$ Whoops! I missed the "planar" part. Not only it makes the geometry nodes more possible (in fact using a repeat zone may be not that hard at all…), but my solution is wrong, decimate in planar mode doesn't support vertex groups. $\endgroup$ Commented Aug 17, 2023 at 16:15
3
$\begingroup$

No.

You could reimplement the functionality in Geometry Nodes, but honestly it's unrealistic…

If you're fine splitting your geometry nodes tree in two, and put the Decimate modifier in middle, and the only problem is how to pass the selection - you can actually use Geometry Nodes to set a vertex group, though it's annoying (and requires even more modifiers):

Assign vertex group in Geometry Nodes (v3.3)

For example to animate a dynamic subdivision (that's a bad algorithm, as it subdivides first, then decimates… But it's an example of dynamic decimation):

$\endgroup$

You must log in to answer this question.

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