nuget assimp net model loading

I just about have this thing working at least rotation animation wise i fixed the shader and made another fix to the interpolation so that it can properly loop around by just increasing the total animation time i added in a switch to just directly calculate the interpolated orientations as well directly.

The scaling is a pain though i think i need to scale the whole fbx loaded model back to be unit length the problem is even a fbx depending on how it is made has different early nodes and mesh nodes that have wonky transforms. Like depending on if a model has mesh node transforms or bone node transforms, then the mesh has to be multiplied to the whole transform chain or omitted. Some models seem to have the scale in the animated bone nodes some don’t, but, i have no idea how to programatically detect that.

Open assimp doesn’t seem to distinguish the animation type properly for HasMeshAnimations or HasNodeAnimations.
Like i have this in at the moment but its just a poor hack around.

        private void UpdateMeshTransforms()
        {
            // try to handle when we just have mesh transforms
            for (int i = 0; i < meshes.Length; i++)
            {
                // This feels errr is hacky.
                //meshes[i].nodeRefContainingAnimatedTransform.CombinedTransformMg = meshes[i].nodeRefContainingAnimatedTransform.LocalTransformMg * meshes[i].nodeRefContainingAnimatedTransform.InvOffsetMatrixMg;
                if (originalAnimations[CurrentPlayingAnimationIndex].animatedNodes.Count > 1)
                {
                    meshes[i].nodeRefContainingAnimatedTransform.CombinedTransformMg = Matrix.Identity;
                }
                   
            }
        }

The real problem is the mesh transform is needed for models with animation without armatures and bones.
And the mesh and armature messes up scaling for models without mesh animations but with armature and bones.
I could just remove all the armature nodes i haven’t seen a animated node for them yet, but i dunno if ill need them for some models. Still that would leave scaled bone animation nodes as needing to be made unit length based on the inverted mesh scale only and the rotation would have to remain. Damn it’s a nightmare to load a blender made fbx with scaling.

fbx mesh animated cube.

Well this does work for simple fbx animated models with multiple animations though.
but the above hack around will break if there is more then one animated mesh.
I haven’t made any sort of xnb tool yet as there is no point till i get this into better shape.

If anyone wants to download it and make some suggestions on how to handle the scaling and the mesh vs bone transform chain problem… dl the project flip the console on and take a look.