Assertion building a Nanite Assembly with a single part

Hi,

We are seeing some crashes building Nanite Assemblies that seem to be related to CL 54564903 and CL 54610981. We got both these CLs and most of the issues were resolved, however the code now fails for single item Nanite Assembles, a kind of odd use case I admit, but it’s nice to not have to specially handle these in our tools that create assemblies and it can be useful to create instances of the same mesh with different Nanite settings via assemblies.

It seems like the RootCluster is never added to SelectedGroups FClusterDAG::FindCut possibly?

Thanks,

Lucas

[Attachment Removed]

Steps to Reproduce
Create a Nanite Assembly with only a single part and Keep Triangle Percent < 100 or Trim Relative Error > 0

[Attachment Removed]

Hi Lucas,

Thanks for the reproduction information. I will work on this next week and get back to you.

-Jamie

[Attachment Removed]

Hi Lucas,

I think I tracked this down and will be fixing it in UE6/main tomorrow. It’s something similar to what you were suggesting. I will try to see if we can get it approved for 5.8.2, but to integrate the fixes yourself is pretty simple. It’s just a few lines of code in ClusterDAG.cpp:

[Image Removed]

Thanks for your report!

-Jamie

[Attachment Removed]

The fix has made it into UE5/Main today in CL 56604200. You’ll want to take a look at it and ignore my diff screenshot above as there were some changes made.

-Jamie

[Attachment Removed]

Awesome! Thank you!

[Attachment Removed]