Mesh curvature \ smoothing algorithm?

Started by
3 comments, last by Kryzon 7 years, 8 months ago

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.

edgeflow1.png

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):

edgeflow2.png

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):

GUID_86_C3_C758_A692_4_D23_A268_06_A3_B1GUID_DA0_DA420_FD15_451_E_848_A_1_DFD11_

GUID_974_F53_D8_7500_461_B_9_BBC_3202_B6

(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.)

Advertisement

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

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

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

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.

edgeflow_a.png

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.

edgeflow_b.pngedgeflow_b2.png

- 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.

edgeflow_c.pngedgeflow_d.png

This topic is closed to new replies.

Advertisement