Floating Damage & Healing Text Using Niagara In Unreal Engine 5

2022 ж. 21 Сәу.
12 319 Рет қаралды

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...

Пікірлер
  • Thank you, as always, for making these tutorials. Each one helps me better understand the UE5 engine and all the things it can do.

    @XxNightmare128xX@XxNightmare128xX2 жыл бұрын
  • This was a great tutorial. The step by step and error encountering is great.

    @vegavak@vegavak6 ай бұрын
  • Always Something New Tutorial Thanks🤩🤩

    @crazyguy7585@crazyguy75852 жыл бұрын
  • Wow this was very cool! Awesome tutorial!

    @dannykay4649@dannykay46492 жыл бұрын
  • This was a great tutorial! I think I'm going to implement this feature into my project today ^__^

    @3DWithLairdWT@3DWithLairdWT2 жыл бұрын
  • where is the OUTPUT SAMPLE TEXTURE SampledColor ? doesn't show up.😭

    @chinccw4529@chinccw45296 ай бұрын
  • Great tutorials mate!

    @VRDivision@VRDivision2 жыл бұрын
  • Amazing stuff! Thanks a lot!

    @fanarshatal2692@fanarshatal2692 Жыл бұрын
  • Wow I figured it was going to be a simple tutorial but its crazy

    @ef3353@ef3353 Жыл бұрын
  • Great tutorial!

    @MrPstewart84@MrPstewart84 Жыл бұрын
  • 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.

    @johnreedy9098@johnreedy9098 Жыл бұрын
  • 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?

    @RiverFox_YT@RiverFox_YT Жыл бұрын
  • 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??

    @dribbler8131@dribbler81318 ай бұрын
    • Did you find a solution to this? Cannot figure it out...

      @peterhall4216@peterhall42166 ай бұрын
  • 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..

    @chriscoppens3535@chriscoppens35357 ай бұрын
    • Thanks for letting people know, I had the same problem.

      @peterhall4216@peterhall42166 ай бұрын
    • Thanks for sharing this! I was having the same issue.

      @jafogx@jafogx4 ай бұрын
    • You need to uncheck "apply Sampled RGBA to PArticle Color" checkbox in the Sample Texture model in Niagara Emitter

      @daniilborisov4154@daniilborisov41542 ай бұрын
    • ​@@peterhall4216 You need to uncheck "apply Sampled RGBA to PArticle Color" checkbox in the Sample Texture model in Niagara Emitter

      @daniilborisov4154@daniilborisov41542 ай бұрын
  • is this possible with float values? also wouldn't be better to use a map instead of a switch?

    @xDemorn@xDemorn Жыл бұрын
  • 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?

    @a_witcher94@a_witcher942 жыл бұрын
  • 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?

    @aaronwe9850@aaronwe98504 ай бұрын
    • I found at the bottom left the tab user parameters and there I clicked on the + Icon to add the parameter

      @iitwiyeah9907@iitwiyeah9907Ай бұрын
  • 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?

    @ZackC@ZackC2 жыл бұрын
    • Hmm I will check into it for sure! Otherwise for various text and fonts you might use a UMG widget based approach instead.

      @buildgameswithjon7641@buildgameswithjon76412 жыл бұрын
  • Is there a way to do this with the NS system set to CPU instead ?

    @gabrielmachado4648@gabrielmachado464810 ай бұрын
  • 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?

    @Hacuda.@Hacuda. Жыл бұрын
  • Will this replicate for multiplayer?

    @maiworld_@maiworld_ Жыл бұрын
  • anyone know how to make the texture smaller ?

    @UE5Noob-zl7su@UE5Noob-zl7su5 ай бұрын
  • Great idea. But still wondering why particles are not facing the camera by default without the necessity of rotating the system.

    @aleca8910@aleca8910 Жыл бұрын
    • 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.

      @sephtv2759@sephtv27597 ай бұрын
  • 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

    @arkitektual@arkitektual2 жыл бұрын
    • Thank you! I always forget you can do that.

      @buildgameswithjon7641@buildgameswithjon76412 жыл бұрын
    • @@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.

      @arkitektual@arkitektual2 жыл бұрын
  • 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.

    @ChrisCohen@ChrisCohen8 ай бұрын
    • 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.

      @alzahelb6053@alzahelb60536 ай бұрын
    • 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!

      @sephtv2759@sephtv27596 ай бұрын
    • @@sephtv2759 for one use is great....

      @DailyPaily@DailyPaily6 ай бұрын
    • @@sephtv2759 thank you for this.

      @grizzle2015@grizzle20153 ай бұрын
  • Great tutorial!

    @mattman2223@mattman222310 ай бұрын
KZhead