Language:
Page Info
Engine Version:

Volume Texture Reference

Choose your OS:

On the following page, you will find more information on using Volume Textures in Unreal Engine 4 (UE4).

Texture Editor - View Mode

By default the Texture Editor will show the Volume Texture as series of 2D tiles. You can also visualize what the Volume Texture will look like in 3D by changing the View Mode from Depth Slices to Trace into Volume.

VolumeTextureReference_ViewSettings.png

The image comparison below shows the difference between the two View Modes.

Depth Slices

Trace Into Volume

Texture Editor - Alpha

Volume Texture can also make use of alpha channel information. If the alpha channel is disabled, then the Opacity of each texel will be the intensity of the selected colors. In the image comparison below you can see the difference between using and not using alpha information.

With Alpha

Without Alpha

Compression Settings

While you can use compression on Volume Textures but there are a few caveats for getting compression to work correctly. 

  • To use compression on the volume texture and its mips, first execute the following code:

    bool UVolumeTexture::ShaderPlatformSupportsCompression(EShaderPlatform ShaderPlatform)

    This must return true for the given platform. In addition to this, the following code must also return the format as supported:

    ITargetPlatform::GetTextureFormats()

GetDefaultTextureFormatName() has been extended with an additional parameter called bSupportCompressedVolumeTexture.

  • PC Volume Texture Compression: Texture compression will be disabled if the user selects anything else than DX11 or DX12 in the PC target platforms. 

  • OpenGL Volume Texture Compression:  OpenGL applies a tiling pattern shuffling texels across X, Y and Z. This behaves differently than the other supported platforms, where the tiling only applies to X and Y. 

    Z tiling is not supported in our texture compressor currently so PC will end up using uncompressed data if OpenGL needs to be supported.

Volume Texture FAQ

The following section provides answers to some of the more common questions that UE4 developers might have about using Volume Textures in their projects.

  • Do we plan to support all texture compression formats on DX11/DX12?

    • We try to support compressed formats as much as possible.

  • What RHIs and platforms are compatible with volume textures?

    • Currently, Volume Textures are used throughout UE4, on most platform. If you look in the code, there is a global named GSupportsTexture3D which seems to be true on all platforms except for some Android phone.

  • Are there any Blueprint nodes that were made or changed to work with Volume Texture Assets? 

    • No currently you can only use Volume Textures within Materials.

  • What’s the intended use case for this feature?

    • Volume Textures can be use for a wide variety of effects like fluid simulation and volumetric fog.

  • Are there any known limitations to when using Volume Textures?

    • Currently Volume Textures can not be used with Texture Streaming or Render Targets.

Volume Texture Properties

The following table provides information on what each of the Volume Textures properties do.

Property

Definition

Source Texture

An (optional) reference texture from which the volume texture was built.

Tile Size X

The reference Texture tile size X.

Tile Size Y

The reference Texture tile size Y.