PDA

View Full Version : Symmetrical weight map


SebasProulx
03-28-2008, 03:51 PM
I have a symmetrical mesh (it's a face). On that mesh , I have a weight map that is not symmetrical.

Anyone knows a way to copy the weight map from one side of the face to the other side? (script or anything)

I know the weight map could have been painted in Symmetry mode, but lets say it's too late now.

Thanks.

Serguei
03-30-2008, 08:14 PM
Edit: I assume you're talking about the weight map property and not the envelope weighs!

Hmm I use to have a nice script for that but can't find it atm, but heres a quick and dirty one that will do the job.
Make sure to have a Symmetry Map (has to have default name) on your model before running the script.
You can select a weight map map and it will create a symmetrical one for you or you can select 2 weight maps and it will symetrize the first selection into the second one.


wm = Selection (0);
obj = wm.Parent3DObject;
sm = obj.ActivePrimitive.Geometry.Clusters ("SymmetryMapCls").Properties ("Symmetry_Map");

if (Selection.Count == 2) {
wmNew = Selection (1);
} else {
wmNew = CreateWeightMap ("WeightMap", obj.FullName) (0);
}

wmArray = wm.Elements.Array.toArray ();
smArray = sm.Elements.Array.toArray ();
wmArrayNew = new Array ();

for (i = 0; i < wmArray.length; i ++) {
wmArrayNew.push (wmArray [sm.Elements.ItemsByIndex ([i]).toArray ()]);
}
wmNew.Elements.Array = wmArrayNew;


Cheers!

SebasProulx
03-31-2008, 11:05 AM
Thank you, it works well.

I would prefer something that would edit my actual weight map and symmetrize only on the selected points, but for what I needed to do right now, I was very helpful.

alanf
04-07-2008, 05:39 AM
There's also LaMaison's WeightMapTools:
http://www.alamaison.fr/3d/lmWeightMapTools/index.html

The "expression map" can be used to invert a weightmap, which depending on the ocassion, is sort of like symmetrizing it.

Dr Dardis
04-07-2008, 10:04 PM
My mate Phil Barrenger's script may be the one you are referring to Serguei?

instructions for use are included in the script file itself.

wery wery handy :)

Chris

Serguei
04-07-2008, 10:06 PM
Nah I was referring to a script I wrote a while back! Found it since though :).