Language:
Page Info
Skill Level:
Engine Version:

2. Required Asset Creation & Setup

For the fluid surface to function correctly, we are going to need to create some new assets. We'll also use some assets created for the Height Field Painter. In the following section, we will go over how each of these assets needs to be setup and any special properties that you will need to use.

Render Target Creation & Setup

For the fluid surface to function correctly, we will need to create four new Render Targets by right-clicking in the Content Browser and from the menu that is displayed, go to Create Advanced Asset > Materials & Textures to select the Render Target option.

HFP_RT_Creation_00.png

Once you have created four new Render Targets, give them the following names:

  • Height0

  • Height1

  • Height2

  • HeightfieldNormal

FS_Render_Targets.png

Material Creation & Setup

For the fluid simulation to work, we are going to need to create two new Materials; one Material for the water, and one Material for the heightmap simulation. To create these Materials, right-click in the Content Browser and from the Create Basic Assets list, select the Material option.

Do not forget to Compile and Save your Blueprint so that it can be used.

  • WaterMaterial is what makes the surface look and act like water. Before you start to build WaterMaterial, make sure the following options have been set in the Details panel for the WaterMaterial.

    • Blend Mode: Translucent

    • Lighting Mode: Surface Translucency Volume

    • Used with Static Lighting: True

    • Uses Distortion: True

    • Refraction Mode: Pixel Normal Offset

    Copy Expression Graph

    FS_Water_Material.png

  • The HeightSim Material is used to propagate the various waves that happen when you shoot at the surface of the fluid simulation. Before you start to build the HeightSim Material, make sure the following options have been set in the Details panel for the HeightSim Material.

    • Shading Model: Unlit

    • Allow Negative Emissive Color: True

    Copy Expression Graph

    FS_HeighSim_Material.png

  • The ComputeNormal Material is used to create the normals that are needed for the water surface. Before you start to build the ComputeNormal Material, make sure the following options have been set in the Details panel for the ComputeNormal Material.

    • Shading Model: Unlit

    • Allow Negative Emissive Color: True

    Copy Expression Graph

    FS_ComputeNormal_Material.png

  • The MAT_ForceSplat is used to determine where the impact happened and how big the impact was. Before you start to build the MAT_ForceSplat Material, make sure the following options have been set in the Details panel for the MAT_ForceSplat Material.

    • Blend Mode: Additive

    • Shading Model: Unlit

    • Allow Negative Emissive Color: Checked

    Copy Expression Graph

    HFP_Material_Creation_03.png

    The MAT_ForceSplat Material is the same Material that was used in the Height Field Painter . If you have already created this Material, feel free to use that one.

With the necessary assets now setup, in the next section, we will take a look at how each piece fits togther to create the Fluid Surface Blueprint.