PDA

View Full Version : How do i adjust bones post skinning.


4dartist
01-21-2005, 08:53 PM
This may sound kinda weird, but is it possible to move a bone after skinning the character?
My problem is i noticed i put the shoulder bone a little close to the torso, and i think it would deform better by moving it out a little. I've noticed if i unlock translate on the shoulder bone and move it out, then move the elbow back in to where it was before, all the verticies that have any weight on the shoulder move with it. I was thinking about creating a dummy bone in there or trying some crazy things, but wanted to see if there was a cleaner approach.. At this point i would rather not reskin the character.

Thanks

(after i moved the bone | Pink)
http://www.4dartist.com/cgtalk/bones.jpg


(Before I moved the bone | Blue)
http://www.4dartist.com/cgtalk/bones2.jpg

M.E.L.
01-21-2005, 09:07 PM
Use Insert to move your bones around after skinning :)

Remember that you will need to re-orient the joint after this as it will no longer be properly oriented.

4dartist
01-21-2005, 09:17 PM
Have you tried that? Insert still moves the verticies. It doesn't seem work on Maya 5.0
I may try exporting the weight map, move the bone, then reimport.. but haven't had much luck with importing maps with this character, there is a separate bone structure for the neck and both feet, and the head is separate geometry because of blendshapes.

___________________________
20mins later or so...

I was able to move a bone, in a little cylinder w/bones test, and i could move a bone, export and import the map, and the verticies would reset to the original spot, and not retain the move i did on the bone. So ya, that works perfect. But alas i try it on my model, and when i export the weights for my character and import them all the skinning is gone.. none of it is retained for some reason. Arg!

Benjamin

M.E.L.
01-21-2005, 11:13 PM
Works for me fine under 6.0....If it's messing up you can simply disconnect the skin from your mesh and then re-select your bones/skin and simply bind again (it will keep the weights, just remember to use Keep History when you unbind the skin!).

Here is some code to make it easier, run this script with your mesh selected and it will create a Quick Select Set for all the joints that are attached to the skinCluster...then you simply just hit the quick select and re-bind :)



//ct_skinnedBones.mel

//query the influences for the given mesh

$sel = `skinCluster -q -wi`;

//select the influences

select $sel;

//create a quick select set for joints.

CreateQuickSelectSet;
defineCharacter;




-shawn

4dartist
01-21-2005, 11:45 PM
Very cool idea. I detached the skin with the keep history option on, except when i got to reattach it i get a msg saying,

"Error: Skin on ShoulderRotateL was bound at a different pose. Go to the bindPose to attach new skins."

I don't see an option for editing the bind pose in my books or the help files. 8(

I wonder why i can't export and import the weights, when it imports, it flashes thro all the bones with no skin visable, then the skin starts to appear and then some of the vertices go to like 0,0,0 then back up to where they are suposed to be. *shrug*. Tomorrow im going to just re-skin the whole model, but would be nice in the future to have a way to edit my bone placements post skinning. (on a complex rig, worked fine on a cylinder with bones)

Benjamin

loked
01-22-2005, 12:29 AM
Try this out:

In the hypergraph show the up stream and down stream connections of the joint you want to move. It should have a .worldMatrix[0] attribute that plugs into the skinCluster. Now create null group node and parent it under the joint you want to move. Zero out all the transforms on the null node onces it's parented and it's pivot should be in the exact same place as the joint.

Now plug the .worldMatrix[0] of the null node into the skinCluster.matrix[#] (make sure you plug it into the same number as the joint was, so it could be skinCluster.matrix[2] for example). Now press insert and move the joint around. It shouldnt affect the skin at all. You can also re-orient it the only thing is you need to leave this null node in your hierarchy. I wouldnt do this very often, but if you need to you can.

Judd

Morganism
01-22-2005, 06:15 AM
Interesting solution, Loked.

In order to do a smoothbind while not in the bindpose, you can delete the BindPose node. As far as I can tell there are no ill effects as long as all your joints and/or controllers can be zeroed out. Anyway, you can delete the BindPose by finding it in the hypergraph, or just typing
delete bindPose1;
in the command line. Then you should be able to bind again.

fortner
01-22-2005, 06:28 AM
michael comet has a tool for this

http://www.comet-cartoons.com/toons/melscript.cfm

- Mike
Creature TD
www.mikefortner.com

loked
01-22-2005, 06:29 AM
Yeah, I dont know if the bindpose is really the problem cause if you have skinned weighted and you now want move a joint, you cant just detach the skin and then re-attach it after moving the joints, cause it will just default to binding weight settings. You could save out your map, but if you dont want to do either and just need to make a quck fix, the solution above should do it. Usually, if it's still early on I just save out a weight map, reattach the skin and apply the map.

Judd

poly-phobic
01-22-2005, 03:37 PM
bahh edit post...

M.E.L.
01-22-2005, 04:37 PM
michael comet has a tool for this

http://www.comet-cartoons.com/toons/melscript.cfm

- Mike
Creature TD
www.mikefortner.com (http://www.mikefortner.com)

holy mister Fortner, long time no speak! Geez man I thought you fell off the face of the earth there for the longest time, never heard back from you! Still over at ReelFX?

Judd, nice solution man :) make people's heads explode heh.

I guess a really simple little note here for any setup artist...before you bind your skin and stuff, always remember to save yourself a little button of all the joints in your character that zero's ALL rotations out...it's a saviour whenever the bindPose gets screwed up..

seven6ty
01-22-2005, 04:51 PM
...Or just go and delete the bind pose(s), no?

loked
01-22-2005, 06:22 PM
Like Shawn said, personally I like to make sure all my joints are zeroed out at all times. Especially when you've got multiple skeletal structures...etc. Everything matches up and you dont run into weird issues down the line. There are times when I've deleted the bindPose node as well, so I'm definitely not saying dont, but just try and prevent getting to that point.

-Judd

4dartist
01-22-2005, 08:39 PM
You guys are the best! Well first i tried the plugin from comet cartoons, but then i realized it was only for maya6.0. Which i don't have. Then i was looking into "loked's" method and well, then realized it would be something i would have to keep in the hierarcy, and well i wanted to avoid that for some reason. So lastly i tried deleting the bindpose1 that "morganism" suggested and detaching the way "M.E.L." said, and IT WORKED! I actually added a few bones around the model that i needed lol and added skinning to them. Very cool guys, thank you.

Benjamin

seven6ty
01-23-2005, 01:00 AM
Yeah, I love to have everything zero'ed as well. Only one problem, IK handles always seem to add the tiniest rotational value to my joints, any tips on how to avoid this?

The big bug is, it'll cause a joint at the top or something to rotate -0.000065 or something, so in the channel control it shows up as having -0 rotation, grrr!!!

loked
01-23-2005, 01:22 AM
That sorta decimal accuracy doesn't matter. Even if you bind to a skeleton without an ikHandle and then apply an ik that throws it off that small percentage, you wont even get the bindPose error, so even Maya interprets that as 0. Sometimes when you apply an RP solver to a single chain you can get rotational problems, if this does happen just switch to an SC solver and it should fix it.

BTW, just make sure you delete the RP solver, zero out the joint and then apply the SC handle. If you just try and switch the solver type in the AE, it wont work.

Judd

CGTalk Moderation
01-23-2006, 02:00 AM
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.