Tim Hobson

How to Enable Mesh Distance Fields for Your Project

In the following steps we will enable the option in Project Settings for Generate Mesh Distance Fields. This will allow Mesh Distance Fields to be generated for all Static Meshes in your game. These can be used for a number of different features in your games, such as dynamic ambient occlusion, shadows, partical collision, and so on.
1.  Start by opening a new or already created UE4 project.
2.  Navigate to Menu > Edit > Project Settings. The Project Settings will now open in a new window.
3.  Locate the Rendering section on the side panel, then in the Lighting tab click the checkmark box next to Generate Mesh Distance Fields.
4. ​You will be prompted to restart the editor now. Click the Restart Now button.
5. ​Once the Editor restarts, depending on the number of static meshes in your current scene, you will see a label in the bottom corner of your screen                   indicating that Distance Fields are being built.
Mesh Distance Fields are only built if a static mesh is currently in your map that is loaded, when a static mesh is opened in the Static Mesh Editor for the first time, or its Distance Field Resolution is changed.
6. ​Once Mesh Distance Fields are built you can visualize the distance fields by going to Show > Visualize > Mesh Distance Fields.


At this point you should now have Mesh Distance Fields enabled for your project. If you're not seeing the Mesh Distance Field visualization when enabled make sure that you have your Engine Scalability settings set to EPIC and that your GPU support Shader Model 5 (SM5) with DirectX 11.