Our cutscenes tend to be quite long, and tend to use a lot of animator tracks controlling character root motion. We’ve noticed that as cutscene length and number of animator tracks increase, Slate seems to freeze for a longer period of time before it starts playing or scrubs to a position. Through profiling, we’ve managed to track this down to the BakeRootMotion function, which gets called on entering an animator track. In the worst cases, with a 10-minute cutscene and tens of animators, this can be responsible for a freeze of several seconds.
We’ve tried reducing the ROOTMOTION_FRAMERATE value and had some success reducing the freeze time for certain cutscenes, but in other cutscenes this can cause the characters to go off course, especially when they’re affected by root motion steering.
We believe the behaviour of this value should be more thoroughly tested and fixed, and exposed as a configurable option for each cutscene. We also believe Slate should provide options to:
– bake root motion only on command
– bake root motion periodically in the background
– serialize baked root motion when the scene is saved to prevent baking at run-time.
You are right that it can be problematic in long cutscenes and with many Animator Tracks. This is something I intent to improve in the next version update very soon after I return from summer vacation. The solution I am looking at is to completely avoid baking the root motion and a total overhaul to the Animator Track code. If that does not work as I expect it will, then I will most probably go with some of the suggestions you posted here, especially the third one (serialize root motion to avoid doing so in runtime).
Once again, an update will be made shortly after summer vacation.
Thanks in advance for your patience as well as your suggestions!
The worst side-effect of this issue is that we use Wwise in one of our projects to trigger audio events on the first cutscene frame – but if root motion baking is triggered on the first frame of each animator track, then the trigger times of each Wwise track can become staggered and fall out of sync, sometimes by several seconds.
One possible solution might be to move all rootmotion baking into the Initialise step of the Animator Track, have that execute before the Enter step, and use sub-frame timing to effectively start the cutscene timer at the moment Initialisation is finished?
Sorry for the late reply due to vacation (I’m still on vacation) 🙂
I want to actually try and completely remove the need of baking the root motion but rather only playback it without any baking, which was quite tricky for having a deterministic playback last time I tried.
You solution though to start the cutscene a bit later than always at 0 in case there is some latency involved in Initialization is also great and will try to do this first and see how it works!
Thank you 🙂
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.