Tuesday, November 28, 2023
HomeVisual Effects Repair ribbon hole Mini Tutorial

[Niagara 5.0] Repair ribbon hole Mini Tutorial


Repair ribbon hole

RibbonFix001

The intention of those mini tutorials is to have simply searchable reference for the implementation of primary concepts in Niagara.

At this time I need to have a fast have a look at how we would clear up a typical problem when utilizing Ribbons.
Until you spawn a particle each single body, there’ll at all times be a niche between the supply of the ribbon and the ribbon itself.

Spawning a particle each body, generally is a resolution in some circumstances, nevertheless it’s usually higher to discover a resolution in which you’ll bridge that hole
There are a couple of methods to take care of this, however I’d wish to current a reasonably primary one that may work in numerous conditions.

Primary Setup
The technique right here might be to reliably discover the final spawned particle and snap it to our supply location (the emitter place on this instance).
We do that by, for each particle, evaluating the index of that particle with the entire variety of particles which were spawned within the emitter. Within the case that we do have the final spawned particle, we set the Place of the particle to the simulation place.

Now to know the entire variety of particles we nonetheless must hold monitor of that by some means.
To do that, we’ll regulate the SpawnPerUnit and SpawnRate modules. (You’ll in all probability need to create a replica for this.)
On the finish of the modules we will add a bit part that reads the spawn depend and provides it to Emitter.TotalParticlesSpawned.

And increase now the final particle of your ribbon will stay connected to the supply.

Besides that’s not totally the case.
On account of tick order it’s attainable that this script might be executed earlier than the motion script of the supply.
This could create a one body hole between the final particle and the supply.
We will clear up this on a case by case foundation, by forcing the Niagara Tick to later within the body.
That is usually ailing suggested as a result of it takes away the engines capability to utilize threading in an environment friendly method, but when used sparingly it may be useful.

And there you go, a fairly sturdy technique to make your ribbons gap-less.

Get pleasure from.




9 Likes

After GPU Ribbon is offered to Niagara I’m not too bothered with this problem, however I nonetheless need to share a much less correct however barely simpler resolution to the hole problem when utilizing Spawn Charge.

This method assumes the consumer to stay with a continuing spawn price worth, as a result of there may be little or no level of randomizing the spawn price worth each body in a ribbon emitter. Anyway as a result of the spawn price worth is fixed, we will merely calculate the spawn interval in second by 1/SpawnRateValue, then in Particle Replace stage, do a Lerp Place and select between SimulationPosition and Particles.Preliminary.Place by checking if the Particles.Age is smaller than the spawn interval.



2 Likes

@ifurkend Humorous sufficient, somebody asking the right way to do your described methodology for spawn per unit, is what triggered me to search for the introduced methodology.



1 Like

If we’re speaking about the identical man, he really wished the most recent particle to transcend the actor place, which is feasible with our strategies, nevertheless it saddens me that it not issues now (not due to the GPU ribbon).

That is really the identical methodology as Partikel’s tip proper, simply not achieved in scratchpad :smiley:
and thanks for the good tip as effectively Niels!



1 Like

I’ve a query, as a result of I’m unable to learn what’s earlier than this (or extra like they’re too superior!), what does SpawnOutputInfo return? To my understanding, it appears you’re taking out the each depend of particle spawn and accumulate them to the Emitter.TotalParticlesSpawned.
It could be nice should you may clarify extra about this half, thanks.

it appears you’re taking out the each depend of particle spawn and accumulate them to the Emitter.TotalParticlesSpawned.

Yup, that’s precisely what we’re doing.

Spawn data is the construction a spawn module passes onto the engine to point that it desires to spawn new particles.
Should you open up one of many epic offered spawn modules, you’ll discover that the final node in these modules is the one I marked in white.

So we merely copy the epic present modules and put these nodes within the image behind it to examine what number of particles this modules desires to spawn and add it to our depend.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments