Filling Gaps

Using the Proxy Geometry tool to automatically fill in gaps when creating new geometry.

Windows
MacOS
Linux
On this page

For watertight geometry, the Proxy Geometry tool will automatically discard any inaccessible structures like interior walls, furniture, and anything within a closed structure. For ideal results source geometry should be constructed or altered with this in mind, but due to game production constraints that isn’t always feasible. To facilitate the generation of efficient proxy LODs from source geometry that is nearly water-tight, the ProxyLOD tool can now optionally use the level set-based techniques of dilation and erosion, to close gaps. The intended use case is primarily doors and windows in distant buildings and in the following How-To we will take a look at how the Proxy Geometry Tool can be setup to automatically close any gaps that the generated geometry might have.

GapFilling_10.png

Steps

In the following section we will take a look at how you can ensure that any open geometry is closed on the Static Mesh that is generated by the Proxy Geometry tool.

  1. First locate a structure or object that has openings that you want to close. For this example, the following small house was constructed using only Static Meshes that can be found in the Starter Content.

    GapFilling_01.png

  2. Next, open the Merge Actors tool by going to Window > Developer Tools > Merge Actors.

    GapFilling_02.png

  3. Inside of the level, select all of the Static Mesh Actors that make up the object that you want to generate new geometry for.

    GapFilling_03.png

  4. In the Merge Actors tool, click the second icon to access the Proxy Geometry tool, and then expand the Proxy Settings.

    GapFilling_04.png

  5. In the Proxy Settings, set the Merge Distance value to 120.

    GapFilling_05.png

    The Merge Distance parameter tells the Proxy Geometry tool the distance at which gaps should be closed. Smaller numbers will close smaller gaps while larger gaps will fill bigger gaps.

  6. Next, click the Merge Actors button and input a name and location in the Content Browser for the newly created Static Mesh. Then click the Save button to start the merging process. 

    GapFilling_06.png

  7. Once the merge has completed, locate the newly created Static Mesh in the Content Browser, and double-click it to open it in the Static Mesh Editor.

    GapFilling_07.png

  8. Depending on the object you selected, you might have some issues with the Proxy Geometry tool creating new geometry that extends further than desired (like the following image):

    GapFilling_08.png

  9. To fix issues like this, first re-select all the Static Meshes that make up your object. Then in the Merge Actors tool, and increase the Merge Distance to a value of 175. Then enable the Transfer Distance Override and set it to a value of 100.

    To get a better idea of what values you should use, check the Output Log. The Output Log tells you what values are used for the Spatial Sampling Distance (Voxel size for re-meshing) and Transfer Distance Override (Material Distance). Once you know what values are used, you can either increase or decrease those values depending on what results you are looking for.

    SamplingScaleMatDistance.png

  10. Once that has been completed, click the Merge Actors button to begin the process again. When the Proxy Geometry generation has completed the object now looks like this.

    GapFilling_10.png

    Depending on how your geometry is set up, you may need to repeat the above process a few times using different values for Merge Distance and Transfer Distance Override, until you get results you are happy with.

End Results

Getting the best results is going to take some time and iteration, as each object for which you generate Proxy Geometry will require slightly different values for both Merge Distance and Transfer Distance Override. In the following image comparison, you can see the results that can be achieved when setting the Merge Distance and Transfer Distance Override to values of 0, 100, 200, and 300.

Example of what happens when both the Merge Distance and Transfer Distance Override are set to values of 0, 100, 200, and 300.

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