unreal.RuntimeMesh

class unreal.RuntimeMesh(outer: Object | None = None, name: Name | str = 'None')

Bases: StaticMesh

Class deriving from UStaticMesh to allow the cooking of collision meshes at runtime To do so, bAllowCPUAccess must be true AND the metod GetWorld() must return a valid world

C++ Source:

  • Plugin: DatasmithRuntime

  • Module: DatasmithRuntime

  • File: DatasmithRuntimeUtils.h

Editor Properties: (see get_editor_property/set_editor_property)

  • allow_cpu_access (bool): [Read-Write] If true, will keep geometry data CPU-accessible in cooked builds, rather than uploading to GPU memory and releasing it from CPU memory. This is required if you wish to access StaticMesh geometry data on the CPU at runtime in cooked builds (e.g. to convert StaticMesh to ProceduralMeshComponent)

  • asset_import_data (AssetImportData): [Read-Write]

  • asset_user_data (Array[AssetUserData]): [Read-Write] Array of user data stored with the asset

  • body_setup (BodySetup): [Read-Write]

  • complex_collision_mesh (StaticMesh): [Read-Write]

  • customized_collision (bool): [Read-Write]

  • distance_field_self_shadow_bias (float): [Read-Write] Useful for reducing self shadowing from distance field methods when using world position offset to animate the mesh’s vertices.

  • generate_mesh_distance_field (bool): [Read-Write] Whether to generate a distance field for this mesh, which can be used by DistanceField Indirect Shadows. This is ignored if the project’s ‘Generate Mesh Distance Fields’ setting is enabled.

  • global_force_mip_levels_to_be_resident (bool): [Read-Write] Global and serialized version of ForceMiplevelsToBeResident.

  • has_navigation_data (bool): [Read-Write] If true, mesh will have NavCollision property with additional data for navmesh generation and usage.

    Set to false for distant meshes (always outside navigation bounds) to save memory on collision data.

  • light_map_coordinate_index (int32): [Read-Write] The light map coordinate index

  • light_map_resolution (int32): [Read-Write] The light map resolution

  • lod_for_collision (int32): [Read-Write] Specifies which mesh LOD to use for complex (per-poly) collision. Sometimes it can be desirable to use a lower poly representation for collision to reduce memory usage, improve performance and behaviour. Collision representation does not change based on distance to camera.

  • lod_group (Name): [Read-Write]

  • mesh_paint_texture_coordinate_index (int32): [Read-Write] The default coordinate index to use when texture color painting on this mesh.

  • mesh_paint_texture_resolution (int32): [Read-Write] The resolution of texture color mesh paint textures on this mesh. The final size will be rounded up to a power of 2 and a multiple of the “Mesh Paint Tile Size” project setting. A default value of 0 will auto calculate the size using the “Mesh paint texels per vertex” project setting.

  • nanite_settings (MeshNaniteSettings): [Read-Write]

  • nav_collision (NavCollisionBase): [Read-Only]

  • negative_bounds_extension (Vector): [Read-Write]

  • never_stream (bool): [Read-Write]

  • num_cinematic_mip_levels (int32): [Read-Write] Number of mip-levels to use for cinematic quality.

  • positive_bounds_extension (Vector): [Read-Write]

  • ray_tracing_proxy_settings (MeshRayTracingProxySettings): [Read-Write]

  • static_materials (Array[StaticMaterial]): [Read-Write]

  • static_mesh_paint_support (StaticMeshPaintSupport): [Read-Write] Whether to support per instance texture color mesh painting on components using this mesh.

  • support_gpu_uniformly_distributed_sampling (bool): [Read-Write] If true, a GPU buffer containing required data for uniform mesh surface sampling will be created at load time. It is created from the cpu data so bSupportUniformlyDistributedSampling is also required to be true.

  • support_physical_material_masks (bool): [Read-Write] If true, complex collision data will store UVs and face remap table for use when performing PhysicalMaterialMask lookups in cooked builds. Note the increased memory cost for this functionality.

  • support_ray_tracing (bool): [Read-Write] If true, a ray tracing acceleration structure will be built for this mesh and it may be used in ray tracing effects

  • support_uniformly_distributed_sampling (bool): [Read-Write] Mesh supports uniformly distributed sampling in constant time. Memory cost is 8 bytes per triangle. Example usage is uniform spawning of particles.

  • thumbnail_info (ThumbnailInfo): [Read-Only]

  • use_legacy_tangent_scaling (bool): [Read-Write]