Download

Text as particles in Niagara

Hi there!

Can I use text (random letters) as particle source in Niagara?
Here an example:

I wouldn’t mind if the text is not 3D. After two days researching, I didn’t find something like that in UA4.

Is it possible?

Is it impossible?

Of the top of my head I can only think of using a Widget Component to render a UUserWidget with some text to a texture and use the texture to sample a Niagara Particle system spawning on a plane.
I don’t know how easy it currently is to render a widget to a texture, but we have done this to dynamically render text to a texture which later will be used as a decal.

An easier but more hacky approach would probably instead of the FSlateWidgetRenderer to render the text using a 2D Capture component and use the resulting texture in Niagara.

Thanks for your reply! Isn’t there a more straight forward way to do it?
I have been just stuck for three days (I mean like 12hrs. days) trying to do some stuff… don’t want to invest like two weeks of my life in that task.

Any other suggestions?

Not that I am aware of if you want to do it accurately. Depending on your needs you also can just drive a Material Animation and a Niagara Particle system spawning random characters at about the same location the Material Animation lets the text disappear, if it is not necessarily required that the letters spawn ONLY EXACTLY inside the existing text.

Thank you again for your try, but “UUserWidget”, “FS1ateWidgetRenderer”, “2D Capture component” … sound like German to me (and after many years living in Berlin, German still sounds like German).

I also googled how to drive a Material Animation in Niagara and there’s not even one entry.

I am afraid making this on my own, would take me the whole winter.

Is it to difficult to feed Niagara particles with just random letters??

Ohh - if you are just talking about the random letter particle effect, those can easily be achieved by putting the letters on a spritesheet and choosing a random index on particle spawn, see Create a Sprite Particle Effect in Niagara | Unreal Engine Documentation for some guidance. (Set SubImageIndex to a random value between the possible numbers upon particle spawn). Basically think of each Smoke Sub-Image as one letter.

OH YEAHHHH

I am really thankful, it took me a while to figure it out, but now I found what and how it works this Sprite Sheet thing, and it’s actually not complicated.

Thank youuuuuu … really

Now I will see if I could do the same but with 3D letters.

For the 3D Text you could try adding a Mesh Renderer for each letter and control them using the Renderer Visibility in the tag. Basiscally assign A to 0, B to 1 … Z to 26 and give each particle a random visibility tag in the range.

But since all the letters are in a sprites sheet, how can I add a Mesh Renderer for each letter??

Or you mean I could create 3D letters and then add them one by one?

Again thanks a lot for the hints, it took me just half an hour to figure out how to do it with the Sprite Sheet.

The 3D Letters have nothing to do with the Sprite Sheets anymore, you would create a 3D Mesh for each letter and assign each to a Mesh Renderer in Niagara. Now instead of setting the SubImageIndex , you set the Visibility tag. For each Mesh Renderer you set a different Visibility Tag (as mentioned A =0, B=1 etc). This is to prevent to render multiple meshes at the same location.

Wow.
Okay, makes sense. And I will have my letters in 3D!

Now I have been stuck like two hours trying to import a PNG (or PSD) with transparency into UA4, I checked and followed all the treads about this topic… it’s crazy how difficult UA4 makes very simple things.

One thousand thanks!

Sounds like you got on the wrong foot with UE4, importing a PNG with transparency is literally just drag&drop into the engine.

I’ve tried everything to importing a PNG with transparency, and it always looks wrong…
Here a few of the threads about it, in all of them they recommend NOT to use PNG (but PSD), and they describe procedures to save with alpha channel, which I tried, and then UA4 said “failed to import”. More than two hours I spent:

The preview will not look correctly, but if you open the Texture2D in the full Editor you see that it will be imported properly. The preview can’t display transparency.

I tried many many ways.

It’s true, the PNG displays correctly in the full Editor, but once I create the Material and the Instance Material and use it inside the Sprite renderer, it displays all the imperfections and the wrong areas in the particles too… it looks really messy and wrong.

The material needs to be transparent as well, and the transparent output of the texture needs to be hooked up to the opacity.

Holy ■■■■! Finally. I got it, I had to just add a black fill layer to the PNG in Photoshop … I really don’t understand exactly how it works.

@Pampersrocka Very much appreciated all your tips and comments. I already have what i wanted!

Have a great day

1 Like