Implmented GLTF Compile and Load Overhaul #404

Merged
XiaoQiDigipen merged 17 commits from SP3-13-Assets-Manager into main 2023-03-07 23:27:01 +08:00
4 changed files with 16 additions and 18 deletions
Showing only changes of commit f861304f5e - Show all commits

View File

@ -23,11 +23,11 @@
Scale: {x: 1, y: 1, z: 1} Scale: {x: 1, y: 1, z: 1}
IsActive: true IsActive: true
Renderable Component: Renderable Component:
Mesh: 149723808 Mesh: 141097368
Material: 128805346 Material: 128805346
IsActive: true IsActive: true
Animator Component: Animator Component:
Rig: 80728853 Rig: 72178939
Clip: 80728853 Clip: 72178939
IsActive: true IsActive: true
Scripts: ~ Scripts: ~

View File

@ -181,9 +181,7 @@ namespace Sandbox
// Link up SHDebugDraw // Link up SHDebugDraw
SHDebugDraw::Init(SHSystemManager::GetSystem<SHDebugDrawSystem>()); SHDebugDraw::Init(SHSystemManager::GetSystem<SHDebugDrawSystem>());
auto clip = SHResourceManager::LoadOrGet<SHAnimationClip>(77816045); //auto clip = SHResourceManager::LoadOrGet<SHMesh>(141097368);
auto rig = SHResourceManager::LoadOrGet<SHRig>(77816045);
int i = 0;
} }
void SBApplication::Update(void) void SBApplication::Update(void)

View File

@ -133,18 +133,18 @@ namespace SHADE
{ {
// Check if there is a channel for this node // Check if there is a channel for this node
SHMatrix transformMatrix = node->TransformMatrix; SHMatrix transformMatrix = node->TransformMatrix;
//const int BONE_IDX = rig->GetNodeIndex(node); const int BONE_IDX = rig->GetNodeIndex(node);
//const auto& CHANNELS = currClip->GetChannels(); const auto& CHANNELS = currClip->GetChannels();
//if (BONE_IDX < CHANNELS.size()) if (BONE_IDX < CHANNELS.size())
//{ {
// const auto& CHANNEL = CHANNELS[BONE_IDX]; const auto& CHANNEL = CHANNELS[BONE_IDX];
// transformMatrix = SHMatrix::Transform transformMatrix = SHMatrix::Transform
// ( (
// getInterpolatedValue(CHANNEL.PositionKeyFrames, closestFrameIndex, poseTime), getInterpolatedValue(CHANNEL.PositionKeyFrames, closestFrameIndex, poseTime),
// getInterpolatedValue(CHANNEL.RotationKeyFrames, closestFrameIndex, poseTime), getInterpolatedValue(CHANNEL.RotationKeyFrames, closestFrameIndex, poseTime),
// getInterpolatedValue(CHANNEL.ScaleKeyFrames, closestFrameIndex, poseTime) getInterpolatedValue(CHANNEL.ScaleKeyFrames, closestFrameIndex, poseTime)
// ); );
//} }
// Apply parent's transformation // Apply parent's transformation
transformMatrix = transformMatrix * parentMatrix; transformMatrix = transformMatrix * parentMatrix;