【UE Particles】Create night light effects

Table of contents

Effect

step

1. Create a dark environment

2. Production materials

3. Making particles 


Effect

step

1. Create a dark environment

1. Create a new default level, first delete the sphere reflection capture "SphereReflectionCapture"

2. Add a post-processing volume to the scene

Check "Unlimited range"

Set the motion blur strength to 1

 Set exposure compensation to 0

Set sky sphere, direct light, and sky light to be movable

The angle of the light source is adjusted to 90°

Atmospheric fog is also changed to rotate the Y axis 45°

Refresh the sky ball material

Change the intensity of direct light to 0.25

2. Production materials

1. Create a window shape

2. Create a material and name it "Mat_Light Point"

Open "Mat_Light Point", set the blending mode to "Additive", the shading model to "Unlit", and check "Double Sided"

Add the following nodes, where the radius of the "SphereMask" node is set to 0.5 and the hardness is set to 0

The complete node is as follows:

3. Create a material instance for the material "Mat_Light Spot"

3. Making particles 

Create a new cascade particle system, named here "P_Fake Light"

Turn on "P_Fake Light" and replace the material in the "Required" module with "Mat_Light Spot_Inst"

"Screen Alignment" is set to "PSA Rectangle" (Official website explanation: https://docs.unrealengine.com/4.27/zh-CN/RenderingAndGraphics/ParticleSystems/Reference/Modules/Required/ )

Check "Use local space"

 

The emitter is named "ray"

Removed "Initial Velocity" module

In the "Generate" module, set the number of generated to 3

In the "Life Cycle" module, set the life cycle to 3~5

In the "Initial Size" module, set the following size

At this point, the particle is similar to a light

We don't want this light to rotate as our camera moves, so we need to add a "Toward->Lock Axis" module

In the "Lock Axis" module, set the "Lock Axis Label" to "Rotate Z"

At this time, the light will only rotate along the Z axis with the camera, but not along the XY axis.

Add a "Position->Sphere" module, which will generate particles inside a sphere.

In order to make the light generation less blunt, we need to modify the "Intralife Transparency" in the "Intralife Color" module

insert a point

Change all values ​​in the first point to 0

Modify the second point as follows

This way the light can appear and disappear softer

Increase the number of particles spawned in the Spawn module

If you feel that the range of particle generation is a bit small, you can increase the starting radius in the "Sphere" module

Add a "Size->Size Scale" module and set the size scaling to (1.4, 0.8, 1)

In the material instance, modify the value of the parameter "Feather Edge" to 200, and change the blending mode to translucent

 Set the life color from light to dark

Change the generated quantity to 200 and set the transparency to 0.02

The effect at this time is as follows

If you feel that the generated range is too narrow, you can add a "Position -> Initial Position" module

Set the initial position range of a particle

Then change the radius of the "sphere" range to be larger

The effect at this time is as follows

In order to make the ground feel illuminated, a rectangular light source is used here.

Video link:

https://www.bilibili.com/video/BV1SP4y1u7vS?p=2&spm_id_from=pageDriver&vd_source=36a3e35639c44bb339f59760641390a8

Guess you like

Origin blog.csdn.net/ChaoChao66666/article/details/132831264