copying skin weights..


#4

Yeah, object mode is right. I’m not really sure why you’re getting that error. Are you able to upload the scene file? I’ve used copy weights on many projects and never had that problem.


#5

I had this exact same issue not two days ago. I think it may be cos you are trying to select a number of seperate skins (i.e Arm one skin, legs skin, head one skin etc) and apply a set of weights that are designed to work with one whole character skin.

I couldnt get it to work at all, and in the end had to repaint the weights for the single mesh, on a rush job too :frowning:

But the benefits of having a seperate meshes for each body parts are greater i think than having just one single mesh. Unless you’re putting it into a game that is…Then its one skin city.

:smiley:


#6

Hmm… that is mighty odd. I’m not really able to upload a copy of the file, unfortunately, but perhaps somebody has had this problem and knows the solution?

I would think it’s just a slight problem with how i’m selecting the elements i want to copy between, or something like that?

Anyone else?


#7

Could you clarify something for me? You had a model that had separate pieces that were skinned to joints and now have a combined model (with merged verts?) and want to take the skinning from the separated one to the combined one? Correct?

One quick note too, you could use these zooScripts(zooWeightsSave to be exact). If you run the script on all the pieces of geometry, it will allow you to delete history, combine your meshes, even merge the vertices and reapply the weights to this new combined mesh with little fuss. May have a couple of verts to mess with but I’ved used this before many times where I had to take many skinned pieces and combine them so it was one mesh for a game engine.

-Sean


#8

Hey,

Yeah, the mesh was previously a lot of different meshes, and I skinned the lot of them, and did the weights. Then I sorted out the UVs, and combined all the pieces. Not done any vert merging, is that something i need to do?

I’ll check out those scripts, they sound like they’ll do the job exactly as I want. I’m going through all this mainly because once I sorted the UVs of the mesh, moving the joints didn’t affect the texture, so I guessed it needed rebinding. Plus there’s a lot of history that needs removing.

It’s odd that the copy weights tool doesnt just work, it seems it should be a simple command. but ill look at the zooScripts :smiley:


#9

Another way to achieve your end result would be to blendshape your uv’d and textured mesh to your original skinned mesh and just hide the skin. Also turn on World in your origin option. If you’re in a hurry, this is a quick method. Of course, your target and base meshes have to be idnetical (in which case it would be better to re-separate your combined geometry).

The second way, that is if you want to have your new geometry skinned, is as follows. First off, if you’ve combined your new geometry you’re going to have a hard time matching weights, so you might want to think of deleting the combine node (if you haven’t deleted history) and just skin your new geometry the way you skinned your old geom.Then bring your rig to it’s default pose (at the origin), then with the new geometry on top of the old geometry, go to the hypergraph and show inputs and outputs on your old geom’s skin mesh. Select all the joints connected to it then shift select your new mesh, smooth skin (make sure selected joints is on instead of hierarchy). Then unlock the transform attributes for both. Translate the orignal by a whole number in one direction and translate your new mesh in the opposite direction using the exact negative value, then set your new mesh’s appropriate scale axis to negative 1. Select you old mesh, select new mesh, mirror skin weights. After which, return both meshes to their original positions and lock transforms.


#10

yeah,… since you combined it all, “copy weights” isn’t going to work. You can use it to transfer, say,… the body,… but the rest of it needs to be reweighted.


#11

Hey again,

Thanks for the detailed suggestions, I might try that mirroring method, it sounds like that actually ought to work! Perhaps I’ve given the impression that i’m trying to copy weights from a mesh where nothing is combined, to one where everything is, but actually they’re both identical - both combined.

I’m going to have to leave this for a while, it being christmas now, but I’ll try some of these suggestions soon afterwards, and report back with how it goes.

Again thanks a lot for all the suggestions and help, really much appreciated!

:smiley:


#12

I used Zoo Scripts (zooCST in the mel box) to do this yesterday and it works a treat for what you’re describing. i didnt think that 3 button window in the zooCST Weights option would work but gosh did it work well! no tweaking required and allowed me to change bind poses over and over for use in a game engine.

Get zooCST from highend plugins. you need it in your life.


#13

i think i’ve encountered this bug before- if memory serves me correctly you can fix it by deleting all the bindPoses in your scene- they get created with every skinCluster, and as far as I’ve seen have never had a use for them.

delete ls -type "bindPose";


#14

Oh, deleting bindposes? i tried the little MEL line you posted, should I have selected the mesh then pasted that into the MEL box at the bottom? it says: // Error: Unknown object type: bindPose.

any idea what’s going on there?


#15

hey again - i decided i’d try the zoo scripts, as that’s what i’d meant to do before i went away before xmas.

got them installed and found the little skin saver box (with 3 buttons). i havent managed to get it working, so i’m just wanting to check how you use it.

currently i’ve got the 2 meshes that are the exact same geom, just one has correctly arranged UVs. both are skinned to the same joint skeleton. one (the bad UV one) has good weights, the other doesnt.

So I selected the one with good weights, and pressed the ‘store weights’ button. It went through and said it had successfully stored the weights. I then selected the new mesh, with bad weights, and pressed ‘restore weights’. it says it’s done it, but there’s no change to how the mesh deforms.

what am i doing wrong?


#16

oops sorry, it’s been awhile, the object type is ‘dagPose’ i think… don’t have maya installed at the moment:

delete ls -type "dagPose";


#17

same error as before:

// Error: Must select a source and a destination skin, or components on a source and destination skin.

hmmp :frowning:

so what about this zoo script, how exactly does it work?


#18

anyone give me a few pointers on this?


#19

Ok, lets start over here.

Q: Is the first mesh one mesh or multiple meshes?
Q: If so, is the the mesh with the good uvs a single mesh or multiple meshes?

The zooWeightSave will only save and restore weights onto the same mesh. The script saves the weight data on the actual mesh vertices. This is handy if you have weighted multiple meshes to a joint hierarchy and you want to combine the meshes and restore the weights. So you would select all the skinned meshes, hit the “save” button, delete the history on all the meshes, combine the meshes, delete history, rename the new mesh and then hit “restore” button.

Once you’ve replied there is a couple more steps I can suggest on how to transfer the weighting to the good UV mesh plus a workflow I use that will make this process a whole lot easier.


#20

Michael Comet’s cometSaveWeights works regardless of edited geometry, provided the points are roughly in the same spot. I’d recommend using it, with settings on “world position.” You’ll lose some of your weighting around edited areas, most likely, but should work.

http://www.comet-cartoons.com/melscript.php


#21

hi again,

thanks both of you, after reading your posts I thought I’d have this sorted.

I was trying to restore the stored weights on an (admitedly identical) other mesh, so that’s clearly why i was having no success with the zooscript. So I stored the weights for the mesh, then deleted its history. I deleted history so that it wouldnt be bound to the joints anymore, possibly this isnt the best way to do this? anyway, once i’d done that I restored the weights with zoo. but it doesnt work properly at all, only some of the joints actually influence the mesh, and they don’t influence it right at all, it’s pretty weird.

so i tried the comet script, but when i try to load the geom into the weight save script box it says ‘// Error: Cannot find procedure “libSkin_getSkinFromGeo”.’ I checked his site again, and he says he doesnt support any versions over v8, so I guess that wont work anyway with me.

so, hm… for what seemed a few weeks ago like such a simple task, this sure is proving hard!

as one of you asked, ill tell you what exactly i’m trying to do.

i have a model skinned to a skeleton, and i’ve changed the weights so i’m happy with them. i then sorted out the UVs for this mesh, but found that having done so, when i move an IK handle around, the texture goes crazy - it doesnt stay as it should according to the UV mapping.

So what i need to do is rebind the mesh to the joints, but i dont want to have to do all the weightings again. there be the problem :frowning:


#22

He doesn’t support anything above Maya 8, mostly because he now works for Disney (IIRC correctly), and because people kept bugging him to recompile poseDeformer. But MEL is MEL. There are scripts around from Maya 4.5 that still work fine today.

Make sure you copy all the MEL files in the archive (download his whole package of scripts) into a spot where Maya can find them. You can’t just source the main file – it has to be able to find libSkin, which is used by a few of his tools.

When you get a message like that, you should check the log to see if a source statement failed or read through the script to see if it sources other MEL files that aren’t in your include path. (If you’re not a programmer but are using Maya, you’ll become a programmer. Mr. Smith voice It’s inevitable.)

As for your issue, I actually ran into that at work too. First rule is to not rig until you have proper UVs. :wink: But yeah, save the weights with Comet’s script (just keep at it and you’ll get it working), then detach the skin and delete history, making sure the UVs held. Rebind the skin to the same joints (if you’re unsure which, Comet’s tool has a function to select the joints mentioned in the file), and re-apply the weights through cometSaveWeights.

I’ve been using the tool for about a year now and it hasn’t failed me once. You just need to find the workflow.


#23

hey again man,

thanks a lot for your help once again :slight_smile:

unfortunately this problem isnt any closer to getting solved… I checked and double checked that the libSkin.mel script is in the same directory (the scripts one) as all the rest of comet’s scripts, and still it says it can’t find the procedure '“libSkin_getSkinFromGeo”. I checked the script itself, it’s just looking in the source folder for the file, it’s all correctly named, etc. For some reason it just doesn’t find what’s in libSkin.mel…

I found another weight saving script, but that one didn’t work either. I have to assume I’m doing something fundamentally wrong here, like selecting the wrong objects or something. The zooCST script seems like it should work fine, as I select the mesh that’s skinned and press store weights, and the progress bar fills up as it stores them. It just doesn’t manage to put them back on correctly, as I described a few posts ago.

This is getting to the point where I’m going to have to give up and re-weight the whole thing… Which considering how annoying Maya’s weight painting tools can be, I don’t much fancy… :frowning: