Floating Damage & Healing Text Using Niagara In Unreal Engine 5

Sdílet
Vložit
  • čas přidán 21. 04. 2022
  • I'll show you how to build a simple and versatile "floating numbers" system to represent attack damage, spell damage, healing or any other events in your game!
    Download the digit textures used in the video if you don't want to make your own:
    drive.google.com/file/d/1QzsM...

Komentáře • 41

  • @XxNightmare128xX
    @XxNightmare128xX Před 2 lety +3

    Thank you, as always, for making these tutorials. Each one helps me better understand the UE5 engine and all the things it can do.

  • @vegavak
    @vegavak Před 8 měsíci

    This was a great tutorial. The step by step and error encountering is great.

  • @dannykay4649
    @dannykay4649 Před 2 lety

    Wow this was very cool! Awesome tutorial!

  • @3DWithLairdWT
    @3DWithLairdWT Před 2 lety

    This was a great tutorial! I think I'm going to implement this feature into my project today ^__^

  • @crazyguy7585
    @crazyguy7585 Před 2 lety +1

    Always Something New Tutorial Thanks🤩🤩

  • @chinccw4529
    @chinccw4529 Před 8 měsíci +4

    where is the OUTPUT SAMPLE TEXTURE SampledColor ? doesn't show up.😭

  • @VRDivision
    @VRDivision Před 2 lety

    Great tutorials mate!

  • @fanarshatal2692
    @fanarshatal2692 Před rokem

    Amazing stuff! Thanks a lot!

  • @ef3353
    @ef3353 Před rokem +1

    Wow I figured it was going to be a simple tutorial but its crazy

  • @MrPstewart84
    @MrPstewart84 Před rokem

    Great tutorial!

  • @johnreedy9098
    @johnreedy9098 Před rokem

    Hey there! How did you implement the particle effect for the fade out on the numbers that you showed in the preview? It'd be great to get an explanation of what Niagara settings you used.

  • @RiverFox_YT
    @RiverFox_YT Před rokem

    this is a great tutorial, i dont supose you would happen to know how i could implement this into the marketplace asset survival game kit by any chance?

  • @a_witcher94
    @a_witcher94 Před 2 lety

    any tips on how to make a waterfall with niagara that has collision and not gets killed when occluded since its gpu depth buffer collision?

  • @chriscoppens3535
    @chriscoppens3535 Před 8 měsíci +3

    Thank you for the tutorial! For me, I had to add a "Color" node under "Particle Update" in Niagara. Otherwise, the numberswould just be shown white, strangely enough. I followed the same steps as in the tutorial setting the Color mode to Direct Set in Initialize Particle..

    • @peterhall4216
      @peterhall4216 Před 8 měsíci +2

      Thanks for letting people know, I had the same problem.

    • @jafogx
      @jafogx Před 5 měsíci +2

      Thanks for sharing this! I was having the same issue.

    • @daniilborisov4154
      @daniilborisov4154 Před 4 měsíci

      You need to uncheck "apply Sampled RGBA to PArticle Color" checkbox in the Sample Texture model in Niagara Emitter

    • @daniilborisov4154
      @daniilborisov4154 Před 4 měsíci

      ​@@peterhall4216 You need to uncheck "apply Sampled RGBA to PArticle Color" checkbox in the Sample Texture model in Niagara Emitter

  • @aaronwe9850
    @aaronwe9850 Před 6 měsíci +3

    It seems that in later versions of Unreal engine 5 they removed the user param button in the Niagara system emitter.
    Do you have an example that works in this situation?

    • @iitwiyeah9907
      @iitwiyeah9907 Před 3 měsíci +1

      I found at the bottom left the tab user parameters and there I clicked on the + Icon to add the parameter

  • @dribbler8131
    @dribbler8131 Před 10 měsíci

    Many thanks for this! It was exactly what i was looking for but when the numbers are displayed how do you keep them facing the player??

    • @peterhall4216
      @peterhall4216 Před 8 měsíci

      Did you find a solution to this? Cannot figure it out...

  • @xDemorn
    @xDemorn Před rokem

    is this possible with float values?
    also wouldn't be better to use a map instead of a switch?

  • @ZackC
    @ZackC Před 2 lety +1

    How might you go about doing this with dynamic text, rather than a small number of individual digits in a hardcoded font?
    Would it be possible to draw text to a render target and utilize that texture for the floating number?

    • @buildgameswithjon7641
      @buildgameswithjon7641  Před 2 lety

      Hmm I will check into it for sure! Otherwise for various text and fonts you might use a UMG widget based approach instead.

  • @aleca8910
    @aleca8910 Před rokem

    Great idea. But still wondering why particles are not facing the camera by default without the necessity of rotating the system.

    • @sephtv2759
      @sephtv2759 Před 9 měsíci

      Because the particles you are spawning are on the grid and the grid doesn't rotate without the additional code. The particles themselves are facing you but they're so small you don't notice. Every single number you see is made up of 256x256 particles in the grid.

  • @gabrielmachado4648
    @gabrielmachado4648 Před rokem

    Is there a way to do this with the NS system set to CPU instead ?

  • @apaskiewicz
    @apaskiewicz Před měsícem

    I am in UE 5.4 and clicked "empty emitter" but when I did I couldn't find anything you had mentioned. Once I created a "SingleLoopingParticle" everything in the tutorial lined up. Is this right? When I am at the step of selecting the OUTPUT sample color, no outputs show on my list. What am I doing wrong? Only Inputs show.

  • @UE5Noob-zl7su
    @UE5Noob-zl7su Před 7 měsíci

    anyone know how to make the texture smaller ?

  • @maiworld_
    @maiworld_ Před rokem

    Will this replicate for multiplayer?

  • @Hacuda.
    @Hacuda. Před rokem

    Thank you very much for the lesson! Please tell me if you know if there is any way to make this replicated for a dedicated server?

  • @arkitektual
    @arkitektual Před 2 lety

    when you are searching for the sprite, you can just click the FolderMagnifying glass icon next to it in the details pane. rather than search for it

    • @buildgameswithjon7641
      @buildgameswithjon7641  Před 2 lety +1

      Thank you! I always forget you can do that.

    • @arkitektual
      @arkitektual Před 2 lety

      @@buildgameswithjon7641 you bet. This tutorial was great. I was working on a project and was implementing blast damage and I got tired of debugging manually so I took a quick detour to do this to easily see when damage applied to nearby actors.

  • @ChrisCohen
    @ChrisCohen Před 10 měsíci +1

    This is going to be really resource intensive, and I can't see what the benefit is, when you can just spawn a UMG widget with some text in it. You even mention this in a comment.
    If it's really important to have particle FX, like if you wanted text to drift away like smoke, sure, use Niagara. But for numbers that appear for just over a second, no player will know if you use a widget versus anything else.
    But they certainly will know when their FPS drops because the game has spawned dozens of emitters and thousands of particles.

    • @alzahelb6053
      @alzahelb6053 Před 8 měsíci +1

      From what I've read you might be wrong in thinking that widgets would be more efficient. The consensus of my internet research seems to think the widgets are more exepensive than niagara. I'm not an expert tho that's juste what I've read trying to compare both solutions. Also I believe Lyra does it this way.

    • @sephtv2759
      @sephtv2759 Před 8 měsíci +2

      It is indeed expensive. I've tested this on multiple damage events at once, hitting 20 targets at once and each hit triggering another hit in a 3 meter radius, suffice to say it hitched like mad, dipped into the 10 fps ranges, spawned millions of particles at once, not great.
      There is however a way to make this much cheaper than even widgets.
      1. First thing you have to fix is the GPU bottleneck, the sheer number of particles and all the alpha testing they do. To fix this I tried lowering the scale and reducing the number of particles but it still wasn't enough, so I decided to ditch showing particles and using meshes for each Digit. Modelled them out in blender
      After doing this, I solved the GPU bottleneck by spawning a single particle per digit using meshes in the mesh renderer, however now there was a CPU bottleneck because of the sheer number of systems this spawns, because you're getting a system per digit which is bad.
      2. Using the spawn particles in grid and making the X count a user variable I managed to fit the entire number from my damage system into the grid count, so it spawned a single niagara system, as opposed to one per digit, with as many mesh particles it needed to display the number.
      Doing the same stress test again only resulted in a 1-2 ms spike on the CPU which is more than acceptable considering the sheer number of damage events I was triggering.
      Setting this up is a bit tricky, you'll have to add all the digit meshes in the mesh renderer, then in initialize particle you have to set the mesh renderer array visibility to direct set, then
      the mesh renderer mesh index to select int from array, then the array sampling mode to direct set and the direct array index to generate int from counter, then set the intial value to -1 so it starts with the right index. In the end transform the int selection array into a user parameter where you'll have to use that, together with the user parameter you've made in the X count of the spawn on grid and do some blueprint logic to tell the system how many to spawn and what int to use from the array for each digit depending on the numbers you send it from your damage system.
      Bear in mind that using meshes instead of multiple sprites to form a texture will greatly reduce the ways you can animate your particles, curling, fading, exploding away etc as you're only spawning a single mesh particle per digit, for me it's a good trade off because of the performance gain. I can use material magic to make the numbers animate in a fancier way anyway.
      Thank you @BuildGamesWithJon for the initial idea!

    • @DailyPaily
      @DailyPaily Před 8 měsíci

      @@sephtv2759 for one use is great....

    • @grizzle2015
      @grizzle2015 Před 5 měsíci +1

      @@sephtv2759 thank you for this.

  • @mattman2223
    @mattman2223 Před 11 měsíci

    Great tutorial!