Niagara_Particles official case of UE4/5Niagara particle effects: 1.5->2.3

Table of contents

Previous articles:

1.5 Blend Attributes by Value

launcher update

 particle generation

 particle update

2.1 Static Beams

 ​edit

Launcher update:

 particle generation

 particle update

2.2 Dynamic Beams

The effect before starting the simulation is:

The effect after starting the simulation is:

launcher update

particle generation

​edit

 particle update

2.3 Multiple Renderers

 launcher update

 particle generation

 particle update


Previous articles:

Niagara_Particles official case of UE4/5Niagara particle effects: 1.1->1.4

1.5 Blend Attributes by Value

The name of this special effect is translated as: mixing attributes by value

 So what exactly does it mean, let's turn on this special effect to see.

First, let's take a look at the manifestation of this special effect:

At the beginning, particles are emitted from the center to the surroundings, and the speed of the particles gradually decreases, and then they are attracted by the center and rush over, and then slow down after passing through the center, and then die.

Experienced people can see at a glance what related modules and calculations are used, while inexperienced people need to start accumulating a little bit.

So let's take a look at how it is implemented:

launcher update

8 particles are generated per second

Then, 3-10 particles are randomly generated in an instant, and the type is each frame . [Here you can try to turn off the Spawn Rate to see the instant generation of Spawn Burst Instantaneous ]

 particle generation

Here we can see that the life cycle of the particles is 8, and the size is unified to 5. The question is, why are some particles bigger and some smaller? The reason must be in the particle update below .

 In adding speed, you can see that it is based on the point mode [change to other modes, which are similar to fountains, angles, etc., you can try it], and the speed is between 10-88 .

 particle update

This module Point Attraction Force , as the name suggests is a point of gravity , similar to the gravitational effect of the planet.

The first is an intensity of 1.8.

The second is the range 256.

The third is that the drop index is 0.5. After strengthening [such as 1], you can see that the ejected particles are not so far away.

After that, the next one is the position of the attracted particle and the point with this gravitational force .

That's why the ejected ball will return to the origin and overshoot.

The function of this is that when the particle starts to spray, it is the main calculation of the change from small to large and the color of the particle .

The realization is to meet the current position of the particle and the position of the particle, and then compare it to 150, do a normalization operation [that is, between 0-1 ], and calculate the initial value [this value will be in the following Color and Sprite Use in Size Scale ]

 The first is Color, from which we can know that it is a linear color, from red to blue, and the current particle color is determined according to our normalized value [between 0-1].

In Sprite Size Scale , we can see that all particle scaling is unified using the following functions.

The function is that the particle size is between 0.5-3, and the specific value is determined by the previously calculated value as alpha .

 

 Next comes the solver and renderer.

2.1 Static Beams

static bundle

 Open:

 

Launcher update:

The Emitter State here is different from before. The previous ones were controlled by the system, and the author did not explain it.

And first of all, this is self, which is calculated by the transmitter itself, not the system:

 Then the meaning of the following is: After letting the particles finish, kill the emitter

Then there is an infinite loop, one second interval:

 After that comes the Beam Emitter Setup :

The translated meaning is the electron beam emission device , let's see what is written inside:

The start is the simulated position used, that is, the starting position.

The end is a random location.

This is one of the reasons why this bundle was generated .

Here you can see that it generates 100 particles in an instant at 0 seconds [the particles are evenly distributed on the beam].

If you adjust the number of particles to 2 , you will find that the particles appear at both ends of the beam at the beginning and end .

 

 particle generation

Don't care about this, the function of this module ends to generate beam [beam]

When the particle is initialized, it can be seen that the life cycle is 1.25.

Then the size is based on the explicit ordering of connected particles in the strip, so according to the curve, it is small on the sides and large in the middle.

 

As the name suggests, this is the width of the generated strip, which is also increased from the middle to the surrounding through RibbonLinkOrder , so if you increase a certain value in the curve, you can clearly see that a certain end of the strip in the special effect changes. big effect.

 particle update

update status

Then there is the color, which changes linearly and also changes according to the increasing order of the particles.

 Noise is generated, which is why the strips slowly distort after they are generated.

 Reduce the linear velocity of the particles, the main effect of this is on the details:

 After that comes the solver and particle renderer and strip renderer .

2.2 Dynamic Beams

Dynamic Beams dynamic strips

Take a look at the effect:

The effect before starting the simulation is:

From the position where NS [ Niagara System ] is connected to a strip with fixed coordinates, this strip will rotate.

No matter how it is rotated, it will be connected from the position of NS to that fixed coordinate for rotation.

The effect after starting the simulation is:

The starting position will leave the NS position for a while and then return to the NS position, and then the ring will keep rotating.

Open it up to see how it works:

After opening the particle, we will find that it is different from what we see in the scene. This is because the end position of the particle strip is a world coordinate. 

launcher update

It can be seen that Absolute Beam Start is ticked, which means absolute beam start : simply speaking, if this is turned off, then its position is not the world position of NS [Niagara System], but the world coordinates 0, 0, 0 position.

As shown in the figure, the current coordinates of Beam End are world coordinates. You only need to change the Absolute Beam End below to false, then the coordinates of Beam End are the relative coordinates of NS .

The bottom is the coordinates of the initial position and the end position of the Beam beam *0.5.

This is a burst of 100 particles in an instant, but you may not know the function of these burst particles just by looking at it.

So we turn it down and we know that the effect of this is: the dance of the strip, if it is set to 2, the strip is a straight line.

3 moves in the middle, 4 starts to increase, 5...and so on.

particle generation

Generate beams, there's not much to talk about in there.

The life cycle of this initialization is different from before. It is passed in the CurrentLoopDuration of the emitter . This means that the life cycle of the initialized particle and the current cycle time of the emitter will be initialized. Simply put, it is the same life cycle as the emitter. .

 particle update

Those who understand the above two understand it all, so I won’t explain it much.

The Rotate Around Point , as the name suggests, is the main factor for the beam to rotate:

First of all, in the first red box, we can see that it is Multiply Float : it means A*B

The following Rotation Rate , you can see that it is -1 , which is the reason why the beam turns to the left , and changing it to 1 will turn to the right . 【Changing B above has the same effect】

Then there is the radius below, the meaning is very simple, a 0-1-0 curve made through the index of the chain , the parameter is 55, and the center of rotation is the position of the particle.

The last is the color, which changes linearly according to the parameters of the chain, that is, the reason why it is blue at the beginning and red at the end. 

2.3 Multiple Renderers

 This particle effect is different from the previous ones. The emitters in the previous particle effects are all one emitter and one renderer inside.

And there are 3 renderers in this one, namely Sprite, strip, and model.

Next, let's take a look at the transmitter in this NS:

 launcher update

The first is generation, generating 2.5 particles per second【】

 particle generation

Initialization in particle generation, we have seen a lot before, but really all used, this is the first time in this case:

It can be seen that the life cycle of the generated particles is 6 seconds, the point is a green [Sprite], and the size of the Sprite is 8.

After that is the model, the size is 1, 1.5, 1.5, and the mode is not uniform.

The width of the strip is 2.5.

Set the band color:

 Set the particle's birth position, circle:

 particle update

Transform the size according to the lifetime:

Vortex Force is vortex force ,

Vortex Force Amount is the power of the vortex . The larger the adjustment, the larger the particle trajectory will be.

Vortex Axis is an axis used to derive the direction of the vortex.

In the Origin below, you can see that the center point of the vortex is where the emitter is located.

Then the pulling amount of the vortex is 200. If you increase it, you will find that the moving speed of the particles will be pulled back and forth very quickly.

The Last Falloff was an impact.

If the radius is 100 and the exponent is 1, it means that the farther you are from the center, the faster you will move [you can imagine the difference between the force on you at the center of the vortex and the force on your periphery. [You can refer to the understanding of black holes]]

Then the last is the reverse, that is to say, if the closer to the center, the slower the speed , after ticking it is: the closer to the center, the faster the speed.

drag, a force of 0.5. 

The previous one was the size of the sprite, and this one is the size of the arrow model:

Finally there is the solver, and 3 renderers. 

Guess you like

Origin blog.csdn.net/q244645787/article/details/132379196