Remove-Doubles (modifier) #41748
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
36 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#41748
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Starting this design task because the possibility of a remove doubles modifier was suggested (in replies to D443).
The current design of the modifier stack creates an entire new mesh for each modifier, this means its not well suited to having small (fine-grained) editing operations as modifiers.
Which is why we don't already have many basic operations as modifiers.
So for this design task I like to gather some good use cases where a remove-doubles modifier would be used, to consider if its worth adding.
Findings...
Changed status to: 'Open'
Added subscriber: @ideasman42
Added subscribers: @karja, @PatriceBertrand
Remove doubles modifierto Remove-Doubles (modifier)Added subscriber: @zeauro
remove_doubles.blend
In this .blend, there is an animated grid with 2 shapekeys simulating a tearing of a transparent block.
On this grid, there is a solidify modifier and a bevel one.
Next to it, there is a non animated grid created by creation of a shapekey from mix at frame 60 and deletion of previous shapekey and basis.
For this mesh, I did a Remove Doubles in edit mode.
With a Remove Doubles modifier added before the others, animated grid could be rendered like non animated one.
RD_simple_deform.blend
In this .blend, a simple deform modifier doing a bend is the starting point of modifier stack.
At the bottom, you see the result if we could add a Remove Doubles modifier just after it.
RD_Sphere_Horn.blend
in this .blend, a simple sphere has a horn define by a curve modifier.
A shapekey was created to animate disappearing of the horn.
With a Remove Doubles modifier, result would be a perfectly smooth sphere
This comment was removed by @zeauro
This comment was removed by @PatriceBertrand
This comment was removed by @zeauro
Just removed discussion about a bisect modifier, @zeauro - please stay on topic.
Copied from D443, added a few comments. Hopefully it works just as i had imagined:
Have experimented with some ideas.
Main purpose i have found in operations where you want to
geometry, and of course the other way around.
Benefits i see are especially for animation and deform on smooth meshes. With a "merge"-modifier you could assign overlapping edges to 2 or more different vertexgroups and move them with bones or curves asunder.
Rough example. The crack or whatever can be handled by Edge Split very good, but i dont know a good possibility to go any further.
My idea for a "merge"-modifier is to create two or more parts with overlapping verts and edges and hide the dividing line with the modifier.
Moving the parts beyond the merge limit splits the mesh.
Fracture could have an extra layer when combined with Edge Split.
A merge option for meshobject + meshobject (like target object) could handle more - Linked Duplicates with Mask would be responsible for more fragments, so you have only one mesh to work on.
Also comes in place where two sets of modifiers should not affect eachother (Solidify/Array always take whole mesh) and 2 objects are needed, but result object shall appear as connected.
A little like Array cap settings without modifier dependencies. I dont know if this is feasible.
The banana shows no cuts/is not peeled when not deformed, providing the merge is activ.
This can also be done with Array merge, but it dont allows to animate seperate banana peels, or to texture it as a whole.
In theory you could display every fruit outside and inside with a single mesh (after cutting it, suitable for animations).
Last one is Skin modifier (maybe not an ideal example). Skin should be generally not bad to use, because you can set higher merge limits and stick how you like.
Also its very organic - a bit like metaballs when combined with a "merge"-modifier + Subsurf. > same method as in @zeauro´s SphereHorn-File. You could collect connected vertices on one point and they merge to a single vertice with the modifier. Then move the vertices to different locations and you get a larger and still connected mesh. (for waterdrops, growing plants or something like that)
Only problem i see is the radius and root after merge operation.
It's interresting to see, in these examples that the effect of the "remove doubles" may be usefull not only after (after in terms of time not of stack order) other modifiers have acted, but also before, that is to say mesh parts are glued and merged to start with, then because of various modifiers they are torn appart, double vertices get separated and the "double modifier" ceases to operate.
Copied from D443 : We must keep in mind that although we call it "remove doubles", (as in "fix a problem"), the operation is really "remove near vertices". In that sense, even though few modifiers would actually create true doubles, many could generate very close vertices. The array modifier would do this simply if using scaling (through a scaled empty object), then each instance gets smaller and smaller, and vertices get nearer. Shrinkwrap modifier could also quite often yield vertices that are very close to each other and could be simplified by a "remove doubles".
An example:
You could duplicate (AltD-link) fingers and scale+place the objects in right position to the hand, before merging them to the character mesh with the modifier.
Thus you can edit finger & vertexgroups on a single mesh, without having to duplicateX5 and reassigning vertexgroups on every finger after changes.
The way is that linked fingers get the merge modifier with target "character mesh" and vertexgroups have to be renamed only one time for every duplicate.
For the Array: This could be used where you want to "skip" repeating parts of the mesh, for example on snake models.
As mentioned above, its like Array merge in this example, but end & start of the arrayed mesh can be modified better.
Nevertheless, this is highly theoretical and maybe there are better methods to handle this specific example, but it should work for lot of models.
Would be nice if this gets considered.
I like to suggest not to see this as another function, rather than a main feature of the modifier in terms of possible use cases.
Here is an example where merge is not only handy, but even necessary.
The belt mesh got a curve modifier and follows a curve circle (white line) with Stretch & Bounds Clamp options enabled.
As you can see, the ends could use a good merger.
Or you apply the curve modifier instead, but this means you cant use curve any more for animation or pose corrections.
The idea is to place a Merge modifier after Curve modifier.
Therefore you dont have to apply the modifier and dont have to lose curve control, and of course, its still very easy to make changes on the mesh.
Added subscriber: @MarcClintDion
Added subscriber: @RayMairlot
This may be a similar situation to what @karja said above, but particularly when modelling wheels/tire tread it is necessary to merge the beginning and end of the tire to create a complete circle.
Currently, it is necessary to apply both the array and whatever deform modifier you have used to bend it into a circle (commonly curve or simple deform set to bend) and then remove doubles in edit mode. The obvious disadvantage is that should you want to later change, say, the design of the tire tread it is necessary to have access to the original un-modified mesh and then repeat the apply, remove doubles process.
A remove doubles modifier could simply sit at the end of the modifier stack and allow the underlying mesh to be altered at any point while still forming a seamless circle.
Updated task with findings section.
If there was a "remove double" modifier, then it would be simple to add settings based on vertex groups. (1) limit the merge to a vertex group, but also (2), limit with given source group onto given target group.
I believe in lightweight modifiers with limited features, used as legos. If and when some node based modifier scheme is introduced, then we would probably use more atomic feature nodes assembled at will. When this comes, it is likely the current modifiers will not be trashed, but simply ported to nodes. In that perspective, it does make sense to introduce such light or atomic modifiers, later to be turned into nodes.
That being said, I did mention earlier that when doubles removal is bundled with a modifier, it can be made more efficient, because it only acts on the vertices that were created. In order to split the work in (A) mesh generation, followed by (B) doubles removal, we would need the (A) node to output not just a mesh, but also vertex groups that identify the newly created vertices. This vertex group node-output would then be pluged into the remove doubles node inputs.
Added subscriber: @ZhangYu
Added subscriber: @RyukoReiakuma
Added subscriber: @AndyDavies-3
+1 I think is a modifier that would be worth adding even if it were only for pure modeling purposes.
There are many occasions where I would rather work procedurally (via a curve) but then have to turn it into a mesh because there is a seam.
user:karja has me convinced this is a really good idea. Normally for some of the things shown in his(her) posts, people tend to use a stand-in object that is complete and seamless while the breakable object is invisible. Then the object is made to "brake" by reversing the visibility of everything at a certain keyframe, it works but this idea for a Remove Doubles modifier seems neater and would be very easy to setup and maintain.
I guess that's all obvious now from all the posts made but I just wanted to add to the use cases for this. -> Breaking glass. The broken mesh could be shown the whole time instead of replacing an unbroken one at the time of breakage.
The subtle tearing that would come from the merge threshold being broken by various vertices at different times may actually enhance the illusion.(if anyone's eyes can even track that fast :)
Added subscriber: @lowercase
you need something like this to be able to use 'pointiness' on text and curve objects, as caps are disconected from bevel
Added subscriber: @Zafio
+1 Worth adding IMO, taking into account the cases already described.
Today I've found myself in the Array+Curve situation, at it was frustrating.
At first I was confused by the "first/last" merge options in the Array Modifier, it took me a while to realize it doesn't work with a curve modifier on top.
So, for that particular case, unless a merge first/last option is implemented for the Curve Modifier (which would be also nice), a Remove Doubles modifier really makes sense.
Regards.
Two more examples to show the importance of this feature:
A pac-man:
A plane to sphere morphing:
As shown in the image, I have to subdivide the mesh a lot to have the closed seam less noticable, and of course, smooth shading is helpless in those cases.
Added subscriber: @AdmiralPotato
Added subscriber: @gandalf3
Added subscriber: @michaelknubben
Added subscriber: @JonathanWilliamson
Added subscriber: @MatthewHeimlich
I'm sure it's already been covered above, but this would be really nice for keeping contiguous shading on characters that are split into multiple objects (arms, legs, torso, head, etc.) for the sake of external texturing tools that don't support Blender's UV sets.
Added subscriber: @gwentiv
Added subscriber: @GottfriedHofmann
When modeling with the screw modifier, a remove doubles modifier would be awesome as well! I have been longing for this for a long time now.
Added subscriber: @AnadinX
This would be a very good addition, I came across this causing me problems when doing a deformed torus made from bends/twists etc. In Cinema4D, there is the Connect object that takes the whole stack and has the weld/merge functionality in it. This is very similar concept and would be invaluable.
Removed subscriber: @ideasman42
Added subscriber: @BloodyRain
I'd love this because I work a lot with the Mirror modifier and run not rarely into the problem that I want to merge some portions along the Mirror axis but not all of them.
So my first idea was to propose an addition to the Mirror modifier to supply it with a vertex group similar to how the Mask modifier uses one which then defines where merging would occur (or not). Optionally with the weight being used as a multiplier for the threshold.
This idea however is much more versatile if said vertex group selection for what can and can not be merged would be added.
Added subscriber: @thomasmouilleron
This would be so useful for maxed out 100% Bevels to create a more controlled subdivision
Added subscriber: @NahuelBelich
Added subscriber: @cedriclepiller
Any news about this?
Added subscriber: @Fiendari
This is one of the most needed modifiers for blender modelling, it would make life so much easier in so many cases and don't we all want easy life I bet you do.
Added subscriber: @RainerTrummer
Also from our side at the studio a very much longed for modifier! Are there plans to go ahead with this proposal?
@RainerTrummer
The dev who started this thread also unassigned and unsubscribed himself from the topic almost 3 years ago.
Removed subscriber: @MarcClintDion
I'm the one who started this thread, and as @RainerTrummer says, I am not a blender developper anymore. Back in 2014, it seemed any work on new modifiers was prohibited because a change of paradigm towards node-based modifiers was envisaged. I had built a 'randomizer' modifier that was trashed for that reason.
In case anyone starts working on this again, I have some thoughts to share regarding the remove double algorithm, whether its part of a standalone modifier or embedded in other modifiers such as the array modifier. The current algorithm builds a list of all vertices, sorted on s = x+y+z, then scans this list. It looks like a 3 dimensional problem has been magically transformed into a one dimensional problem, but this is a total illusion: you might just as well sort all vertices on x, then scan the list. Working on the sum has merely changed the main axis through which vertices are compared for distance. In the end, for each value of s (or of x), you need to loop through all vertices that are within epsilon of s. It is not far from o(N^2).
The algorithm I had in mind back then was very different, and I believe it could be much faster when the number of vertices is large. It goes like this. You divide the whole space in little cubes of size epsilon. For each vertex, you determine to which little cube it belongs and you build a hashmap where the key is made of the coordinates of the cube, and the value is a list of vertices that are inside this cube. So for N vertices, this is o(N). Then you do another scan of vertices and for each vertex, you will retrieve the vertices that are in the same cube or in one of the 27-1 adjacent cubes. You will compare the distance for each of these candidate doubles.
If someone wants to start work on this, I hope this can help.
Added subscriber: @softyoda
Added subscriber: @FinbarrORiordan
Added subscriber: @Dspazio
Added subscriber: @Mantissa
Added subscriber: @NoahJamesBradleySmith-2
Added subscriber: @lemenicier_julien
Added subscriber: @Ariel-Tavori
Added subscriber: @Alesk
Yo !
Any hope to see this done one day ?
Added subscriber: @item412
Added subscriber: @joedanimation
Added subscriber: @HDMaster84
Changed status from 'Confirmed' to: 'Resolved'
This is now implemented in Blender with the new Weld Modifier.