Page MenuHome

Weld Modifier Proposal
Open, NormalPublic

Tokens
"Love" token, awarded by DarrellJuk."Love" token, awarded by AnadinX."Love" token, awarded by monio."Love" token, awarded by xharthok."Party Time" token, awarded by Tetone."Love" token, awarded by Way."Burninate" token, awarded by mazigh."Party Time" token, awarded by DreamIncubator."Love" token, awarded by reguza64."Love" token, awarded by DotBow."Like" token, awarded by Zino."Love" token, awarded by Frozen_Death_Knight."Love" token, awarded by undo."Love" token, awarded by jemian."Love" token, awarded by jonathanl."Love" token, awarded by knightknight."Love" token, awarded by dgsantana."Love" token, awarded by MetinSeven."Love" token, awarded by brilliant_ape."Love" token, awarded by stephen_leger."Love" token, awarded by lcs_cavalheiro."Love" token, awarded by symstract."Love" token, awarded by juang3d."Love" token, awarded by wilBr."Love" token, awarded by Spatz."Love" token, awarded by astrand130."Love" token, awarded by juri3d."Like" token, awarded by amonpaike."Love" token, awarded by fiendish55."Love" token, awarded by Dspazio."Burninate" token, awarded by EitanSomething."Love" token, awarded by helloidonthaveanyideaformyusername."Love" token, awarded by Fracture128.
Authored By

Description

Motivation

While modifiers such as spin, mirror & array can merge duplicates, there are times when
Some modifier setups don't can't as easily predict duplicate geometry.

Examples include:

  • Curve modifier deforming an object that loops back on it's self.
  • Bend modifier causing opposite edges touching when bending 360 degrees.
  • Beveled curves which taper to a point (although this could be supported without a modifier)

Lots of comments from users on
this thread.

Proposal

  • Seams: restrict welding to vertices along boundary edges.
  • Edge Collapse: collapse edges below the length threshold.
  • Vertex Group: option to limit welding to vertex groups.

There will be two methods available:

  • Simple (default)

    This would be a fast weld operation that would support common welding operations - weld-seams/collapse-edges although other cases could be supported in the future.

    Merging geometry that would cause degenerate faces will be skipped (this requires much more complex operation to properly handle).

    (internally this will manipulate the Mesh structure without requiring it to be converted into BMesh).
  • Full

    This would perform a full merge-by-distance, with support for resolving degenerate cases, documented to be much slower then the Simple operation.

    (this can use the existing merge-by-distance code)

Pros

  • Fast by default, for merging boundaries of disconnected surfaces.
  • The ability only to merge a small subset of vertices should speed up the operation in most real world uses.

Cons

  • The Full merge-by-distance code uses a method that depends on vertex order (picking all vertices closest to vertices at the start of the mesh). This means changing the vertex order of the input may cause the result to *jitter*.
  • The Simple method will have limitations which might be hard to understand. Ideally we wouldn't have to select between two methods.

Details

Type
To Do

Related Objects

Event Timeline

Campbell Barton (campbellbarton) lowered the priority of this task from Needs Triage by Developer to Normal.Wed, Sep 25, 2:50 PM

Pointing out that some of the desire for this comes from the fact that the Bevel modifier can, as a result of clamping, put vertices on top of each other, and users would like them merged. As Campbell points out, the Bevel modifier itself could be changed to detect and merge in such cases. I would have done so if it were easy, but it is not so easy (the current code that merges nearby vertices gets quite complicated), so was delaying -- especially as my eventual goal is to get rid of clamping completely and continue beveling after such collisions cause merges.

All this is to say: restricting this to only happen at boundaries (seams) may not accomplish everything people want, so if possible that should be an option rather than a requirement,

AV (Dspazio) added a subscriber: AV (Dspazio).

@Howard Trickey (howardt) wouldn't collapsing edges handle this case?

We should be able to support this as long as it doesn't result in faces using the same edge/vertex twice.

Collapsing edges would mostly handle that case, yes. I wasn't sure whether you intended to support that everywhere or just as part of handling merges across boundaries, but thinking about it, you must have meant the former, because the latter wouldn't come up in most cases, if ever.

One case that your Simple solution would rule out: cases where bevel acts as an inset into a particular face (because all edges around that face are beveled). At some point, the inner face of the inset disappears (always, for triangles; for regular polygons otherwise). Users would probably like that face to go away and all the points of the inner face to weld together. And a variant on this: sometimes the inner face degenerates into a line (e.g., insetting a rectangle).

I can add some others examples we talked about in the Bevel modifier thread.



One more from fiendish55
https://i.imgur.com/PfjPJ8K.gifv

Maybe it could be possible with modifiers (bevel, merge, triangulate on ngons) to achieve this kind of non-destructive beveling.
https://devtalk.blender.org/uploads/default/original/1X/c043c82a09a5ea04bc1b1bd4c8962e9f2d9b3d72.gif

Please keep things like multires in mind during the design process. One of the best use cases that I can imagine for this kind of modifier is for sculptors who wish to split objects that should visibly be contiguous into multiple pieces so that they can really crank up the level of subdivision on each individual part for multires sculpting while still having them act like a single mesh for animation, edit mode, etc.

I'm curious if this is planned to support joining objects, or only work on a single object? Sometimes in animation it would be nice to merge edges of objects together (hand/sleeve for example).

@Joseph Brandenburg (TheAngerSpecialist) it's possible although it wouldn't be a target for the first version of this patch.

Also, this feature seems better suited to a grouping than a single objects modifier - where all objects in the group have their seams welded.

Please keep things like multires in mind during the design process. One of the best use cases that I can imagine for this kind of modifier is for sculptors who wish to split objects that should visibly be contiguous into multiple pieces so that they can really crank up the level of subdivision on each individual part for multires sculpting while still having them act like a single mesh for animation, edit mode, etc.

I second this, If you guys can make it work, we will have a very powerful multires.

Way awarded a token.Fri, Sep 27, 1:04 PM

The "full method" use the existing merge-by-distance code; it's right to say that will give us options like 'merge at first/last/3dcursor' and peraphs Empty? Because that could open new scenarios.

@Tosky (Valerush), these don't make sense for modifiers since defining operations on individual vertices doesn't fit well with the current modifier stack.