I recently ran into one of those frustrating situations while working with Geometry Nodes: I needed to smooth some part of a mesh, but there is no Smooth Mesh node yet.

A common workaround currently is to use the Smooth Modifier, which is doing exactly what we need. The downside of using a modifier tough, is that you can't apply it to only a certain part of your mesh dynamically. (you can use a vertex group, but that's not very dynamic and a bit tedious)

Geometry Nodes in Blender 3.1 has so many ways to pull information out of your geometry. It also has ways to maniplulate it.

So I thought maybe there is a way to pull off a smoothing effect. I ended up trying something (explained in the video) that failed. But while doing so, I stumbled upon a different way that does exactly what I need.

I'm not sure about the smooth modifier algorithm details , but what it does looks very similar.

Here is the video where I explain the process:

How to create your own Smooth Node

The basic idea behind this way of smoothing, is to find the centers of the edges.

We can get the center position of all edges, by taking the average of the two vertices that define the edge:

Getting the Edge center position with Geometry Nodes
Getting the Edge center position with Geometry Nodes

The next step is a bit weird. But we're going to use the edge locations to set the positions of all vertices.

Setting the position of the Vertices using the Edge locations
Setting the position of the Vertices using the Edge locations

This involves some behind the scenes magic of Geometry Nodes. If we take a vertex, and set its position based on edge data, which edge is it going to use?

It looks like Geometry Nodes uses ALL edges connected to the vertex, and takes the average.

And this, by definition, smooths out the mesh. Which is awesome 😃

If we "nudge" each vertex in the direction of all its connected edges, spiky spikes will get less spiky, corners will be less sharp. In other words, we smooth out the mesh.

A modular step

I was so happy when I got this to work. Because this means smoothing can now be one of the many modular steps inside the node tree. (Instead of applying an entire smooth modifier)

We can smooth only a certain selection of our mesh. Or smooth only with a certain amount based on some other value. Like the normals or our faces, or proximity to another object. Possibilities are endless.

For the time being

When a real "smooth mesh" Geometry node gets added to Blender, this will all become irrelevant. But until that time, at least we can get some kind of smoothing happen in our Geometry Node trees.