Animation testing environment
Progress has been fairly slow for a while on animations for the game. The two major types of animation that need to be done are the animations for character select and the FPS hands animations.
After speaking to a couple of the animators, part of the reason for this seems to be that they don’t have access to the main build repository so difficult getting feedback on animations since they need to be incorporated into the build and tested by someone like myself, who can then show them a video to make sure the animations work properly and the retargeting works as expected.
This is not an ideal way to work, so I decided to make a test area in the art repository so that they are able to check the animations on the characters for character select. I decided to create the character select test area first because while it’s not as crucial, I set up the in game character select so I had a better understanding of how to do it.
The other motivation for this is that I also wanted to make my own life a bit easier. If designed well, I could set up the sytem so that when the animators add their animations to test in the art build, it can be easily transferred over to the main build.
After speaking to a couple of the animators, some requested features for the tool were:
- A ground plane
- The ability to enable and disable sections of the animation
- A speed control for the animation
- The ability to loop sections to test blending
- A scrub for controlling the animation position
I was able to get all of these features in besides the scrub, which I couldn’t find an easy way to implement. For the rest of it, it was a bit more of a mixed bag between easy and a bit more challenging.
Some of the easier stuff to do was swapping out the skeletal mesh and animation, as I found I could migrate my Actor I created for the model over to the art build because it didn’t have too many dependencies. The speed control and general UI was also quite straight forward as at this point since I’d had a lot of practice, the speed control slider was just output straight into the montage play speed in Blueprint.
Looping sections by choice and enabling/disabling sections was quite a bit harder than I thought after investigating the Blueprints I had available. I wanted to essentially keep the same animation montage created in the art build and be able to port that over easily, but unfortunately due to the idle and post-idle animations in the montage always looping I would have to either disable the looping to set up specific triggers for the montage to loop by section which I would then have to change in the main build, or I would need to hack around it.
As I’m writing this now, I realise how trivial the former option would have been and probably should have just done that, but instead we are here in hack-ville. The hack I used was adding each of the animation segments to the data table that is loaded to display the character animations which I would use to retrieve their play time and time each section of the montage and choosing to either loop or advance to the next section based on the user input. This then caused an issue because the time for these animation sequences is based on a 1.0x playback speed, so I had to then divide this time by the playback speed multiplier.
While not the cleanest code I’ve ever written, I’m glad I made something that can potentially help unblock animators who are struggling with our current workflow. Also this is a reminder to myself and any readers that it’s sometimes important to just take a step back when problem solving. Sometimes the easiest solution is the most obvious one, but it’s rarely obvious in the moment.