Language:
Page Info
Engine Version:

Using Volume Textures

Choose your OS:

Once you have created a Volume Texture, you will need to set up your Material in a particular way so that the Volume Texture will render properly. In the following How - To we will take a look at what needs to be done to a Material so that it can be used with Volume Textures.

Steps

  1. First, right-click inside the Content Browser and from the Create Basic Asset section, select the Material option.
    VolumeTexture_CreateMaterial.png

  2. Name the new Material MAT_VolumeTexture and double-click it to open it.

  3. Over in the Details panel, under the Material section, set the Shading Model to Unlit.

  4. Next, search for the TextureSampleParameterVolume Material Expression node and add it to the Material Graph.
    VolumeTexture_AddVolTextureNode-1.png

  5. Name the TextureSampleParameterVolume node VolumeTexture.

  6. Locate and select your Volume Texture in the Content Browser. With the Volume Texture selected, click the white arrow next to the Texture input to load the Volume Texture into the TextureSampleParameterVolume node.

    Click for full image.

  7. Then add the following Material Expression nodes to the graph and connect them to match the image below.

    Click for full image.

    • LocalPosition

    • Object Local Bounds

    • Subtract

    • Divide

  8. Once that has been completed, connect the output of the Divide node into the UV input on the TextureSampleParameterVolume.

    Click for full image.

  9. Next, connect the RGB output of the TextureSampleParameterVolume Material Expression node to the Emissive input on the Main Material node.

    Click for full image.

  10. Finally click the Compile and Save buttons to compile and save your Material.

End Result

When all of that has been completed, you will have a Material that can utilize Volume Textures. Keep in mind that the above example is only showing off the most simplistic use case of getting Volume Textures to work inside UE4. For more complex examples of how to use Volume Textures in UE4, check out the following blog post's.