General Category > ASL Scripts
Script Request Thread
nemyax:
A request for an edge and point dissolve script, if I may.
Here's how it should work:
Edge dissolve (with cleanup)
Edge dissolve (without cleanup)
Vertex dissolve
I'm not sure how best to handle the UVs on seams during edge dissolve. Probably just pick one of the sides and arrange them between the affected UVs on that side.
Raxx:
Hey nemyax, I had kind of hinted at this to Steve before, with this as a form of auto-healing after deleting a point or edge (with cleanup).
I have an Anim8or UI overlay in the works that I'll be embedding features like this in. I was thinking of adding this dissolve feature as a script, and whenever you hit the delete key it'll run the script and dissolve the point or edge instead of performing the original delete command. The only issue is that command scripts like this don't have undo capability.
nemyax:
--- Quote from: Raxx on January 21, 2015, 03:32:39 pm ---I had kind of hinted at this to Steve before
--- End quote ---
Ah, then you should keep trying! Steve is very keen on the important stuff if you can prove it's important =)
--- Quote from: Steve on January 21, 2015, 09:10:30 pm ---I hadn't realized how useful this would be until I implemented it - so thanks for keeping on reminding me about it until I finally did something :)
--- End quote ---
Steve:
I understand the value of some form of edge/point/face dissolve - they are on my list of things to do. But I don't know when I'll get to them.
It's not clear how to implement them however. It's easy to introduce convex faces which are invalid faces. nemyax there are several in your examples that won't properly render. So I'll describe this in a bit more algorithmic manner what I'd propose:
For edge dissolve I'd propose something like your with clean-up:
1) Find connected groups of faces that are adjacent via a selected edge.
2) Delete all selected edges and and adjacent faces.
2) If any end points are left without any edges attached, delete them.
3) Rebuild faces from connected groups. There are a lot of possible problems: one example of many is if a ring of edges completely encircle a group of faces, then deleting them will create an island. If anything strange like this is present, bail out and revert to the original mesh.
4) Convert any sequence of connected edges that are part of the same two faces into a single edge. (This is the "with clean-up" part.)
For point dissolve:
1) Selected points with 0 or 1 edge are deleted.
2) Those with 2 edges are replaced by a single edge. Adjacent faces, if any, are rebuild accordingly.
3) For those with 3 or more edges and have two edges each (i.e. a properly built mesh), delete all the edges and add a new face as above. Again multiple problems can arise, such as islands. These will cause Anim8or to bail-out.
For face dissolve:
1) Replace each selected face group and all it's edges and points with a single point at the group's center.
2) Rebuild adjacent faces with this new point in the place of all their deleted edges.
3) Delete degenerate faces (i.e. those with only two edges).
Then there's the concept of face and edge collapse, which is another topic ...
nemyax:
--- Quote from: Steve on February 11, 2015, 10:55:59 pm ---There are a lot of possible problems: one example of many is if a ring of edges completely encircle a group of faces, then deleting them will create an island. If anything strange like this is present, bail out and revert to the original mesh.
--- End quote ---
Bailing out is one option. Another would be to go for the closest valid result. An example from Wings:
Perhaps this would be the "least surprise" choice in situations where you dissolve edges in multiple areas at once. But of course, it's your call.
--- Quote from: Steve on February 11, 2015, 10:55:59 pm ---For face dissolve:
1) Replace each selected face group and all it's edges and points with a single point at the group's center.
--- End quote ---
But this is collapsing =) Anim8or's Merge Faces already dissolves face groups.
--- Quote from: Steve on February 11, 2015, 10:55:59 pm ---Then there's the concept of face and edge collapse, which is another topic ...
--- End quote ---
Maybe this discussion should be snipped off the script request thread into its own?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version