docs.unity3d.com
Version: 

    Remove holes

    API function: algo.removeHoles

    As part of your mesh optimization process, you can delete holes in your mesh model to reduce its polygon count. This feature deletes holes from identified patch data.

    This example shows a model before and after processing:

    Remove Holes

    You can choose which types of holes to delete:

    Some holes have depth and others don’t.

    1. Through holes entirely go through the volume of an object and come out on the other side.
    2. Blind holes partly go through the volume of an object.
    3. Surface holes are cut into a surface and don’t have depth. Their edges are boundaries (shown in blue when viewing edges). Read more.

    You can choose the maximum size of holes to be processed and the material with which to seal holes.

    This example illustrates the deletion of holes with a diameter of at most 30 mm. Close-up images show which holes are processed:

    Remove Holes

    Tip

    Before you delete holes, we recommend that you use the patch identification feature, to identify more through holes and blind holes before processing. Because this operation increases the number of patches, we recommend that you use the patch deletion feature afterward, to reduce the number of patches back to an acceptable amount and improve performance.

    The topology around the processed holes remains unchanged. For example, the polygon count may be unnecessarily high in areas where new polygons are flush with the existing mesh.

    Tip

    We recommend that you the quality-driven decimation feature, with light parameters, to confine decimation to areas where new polygons are flush with the existing mesh. Read more.

    This example shows the results of decimation with such parameters:

    Remove Holes

    Version 2025.2.0.1
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX.