Hi all!
I got unexpected (and very welcome) help by Piek in another thread, and upon my “thank you” reply he said: Tell you what, if you find a simple way of mirroring muscles we’ll call it quits :o). He said it as a joke, but if I can pull it off, Im gonna try.
Ok. I have developed a script to mirror cgMuscles and its Proximal and Distal points and Im posting it here to get feedback and hopefully help out others. Please do not redistribute and by no means sell this script. It is my property and you are free to download it from this site.
What it does:
- It mirrors the cgMuscle with all its properties and the Proximal and Distal points.
- It asigns the Proximal and Distal points to the correct Node slot of the muscle
- It renames the Proximal and Distal points cgMuscleXX_P or _D accordingly.
- It can mirror muscles in X, Y or Z, but the mirror point is the 0 coordinate of the Axis chosen, so you may need to reposition your objects to fit this rule (further versions could use an arbitrary object, or a special coordinate)
What it doesnt do
- It doesnt change the name of the muscle, the muscle is created with the next available cgMuslceXX number.
- It doesnt try to figure out to which bones should the Proximal and Distal points should be parented to, nor does it tamper with rotation controllers of this points such as Orientation Constraints. This two settings must be done manualy.
- If the muscle had any Modifier on top, it is disregarded.
- It cant do batch mirroring, the process must be done one muscle at a time. Future versions can improve on this.
- For the time being, original Proximal and Distal nodes should be of the type POINT for no special reason but the fact that the nodes created automatically with the muscle are of this type, and the script uses a points .size property to set the new nodes property. This should be corrected also.
Instructions:
-
Donwload the script from the following URL (right-click, save target as) to a location on your hard drive
http://www.edicionesarchipielago.com/externos/MirrorCgMuscles.ms
** Edited: Please always download the newest version from the posts below. -
From within MAX, select MAXScript menu -> Run Script and point to the file you downloaded.
-
A floating window appears, select the Axis in which you will mirror the muscle.
-
Click the “Mirror Muscle >” button and select the muscle you want to mirror. The new muscle appears and its Proximal and Distal controlers if it had any. CONTINUE WITH THE NEXT STEP
-
You MUST click the “Assign Proximal - Distal” button in order to link this two Nodes to the MUSCLE, for some strange reason, if this was done within the main script, the muscle will collapse into a strange form.
Thats it, continue clicking first the Miror button and then the Assign button for every muscle you want mirrored, and close the floating window.
*One small bug I found is that both MTStart and MTEnd are named $.MTStart internally, so the MTEnd value cannot be passed to the mirrored bone, but this is not me, its the design of the ACT plugins, this needs correcting in future versions.
Ok, thats it… please let me know your expierences and if its working, report any troubles, etc… Good luck every one.
Rafael Polit Jr.
Quito, Ecuador.