Thursday, November 30, 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 fundamental concepts in Niagara.

Right this moment I wish to have a fast take a look at how we would resolve a standard challenge when utilizing Ribbons.
Except 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, could be a answer in some circumstances, but it surely’s typically higher to discover a answer in which you’ll be able to bridge that hole
There are a number of methods to take care of this, however I’d wish to current a reasonably fundamental one that may work in a lot of conditions.

Primary Setup
The technique right here can 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 overall 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 overall variety of particles we nonetheless must preserve observe of that in some way.
To do that, we’ll alter the SpawnPerUnit and SpawnRate modules. (You’ll in all probability wish to create a duplicate for this.)
On the finish of the modules we will add somewhat part that reads the spawn rely and provides it to Emitter.TotalParticlesSpawned.

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

Besides that’s not solely the case.
Because of tick order it’s doable that this script can 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 will resolve this on a case by case foundation, by forcing the Niagara Tick to later within the body.
That is usually unwell suggested as a result of it takes away the engines potential to utilize threading in an environment friendly approach, 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.




6 Likes

After GPU Ribbon is on the market to Niagara I’m not too bothered with this challenge, however I nonetheless wish to share a much less correct however barely simpler answer to the hole challenge when utilizing Spawn Charge.

This method assumes the person to stay with a continuing spawn charge worth, as a result of there’s little or no level of randomizing the spawn charge worth each body in a ribbon emitter. Anyway as a result of the spawn charge 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.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments