Crash when exporting a tree with custom Nanite Assemblies in Procedural Vegetation Editor

Crash when exporting a tree with custom Nanite Assemblies in Procedural Vegetation Editor (UE 5.8)

Description

I created a custom Nanite Assembly from a combination of static meshes using Scripted Actor Actions > Nanite Assemblies > CreateNewStaticMeshAssemblyFromSelection. The generated assembly works and renders correctly within the Procedural Vegetation Editor (PVE). However, attempting to export the tree causes Unreal Engine to crash.

Crash Code

Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Containers\ContainerHelpers.cpp] [Line: 8]
Trying to resize TArray to an invalid size of 18446744073709551615
UnrealEditor_Core
UnrealEditor_DynamicMesh
UnrealEditor_DynamicMesh
UnrealEditor_DynamicMesh
UnrealEditor_ModelingOperators
UnrealEditor_GeometryScriptingCore
UnrealEditor_GeometryFramework
UnrealEditor_GeometryFramework
UnrealEditor_GeometryScriptingCore
UnrealEditor_ProceduralVegetationEditor
UnrealEditor_ProceduralVegetationEditor
UnrealEditor_ProceduralVegetationEditor
UnrealEditor_ProceduralVegetationEditor
UnrealEditor_ProceduralVegetationEditor
UnrealEditor_ProceduralVegetationEditor
UnrealEditor_ProceduralVegetationEditor
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
user32
user32
UnrealEditor_ApplicationCore
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

Steps to Reproduce:

  1. Drop all assets required for the Nanite Assembly into the level (For Nanite Assemble I use Nanite meshes)
  2. Run the Editor Utility Action: 'CreateNewStaticMeshAssemblyFromSelection'

  1. Open the Procedural Vegetation Editor, create a new Foliage Palette, and add the newly created Nanite Assembly to it. (In my case “PVE_Sample_Conifer_Tree_01” asset)

  1. Export the asset as a Skeletal Mesh with voxelized Nanite

  1. Crash

**
Exporting as a Static Mesh**: If exported as a Static Mesh instead, Unreal Engine does not crash, but the instances within the exported tree become invisible.

I tried different meshes with different settings. In this article, it’s just a group of nanite spheres created in Unreal.

The only current solution is merging the meshes into a standard Static Mesh. While this avoids the crash, it completely nullifies the benefit of creating a Nanite Assembly.

Found my mistake, it hasn’t been implemented yet:

Known Limitations

These are some current limitations to be aware of:

  • You cannot create assemblies of other assemblies. The system currently supports a single layer of instancing.