Jump to content

Multiple animation keywords for a custom weapon? (Found Solution)


N7R

Recommended Posts

I need to emphasize this method (as its the only working method I could find myself) is how to get 3rd person animations to work correctly alongside 1st person ones when you are using more than 2 keywords where certain animations need to overlap depending on what attachments are on to the gun or removed. If you JUST have 1st person animations on your weapon and don't care for 3rd it appears you don't need to jump through these same hoops. One keyword would suffice and the game is smart enough to know which animations to blend but once 3rd person comes into play and you have to generate the AnimTextData it looks like it starts to overlap a lot of records and won't give your character the correct movement in game when you are in 3rd person which is very bad and literally unplayable.

 

I originally typed this whole thing out and was about to post it looking for a solution to a rather complex animation problem. However in a last minute 'light bulb' moment I went into CK, tried my test, and sure enough it was the solution. Instead of just trashing this entire post though (I don't expect anyone to still read this but cool if they do or it helps one person in the future) I thought it would be best to provide the issue and the answer for any other weapon creators out there that might come across a similar issue.

 

When dealing with multiple animation sets for a gun that all need to work together depending on what gun attachments you create or take off in the workbench I don't think there is any if at all information on it especially when you have 3rd person animations. What exactly do I mean when I say multiple animation sets? Well essentially say you have a gun that also has a weapon mod attachment like a foregrip. When the foregrip is attached you'd expect the character no longer holds the gun in the same position but grips the foregrip right? This is basically a new animation path needed for when that mod attachment is in use. This has been done before with only a few weapons I've seen and has been briefly explained thankfully by some users in the past. Now say you also have a magazine that is special and has a different animation and is much faster than your default reload animation. This is yet another animation path needed on top of the foregrip paths already on the gun. I don't think this type of situation has been shown or explained before when dealing with 3rd person animations. The hard part is how to set this up so all the animation paths are playing the correct animation depending on how many attachments that change the animation. Maybe this is common knowledge among a few animators but as far as I know there is no good public info on how more than 2 animation keywords can be run simultaneously on a custom weapon and the 3rd person animations play correctly as well since they are more convoluted than the simple 1st person ones.

I have the solution at the bottom of the post for those interested. Right below is my original problem first:

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I don't know if any weapon animators for Fallout 4 will ever see this but looking for any setup guidance on how this can be achieved properly in the CK where multiple animation keywords (more than 2) can be run on a weapon at the same time without overlapping issues. I apologize in advance this might get a bit technical and possibly confusing but I hope the CK can actually do what I am looking for. So the quick rundown is I have a scratch built weapon and have successfully made animations for 1st and 3rd person. Along with all the animations I've done the whole ck additive subracegraphdata stuff everything works perfectly in Fallout 4 in 1st and 3rd person.

A quick breakdown of my animation keywords would be this:

- Main gun keyword (this includes all the base 1st and 3rd person animations)

- Foregrip keyword (this animation set includes a foregrip attachment so when it is added to the weapon the character adjusts their hand to rest in the correct spot for 1st and 3rd person views)

- Fast mags keyword (this is an additional 3rd animation keyword for a special magazine animation where the character swaps mags in a special and much faster way. (This keyword like the foregrip is associated to a new mesh, in this case a special magazine mesh)

This is where the issue arises. The 3rd animation keyword I have (fast mags) needs two subgraphdata tables created. Here is an illustration showing what I mean when the keyword is needed twice:

 

http://i.imgur.com/ZBtPPVG.jpg

I need one created for when a foregrip is attached and another for when the character is holding the gun without a foregrip. Unlike the foregrip there is just one animation path set needed because the attachment is removed and the default keyword is the only animation path being used then. However the fast mag keyword is needed either for the foregrip attachment or when the gun does not have one so essentially the game sees the keyword is being used both times whether I attach a foregrip or not. When I generate my AnimTextData and go into the game if I am in first person view I can attach fast mags and a foregrip (or have 1 or the other just attached) and the animations blend perfect. Its quite awesome to have my gun with a foregrip then craft fast mags and the animation knows to swap mags with a new reload animation replacing the default one I made. If I was just doing 1st person animations then there would not be any problems at all. However, for 3rd person animations ... my character can no longer walk forward when I have more than 1 of the keywords attached but the gun animations play at least. My guess is my subracegraphdata when generating the AnimTextData for 3rd person is overlapping some stuff so it confuses the 3rd person animations. It doesn't know whether I am using the fast mag keyword with or without a foregrip since its referenced twice so it just messes things up.

Now of course before coming here I tried extensively to find other options this is what I tried or realized:

1) One workaround to this is make a fast mag keyword for when a foregrip is attached and make another keyword for when no foregrip is attached. The issues here is I then have two magazine meshes that the player would have to craft to get the correct looking animation. This also means when the gun is injected into the level lists it may randomly generate the wrong fast mag mesh animations to go with the gun. I really don't like this approach and find it hard to believe the CK is not smart enough to set up a system where I can have one mesh and it knows which set from that keyword to use depending on what other keywords the gun has already .

2) Another lame option would be to just have one animation set for the fast mags (like foregrip has) but then either the character will hold the gun wrong with or without the foregrip depending on which set I decide to cut. Again, I don't like this option as it gimps my original and already working animations.

3) The third option which I actually tried ... wait, this actually turned out to be the solution after I typed this whole thing out LOL of course ....

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

THE SOLUTION:

It turns out the solution to have a weapon use multiple animation keywords (and work for 3rd person) which all have different animation files needed to play depending on the other mod attachments is to create two keywords for the same mesh. Instead of having one keyword for each magazine (like I mentioned above in option 1) is to simply add two different keywords to the same magazine mesh or more depending on how many attachments needed different animations to play. What this essentially does is create a tug of war with the magazine mesh. When the magazine is in use and the weapon has either a foregrip or none it will use the animation set that only matches the keywords currently being used at the time. The cool part is the magazine mesh will be used regardless but a different animation will be played depending on the current active keywords on the gun.

So for example I have the gun with a foregrip and the keywords in the subgraph are like this:

main gun keyword

foregrip keyword

fast mags foregrip keyword

Now if I go to the workbench in Fallout 4 and detach my foregrip the only keywords left on the gun are this:

main gun keyword

fast mags keyword

It then will only reference my other subgraph that has no foregrip keywords listed in it. Now you might be thinking "why does it still not reference the foregrip subgraph? doesn't the mag mesh still have a foregrip keyword on it?" You would be correct, however since my subgraph includes a foregrip attachment keyword it will not be triggered unless the foregrip keyword is in active use as well. It is basically an all or nothing scenario, it won't call those animation paths to action unless it can find the exact same matching keywords in that subgraph on the gun at the same time. So regardless if I have a fast mags foregrip keyword the game can't find the foregrip keyword on the gun when it was removed so it instead it sees the regular fast mags keyword and main gun keyword are still visible so it goes with that one instead. Unlike when I had one keyword on the magazine for two separate subgraphs that had different animation paths, using 2 keywords which each has their onw subgraph animation paths eliminates the game from confusing which subgraph it should be pulling the animation files from.

Here is an illustration showing the working method, as you can see the red block (the magazine mesh in this example) has two different keywords on it:

http://i.imgur.com/Ft38EBe.jpg

 

 

Again as I have at the top of this post: I need to emphasize this method (as its the only working method I could find myself) is how to get 3rd person animations to work correctly alongside 1st person ones when you are using more than 2 keywords where certain animations need to overlap depending on what attachments are on to the gun or removed. If you JUST have 1st person animations on your weapon and don't care for 3rd it appears you don't need to jump through these same hoops. One keyword would suffice and the game is smart enough to know which animations to blend but once 3rd person comes into play and you have to generate the AnimTextData it looks like it starts to overlap a lot of records and won't give your character the correct movement in game when you are in 3rd person which is very bad and literally unplayable.

 

I hope this post was useful to someone out there. When animators say 3rd person animations are more annoying and can be a nightmare I understand why. They require a lot more data entry and workaround to get working correctly.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...