Repair ribbon hole
The intention of those mini tutorials is to have simply searchable reference for the implementation of primary concepts in Niagara.
At the moment I need to have a fast have a look at how we’d resolve a standard situation when utilizing Ribbons.
Until you spawn a particle each single body, there’ll all the time be a niche between the supply of the ribbon and the ribbon itself.
Spawning a particle each body, is usually a resolution in some instances, however it’s typically higher to discover a resolution in which you’ll bridge that hole
There are just a few methods to take care of this, however I’d prefer to current a reasonably primary one that can work in numerous conditions.
Fundamental Setup
The technique right here will probably 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 whole 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 whole variety of particles we nonetheless must preserve observe of that someway.
To do that, we’ll modify the SpawnPerUnit and SpawnRate modules. (You’ll most likely need to create a duplicate for this.)
On the finish of the modules we will add a bit part that reads the spawn rely 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 solely the case.
Attributable to tick order it’s potential that this script will probably be executed earlier than the motion script of the supply.
This may create a one body hole between the final particle and the supply.
We are able to resolve this on a case by case foundation, by forcing the Niagara Tick to later within the body.
That is typically unwell 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.
7 Likes
After GPU Ribbon is obtainable to Niagara I’m now not too bothered with this situation, however I nonetheless need to share a much less correct however barely simpler resolution to the hole situation when utilizing Spawn Fee.
This method assumes the person to stay with a continuing spawn fee worth, as a result of there may be little or no level of randomizing the spawn fee worth each body in a ribbon emitter. Anyway as a result of the spawn fee 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.
1 Like
@ifurkend Humorous sufficient, somebody asking methods to do your described methodology for spawn per unit, is what triggered me to search for the offered methodology.
1 Like
If we’re speaking about the identical man, he truly wished the most recent particle to transcend the actor place, which is feasible with our strategies, however it saddens me that it now not issues now (not due to the GPU ribbon).