Free blueprint multi-threading plugin - UE5

Поделиться
HTML-код
  • Опубликовано: 22 окт 2024
  • Link: github.com/Lob... .

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

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

    This is super interesting, but I'd be nervous about figuring out what functions can be multithreaded and what ones can't.
    Are there any guidelines for this, or any additional usage guidelines that we would need to be aware of?

    • @Mr.Sunshine2023
      @Mr.Sunshine2023  Месяц назад +1

      no, there is no such thing, in general, multithreading in blueprints has a lot of problems, and I understand why epics did not take it up

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

      @@Mr.Sunshine2023 I think your channel would be super interesting if you made some videos showing use-cases where it is safe to do blueprint multithreading.
      In general, isn't it true that as long as you are not messing with values on the game thread, it should be fine?
      So for instance, enemy AI calculations could be great, right?

    • @Mr.Sunshine2023
      @Mr.Sunshine2023  Месяц назад +1

      In fact, they are mainly designed for your personal calculations, not for the engine, if you have something that has a lot of loops, something like that. But one of the positive things, I think, is enabling Ticks on another thread. To me, this can be considered relatively safe, although there are downsides to this safety. If you enable it, the tick can be triggered on other threads, which will reduce the load on the game thread, but you can't put too much complex logic in there, because the game thread executes all other ticks and then waits for the ticks to finish in other threads, so if you don't interact with other objects in the world on the tick, but only with the object on which the tick is triggered, then it should be safe. Correct me if I'm wrong.

    • @Mr.Sunshine2023
      @Mr.Sunshine2023  Месяц назад +1

      I think I will develop it as needed and based on feedback. I may add other functionality for multithreading. So far, I have neither ideas nor time for this.

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

      @@Mr.Sunshine2023 One design scheme I see a lot is for using multithreading in conjunction with the game thread for specific jobs, e.g., game thread constructs a job and distributes to the other threads but waits for the calculations to be done, then recollects all the information.
      So like big loops of calculations that get added together can be parallelized, but the game thread is still waiting for the calculations to be returned. (Edit: In hindsight, I guess you talk about this exactly in your video huh?)
      I think this is a great topic and I haven't seen a ton of stuff on it for UE specifically, so this could be a good niche if you ever wanted to get into the education space here

  • @xavierbak2525
    @xavierbak2525 11 дней назад

    hey ! I need to calculate a lot of vectors, how should I go about it?

    • @Mr.Sunshine2023
      @Mr.Sunshine2023  11 дней назад

      Depending on your needs, the easiest option to use "Run task on background thread" or "Threaded logic" they do same job, but one of them you can call only in event graph because its latent node. In this case you will calculate everything in another thread and write to array, and after it ends it's call another logic in game thread where you can apply vectors to your game logic.

  • @RaphpowerSGSUModding
    @RaphpowerSGSUModding 2 месяца назад

    Doing what epic won't
    Thanks!

    • @Mr.Sunshine2023
      @Mr.Sunshine2023  2 месяца назад +1

      I just decided to learn a little bit about multi-threading, and since I learned a little bit, I thought I'd help people, since the plugins that are available now are quite simple. With the help of feedback, I will expand the capabilities of the plugin (unfortunately, I still can't publish it on the marketplace).

    • @RaphpowerSGSUModding
      @RaphpowerSGSUModding 2 месяца назад

      @@Mr.Sunshine2023 I understand, I would have loved this on 4.26 for our Rock N Roller coaster project.
      Enjoy the work you are doing, it's good!

    • @Mr.Sunshine2023
      @Mr.Sunshine2023  2 месяца назад

      @@RaphpowerSGSUModding I don't installed 4.26, but have 4.27, if needed can try build for it. Maybe it will work for you.

    • @RaphpowerSGSUModding
      @RaphpowerSGSUModding 2 месяца назад

      @@Mr.Sunshine2023 Maybe, i'm at the end of the project anyways, I managed to get good performance by nativizing bps.
      I'm not a dev tbh, just a TechArt guy mostly doing dev because we don't have one lmao, so my code might also be the issue.
      But I did some research and oh my god with threads it would have been so much better on some stuff!
      (Handling captures on separate threads, exporting images, etc... because I just try to do the heavy stuff either on begin play or behind a black screen when exiting a train for example)
      Don't try and go through the hassle, it's a fan tribute project to an extinct ride, I would not have enough time and willingness to use for that specific project at this state of developpment. I highly appreciate it though, and will check your work for future stuff

    • @Mr.Sunshine2023
      @Mr.Sunshine2023  2 месяца назад

      If you have any ideas, you can give us a suggestion to add

  • @capt3951
    @capt3951 25 дней назад

    how to compile for newer unreal engine version?

    • @Mr.Sunshine2023
      @Mr.Sunshine2023  25 дней назад

      @@capt3951 you have some errors? If I'm right, I compile for 5.4

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

    hey , i downloaded it ,, but how do i add it to my project ???

    • @Mr.Sunshine2023
      @Mr.Sunshine2023  Месяц назад

      build version? if yes, then just create folder Plugins (in project folder) and extract into this folder, otherwise same, but it will be needed to compile c++ (not hard, but still)

    • @Mr.Sunshine2023
      @Mr.Sunshine2023  Месяц назад

      ruclips.net/video/BR3Dbi_QGfk/видео.html its for engine