Hey all!
After some freestyle modeling and applying a symmetry modifier I often end up with parasite vertices along the center edge of the model, like on the left here. Also, similar problems sometimes appear on the open borders of meshes, like on the right. (and more generally, this can happen on any random edge after a Divide anyways ...)
Now I understand what causes these situations to appear, but does anyone know a fast and clean way to remove such verts? I thought it was possible before by selecting all the verts of an object and hitting remove/backspace (the removing only the useless ones) but I must have been using some custom script for that because now I seem unable to do so!
Thanks for your help!
Replies
(
fn dotAngle v1 v2 = ( acos (dot v1 v2)/(length v1)*(length v2) )
bit32=(bit.set 0 32 true)
getEdgesUsingVert=polyOp.getEdgesUsingVert
getVertsUsingEdge=polyOp.getVertsUsingEdge
getVertPosition=polyOp.getVert
allverts=(for i=1 to $.numverts collect i) as bitarray
suspectVerts=for i in allverts collect ( if ((getEdgesUsingVert $ i) as array).count==2 then i else dontCollect)
vertsToRemove=for i in suspectVerts collect (
testEdges=getEdgesUsingVert $ i
testVerts=(getVertsUsingEdge $ testEdges)-(#{i})
testVerts=testVerts as array
v1=((getVertPosition $ testVerts[1])-(getVertPosition $ i))
v2=((getVertPosition $ testVerts[2])-(getVertPosition $ i))
if (dotAngle v1 v2)==180.0 then i else dontCollect
)
polyOp.setVertFlags $ vertsToRemove bit32 mask:bit32
$.remove selLevel:#Vertex flag:bit32
)
It works most of the time, but sometimes it misses one or two though
Check it out.
it often killed uvLayout and a few other external tools for me because they were less stable or comfortable with ngons.
In 2010 there is also a special viewport mode that lets you debug stuff and for example show dead verts or others.
Animax, that's fantastic! It's working very well and I like how it selects the problematic vertices instead of brute-deleting them. Feels much safer!! (by the way thats weird, the video on the script change shows a completely different behavior but hey I wont complain!)
Render, I'm on 2009 but I don't get what you mean by 'filter the selction'. Am I missing something?
Never heard of that viewport mode, that sounds EXTREMELY useful. I have been dreaming of realtime surface tension heatmap shaders for ages now (showing pinching, and concavity vs convexity) ofor both Max and Mudbox, so maybe it's coming soon!!
Varg yeah I know hehe. But I rely quite a bit on that fonction actually, hence the question :P
You guys are awesome!
http://www.jhaywood.com/maxScripts.htm
I have it tied to a button I click every now and then, very useful!