Rifle Animset Pro

Thanks a lot! Works like a charm. Even no issues with multiplayer setup or custom mesh without IK rig (just normal hand bones).

9bbc809afc676c1d5227efa3179e80cdcc91332c.jpeg

14580ee9b4f87ba233e560fe64eab5a512684f7f.jpeg

Edit: Just in case anybody else is trying to do this with two bone IK: After playing a bit with this setup I found out that looking upwards causes the left hand ellbow to look a bit strange. That means you have to add the joint target location as well. BoneSpace lowerarm_l or upperarm_l works both if you move the joint target arrows in the preview of the anim_bp somewhere near the left hand ellbow.

Looks great!

Also, once I did this, I was having trouble with the reload animation in that the left hand would stay stuck to the gun. In order to fix that, I had to basically create the same setup but without the TwoBoneIK node (basically what you had before). Then when my IsReloading boolean was true, I would transition to the different Rifle animation state that would have the setup without the TwoBoneIK. Then once the reloading anim finished and IsReloading was set back to false, I would head back to the animation state that did include the TwoBoneIK node. Hope this makes sense.

Yep. Makes sense. Thanks for that hint as well. :slight_smile:

Even if I don’t need my IK rig of my custom mesh for this setup I wonder how one would retarget IK bones the right way? I ignored them previously but it seems they could be handy sometimes and I would not retarget and modify all anims again after I modified them a bit to fit to the shape of the character. I already had IK bones for hand and feet but the ik root and ik gun bones was missing so I added them and exported the mesh again including the IK rig. Usually I set root to anim and pelvis to anim-scaled and all other (deform) bones to skeleton. Works well for deform bones. But looks like the translation retargeting mode of IK bones have to be animation (or it seems they turn pretty wrong). But if translation retargeting of hand_r is following the skeleton and ik_hand_r is following the animation instead then the translation differs of course. Is this the expected behaviour?

Only problem I still have with this pack and the pistol pack is how to solve the concept of casual movement with drawn weapon. How have you guys solved for this? From a game play perspective it doesn’t make sense to draw weapon every time you want to be “ready” to fire but also don’t want to walk/run iron sight . I know the question has been posed a few times before. Kubold - Do you have any plans to add animations for casual movement with drawn weapon for rifle and pistol?

If not - does anybody have any good solution for this scenario? Does blending it with another animation package (i.e. Mocap online work well?). Is there any other “poor mans” solution to create these animations?

Kubold - really love your animations but trying to figure out how to solve for this issue in the best possible way.

Funny enough there seem to be these type of animations in the packs but only for sprinting.

Any help insight appreciated.

C

My Rifle and Pistol sets are clearly combat movement sets, so this is not really a problem with those packs, but with the lack of casual sets. To have casual movement with guns in your game, you simply have to get more animation sets like that.

You can either wait until I make them, get them from other vendors, or hire a mocap studio to produce them for you. Or you can use IK (which looks decent and saves you RAM memory for 100 animations per weapon, which can sum up to 700+ anims in full game):

I know the footage is from Unity, but it ilustrates how IK-altered animations look like. You can do the same in Unreal.

Thanks for the quick response Kubold. Will have to do some more research on how to set it up with IK looks good enough for now.

Thanks again for the quick response.

CW

One more question on animation scope/solutions:

  1. Rolling - I know this has been your topic on a few discussions (also know your background on GOW). Any thoughts on rolling animations that blend in well with your movement animations?

  2. What were your thinking on the jump animations in the rifle and pistol pack. How would you solve for being able to shoot in air with rifle and gun?

I, too, would LOVE to get a root motion roll/dodge animation that fits in with the rifle/pistol animsets. Kubold, hear our cries!

Regarding shooting mid-air, I used a blend pose by bone node in the AnimBP to set the bottom half of the character in the jump/fall animation and the top half of the character to it’s aiming blend space (though I set it up a bit differently than did).

@to translate that video into UE, I would essentially attach the gun to the IK gun bone, rotate the socket so it rests in the correct position, and then IK the left and right hands towards their respective IK hand nodes? Actually should I do this for the other animations too? Because right now I attach the gun socket to the normal right hand bone, not the IK.

You should have the IK on in most animations, where a character is holding a gun with both hands. Notice that IK bones are also animated, exactly like the original animation. The original ik_gun and hands IK bones are there to make sure that

a) hands and feet always move the same like on the original animation, regardless of limb’s lenght or shoulder width of retargeted characters
b) left hand always holds the barrel, regardless of the character’s shoulder width, so different characters still hold the gun correctly
c) to aim the gun by rotating the ik_gun bone. It doesn’t matter what the gun is parented to

To get a result like in the above video, add two new sockets to hips or spine bone - those will be your IK targets for hands. Rotate and offset them, so when you use IK, the hands will go to positions like in the video (so, holding a gun). You can add many, many sockets more and control yhe hands of your character fully - for example steady the shot, really pull a lever, hold a torch in left hand etc. IK are cool :slight_smile:

Thank you for all of your help @Kubold. I finally have set up the IK’s correctly. At first I was having the hand_l IK to hand_r and just placed the IK where it needed to be, but this just seemed wrong as I had to disable that IK node in order to run the Reload animation. Now that I have the hand_l IK’ed to the ik_hand_l and the hand_r IK’ed to the ik_hand_r, the reload animation functions fine.

In the IK nodes, I had to have the Joint Target effector changed to Bone Space as well and point that towards the appropriate lowerarm bone, similar to what Neutronux said in his post. This makes the arms not all weird looking with the IK nodes.

Also, at first I tried adding a socket to ik_hand_r for the gun, but when I played the fire animation, the gun wouldn’t move or have any kind of recoil. So I just have the socket on the hand_r like normal and the gun moves fine now.

I’ll try setting up the relaxed rifle tonight with your suggestions for IK.

OK, so I figured out the relaxed rifle IK setup.

First, I had to create a large Layered Blend Per Bone node because one I didn’t want the arms to be swinging while he was walking and two I wanted the hand to be in the position of the rifle animset and not the movement animset.

So for this node, the base pose was the regular movement animset blendspace. Then I had a pin for clavicle_l, clavicle_r, lowerarm_l, and lowerarm_r. The clavicles took in a paused movement blendspace and the lowerarms took in a paused rifle blendspace.

So, the thing with UE4 IK setups is they don’t allow you to set the end effector to a socket, only to bones. I tried adding a socket to the pelvis bone and then IK the right hand bone to it, but it never worked. It only worked when I set the end effector to a bone. So for the hand_r bone, I set the effector bone to lowerarm_r and for hand_l, I set the effector to hand_r.

Since I could only use bones, I also had to add a Transform node to rotate the hand properly since I couldn’t just grab the correct rotation from the effector bone. I had to rotate both hands to be in the proper position.

This also forced me to change how my state machines transitioned, but that wasn’t a big deal and was easily solved.

Here is what my guy looks like now when equipped with a rifle:

relaxedrifle.PNG

Next comes the relaxed pistol.

thoughts on best way for rolling/dodging? You have anything in the works? Or thoughts on other solutions?

CW

Well, for starters you need some animations :slight_smile: I haven’t yet made rolls with rifle, so either please wait for an update, or grab some from Mixamo or something, if you absolutely need it now. You can also use dodges from my sword pack or Sword and Shield pack as placeholders. So far I haven’t yet see any other technique of dodging then in games like Gears of War, God of War, Diablo, Dark Souls, The Witcher etc. You press a direction and hit “dodge” button to play one of the 4 directional dodges.

For enemies though, I found this technique works well:

  1. When a Player attack animation starts (for example with melee weapon), you shoot a trace forward to check if it will hit the enemy. So not on the impact, but at the beginning of the swing.
  2. If the trace hits the enemy, it triggers a test of dodge for this enemy, for example 25% that it will dodge.
  3. If yes, then the enemy triggers dodge animation (either just backwards, or we choose which direction basing on raycasts, so it doesn’t dodge straight to a wall or fall from a cliff). We can also turn off getting hit mechanism for dodging enemy, to ensure it dodsn’t get hit during dodging.

You know, you can actually In Place animations but tweak the character movement so that it does not increase/decrease velocity abruptly, but by using a curve. This way you can fake the existance of root motion animations but never actually using them. It’s simple. Make the character gradually increase velocity as the player makes him start his jog ( and, of course, decrease the velocity gradually when the player releases the movement key ). This way, the start/stop/turn animations can be played, the animations look nice and fluent AND you don’t have to worry about data sent while networking because the capsule is not driven by the animation, you somehow merge the two together and only positional data is sent.

I will try to post a video further explaining this phenomenon. Sadly, it regards only the aspect of the game, so I don’t know why you would get intro this kind of mess just for pretty stuff if gameplay lacks funtionality, there are bugs and what not.

Cheers

@
Greetings,
Working for the client I discovered an issue in this pack, in assets “EquipRifle” and “HolsterRifle” Head and Body are wobbling.
Example: https://puu.sh/vhSfd.gif
We decided to contact you on the forum before messaging epic about technical issues so they message you.
Regards.

Hi @CriErr well, I’m not of course but just my 2 cents on this matter: as an user of this animset, I don’t evaluate this as “head bobbing”, but I believe the character is “clearing the way” for the weapon to go on the back, without accidentally hitting the back of the head. This feels even more natural - at least for me - when you have a character with a face, so it’s easier to interpret such movement.

But I guess @could properly validate this statement or not. =)

Cheers,

  • T

Can anybody help me with blendspace inputs. It is the only thing on which I can’t get my hands on. How to give walk forward and walk right inputs to bsp ? I mean get velocity doesn’t works it gives creepy movement results.