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.
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?
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.
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.