Jump to content
Sign in to follow this  
Kydoimos

Custom Animations and Weapon Holding

Recommended Posts

Hi all,

 

Just a quick question regarding custom animations and weapon holding. I downloaded the Blender A3 rig some months ago and have played around with it a bit, but I was curious - how would one assign the weapon to the hand(s)? Obviously, the weapons in A3 are different shapes and sizes, so how would one create a (static) stance that encompasses these? I was just curious to know how it's done for future projects  :)

 

Many thanks!

 

EDIT: I'm guessing it's something to do with this, perhaps?

 

 

Step 7: Open your weapon config and add this line to it then save.

“handAnim[] = {"OFP2_ManSkeleton", "Path\to\weapon_anim.rtm"};â€

Share this post


Link to post
Share on other sites

EDIT: I'm guessing it's something to do with this, perhaps?

No, that's just telling the game which .rtm file to load the animation from.

To make hand animations fit a weapon you have to physically move the "weapon" bone in the animation rig to somewhere near the shoulder position (doesn't have to be exact) then pose the hands around the weapon. The handanim type animations only use the relative position of the "RightHand"/"LeftHand" skeleton to the "Weapon" bone - everything else is done with inverse kinematics.

So if you have a custom weapon model you need to fit the unit's hands around, import the model to the position where the "weapon" bone is in the rig and then animate everything around it.

To correctly orientate your model to the default "weapon" position, you generally have to import your gun model to the animation rig then rotate it 90 degrees in the Y-axis around the [0,0,0] grid position (origin of the grid) making the muzzle point forwards, then move it 1 grid unit along the X-axis so sit on the anim rig's right hand side. You can then link your model to the "Weapon" bone and it'll move whenever you move that bone (probably want to delete your weapon model from the rig before you export the animation).

  • Like 3

Share this post


Link to post
Share on other sites

@da12thMonkey - thanks man! That's really helpful, hugely appreciated!

 

 

can then link your model to the "Weapon" bone and it'll move whenever you move that bone

 

That was the bit I was missing, I'll see if I can figure out how to do it on the Arma blender rig - thanks again!

Share this post


Link to post
Share on other sites

I think I must be going a bit wrong somewhere; I've successfully linked the weapon bone to the hand (see below) on this test anim:

 

Test_Anim_zpsiabujmbc.jpg

 

Now, the weapon bone (I assume that's the red square around the weapon in this instance) moves with the hand. I've also successfully moved the weapon into the hand and closed the hand around the weapon's grip. Trouble is the individual weapons are different sizes and their relative position is different:

 

Anim_Test_02_zpsr8drivrb.jpg

 

So, while I can get a perfect hand grip on, say, an MX assault rifle, it's completely wrong if I change the unit's load-out to a different primary weapon - for instance, an SMG. I must be doing something wrong in this process, as I believe the weapon bone should be automatically aligned with the unit's hand bone, and the grip position should be the same? Maybe I need to re-link the bone in O2 somehow? Or something else entirely?

 

Thanks so much for your patience, I'm always really grateful for the advice! :) I did find a related thread here: https://forums.bistudio.com/topic/160314-arma-3-animation-tutorial-from-blender-to-arma-3/page-2 - but you know, I'm still struggling :P

Share this post


Link to post
Share on other sites

Oh, you're doing a static animation? I misread the op due to the last part and thought you were doing an handanim

Not exactly sure how one would set that up on static move since I normally only do them for vehicle crews (i.e no weapons). But I think it's done setting rightHandIKCurve[] = {1}; in the config.

 

Might also need to set weaponIK = 1;

Share this post


Link to post
Share on other sites

@da12thMonkey - thanks so much, mate! It worked a treat! :D

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×