PDA

View Full Version : How to modify Skeleton while preserving skin weights and pose


kuks
10-30-2007, 09:39 AM
Hi all Guys, i have a little problem about posing a character. I have created a skeleton then attached to the geometry by using the smooth bind tool. I have painted the weights and posed the character.

Now i want to modify my skeleton to add other joints but i don't know how to preserve my pose and skin weights. Do you know how to solve this problem??
Thank you in advance.

p.s.
I tried using the detach tool with "keppe history" activated but i lose my "pose" while maintaining the weights

scroll-lock
10-30-2007, 10:43 AM
What do you mean by "Posed the character" ? That you are not in Bind Pose or something else ?
It`s easy to add joints to the already existing, but you have to do it in Bind Pose - just go to Skin > Edit Smooth Skin > Add Influence

kuks
10-30-2007, 10:59 AM
I'm sorry about my poor english...

i'll try to explain the situation :

I have used Bind Skin - Smooth bind to attach the skeleton to my poly character, then i have painted the skin weights by using the proper tool and i Have edited/moved the joints to obtain a "combat pose".

Now I have my character ready to render but i'm not satisfied about the Hand rigging, so i would like to re-create the hand joints but i don't know if I could use the detach skin without losing the actual pose of the character.

shinyprem
10-30-2007, 11:05 AM
Hi
The workflow would be something like this.. (1) To save the pose. open the script editor--> clear the history. Select all the bones goto the channel box click in the Tanslate X box and press "Tab" key so the the cursor goes down to the next. Now select the lines from the script editor history area to the input area. To get the pose select the joints and select these lines in the input area and press ctrl+enter key. (2) Now before detaching the skin by keeping the history rotate all the joint X Y Z values to "0". Add the joint, but dont select the new joint added---> skin it. If pblm persists type in the command line " dagPose -reset -n bindPose1;" (3) select the newly added joint+the geometry mesh and goto skin>edit smooth skin> add influence option---> "Tick" weight locking. Now u can weight the new joint.
Rgds,

kuks
10-30-2007, 03:02 PM
Hi, thank you for the help!!!

kuks
10-30-2007, 03:03 PM
Sorry guys, i have another problem to solve, this trouble is not finished yet...
When i delete the XYZ values (translate and rotate) of the joints (before detach), the joints collapse into one point, probably i forgot to freeze transformations before doing the Smooth Bind, so i Have a series of values xyz /related to translations that cannot be modified, because their related to the initial creation of the skeleton.

I will be clear :

I have a skeleton with 26 joints, Before detach i deleted the rotate "xyz" values of the joints, my skeleton went to the neutral pose (ok!). I tried to delete also the translation "xyz" values but something went wrong, the joints collapsed into one point.

The problem : i operate over this joints two times : before Smooth bind and after smooth bind.

I don't know what to do in this situation...

Soulcialism
10-30-2007, 03:56 PM
you could do a couple of things here...

first, you probably shouldn't try adding joints from the posed position, it is just kind of a messy workflow. you would have to do some crazy stuff with duplicating meshes, copying weights, pretty prone to error. you should add joints from the bind pose.

i would do it like this:
1) save the pose out... here is a script that i just wrote up that might do the trick. otherwise try dkAnim or pose2shelf from highend3d maybe...

first clear your history of your script editor (edit > clear history). select the root joint and run this script, it should just print out a bunch of setAttr statements for rotation of each joint in the heirarchy. if you copy those and paste them back into the interpreter area (bottom half of script editor), you shoudl be able to run those and get back to the original pose

{
select -hi;
string $joints[] = `ls -sl -typ joint`;

for ($joint in $joints){
float $rx = getAttr ($joint + ".rx");
print ("setAttr " + $joint + ".rx " + $rx + ";\n");
float $ry = getAttr ($joint + ".ry");
print ("setAttr " + $joint + ".ry " + $ry + ";\n");
float $rz = getAttr ($joint + ".rz");
print ("setAttr " + $joint + ".rz " + $rz + ";\n");
}


}

so go to bind pose, detach skins, add your joints, rebind and add influences, and then run the setAttr statements to get back to your pose.


you don't want to translate joints to 0, because translate is based on relation to the parent joint. if you zero out a joint, it just snaps it to the position of the parent. if you do that for the entire skeleton, every joint will snap to the origin, which is what sounds like is happening to you.

JYoung
10-30-2007, 03:57 PM
Don't zero out the translation values on the joints. You could also set a keyframe for your pose and then zero the rotations out.

kuks
10-30-2007, 04:23 PM
Thank you guys, your comments has been very helpful. :thumbsup:

About the "secondary" problem : i found the joints thas has been modified (Translation) after the Smooth Bind (i looked back at my previous project scene files...), so i have been able to correct the translation values and get back to my original pose without problems...

I detached the skin and added new joints (for the hand fingers) to my skeleton...

Now i have just done the Bind smooth operation and i'm going to paint the weights for the fingers joints.

Thank you!

pixlix2
10-31-2007, 06:52 AM
you could have also used the "go to bind pose" command in the skin menu. it should set the joints to the position they had when you applied the skin

CGTalk Moderation
10-31-2007, 06:52 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.