abSymMesh

September 21st, 2004

A useful little script for building symmetrical and asymmetrical blendshapes.  Check for symmetry, mirror and flip polygon geometry, and much more.

Ok, not much more, but it is pretty useful.

Instructions

It should be fairly self explanatory, but here goes.

Select a mesh and click "Check Symmetry" to highlight asymmetric vertices.  

To use the selection mirror, mirror selected, flip, and revert functions, you must first select a symmetrical mesh and click "Select Base Geometry."  You can now select a duplicate mesh with the same structure,  and you should be able to use all of the functions on it.  Revert, mirror, and flip work on both vertex (component) and object selections.

Uncheck "Use Pivot as Origin" to evaluate your objects using the mirror axis world origin as your axis of symmetry.

Additions to 1.5

I've added more features to "Revert to Base" (RtB) in version 1.5.  You can now revert vertex positions back to those of the base object with variable percentages using the option menu attached to the RtB button.

I've also added a slider that can be used to interactively adjust the amount by which selected vertices will move back to their original position on the base object.  It only works on vertex selections and not entire objects (mel - or my computer - is too slow for that).

You can now specify an alternate base mesh (aBase) to use as a base object for the RtB button.  Select the object you wish to use as the aBase, right click the RtB button and select "Use Selected as Base."  Now all Rtb and slider operations will revert to the specified mesh.  Select "Use Original Base" to use the global base object (gBase) as the revert base.

The gui's "Select Moved Verts" button will always return results vis a vis the gBase.  You can use "Select Moved from Revert Base" in the RtB popUp menu to highlight the verts that have been moved relative to the aBase.

The default range for the revert slider is zero percent to one hundred percent.  You can enable "Use Overshoot" in the Rtb popUp menu to expand this range to negative fifty percent to one hundred and fifty percent.

Operations

New in version 1.7 is the Operations menu.  Once you select a base mesh the menu items will become enabled.  Each operation requires that you select two meshes with the same topology as your basemesh.  A is the first selection, B the second.  The operations are as follows:

  • Copy A to B:  The vertex offsets (relative to the basemesh) of blendshape A are applied to blendshape B.  You could do this before, but it took several clicks.  No longer!

  • Add A to B:  The offsets of the vertices on blendshape A are added to those of B.

  • Subtract A from B: The vertex offsets of A are subtracted from those of B.  This can come in useful when creating multiple corrective blendshapes (which, curiously enough, is why I added the Operations menu).


Updates

Update/Bug Fix
September 20th, 2004 "Select Moved Verts" button will select vertices that have been moved relative to the base mesh.
Update/Bug Fix
March 21st, 2005 Added progress bar for "Select Moved Verts."  I love progress bars.
Update/Bug Fix
October 24th, 2006 Added a slider to dynamically revert selected verts to base object.  The slider only works on vertex selections, not on the object level (it's too slow).  You can now specify alternate versions of the base mesh to revert to as well.  Improved performance of revert.
Update/Bug Fix
December 4th, 2006 It should now work in Maya 8.
Update/Bug Fix
April 14th, 2008 Added operations menu which allows you to copy, add and subtract blendshapes from one another.
Update/Bug Fix
July 22nd, 2008 Increased default window size to fit entire UI.
Version 1.9
October 26th, 2013 Added "Attempt To Restore Symmetry" to (new) "Tools" menu.  It's really only meant to work on meshes that have a few asymmetric vertices.
Version 1.91
October 29th, 2013 Added float field to the revert slider.  Fixed issue with duplicate menu name preventing script from loading.
Version 1.95
August 19th, 2015 Added "Revert Positive Mirror Axis Verts To Base" and "Revert Negative Mirror Axis Verts To Base" to "Operations" menu.  Added "Selection" menu with options to select positive, negative and mirror axis origin verts for the current selection.

"abSymMesh" was posted on October 1st, 2004 under Mel Scripts.  It was created using Maya.

This entry was last updated on August 19th, 2015.

Subscribe to the Comments Feed or Updates Feed for this entry.

Share |

comments

DRGraphix
November 29th, 2008 said:

I'm very impressed, don't know why Autodesk wont add this. Suggestion: Make a progress bar for when you undo these time-consuming tasks. I keep instinctively hitting the undo button several times, b/c I'm not aware it's processing.

Otherwise beautiful, saved me hours!

DRGraphix
November 29th, 2008 said:

Oh yeah, the slider doesn't seem to work, either.

yo
November 29th, 2008 said:

To anyone who's made it to the end of this page: Remember, you can use the graph editor to set negative keyframes for your blends!! This gives you automatic opposites with no extra work (provided you like the graph editor ;)

November 29th, 2008 said:

DRGraphix:  An undo progress bar would be awesome.  Unfortunately there's no way that I know of to hook into Maya's undo using mel.  If someone knows of a way I'll be happy to take a look at it.

I'm not sure why the slider wouldn't be working for you.  Are you working on a big mesh, maybe?  Because it can be kind of slow.

Dan
March 23rd, 2009 said:

umm... i have a request... any way to making this work in 2009?

Dan
March 23rd, 2009 said:

wait... n/m... now i just need to figure out how to use it... thanks!

Dan
March 23rd, 2009 said:

if it's not symmetrical how would be go about fixing it?... When i used the "check symmetry" it selected vertexes that were the exact opposite of each other and they look symmetrical.

March 24th, 2009 said:

really good good good script. even though im a modeler, this amazon script is pretty useful!!! so many thank you!!

March 25th, 2009 said:

Thanks Andy!

Dan,

First of all make sure that if you've got "Use Pivot As Origin" checked, that your pivot lies on your desired symmetry plane.

If you're still having issues, there are several ways you can make your model symmetrical.  What I usually do if there are only a few asymmetric verts is:

  • Duplicate my mesh.
  • Mirror the original mesh (set x scale to -1).
  • Snap the problem verts on one side of the duplicated mesh to their respective sym verts on the mirrored original.

You can also delete half of your model and then mirror it with the mirror geometry tool (under the Polygon menu, I think).  There might also be some scripts out there that will do it for you.

Hope that helps.

Stupidvampire
June 10th, 2009 said:

It doesn't work with 2008 SP1. ;_;

June 15th, 2009 said:

Hey Stupidvampire,

I'm not sure why you're having problems -- I'm using SP1 and it works fine on my machine.  How is it not working on your system?

Alex
August 11th, 2009 said:

For some reason, abSymMesh is not working on a combined object. The face vertices move, but not the eyebrows which are part of the same object. Anyone have any idea why?

Great tool by the way, has saved me countless hours of toil and struggle.

August 24th, 2009 said:

Hey Alex,

Sorry about the late reply -- I'm not sure what's going on.  I did some tests on a quickly combined mesh (with some overlapping verts) and it performed as expected.  Have you tried changing the tolerance?  If you want to send me the mesh I'd be happy to test it.

Bat
November 13th, 2009 said:

Hi, Can I use it in Maya 2010.

November 13th, 2009 said:

Yep, it should work.  I haven't actually tested it (I'm on 2008) but I'm sure I would have heard if it didn't (and there's no reason it shouldn't),

Bat
November 14th, 2009 said:

For me, it doesn't work. I can only use Revert selected to base, for flip, mirror, I clicked it but nothing happened.

Thank you.

November 18th, 2009 said:

Hey Bat,

Seems strange to me that it wouldn't work.  I'll download the 2010 trial, check it out and get back to you.

Bat
November 18th, 2009 said:

Crumbly, thank you very much.

November 19th, 2009 said:

Bat,

I tested it on the 2010 trial and it worked fine for me.  Is your base mesh symmetrical?

You might also want to make sure that you're clicking "Mirror Selected" and not "Selection Mirror".  The former mirrors the mesh while the later mirrors the vertex selection.

Bat
November 19th, 2009 said:

Thank you

clym
December 29th, 2009 said:

I seem to have a problem with my mesh. I found a test model that works, I then export it as a .obj and it DOESNT work - so the problem is the .obj export or whatever it does. Also, if i move the pivot point on the ORIGINAL then it doesnt work also. If i move the pivot point of the one that normally works...then back again...it fails to work. Any ideas why this is? I've tried all sorts, such as mirroring geometry, freezing transforms, deleting the history, all of which don't work and i have been able to nail it down to this pivot issue. How do i set the pivot in the right place? manually (holding X - to snap to grid) and placing the pivot in the middle of the grid does NOT work! any clues?? thanks,

Clym

December 30th, 2009 said:

Hey clym,

Are you working at small scales, or with large units (meters or yards)?  That could be part of the problem with the obj issue.  The floating point accuracy gets in the way when the difference between vert positions is too far right of the decimal point.

As for the pivot, the way I center it is to first snap it to one of the vertices on my mesh that I know should lie on the origin.  I then use a script like this one to set my object's pivot transforms relative to the world.  If your X translation is non zero after you run the script (assuming you're working with YZ symmetry), zero it out and check your symmetry again.  If your mesh isn't symmetrical then at least you know that your center vertices (or at least one of them) now lie on the origin.  Set your other origin vertices' X translations to zero, delete all of the faces on the -X side of your origin verts and mirror your mesh.  It should now be symmetrical.

siamak
January 25th, 2010 said:

Hi,I'm trying to using the script.but when ever I pick my base shape and  click on select base geometry,Maya gives out this: // Warning: Base geometry is not symmetrical, not all vertices can be mirrored. Although I 'm aware of my object being symmetrical ( I have made it by mirror cutting its shape), it gives me a huge number of 2191 vert(s) as being asymmetric. I have already tried different arguments for the global tolerance, But that was hopeless.And I use Maya 2008 (I don't know which version it would be).and I used both 1.1 and 1.71 versions. I would appreciate helping me to utilize you useful script.  

thanks,siamak

January 26th, 2010 said:

Hey siamak,

Is your pivot is centered relative to your mesh?  If not, that should be your first step.  If that doesn't help, check out my advice to clym just above your post.  And if that doesn't help, feel free to send me your mesh and I'll take a look at it (I obviously won't share it).

Leto
June 21st, 2010 said:

Hey crumbly, I used abSymMesh to flip my blend shape and the geometry explodes. everything goes smoothly as far as checking symmetry but when i flip i get weird warping

Leto
June 22nd, 2010 said:

Could altering my base shape have anything to do with my warping, i remirrored to compensate for a symmetry issue i was having trouble with.

June 24th, 2010 said:

Hey Leto,

Yeah, altering your base shape can potentially mess everything up.  What probably happened was that your point order was changed when you remirrored your base (if the geometry was changed at all) and the verts lost their numerical correspondence between it and your blends.  Your blendshapes need to be copies of your baseshape.  

The most basic way to fix this is to create a copy of your new base for each existing blend and to then snap the vertices of each base copy to its corresponding blend.  There might be a faster, more clever way to do this (there usually is), but I'm not in front of Maya at the moment (and won't be for a few more days) so I'm not sure what it would be.

Hope that helps.

Nicole
August 14th, 2010 said:

Thank you so much!!  This has GREATLY decreased my work time!

Thank you

Alex
August 27th, 2012 said:

Hello, this is a great tool. I've used it a lot in the past, thanks for creating it. But I cannot get it to work with Maya 2012 OS X. Everything looks fine but when I choose Mirror selected of Flip selected nothing happens, no errors, nothing. My geometry is symmetrical.

August 27th, 2012 said:

Hey Alex,

I just checked my PC version, and the script seems to be working fine.  Unfortunately, I don't have an OS X version of Maya on which to test it, so I can't really track it down.  It is weird that you're not receiving any error messages, though.

If you select your base geometry and click "Check Symmetry" does it display a message in the command response line (or the script editor)?  Does it tell you that your geometry is symmetrical after you set it as the base object?  Is your target mesh selected (highlighted) when you click the mirror or flip buttons?

Sorry, I wish I could be of more help.

Alex
August 28th, 2012 said:

Thanks Crumbly, I think it was a temporary glitch, this morning it started working again. You're script is really awesome. It has saved me a LOT of time. Frankly I'm flabbergasted that Maya doesn't have this by default, it's such a common task.

Thanks for responding so fast also.

May 27th, 2013 said:

Hey,  I have been modeling for years and this has definitely been a tool I can't do without! Thank you very much!

Rey
October 27th, 2013 said:

Hi Crumbly, I've been using your abSymMesh for some time now. It's really useful, I've recently updated to v.1.9 and it does not load. I tried re-booting Maya, loading it and sourcing it. I can't get the UI window to pop up like in v.1.71. Running Window 7 x64 SP1 with Maya 2014 x64 SP3.

// Error: file: C:\Users\Rey\Documents\maya\2014-x64\scripts\abSymMesh.mel line 1162: Object's name 'abSMOperationsMn' is not unique. //

Thanks

October 29th, 2013 said:

Hey Rey,

Sorry about that.  I just uploaded a new version (1.91) which should work.

November 25th, 2014 said:

Awesome Script! I have been using it for years primarily for Asymmetrical Facial Blend Shapes. I could not properly rig a character without it. Thanks Crumbly!

September 8th, 2015 said:

Just wanna say thanks for making an amazing script.

September 8th, 2015 said:

Thanks, Stephen!

And thanks to everyone who's given me such awesome feedback on the scripts.  I never really say it, but it's very much appreciated!

July 19th, 2016 said:

Awesome tool!!!!! Million thx!

Akshay
April 10th, 2017 said:

Hi crumbly, I tried running the script in Maya 2017 but it gave me this error // Warning: Line 193.13 : Redeclaration of variable "$obj" shadows previous declaration at line 183. Previous value will be retained. //

I was wondering if there was any way to circumvent that. Thanks!


just say it






    

Related Posts