I’ve been using VertexAnimated Static Meshes with multiple animations in UE’s Instanced Static Mesh Components, where the animation is chosen by PerInstanceCustomData driven by a blueprint. This is working fine, but for some reason whenever I rotate the mesh instances to a non-zero rotation value, the mesh stretches and distorts. This does not happen with a single Static Mesh placed in a level and rotated, only with instances.
Here is an image of what I mean
The image depicts an Actor with 2 components on the same hierarchy level: an ISM and a standard StaticMesh.
Characters from left to right:
- single static mesh rotated about 90 degrees: works fine
- ISM instance rotated about 90 degrees: stretched and distorted
- ISM instance with rotation of 0: works fine
I’m using animations from Mixamo placed on a single animation track back to back. It seems like the first animation doesn’t cause a problem, but all the following animations do.
Some uneducated speculation I might give is that this could be due to some missing vertex data or something like that. Vertices that have no recorded data for some property on any given frame might default to the mesh’s default properties, which is created from the first frame, which is maybe why the first animation doesn’t seem to be messed up when rotated. I might be completely off-base, I don’t fully understand how blender’s animation system or this script work.
Also of note, the generated offset texture looks a bit off, no pun intended. Maybe it’s not, but the colors for the second animation look very different despite the poses in both animations being fairly similar…
The generated offset texture looks like this
Any helpful advice would be appreciated.
Edit:
Actually, the images I linked were of my latest attempt at different ways to record keyframes and the second animation was actually made by duplicating and editing a few keyframes from the first animation. That was my attempt to rule out the possibility that the problem was with using multiple different animations exported from Mixamo separately, but it made no difference. So everything I said still applies.