mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 14:00:39 +00:00
Fix for importing animated skinned meshes.
Scale is negated in inverse bind matrices. Vertex weights are normalized (glTF importer is limited to 4 weights per vert). Fixed interpolation for animations where the first frame is not at 0.0. Allows cached.dts version of assimp imported shapes to be loaded.
This commit is contained in:
parent
6be2989bbc
commit
6660f253b5
4 changed files with 35 additions and 14 deletions
|
|
@ -19,6 +19,7 @@ AssimpAppSequence::AssimpAppSequence(aiAnimation *a) :
|
|||
mSequenceName = mAnim->mName.C_Str();
|
||||
if (mSequenceName.isEmpty())
|
||||
mSequenceName = "ambient";
|
||||
Con::printf("\n[Assimp] Adding %s animation", mSequenceName.c_str());
|
||||
|
||||
fps = (mAnim->mTicksPerSecond > 0) ? mAnim->mTicksPerSecond : 30.0f;
|
||||
|
||||
|
|
@ -72,6 +73,7 @@ AssimpAppSequence::AssimpAppSequence(aiAnimation *a) :
|
|||
minFrameTime /= (F32)timeFactor;
|
||||
maxEndTime /= (F32)timeFactor;
|
||||
fps = (minFrameTime > 0.0f) ? 1.0f / minFrameTime : fps;
|
||||
fps = mClamp(fpsRequest, 5 /*TSShapeLoader::MinFrameRate*/, TSShapeLoader::MaxFrameRate);
|
||||
seqEnd = maxEndTime;
|
||||
mTimeMultiplier = 1.0f / timeFactor;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue