unreal.MeshApproximationSettings

class unreal.MeshApproximationSettings(output_type=MeshApproximationType.MESH_AND_MATERIALS, approximation_accuracy=1.0, clamp_voxel_dimension=1024, attempt_auto_thickening=True, target_min_thickness_multiplier=1.5, ignore_tiny_parts=True, tiny_part_size_multiplier=0.05, base_capping=MeshApproximationBaseCappingType.NO_BASE_CAPPING, winding_threshold=0.5, fill_gaps=True, gap_distance=0.1, occlusion_method=OccludedGeometryFilteringPolicy.VISIBILITY_BASED_FILTERING, occlude_from_bottom=True, simplify_method=MeshApproximationSimplificationPolicy.GEOMETRIC_TOLERANCE, target_tri_count=2000, triangles_per_m=2.0, geometric_deviation=0.1, ground_clipping=MeshApproximationGroundPlaneClippingPolicy.NO_GROUND_CLIPPING, ground_clipping_z_height=0.0, estimate_hard_normals=True, hard_normal_angle=60.0, uv_generation_method=MeshApproximationUVGenerationPolicy.PREFER_X_ATLAS, initial_patch_count=250, curvature_alignment=1.0, merging_threshold=1.5, max_angle_deviation=45.0, generate_nanite_enabled_mesh=False, nanite_proxy_triangle_percent=0.0, support_ray_tracing=True, allow_distance_field=True, multi_sampling_aa=0, render_capture_resolution=2048, material_settings=[TextureSizingType.TEXTURE_SIZING_TYPE_USE_SINGLE_TEXTURE_SIZE, [1024, 1024], 5.0, 0.5, 10000.0, 4.0, 0.0, 0.5, 0.0, 0.5, 1.0, 1.0, 1.0, BlendMode.BLEND_OPAQUE, True, True, False, False, False, False, False, False, False, False, False, [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024]], capture_field_of_view=30.0, near_plane_dist=1.0, use_render_lod_meshes=False, enable_simplify_pre_pass=True, enable_parallel_baking=True, print_debug_messages=False, emit_full_debug_mesh=False)

Bases: unreal.StructBase

Mesh Approximation Settings

C++ Source:

  • Module: Engine

  • File: MeshMerging.h

Editor Properties: (see get_editor_property/set_editor_property)

  • allow_distance_field (bool): [Read-Write] Allow Distance Field: Whether to allow distance field to be computed for this mesh. Disable this to save memory if the generated mesh will only be rendered in the distance.

  • approximation_accuracy (float): [Read-Write] Approximation Accuracy: Approximation Accuracy in Meters, will determine (eg) voxel resolution

  • attempt_auto_thickening (bool): [Read-Write] Attempt Auto Thickening: if enabled, we will attempt to auto-thicken thin parts or flat sheets

  • base_capping (MeshApproximationBaseCappingType): [Read-Write] Base Capping: Optional methods to attempt to close off the bottom of open meshes

  • capture_field_of_view (float): [Read-Write] Capture Field Of View

  • clamp_voxel_dimension (int32): [Read-Write] Clamp Voxel Dimension: Maximum allowable voxel count along main directions. This is a limit on ApproximationAccuracy. Max of 1290 (1290^3 is the last integer < 2^31, using a bigger number results in failures in TArray code & probably elsewhere)

  • curvature_alignment (float): [Read-Write] Curvature Alignment: This parameter controls alignment of the initial patches to creases in the mesh

  • emit_full_debug_mesh (bool): [Read-Write] Emit Full Debug Mesh: If true, write the full mesh triangle set (ie flattened, non-instanced) used for mesh generation. Warning: this asset may be extremely large!!

  • enable_parallel_baking (bool): [Read-Write] Enable Parallel Baking: If false, texture capture and baking will be done serially after mesh generation, rather than in parallel when possible. This will reduce the maximum memory requirements of the process.

  • enable_simplify_pre_pass (bool): [Read-Write] Enable Simplify Pre Pass: If true, a faster mesh simplfication strategy will be used. This can significantly reduce computation time and memory usage, but potentially at the cost of lower quality output.

  • estimate_hard_normals (bool): [Read-Write] Estimate Hard Normals: If true, normal angle will be used to estimate hard normals

  • fill_gaps (bool): [Read-Write] Fill Gaps: If true, topological expand/contract is used to try to fill small gaps between objects.

  • gap_distance (float): [Read-Write] Gap Distance: Distance in Meters to expand/contract to fill gaps

  • generate_nanite_enabled_mesh (bool): [Read-Write] Generate Nanite Enabled Mesh: Whether to generate a nanite-enabled mesh

  • geometric_deviation (float): [Read-Write] Geometric Deviation: Allowable Geometric Deviation in Meters when SimplifyMethod incorporates a Geometric Tolerance

  • ground_clipping (MeshApproximationGroundPlaneClippingPolicy): [Read-Write] Ground Clipping: Configure how the final mesh should be clipped with a ground plane, if desired

  • ground_clipping_z_height (float): [Read-Write] Ground Clipping ZHeight: Z-Height for the ground clipping plane, if enabled

  • hard_normal_angle (float): [Read-Write] Hard Normal Angle

  • ignore_tiny_parts (bool): [Read-Write] Ignore Tiny Parts: If enabled, tiny parts will be excluded from the mesh merging, which can improve performance

  • initial_patch_count (int32): [Read-Write] Initial Patch Count: Number of initial patches mesh will be split into before computing island merging

  • material_settings (MaterialProxySettings): [Read-Write] Material Settings: Material generation settings

  • max_angle_deviation (float): [Read-Write] Max Angle Deviation: UV islands will not be merged if their average face normals deviate by larger than this amount

  • merging_threshold (float): [Read-Write] Merging Threshold: Distortion/Stretching Threshold for island merging - larger values increase the allowable UV stretching

  • multi_sampling_aa (int32): [Read-Write] Multi Sampling AA: If Value is > 1, Multisample output baked textures by this amount in each direction (eg 4 == 16x supersampling)

  • nanite_proxy_triangle_percent (float): [Read-Write] Nanite Proxy Triangle Percent: Percentage of triangles to reduce down to for generating a coarse proxy mesh from the Nanite mesh

  • near_plane_dist (float): [Read-Write] Near Plane Dist

  • occlude_from_bottom (bool): [Read-Write] Occlude from Bottom: If true, then the OcclusionMethod computation is configured to try to consider downward-facing “bottom” geometry as occluded

  • occlusion_method (OccludedGeometryFilteringPolicy): [Read-Write] Occlusion Method: Type of hidden geometry removal to apply

  • output_type (MeshApproximationType): [Read-Write] Output Type: Type of output from mesh approximation process

  • print_debug_messages (bool): [Read-Write] Print Debug Messages: If true, print out debugging messages

  • render_capture_resolution (int32): [Read-Write] Render Capture Resolution: If Value is zero, use MaterialSettings resolution, otherwise override the render capture resolution

  • simplify_method (MeshApproximationSimplificationPolicy): [Read-Write] Simplify Method: Mesh Simplification criteria

  • support_ray_tracing (bool): [Read-Write] Support Ray Tracing: Whether ray tracing will be supported on this mesh. Disable this to save memory if the generated mesh will only be rendered in the distance.

  • target_min_thickness_multiplier (float): [Read-Write] Target Min Thickness Multiplier: Multiplier on Approximation Accuracy used for auto-thickening

  • target_tri_count (int32): [Read-Write] Target Tri Count: Target triangle count for Mesh Simplification, for SimplifyMethods that use a Count

  • tiny_part_size_multiplier (float): [Read-Write] Tiny Part Size Multiplier: Multiplier on Approximation Accuracy used to define tiny-part threshold, using maximum bounding-box dimension

  • triangles_per_m (float): [Read-Write] Triangles Per M: Approximate Number of triangles per Square Meter, for SimplifyMethods that use such a constraint

  • use_render_lod_meshes (bool): [Read-Write] Use Render LODMeshes: If true, LOD0 Render Meshes (or Nanite Fallback meshes) are used instead of Source Mesh data. This can significantly reduce computation time and memory usage, but potentially at the cost of lower quality output.

  • uv_generation_method (MeshApproximationUVGenerationPolicy): [Read-Write] UVGeneration Method: Mesh UV Generation Settings

  • winding_threshold (float): [Read-Write] Winding Threshold: Winding Threshold controls hole filling at open mesh borders. Smaller value means “more/rounder” filling

property allow_distance_field

[Read-Write] Allow Distance Field: Whether to allow distance field to be computed for this mesh. Disable this to save memory if the generated mesh will only be rendered in the distance.

Type

(bool)

property approximation_accuracy

[Read-Write] Approximation Accuracy: Approximation Accuracy in Meters, will determine (eg) voxel resolution

Type

(float)

property attempt_auto_thickening

[Read-Write] Attempt Auto Thickening: if enabled, we will attempt to auto-thicken thin parts or flat sheets

Type

(bool)

property base_capping

[Read-Write] Base Capping: Optional methods to attempt to close off the bottom of open meshes

Type

(MeshApproximationBaseCappingType)

property capture_field_of_view

[Read-Write] Capture Field Of View

Type

(float)

property clamp_voxel_dimension

[Read-Write] Clamp Voxel Dimension: Maximum allowable voxel count along main directions. This is a limit on ApproximationAccuracy. Max of 1290 (1290^3 is the last integer < 2^31, using a bigger number results in failures in TArray code & probably elsewhere)

Type

(int32)

property curvature_alignment

[Read-Write] Curvature Alignment: This parameter controls alignment of the initial patches to creases in the mesh

Type

(float)

property emit_full_debug_mesh

[Read-Write] Emit Full Debug Mesh: If true, write the full mesh triangle set (ie flattened, non-instanced) used for mesh generation. Warning: this asset may be extremely large!!

Type

(bool)

property enable_parallel_baking

[Read-Write] Enable Parallel Baking: If false, texture capture and baking will be done serially after mesh generation, rather than in parallel when possible. This will reduce the maximum memory requirements of the process.

Type

(bool)

property enable_simplify_pre_pass

[Read-Write] Enable Simplify Pre Pass: If true, a faster mesh simplfication strategy will be used. This can significantly reduce computation time and memory usage, but potentially at the cost of lower quality output.

Type

(bool)

property estimate_hard_normals

[Read-Write] Estimate Hard Normals: If true, normal angle will be used to estimate hard normals

Type

(bool)

property fill_gaps

[Read-Write] Fill Gaps: If true, topological expand/contract is used to try to fill small gaps between objects.

Type

(bool)

property gap_distance

[Read-Write] Gap Distance: Distance in Meters to expand/contract to fill gaps

Type

(float)

property generate_nanite_enabled_mesh

[Read-Write] Generate Nanite Enabled Mesh: Whether to generate a nanite-enabled mesh

Type

(bool)

property geometric_deviation

[Read-Write] Geometric Deviation: Allowable Geometric Deviation in Meters when SimplifyMethod incorporates a Geometric Tolerance

Type

(float)

property ground_clipping

[Read-Write] Ground Clipping: Configure how the final mesh should be clipped with a ground plane, if desired

Type

(MeshApproximationGroundPlaneClippingPolicy)

property ground_clipping_z_height

[Read-Write] Ground Clipping ZHeight: Z-Height for the ground clipping plane, if enabled

Type

(float)

property hard_normal_angle

[Read-Write] Hard Normal Angle

Type

(float)

property ignore_tiny_parts

[Read-Write] Ignore Tiny Parts: If enabled, tiny parts will be excluded from the mesh merging, which can improve performance

Type

(bool)

property initial_patch_count

[Read-Write] Initial Patch Count: Number of initial patches mesh will be split into before computing island merging

Type

(int32)

property material_settings

[Read-Write] Material Settings: Material generation settings

Type

(MaterialProxySettings)

property max_angle_deviation

[Read-Write] Max Angle Deviation: UV islands will not be merged if their average face normals deviate by larger than this amount

Type

(float)

property merging_threshold

[Read-Write] Merging Threshold: Distortion/Stretching Threshold for island merging - larger values increase the allowable UV stretching

Type

(float)

property multi_sampling_aa

[Read-Write] Multi Sampling AA: If Value is > 1, Multisample output baked textures by this amount in each direction (eg 4 == 16x supersampling)

Type

(int32)

property nanite_proxy_triangle_percent

[Read-Write] Nanite Proxy Triangle Percent: Percentage of triangles to reduce down to for generating a coarse proxy mesh from the Nanite mesh

Type

(float)

property near_plane_dist

[Read-Write] Near Plane Dist

Type

(float)

property occlude_from_bottom

[Read-Write] Occlude from Bottom: If true, then the OcclusionMethod computation is configured to try to consider downward-facing “bottom” geometry as occluded

Type

(bool)

property occlusion_method

[Read-Write] Occlusion Method: Type of hidden geometry removal to apply

Type

(OccludedGeometryFilteringPolicy)

property output_type

[Read-Write] Output Type: Type of output from mesh approximation process

Type

(MeshApproximationType)

property print_debug_messages

[Read-Write] Print Debug Messages: If true, print out debugging messages

Type

(bool)

property render_capture_resolution

[Read-Write] Render Capture Resolution: If Value is zero, use MaterialSettings resolution, otherwise override the render capture resolution

Type

(int32)

property simplify_method

[Read-Write] Simplify Method: Mesh Simplification criteria

Type

(MeshApproximationSimplificationPolicy)

property support_ray_tracing

[Read-Write] Support Ray Tracing: Whether ray tracing will be supported on this mesh. Disable this to save memory if the generated mesh will only be rendered in the distance.

Type

(bool)

property target_min_thickness_multiplier

[Read-Write] Target Min Thickness Multiplier: Multiplier on Approximation Accuracy used for auto-thickening

Type

(float)

property target_tri_count

[Read-Write] Target Tri Count: Target triangle count for Mesh Simplification, for SimplifyMethods that use a Count

Type

(int32)

property tiny_part_size_multiplier

[Read-Write] Tiny Part Size Multiplier: Multiplier on Approximation Accuracy used to define tiny-part threshold, using maximum bounding-box dimension

Type

(float)

property triangles_per_m

[Read-Write] Triangles Per M: Approximate Number of triangles per Square Meter, for SimplifyMethods that use such a constraint

Type

(float)

property use_render_lod_meshes

[Read-Write] Use Render LODMeshes: If true, LOD0 Render Meshes (or Nanite Fallback meshes) are used instead of Source Mesh data. This can significantly reduce computation time and memory usage, but potentially at the cost of lower quality output.

Type

(bool)

property uv_generation_method

[Read-Write] UVGeneration Method: Mesh UV Generation Settings

Type

(MeshApproximationUVGenerationPolicy)

property winding_threshold

[Read-Write] Winding Threshold: Winding Threshold controls hole filling at open mesh borders. Smaller value means “more/rounder” filling

Type

(float)