Source Filmmaker

Source Filmmaker

81 értékelés
How To Retarget Skeletons
Készítő: Kharos
This guide is a tutorial on implementing a Valve skeleton (or really any skeleton) as the base skeleton for another model. This is called Retargeting. Doing this yields a few benefits, namely things like extra spine bones on models that may have had only 2 for example (allowing for additional transform freedom), extra bones for additional pivot points, as well as a reduction to jitter or inaccurate rotation motion during keyframe transitions that can be caused by inaccurately oriented bones.

For an example in this guide, I'll use a large proportioned human model which is a space marine by Joazzz, and will be applying a Valve skeleton to it.
   
Díjazás
Kedvenc
Kedvenc
Törlés
Tutorial
1. Spawn two models: the one which you want to apply the skeleton to, and an invisible (or made invisible through SFM settings) model that yields the skeleton for animation purposes. In this example, I'm using an aforementioned space marine (but I'll reffer to the model as "base model"), and an animations_barney Valve model whose skeleton I'll be applying to the base model (I will reffer to it as Barney).

2. Open the animationset dropdown menu for both of the models so you have all the bones visible.

2. Left click hold and drag the rootTransform bone from the base model's skeleton onto the rootTransform bone of the Barney skeleton. This will make the base model’s root bone a parent bone of Barney’s skeleton root bone.

3. Select the rootTransform bone on Barney and, in the procedurals tab, drag the zero bar all the way to the right.

4. Click on the + sign in the animationset editor to open a dropdown menu on Barney’s root bone and click the + sign again on the rot dropdown menu. This will show you the 3 axis of the bone’s rotation.

5. Select the Z axis (blue one) and open the graph editor.

6. Put a keyframe on frame 0 by pressing M and select the keyframe.
Type whatever value you need in the second key value bar in order to make your Barney skeleton match up with the rotation of the base model's skeleton, then press enter.

7. The Barney skeleton should now match the rotation of the base model skeleton. If it doesn't - you can rotate it to another degree until it matches the rotation of the base model you're using. Check.

8. Now go back to the animationset menu and look at the bone list of the base model's skeleton.

9. You want to left click hold and drag all of the basic bones of the base model onto their equivalents on the Barney skeleton. It is quite simple really: the left thigh of the base model skeleton is dragged to the left thigh of the Barney skeleton. Do this for all bones that have their equivalents on Barney, meaning the thighs, the calves, the feet, the toes, the upper arms, the forearms, the hands, and the head.

10. Now the tricky part comes with the spine bones most of the time. If your base model has less spine bones than the model whose skeleton you want to use (in this case Barney), you want to take the bones of your your base model and drag them (in a *physical* order from top to bottom, not the bone list order) to the spine bones of Barney. In my case, it was spine D (top spine bone on base model) to spine 4 (top spine bone on Barney), the spine A (lower spine bone on base model) to spine 2 (spine bone below spine 4 on Barney), since the model I'm using had only 2 spine bones, while Barney has 4. This means I haven't touched spine and spine 1 on Barney. Finally, the pelvis bone from the base model is to be dragged to the pelvis bone on Barney.

10.1. Now, if your base model indeed has less bones than Barney, you want to take the pelvis on Barney’s skeleton and drag it to both the spine and spine 1 bones on the same skeleton (Barney). You'll see why in step 11.1.

11. Select all the bones on Barney that now have a padlock icon to their left and zero them all by dragging the zero bar fully to the right in the procedurals menu.

11.1. Now select Barney's spine and spine 1 bones you've locked to Barney's pelvis (skip this step if you didn't have to do step 10.1). Drag each one of them slightly up individually to your own desire and do the same for the spine 2 and spine 4 bones in order to let them match up with the anatomy of your base model. The 2 extra bones will basically act as extra spine bones that you can use to rotate the torso from the pivot point of the extra bones.

12. After you’ve done all this, click on the padlock icons on all of Barney’s bones to unlock them from the base model's skeleton.

13. Repeat the bone locking process in reverse, dragging Barney’s bones onto their equivalents on the base model instead. Note that despite the fact you may not, for example, have clavicle, neck, or spine and spine 1 bones on your base model (like in my case), they are still in between parent bones; this means that they will still act as intended and you can use all of them. Your base model will now have clavicles that it never had for example, tho this may look a bit weird on less "armored" models, as the new bones don't actually affect the weight painting of your mesh.

14. Click on the little arrow pointing diagonally to the right on the left side of the bone menus to change it to grey on all of the base model's skeleton dropdown menus for bones. This will make the bones invisible since you won’t need the old base model skeleton's bones anymore.

15. Try out the new skeleton!

16. You’re free to use the basic valve biped IK rig as well, just apply it to your Barney skeleton model or whichever model you were using the skeleton of. There are a few things I had to do first in my case, which you may not have to, and that is to remove the locks on the base leg bones and drag them back to the Barney skeleton leg bones as done in step 9, essentially meaning I had to have the locks show up on the bones on Barney’s skeleton instead.

18. Select only the rotation x (red) axis on the thighs and calves on Barney’s skeleton, but do it one at a time.

19. Go to the graph editor and make a keyframe at frame 0, then select that keyframe and put in -180 for the thighs, and 180 for the calves. ONE BY ONE.

20. Apply an IK rig and see if it works. Without this, my knees bent backwards. You may have to do this with varying degrees and such incase you experience that, but if you don't - great!
6 megjegyzés
Voxaust 2023. márc. 11., 21:39 
There was a megapack on sfm lab containing a bunch of joazz's space marines such as black templars and word bearers, but that megapack was likely taken down so they can fix the iron hands and word bearers textures
Safmarine 78 2021. okt. 8., 14:30 
sorry,but Joazzz deleted his models :winter2019neutralyul:
DemSunny 2021. okt. 8., 13:03 
Hey there! I know you posted this a while ago, but I've recently gotten into animation and have been incredibly inspired by WH40K Animations. As I'm sure you know Joazzz's WH40K models are super hard to find nowadays, Do you have any way of sharing the models you have? I only have the Ultramarines and would kill for a shot at getting another chapter.
DaEnderAssassin 2020. ápr. 27., 19:10 
If its bipedal autorigger is much easier to use.
Model > Rig > autorigger then confirm all bones are correct and the number of spine bones is correct (Also enable way to fix finger lag) and the create a rig script with those setting. Then select that new script from the rig menu.
Count Ejacula 2020. ápr. 22., 9:16 
Does this work in Gmod too ?
mEd1c 2020. febr. 8., 17:43 
Can I use this on all SM models by Joaazzzz?