# Mesh curvature \ smoothing algorithm?

This topic is 877 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi. I'm trying to understand the logic behind a mesh editing tool in Maya.

While 3D modeling, if you join two parallel edges with a new edge between them, that area stays "flat" since the vertices were created on the parallel edges.

You can move that newly created edge manually to give it some form, but using the "Edit Edge Flow" tool it automatically moves that new edge (or rather, the two vertices that form that edge) to a position that "feels" like it follows what the mesh should be.

With that new edge selected, just clicking that tool does this (these are profile views):

I assure you that the other edges don't move at all, just the selected one.

What should be the algorithm behind this, is this just smart interpolation? I would really like to code a script for something like this for Blender.

The following images were taken from the Maya documentation (it doesn't mention anything about the algorithm used):

(In this last image it shows that by changing the strength setting of that tool, it can be used to 'remove' the curvature of a selection of edges, like the opposite effect.)

##### Share on other sites

It probably does some sort of bezier curve/patch interpolation based on the tangents of the adjacent triangles.

##### Share on other sites
My guess is that they treat the verts on the perpendicular edges as control points for catmull-rom splines, and the 'edge flow' is actually the curve tension. This paper has some great info about how to evaluate the spline: https://www.cs.cmu.edu/~462/projects/assn2/assn2/catmullRom.pdf

##### Share on other sites

Thank you for the suggestions, I will look into them.

##### Share on other sites

I was thinking of some geometrical approach. It seems easier to look at this problem from a profile view as it comes close to 2D.

You have some connected edges, among which edges A, B and C. You subdivide edge B a couple of times, so you have three new edges B1, B2 and B3.

The vertices that form B1, B2 and B3 need to be displaced to make the edge flow smooth. By smooth I mean an edge flow that makes a "bridge" between edge A and edge C, that forms a transition between them.

This transition could be in two ways, or more, like the splines you suggested.

- Forming triangles between a vertex and its neighbours, getting the triangle height and forming an transition in the triangle height from the first vertex to the last.

- Looking at the face (or edge, in this 2D view) normals, the vertices need to be moved so the normals of the sub edges can form a transition between the normal of edge A and the normal of edge C. But the math is beyond me.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 14
• 46
• 22
• 27
• ### Forum Statistics

• Total Topics
634047
• Total Posts
3015232
×