Implmented GLTF Compile and Load Overhaul #404
Binary file not shown.
|
@ -23,11 +23,11 @@
|
|||
Scale: {x: 1, y: 1, z: 1}
|
||||
IsActive: true
|
||||
Renderable Component:
|
||||
Mesh: 149723808
|
||||
Mesh: 141097368
|
||||
Material: 128805346
|
||||
IsActive: true
|
||||
Animator Component:
|
||||
Rig: 80728853
|
||||
Clip: 80728853
|
||||
Rig: 72178939
|
||||
Clip: 72178939
|
||||
IsActive: true
|
||||
Scripts: ~
|
|
@ -181,9 +181,7 @@ namespace Sandbox
|
|||
// Link up SHDebugDraw
|
||||
SHDebugDraw::Init(SHSystemManager::GetSystem<SHDebugDrawSystem>());
|
||||
|
||||
auto clip = SHResourceManager::LoadOrGet<SHAnimationClip>(77816045);
|
||||
auto rig = SHResourceManager::LoadOrGet<SHRig>(77816045);
|
||||
int i = 0;
|
||||
//auto clip = SHResourceManager::LoadOrGet<SHMesh>(141097368);
|
||||
}
|
||||
|
||||
void SBApplication::Update(void)
|
||||
|
|
|
@ -133,18 +133,18 @@ namespace SHADE
|
|||
{
|
||||
// Check if there is a channel for this node
|
||||
SHMatrix transformMatrix = node->TransformMatrix;
|
||||
//const int BONE_IDX = rig->GetNodeIndex(node);
|
||||
//const auto& CHANNELS = currClip->GetChannels();
|
||||
//if (BONE_IDX < CHANNELS.size())
|
||||
//{
|
||||
// const auto& CHANNEL = CHANNELS[BONE_IDX];
|
||||
// transformMatrix = SHMatrix::Transform
|
||||
// (
|
||||
// getInterpolatedValue(CHANNEL.PositionKeyFrames, closestFrameIndex, poseTime),
|
||||
// getInterpolatedValue(CHANNEL.RotationKeyFrames, closestFrameIndex, poseTime),
|
||||
// getInterpolatedValue(CHANNEL.ScaleKeyFrames, closestFrameIndex, poseTime)
|
||||
// );
|
||||
//}
|
||||
const int BONE_IDX = rig->GetNodeIndex(node);
|
||||
const auto& CHANNELS = currClip->GetChannels();
|
||||
if (BONE_IDX < CHANNELS.size())
|
||||
{
|
||||
const auto& CHANNEL = CHANNELS[BONE_IDX];
|
||||
transformMatrix = SHMatrix::Transform
|
||||
(
|
||||
getInterpolatedValue(CHANNEL.PositionKeyFrames, closestFrameIndex, poseTime),
|
||||
getInterpolatedValue(CHANNEL.RotationKeyFrames, closestFrameIndex, poseTime),
|
||||
getInterpolatedValue(CHANNEL.ScaleKeyFrames, closestFrameIndex, poseTime)
|
||||
);
|
||||
}
|
||||
|
||||
// Apply parent's transformation
|
||||
transformMatrix = transformMatrix * parentMatrix;
|
||||
|
|
Loading…
Reference in New Issue