Crash when enabling Nanite on a Mesh using an OptimusDeformer

Hello,

One of my co-workers came to me today for support with a crash and having investigated it I was able to deduce that it happens when a skeletal mesh has a deformer present and then nanite support is enabled and applied. (the deformer in question was hsasset://DeformerGraph/Deformers/DG_LinearBlendSkin_Morph_Cloth_RecomputeNormals)

This causes a crash within FSkeletalMeshDeformerHelpers::GetClothBuffersForReading() as its doing a static cast on the FSkeletalMeshObject and is assuming its a FSkeletalMeshObjectGPUSkin where as its actually a FSkeletalMeshObjectNanite. It then tries to use the incorrectly converted object and crashes.

For now I’ve told my co-worker to clear the deformer before enabling nanite but it obviously shouldnt crash and (forgive me for my lack of knowledge, I’m a gameplay coder) I dont know if that means they are losing functionality they require from the deformer. (maybe nanite provides an alternative? Or there is a different set of deformers that replaces the older ones?)

Can anyone provide some information to assist?

Cheers

Paul

[Attachment Removed]

Steps to Reproduce
Open Skeletal Mesh

Apply “DG_LinearBlendSkin_Morph_Cloth_RecomputeNormals” to the deformer variable in the asset details window

Toggle on “Enable nanite support” under the nanite sub catagory

Click apply settings at the end of the nanite sub catagory

Crash

Can anyone provide some information to assist?

Cheers

Paul

[Attachment Removed]

Hey there,

Thanks for raising this, I’ve logged an issue to address the crash. Unfortunately, we don’t support deformer graphs with Nanite Skeletal Mesh and we don’t have other options yet. Nanite Skeletal Mesh uses a completely different render path and is experimental. It will be awhile before have support for deformers. Your recommendation is the same that I would give in that you need to remove deformer graphs from nanite skeletal meshes.

Dustin

[Attachment Removed]