Unreal Engine 5 - ALS vs Motion Matching (Performance Profiling)

Поделиться
HTML-код
  • Опубликовано: 18 июн 2024
  • So in my last video a lot of viewers made some great points that would indicate my test wasn't entirely balanced. So I decided to redo it with Live Insights Profiling.
    Join our Discord: / discord

Комментарии • 29

  • @unrealdevop
    @unrealdevop  Месяц назад +7

    So basically this is what I take from it....if you want a really simple animation system, it's probably best to not go with Motion Matching. If you want a really fluid one, you can and the performance will be similar. Depending on how Simplistic it is, the performance may be better using traditional animation setups. If it's complex, it may be about the same. Either way it doesn't seem like performance is going to be a serious factor unless your trying to run your game on an Atari.

  • @Girugi
    @Girugi Месяц назад +5

    One of the first things epic says in their lectures about profiling is to never run profiling in the editor.
    Also, please consider that the work of these animation system are likely distributed over multiple frames with an uneven load. What you want to check for is accumulated values of multiple kn stances over a longer time. Also, both systems might scale differently when multiple different instances are running and memory in the project changes.
    I think if we want actually useful and actionable data, sadly much more involved and I depth testing is needed.
    But thanks for doing a brief initial test none the less.

    • @unrealdevop
      @unrealdevop  Месяц назад

      Yeah, I'll keep this in mind next time.

  • @FPChris
    @FPChris Месяц назад +2

    Cool. I’m currently taking a course on ALS. I’ll finish that for now. Can’t hurt to know it.

  • @Cluxiu
    @Cluxiu Месяц назад +2

    Thank you for the video brother

  • @brokenhdd9291
    @brokenhdd9291 Месяц назад +3

    Honestly, profiling Perf for unreal is just so random. You can have the exact same hardware, identical uproject, and get different results by the luck of the dice on your system installation.
    And if you have an AMD CPU, Your perf in UE5 might be trash or might be fantastic.
    Some of my coworkers have better hardware in every conceivable way, but for some reason I get triple the performance of them. And one our QA has the same machine as me, and he gets nearly double my perf WHILE recording and streaming the playtests.
    Regardless, they are using Motion matching in Fortnite on all players and NPCs. Clearly they are designing the system with scalability in mind. (Change trajectory samples, Animation Budgeter, PSD size, Prediction iterations, etc)
    Technical Animators and engineers will budget the performance of skeletal meshes. Very few games require 50 characters all ticking at full fidelity on screen. If you're making an RTS, it'd be very silly to make the units use motion matching.
    Just going thru the sample, there are so many optimizations that can be made on top of the sample.

    • @unrealdevop
      @unrealdevop  Месяц назад +1

      Yeah I understand but after all the comments on the other one I figured I would do it and at the very least it still proves that the performance is not Worse. Which was really my goal. I didn't want people being lead to believe that the performance of Motion Matching is just really bad.
      Very few games though will actually have 50 characters ticking on the screen all at the same time.

  • @Disastorm
    @Disastorm Месяц назад +1

    I think the official stream also said that performance was similar so this seems consistent with that. I think they also mentioned that for the old system, some people might blend a bunch of animations at the same time, and that might be one area where the new system performs better since it never blends more than 2 ( during a transition ).

    • @unrealdevop
      @unrealdevop  Месяц назад

      Yeah, at the very least we can now say that performance is at least comparable. I just didn't want people thinking it was worse then it really is.

  • @shannenmr
    @shannenmr Месяц назад +1

    You should profile the Lyra AnimBP (without converting anything to C++) against this because I found at scale (10+ AI) it was at-least 3 -4 times faster then ALSv4 (BP) and around 1 - 2 times faster than ALS-Refactored (C++).
    Would also like to see that KelechiApakama's reply about his profile numbers since per your finding those UpdateValues/Generate Trajectory functions is the majority of time and most of that can probably be moved to the Blueprint Threadsafe Update function meaning that can be moved to a worker thread... sure it might take the "same amount of time to perform" but it can split it across multiple threads (for each AnimBP) leading to way lower overall times to generate a frame. (higher FPS)

    • @unrealdevop
      @unrealdevop  Месяц назад

      Well I don't believe that you can handle the Trajectory like they did in a thread-safe manner right now. They have acknowledged that they want to move this stuff over to Blueprint-ThreadSafe and stated that there were reasons why they couldn't. It don't surprise me that Lyra would be faster then ALS though, it was a pretty heavy system...he didn't hold back, he wasn't focusing on performance but quality.

  • @gnoel5722
    @gnoel5722 Месяц назад

    Thank you for redoing with better accuracy. In your opinion, why and how did PrismaticaDev arrived to the conclusion that Motion Matching was -20fps compared to ALS?

    • @unrealdevop
      @unrealdevop  Месяц назад +1

      I believe that it was simply the fact that he had a single node running on the AnimGraph with very little logic needed. Most of the performance loss is caused by calculating all the logic. If you noticed most of that hit was not by the Pose Search in the Motion Matching system....but was actually caused by the Essential Values Function, and the Trajectory Function (They manually calculate a more sophisticated Trajectory then is offered by the Trajectory Component)

  • @andy0x58
    @andy0x58 Месяц назад

    ALSv4 that You used is fully Blueprinted ?

  • @mikaelpettersson5916
    @mikaelpettersson5916 Месяц назад

    could you compare this to the standard motion i UE . (the anim blueprint that comes with the template) so we have a baseline.

    • @unrealdevop
      @unrealdevop  Месяц назад

      Yeah I could do that later today, I'm going to assume it will outperform Motion Matching since it's so simple.

    • @noobking6683
      @noobking6683 Месяц назад

      I think lyra can also be considered for baseline.

    • @unrealdevop
      @unrealdevop  Месяц назад

      @@noobking6683 Yeah but I don't want to go nutz with this, I would like to make a lot of comparison videos but I'm just a bit too busy right now.

  • @OverJumpRally
    @OverJumpRally Месяц назад

    I don't understand what changed from the other video where performance were 36% higher...

    • @Roystoncinemo
      @Roystoncinemo Месяц назад

      I think because now he swapped with ue4 Manny, There is essentially double the skeletal mesh (Uefn live retargeted to Ue4) so that might affect the performances. Enabling threadsafe for essentialupdates node will also increase performance overall!

    • @unrealdevop
      @unrealdevop  Месяц назад

      @@Roystoncinemo I'll have to look into this but I suppose that could play some role somewhere in performance but I'm not sure if it would actually effect it to that degree, profiling alone decreases performance and it did drop 10 fps. At the same time though the ALS_Manny has like 16+ Material Slots, so I decreased it to 2 and that brought the draw calls from ~4000 down to ~1000. I did not see the Retargeting under the Insights Profiling so I don't think that was accounted for in the final ms hit. I will go back and look though to see if that was included. If it was, then it was a small enough sliver that I overlooked it and therefore likely had a minimal effect on it. More like would be the fact that I am using the UE4 Manny and not the UEFN which may actually be more performant, although I can't say for certain.

    • @Roystoncinemo
      @Roystoncinemo Месяц назад +1

      @@unrealdevop Retargeting itself wont have big impact, but because of it there is now two skeletons present inside the blueprint. So double the bones present in the scene, That might have a slight impact overall. But ya this wont change the AnimBp cost. With further optimization Motion Matching will become the standard soon for fluidity and performance!

    • @unrealdevop
      @unrealdevop  Месяц назад +1

      @@Roystoncinemo Yeah I believe so, there were some things they had to do a particular way to work around current limitations so if nothing else the performance will improve over time.

  • @artdrawing6682
    @artdrawing6682 Месяц назад

    You have totorial to make this system from zero

    • @unrealdevop
      @unrealdevop  Месяц назад

      Not sure what you mean actually.

    • @zinetx
      @zinetx Месяц назад

      @@unrealdevop I guess that was a question.
      "Do you have a tutorial series on how to make (configure?) the new Motion Matching system from scratch?"

    • @unrealdevop
      @unrealdevop  Месяц назад +1

      @@zinetx Nah, I've done it with Lyra Animations but decided not to do a complete breakdown until I figure out how to fix all the problems. As soon as I get this new Layering System out of the way I'll work on that.