View Full Version : Weight Map and skinning woes
07-27-2007, 05:20 AM
Im trying to import my weight map back onto my skin and get my mesh / skin to work again...... I had to redo my uv's on my mesh, so i detached my skin with the skin history on and exported the weight map. I now need to delete the history on my mesh to remove all the tweaks from redoing the uv's, but when i do it, and try to rebind my skin, and then reimport my weights back on to the mesh, the skeleton is not attached to the skin. When i move the rig, the skin dosent move with it. I am using The Setup Machine 2. If i just detach my skin and then try to rebind it without deleting history, I can get this process to go fine, but because of the history on the mesh from redoing the uv's, the performance is so slow that it becomes worthless trying to work like that. I know i need to delete the history to get back to my regular performance, but how can i do it, while still being able to reattach my skeleton to my skin, with my imported weight map?
07-27-2007, 06:25 AM
Not sure exactly if this will help but here ar e a few options...
Take your re-uv'd geo and bind it to the skeleton then use the copy skin weights tool which shouldnt consider the uv's - as it does a closest point comparison.
If your topology is the same then use an export/import skin weights tool such as michael comets one www.comet-cartoons.com
Otherwise you can dig into the hypergraph and delete the connections to certain dag nodes to kill some of the unrequired history/nodes on the original geo.
Now that I have posted a reply I'll re-read your issue and figure out if I've even addressed the problem ;)
07-27-2007, 08:44 AM
Use 'copy weights", don't do the import/ export weights that Maya has. Copy weights can transfer weighting on raycasting or uv's.
If you changed the uv's on the mesh, save a copy of your original skinned mesh, and then reference in the good skinned mesh to your changed one,.. and copy weights.
Try raycast, and nearest bone since you changed the uv's.
07-27-2007, 03:45 PM
If you used the internal Import/Export weights then you're slightly up a creek as the internal function set works off the UV's of the mesh (the weights are exported as alpha maps that you can tweak/edit in photoshop if you so desire).
A simple solution in your case is to rebind the geo with the UV history still applied, then go Edit -> Delete By Type -> Non-Deformer History. This will blow away any history except for deformation history (clusters, skin cluster etc).
Also, to assure that you'll get a clean re-bind you can use a script I wrote for querying the joints of a bound mesh and storing them in a quick select set (I've often found that when I rebind I just want the exact same joints originally bound incase it adds an influence).
global proc sm_skinnedBones ()
$sel = `skinCluster -q -wi`;
Hope that helps you a bit :)
07-28-2007, 03:23 AM
Thank you gentlemen for trying to aid me in my troubles. What ive decided to attempt to do however is re-rig my mesh with new skinning. What i would like to be able to do, if i can, is mix and match the weight maps. Let me explain to you what i mean: I want to keep the old weight map that i had where the arms and legs were painted correctly, but the hands were badly weighted. So I would like to mix that weight map with my new weights where the hands are now weighted perfectly, but the rest of the body weights are no good. How can i mix the good weighted arms and legs from my old skin with the good weighted hands from my new skin so that i have one perfectly weighted mesh? Thanks again for your help
07-28-2007, 04:21 AM
Use michael comet's weight import/export tool, select the vertices that you wish to export the weights for and save them out as hands.txt for example. Open up your mesh again, apply the body weights that you want, then import the hand weights ontop of that and voila, best of both worlds :)
07-28-2007, 05:16 AM
Thank you for your quick reply BoostAbuse but you know what? I was just playing around to see what would happen.......i left my new rig that had just the hands weighted, and used the default maya import weight map, importing the weights of my old skin that had the arms and legs weighted. What happened was, the weights came in perfectly fine and what surprised the hell out of me was.......my new weighting was still intact with no problems. The import didn't mess up the new weights. So i got my arms, legs, and hands all weighted fine now. go figure. Funny the results you get when you experiment. Thanks alot though guys, all of your help was much appreciated on this issue.
08-24-2007, 04:16 PM
If you need to modify uvs on skinned geometry without dirty history, just modify it on Orig intermediate node before skinCluster (uncheck Intermediate Object in it's display attributes). Or just duplicate object, make everything you need on duplicate, then Copy Mesh Attributes to the same Orig node and kill it's history :)
08-24-2007, 04:16 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.