An object loader that can display 3d models in a 3d space using the DX12 library.
- Load 3d models from .obj and .md5mesh files.
- Camera movement (rotating, panning, translating, zooming).
- Animation from .md5anim files using gpu-skinning.
- Load multiple 3d models at once in the same world.
- Create custom 3d models.
- Component based system is used to give the 3d models different attirbutes. These attributes store data of the 3d model such as animation frame data and uv texture coordinate data.
-
Positional data of 3d models during an animation are calculated using bone armatures and weighted vertices. Each frame, the bones in the bone armature are translated and rotated to a different position, and each bone applies a different weight to every vertex in the 3d model which determines how much the vertex should move according to that specific bone.
-
Animations are handled on
VertexShader.hlslvia the process of gpu-skinning.
float4 tempPos;
tempPos.x = 0.0f;
tempPos.y = 0.0f;
tempPos.z = 0.0f;
tempPos.w = 1.0f;
// apply weight and rotation
for (int i = 0; i < 4; i++) {
float3 weightPos = float3(input.weightsPosX[i], input.weightsPosY[i], input.weightsPosZ[i]);
float3 rotPos = rotateVectorByQuat(boneRot[input.boneIndices[i]], weightPos);
tempPos.x += (bonePos[input.boneIndices[i]].x + rotPos.x) * input.weights[i];
tempPos.y += (bonePos[input.boneIndices[i]].y + rotPos.y) * input.weights[i];
tempPos.z += (bonePos[input.boneIndices[i]].z + rotPos.z) * input.weights[i];
}
float temp = tempPos.y;
tempPos.y = tempPos.z;
tempPos.z = temp;
// set position
output.pos = mul(tempPos, wvpMat);
Type the path to the object file in the text box then press import object.
Rotate: LMB + Move
Zoom: Scroll Wheel
Pan: Shift + LMB + Move
Programmer: Joon Kang
Mentor: Samil Chai
Start Date: 2018-03-11
End Date: 2019-01-13
Portions of source code have been removed for privacy purposes.


