Zeroing
Last updated
Last updated
As you have probably noticed the weapon is not sitting right in the hand. You may be surprised to learn that after centering it, your not guaranteed it will look right. That's where Live Retargeting Comes in. A lot of people assume that if the Skeleton is the Same and the characters come from the Same Source, that retargeting an animation will just work. This isn't true, Retargeting is so simple that you could explain it to a 4th Grader and they would understand the principle behind it. There is nothing Sophisticated or Mysterious about how Retargeting works, and because it's so simple, it doesn't do a good job when it comes to Precise Hand Placement. This becomes more apparent when two-hands are needed to be very precisely placed on an object. Anatomy differences will inevitably result in offsets that are in no way avoidable and regardless of how sophisticated the Retargeting Technique is, it will never be able to overcome this obstacle, at least not until AI Completely replaces the need for it altogether (By that point there will be absolutely no need for developers at all). First off start the game and toggle the Aim so that it stays aiming and eject by pressing F8 on your keyboard. If your unsure how, go to Content->DAO->Input and open the IMC_Sandbox_DAO At the very bottom you will see an Input Action named IA_DAO_Debug_Aim, this will toggle Aiming On/Off First find your PDA_ItemCharData and Open it. This is where we can benefit from having these stored in choosers per-item, we can simply open the item in question up and open the chooser, find our character, and open the asset assigned for them. Now all the assets we need can be accessed from this one asset. This makes everything easy to find and manage. Go to your PDA_HeldObjectSettings File for this weapon, this should be the Data Asset Assigned to the IKRetargetData for that AnimSet under the PDA_ItemCharData file assigned to that item for this character. If I am holding the item in my right hand, then the Linked Anim Set for RightHand should be the current one loaded and so the IKRetargetData under that hand should be the one I need to Open. Open the PDA_HeldObjectOffset file and adjust how it's held in the hand. I usually try to orient it so that the top of the gun is parallel to the top of the hand. If you oriented the weapon to the one this pose was originally made for then you will not need to Zero it, instead you will just need to offset it in the hand and possibly add a Static Local Offset to each hand to position them properly. If you have trouble getting this pose to look appropriate for your Gun, then you may need to make your own AnimSet for it, but Modifying the ones it is currently using. I suggest that you retarget them to your character, Modify them there, and then retarget them back as described at the end of this page. Open up the PDA_LiveRetargeting Asset that is Assigned the DAO.HeldObject.Stance.Aim Gameplay Tag and Expand the Right Arm Section.
If your using one of my Poses then you won't need to Zero it, you will simply need to adjust whatever is relevant. For example, the offhand may need to be adjusted, or the hand holding it will need to be moved forward/left/right/back. NOTE: Rotating the hand holding the gun will throw off the accuracy! For the sake of explaining things to you guys I will be doing this from scratch and therefore I reset the settings for this one. In the image above you will notice: A Green Line: From Muzzle to Where the Camera is Rotated A Blue Line: Pointing Straight Down The Barrel, Indicating Where The Rifle Is Actually Pointing Some Numbers: These represent the Angles along all 3 Axis of the Rifle In Relation to the Camera Rotation, these angles are relative to the HANDS though and assume the hand bones are hand_l and hand_r For Zeroing the Accuracy goto DAO->Blueprint-Widget and right click the IK_Retargeter_Offset_Debug Editor Utility Widget. Select Run Editor Utility Widget and dock it to the side. For this to work properly it's important to note that it will not account for any Local Rotation Offset you have currently applied, therefore ZERO that out on the hand holding/aiming the gun before hand. After you have done that, aim near the horizon and fire the rifle. If you are already aiming near the horizon just press the Fire Guns button on the Editor Utility Widget. Select the offset and copy it, this is Formatted so that you can directly Paste it into the Static Rotation Offset for your Chain Bone Settings to the right. Hold down Shift and press the Left Mouse Button on a space next to the Static Rotation Offset, this will Paste it into there. You can also right click it and select Paste. You should have noticed your Gun Move. Press the Fire Guns Again and it will update the offset, if everything went according to plan then it should be approximately 99% accurate. (So far it has worked 100% of the time across all MetaHuman Characters and All 5 Template Characters. If It does not work for your character, it could possibly be a skeletal issue at fault.) Now it's time to adjust the way he is holding the gun in his hands. For adjusting the way he holds it, we will only be changing the Static Local Offset not the Static Offset. We Want this to be a local offset If you are not satisfied with the grip he has on the weapon, it may be necessary to make your own poses. It normally takes me about 1-2 hours to make and setup a new AnimSet, I normally take my time during this process because I want to make sure it looks good. (DO NOT ADJUST THE STATIC OFFSET, IT WILL CAUSE THE HANDS TO OFFSET IN SUCH A WAY THAT WHEN YOU AIM UP THEY WILL BE FURTHER FORWARD OR BACK AND WILL DESYNCHRONIZE THEM.) After you are satisfied and have reduced clipping issues you can move on to the Left Hand. It's Important to Note that an Ant can not hold an Airplane up off the ground with his left hand on it's Nose and it's Right Hand on it's Tail.....Neither Can A Short Character hold the Barrel of a Sniper Rifle if it's Really Huge.....so you can either try to make your own modified version of these Poses that are more appropriate for characters with short arms (I'll have a video on creating custom poses, but I'll have a section here where I show you how to add them to a Linked Anim Layer Child Class) or you can scale it down from the PDA_HeldObjectOffset file. After your done you may or may not be satisfied with the Fingers. I will Document the Process for Addressing that Later. I normally Retarget the poses to my character from the UEFN, Modify them, and then Retarget them back. If you do this it's important that there are no Hand Offsets on either of their IKRetargeter Chain Settings for the Arms, and it's important to ensure that neither of their IKRetargeter's have their Retarget Poses Aligned, go into Edit Mode and RESET the alignment for both the Source and Target just to make sure. If you do this right, you won't even need to Zero these when you retarget them back, but it's important your really careful how you do that. This will also allow you to fix the fingers on them as well.