Spawning particles from the edge of dissolving?

As we already know dissolving is one of the most amusing, wonderful thing when doing VFX. Up until now, I still try to figure out a way to spawn particle as things dissolve. However, I don’t really want to rely on the BP, just material and Niagara.
My material is pretty simple, I’m using valuestep to do the dissolve, my gradation is a spheremask multiplying with a noise texture (so I can control the location of the center of dissolving). And with little trick I render the edge of the dissolving too. My current situation is like this.


I want to spawn particle basing on the position of the edge, but I don’t know how to feed that position info to my other emitter. Does anyone have any idea?
edit: I tried many tutorials on youtube, mostly CGHow’s but his work is a bit different from what I want, and it requires Blueprint. I just want to create only a Niagara System.

6 Likes

you could try something like this https://youtu.be/YZ3TIqwqOWY?t=2700 by adding/feeding the disolve edge to the material if they are driven by a material parameter collection

3 Likes

under niagara you could achieve that via texture sampling like in this serie of video https://www.youtube.com/watch?v=EOOFIuA7Jsg

2 Likes

My approach to this was to have the Niagara system sample the GBuffer and spawn the particles where the contents met my spawn criteria, If the sampled value is greater than 1 (emissive pixel) then place a particle.

2 Likes

I’m actually leaning to this method but I still don’t know how to execute it. Let’s say.
I create an UV mask connecting to OpacityMask. I also have the edge UV running data too but Idk how to feed it to the scratchpad.

The GBuffer approach doesn’t need to know anything about your mesh/material as it is just looking at the rendered image.

The most basic approach you could do is simply in your particle spawn stage get the screen coordinate from the particle position, sample the GBuffer SceneColor and if it is above 1 then it is probably emissive and allow the particle to live, if it is below your threshold kill the particle. Now you have particles that only exist where the edge was glowing.

hm, interesting. What if my core material is also glowing? Does that method not work here? I mean I put it black above just to test it out. But when applying on the real mesh it might have value >1 connecting to emissive.

Yeah if it is also glowing or even reflecting a bright light then you will need another value to confirm it is what you are after. What I did in my use case was to create a specific signature such as > 1 for colour, 1 for roughness and 1 for metal. Some combination you are unlikely to use elsewhere, then so long as your dissolving edge matches that criteria it should work.

https://www.youtube.com/watch?v=IvLO60sacgI this vid from TharleVFX might help you :slight_smile:

3 Likes

And his follow on video also deals with stuff that may help you on this https://www.youtube.com/watch?v=nLVAAwmo2wc

this is cool but it’s kind of complex and requires specific vertexcolor on it. I think I need a more common technique.

20220220_112147 00_00_00-00_00_30
Solved this. The gist is to use the same logic in both material and in niagara system. There’re a lots of way to dissolve but this is my dissolve_logic.



Thanks Partikel and Wyvery for the instructions!

18 Likes

Looks really cool!

I assume this script is run on Update in order to update the dissolving texture on tick, but setting the Particles Position on update is causing a lot of flickering for me. Any ideas what i might be doing wrong?

The dissolve module I made is set in Spawn Stack. Since it returns intial position of the particles basing on the static mesh location by rejecting particles outside of the edge. If it is set in Update Stack, the particles won’t move.
What I do was: Dissolve a mesh renderer particle, using that same dissolve_logic inside the Scratchpad module. Checking the edge of the dissolving, rejecting particles that are outside of the edge.

2 Likes

Thanks a lot for the reply, really helps :slight_smile:
I’m gonna have another look at this later today.

Looks great! As a Niagara neophyte I’d love to see any more tips/screenshots on how you accomplished this.

I appreciate your engagement with the thread. Together, we tackled the question and successfully unraveled the mystery, as evidenced by the entire discussion. However, the solution presented earlier might now be outdated, and there exist several additional methods to further expand upon it.
I’m happy to answer any questions related to the topic.

1 Like

I’ve been struggling with getting a disintegration mask where the particles actually follow the glowing edge when animated. I’ve tried several YouTube tutorials on the subject and they all kind of gloss over that part.

I can get the mask with the glowing edge and particles emitting from that edge but then they won’t update to follow the mask as it’s animated going from solid to disintegrated. Or in another version I can get the particles to follow the glowing mask edges but I can’t get it to work correctly with the objects native material.

You’re results here look very close to what I’m going for. Would you approach this the same way if you had to do it again today or are there easier ways to do it now?

The version above is only for static location, if your mesh has moved away from the origin position and rotated around, you have to do some transformation for the particle position to get updated correctly.
Currently, I’d still approach the same way, but better and optimized. I haven’t found any methods that’s easier to do this but I hope someone will :smiley:

2 Likes