Enabling Nanite on AnimToTexture Crowd Assets causes stretched VAT animations.

Hello!

We’re using AnimToTexture in a similar way to CitySample for our distant crowd assets. We want to try swapping them to Nanite however when we do that all the VATs seem to flatten/stretch in a weird way. I replicated the same thing in CitySample by setting up the meshes the same way as in our actual project.

Is there a way to fix this? I found some other posts about AnimToTexture on nanite meshes so i’m assuming it’s doable. The repro i added is the same thing I’ve done in both projects. I’m not sure where the problem stems from exactly so its tricky to try out fixes.

Thanks!

Steps to Reproduce

  1. Find all the static meshes used by the AnimToTexture VATs.
  2. Bulk Edit them to Enable Nanite and Disable Lerp UVs.
    1. Also enable the nanite usage flags on the relevant materials if not done already.
  3. Simulate a level that spawns them (eg Small_City_Lvl)
  4. Observe the stretching issue.

What I expect to see is something comparable to the VAT on a non-nanite mesh which more closely resembles the actual animation.

Hello there,

I’ve replicated the issue, but when applying vertex animation directly to the mesh (by way of just placing the static mesh in the scene), the deformations appear correct.

It’s unclear to me at this stage if this may be MASS-specific, so may I ask if you are seeing this only with MASS?

Best regards,

Chris

Hey! Thanks for verifying

Yes I have a similar result in our real project, where I’ve placed a handful of static meshes using (as far as I know) the same VAT as those in our mass setup and they don’t have this stretching.

It appears to be a side-effect of the local-world and local-tangent transforms in ML_BoneTransform when applying the animation textures.

Switching to Instance-World and Instance-Tangent in BonePositionAndNormal appears to remedy the issue. The object pivot also needs to use the Instance space as well.

I hope that helps.

Best regards,

Chris

Perfect! Works like a charm. Thanks for finding that. I think we can close this out.

If anyone else wants to try this what we needed to change to get this to work is in BonePositionAndNormal which is embedded a few layers into the ML_BoneTransform functions.

[Image Removed]

I’m very glad that worked for you, and thank you providing that snippet for future reference.

If you have any further questions, please don’t hesitate to ask. Otherwise, would you mind if I close this case for now?

Best regards,

Chris

Yup you can close it, thanks again!

You’re very welcome.

Best regards,

Chris