【UE5.1】Add weather effects to the forest

 Based on the previous blog ( [UE5.1] Procedurally generated Nanite vegetation ), we added weather interactive effects to the forest, and interactive effects between characters and snow and puddles.

Table of contents

Effect

step

1. Preparation work 

2. Add super dynamic sky

2.1 Modification time 

2.2 Alternation of day and night

3. Add super dynamic weather

3.1 Changing the weather 

3.2 Add interactive effects between weather, terrain, and plants

3.3 Add interaction effects between characters and snow


Effect

step

1. Preparation work 

1. Copy the dynamic weather plug-in to the Content folder of the project

2. Delete the "Lighting" folder and all its contents in the outline

2. Add super dynamic sky

Drag a super dynamic sky blueprint into the scene

2.1 Modification time 

You can modify the time of day by modifying the value of the parameter "TimeOfDay". The parameter range is 0~2400. Then it can be concluded that when the parameter value is 1200, it means 12 noon.

2.2 Alternation of day and night

You can turn on the day and night effect by checking "Animate Time Of Day"

Set the length of day and night through the parameters "Day Length" and "Night Length"

 

Run the game at this time and you will see the effect of day and night alternation (the day length is set to 0.3 and the night length is 0.15, so the day and night alternation is very fast)

For more parameter introduction, please refer to the official video link: https://www.youtube.com/watch?v=b52npy-XUdQ 

3. Add super dynamic weather

Add a super dynamic weather blueprint to your scene

3.1 Changing the weather 

You can set different weather effects by setting the parameter "Weather"

3.2 Add interactive effects between weather, terrain, and plants

It is necessary to add material functions to terrain materials and plant materials.

1. Open the terrain material "MTL_BF_Landscape_MASTER"

Add a "Dynamic_Landscape_Weather_Effects" node at the following location

2. Open the terrain material instance "MTL_BF_Landscape"

Check all options to turn on dynamic weather effects

3. Open the material "Wall_Example"

Copy the following nodes

4. Open the material "MTL_MW_Cover_MASTER"

Paste the copied node

5. Open the material "MTL_MW_Foliage_MASTER" and add the same node

 

6. Add the same node as "MTL_MW_General_MASTER"

7. Open "MTL_MW_General_Nanite_MASTER"

8. Select the dynamic weather blueprint "Ultra_Dynamic_Weather" in the outline, and then check "Enable Dynamic Landscape Weather Effects"

We can set the snow thickness

puddle coverage

At this point you can see the water accumulation effect on the ground:

When we switch to snowy weather we can also see the plants covered with snow

3.3 Add interaction effects between characters and snow

1. Open the character blueprint, here is the third-person character template blueprint "BP_ThirdPersonCharacter" 

Add the weather interaction component "DLWE_Interaction" under the mesh level

Make a copy

The parent sockets are set to the character's left and right foot bones respectively.

You can set the sound volume of the left and right feet when walking on the snow.

At this time, you can see the footprints when walking in the snow and hear the sound of walking:

Similarly we can set the sound when the character passes through the puddle:

Guess you like

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