Sign in to follow this  
Kryzon

Mesh curvature \ smoothing algorithm?

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.

 

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

Share this post


Link to post
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.

 

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this