Using Volume Textures

Taking a look at how to use Volume Textures in Materials

Windows
MacOS
Linux
On this page

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 of the Content Browser and from the Create Basic Asset section, select the Material option.

    VolumeTexture_CreateMaterial.png

  2. Give the new Material a name of MAT_VolumeTexture and double-click on 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.

Tags
Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback