Home // Blog // Ugly Briefs Update #2

Such ugly underpants. I hope the underpants gnomes don’t steal

So as promised. I wanted to update you all again this week and talk about the turret rotation Animation Blueprints (Anim BPs) and Anim Graph issues we fell into with difference Unreal Engine integrations. Fortunately with this change over with how the Anim BPs work now with Unreal 4.25+, global Anim BPs (that can work across multiple different skeletons/actors) will now work! So we’ll get into all that. If you want to read up about what Anim BPs are, feel free to check out the Unreal Documentation here.

From Individual Turret Anim BPs to Global Turret Anim BPs

Back before Unreal 4.23, we first created the Turrets for the ships using their own skeletons and their own Anim BP setups (since we assumed that each skeleton needed their own Anim BP reference). However as we continued to develop, we quickly found out with our designs that we are quickly getting out of hand with the number of turrets we needed to make (16 currently working turrets, probably ~30 more needing to be created).

Since this wasn’t the biggest deal and we could copy-pasta the Anim BPs and just re-reference the “new” skeletons (pretty much similar skeletons with bones for Root/Yaw/Pitch), we decided to put off looking into a solution for creating a parent Anim BP that could handle the rotation behaviours of all the turrets.

Just a quick definition here about what the Turret Anim BPs do;

Basically, the Anim BPs handles the “new aim direction” inputs (given by the turret view, or crosshair aiming) and translate that direction into rotations for the turret Anim Graph to attempt to make (given a certain speed).

Also, we initially setup the Anim Graphs for all the Anim BPs to first do the Yaw Rotation, cache the yaw rotation as a pose, and then re-reference that and also add the Pitch rotation and then output that as the final pose made by the turret to complete the rotation update (This caused a crash when updating to 4.25, but we’ll get there).

4.25 Integration

Unfortunately since we’re using FMOD for the sound system, we tend to lag behind when it comes to integrating into the new versions of Unreal. We had to wait until FMOD came out with a new supported plugin for the engine version before we made the move. Once that happened, we then proceeded to integrate up to 4.25 as I was excited to take a look at how Chaos destruction may work for us with the Asteroid destruction. Unfortunately, I was met with an assertion failures that leads to Engine Crashing on level load!!!

Assertion failed: IsRotationNormalized() [File:D:\Build++UE4+Licensee\Sync\Engine\Source\Runtime\Core\Public\Math/TransformVectorized.h] [Line: 1235]
Assertion failed: !Pose[BoneIndex].ContainsNaN() [File:D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Public\BonePose.h] [Line: 564]

This massive blocker stopped us for several days before we could continue working as we tried again and again to dig down into which actors were causing this when placing them into a blank level. Eventually I found out it was ANY Turret that would be attached to a ship that would cause this. Apparently these cached transforms run (even when just working in the editor viewport) at all times and this cached setup for the AnimGraphs didn’t work anymore.

To fix this, instead of using a cached pose to save the Yaw transform update we found out we could do a “Transform (Modify) Bone” call instead, and then pass that Component pose forward and then do the same thing for the Pitch.

While working on this, I decided to try using this same setup to create a new Parent turret Anim BP/Anim Graph setup since all the bones for the turrets that I want to rotate are all setup to be named “turret_yaw” and “turret_pitch”. And it looks like with this same generic setup on calling the modify bones by name works on all the rest of the turrets now! No more need for Anim BP bloat in the files anymore since we’re just going to rotate the turret_yaw and turret_pitch bones for all turrets (regardless of their translation offsets for their meshes, wooo!). And with that, I did a proof of concept throwing a Naval sized turret onto an Icarus! haha!

Summary

With all this said, it just reminds me of how much bullshit we’ve been running into with the integrations of both 4.24 and 4.25. Sure, it’s good that Epic keeps going with these new versions that keep cleaning up old systems and/or improvements on them, but it’s extremely frustrating when ever we do an integration (which seemed to always be quarterly) that we had to pretty much perform an easter egg hunt to fix what ever issues arise, like – .DLLs now get split so you also need to include .modules with compiled builds (thanks 4.24), the above mentions saved caches causing crashes on level load with these assets, Materials/Lighting being blown out due to new RTX shader methods…. ugh, I could go on, but I guess I’ll save that bitching for another brief. Thank goodness too that Epic seems to be focusing more on Unreal V instead of making new versions for us to keep playing catch up on. It’s very likely we will stick with Unreal 4.25 until final release, but anything could change so don’t quote me on that.

Anyhoo, I hope you all enjoyed that brief and we’ll see you again on Friday.

God speed, Warden

-Kami

0 Comments ON " Ugly Briefs Update #2 "

Subscribe to the Solar Warden Newsletter

Solar Warden on Social Media

Facebook

Twitter


YouTube


Reddit

Join Live Chat on Discord

Solar Warden on IndieDB

Solar Warden

Polar Zenith Copyright © 2022 Polar Zenith, LLC. All Rights Reserved.