Displacement/Tessellation in Unreal Engine 4.27 with Megascans
- L K
- Apr 21, 2022
- 3 min read
Below I've outlined issues I encountered with displacement maps in Unreal Engine 4.27, specifically when using textures created an imported via Quixel Mixer/Bridge.
Tessellation is a process whereby you add polygons/triangle to a mesh for additional detail. Obviously this can come at an expensive render cost due to the the overall polygon count of the scene increasing. The Unreal Documentation - https://docs.unrealengine.com/4.27/en-US/Resources/ContentExamples/MaterialProperties/1_8/ - shows that the engine supports a "flat" mode and a "PN Triangles" mode.
Flat being a process where it breaks surfaces into smaller triangles, and through the use of a displacement map, the world position of the new triangles can be changed to create surface details.
PN Triangles can do the same as the 'flat' setting, but it also smooths the overall mesh
My initial goal was to use a displacement map to tessellate a roof texture to add geometry to roof tile textures. Mixer/Bridge support this feature and so I thought it would be a good way to reduce modelling time.
CREATING A TEST TEXTURE IN BRIDGE

This is just a simple tile texture from the Megascans library. The tessellation is clearly visible on the cube preview mesh.
IMPORTING TEXTURES INTO UNREAL ENGINE

The Quixel plugin in Unreal doesn't initially import the master texture that supports tessellation.
You need to open the plugin menu within Unreal and check both the "Enable Displacement" and "Import Master Material Textures" options.
This imports a new MS_DefaultMaterial_Displacement material which uses a displacement map which is omitted from the other Quixel master materials.

Once you've changed the plugin settings and restarted the Engine it should import from Bridge with no issues.
ISSUES
I encountered two main issues in Unreal Engine. Firstly that the tessellation was not matching the material closely, and secondly that the camera needs to be very close to the material as the engine uses some form of LOD system to save performance with this feature.

Some minor adjustments to the tiling, and brightness for clarity.

The tessellation is almost unnoticeable. You can see some slight deformation when orbiting very closely.

The tessellation quality is clearly low and does not match the base texture.


You can see almost identical tessellation on this sample, with major vertices being applied on the same places in the preview.
I suspect this is something to do with how the extra tesselation triangles are generated in engine and that they are independent of the material (and therefore displacement map) scale, but of the overall scale of the mesh applied to.

You can see in the above comparison the essentially non existent tessellation on the default material. Tessellation that roughly matches the texture in the centre, but with very noticeable bumps and edges where they shouldn't be. And a much better representation on the larger material, but still with some visible issues.
SUMMARY
Due to these issues above I decided to forgo using this method in my project. I only wanted the extra detail on roof tiles, and this end result was unreliable and not acceptable for me.
I'd suspect using this method on natural materials - rocks, ground etc - would give a reasonable result. It's the regular lines and pattern of man made materials where issues arise.
Also this is only using the Quixel master material. There are going to be solutions or better results using a fully custom material instead of the Quixel template. The Unreal Documentation is showing a much more convincing result on their example for World Displacement - https://docs.unrealengine.com/4.27/en-US/Resources/ContentExamples/MaterialNodes/1_11/

Kommentare