MODEL VIEWER
MOTIVATION
While we were building our own custom engine, our graphic designers needed a more efficient way to confirm assets created for the game. Therefore I saw an opportunity to create a modelviewer, in which they can preview the models as they will be rendered in engine.
TOOL Modelviewer
TIMEFRAME 1 week (20h/week)
ENGINE In-House (Friendship Engine)
PROCESS
I made the modelviewer into it’s own program, to keep it as contained as possible. Next I added the floor, gizmo, and a simple menu using Dear ImGui.
The drag & drop function was implemented together with a observer pattern, sending a filepath to the main program where the mesh will be loaded and displayed onto the viewport. I had to rewrite some parts of the engine’s mesh import pipeline to make it work.
The textures are found automatically first by the name of the material that is baked into the mesh, and if that’s not found it searches by filename. If there’s no corresponding texture a error message is displayed and the mesh will receive a default texture.
FINAL THOUGHTS
This was a very fun tool to make! As our engine progressed I kept making updates to it to make sure the graphics were up-to-date, and it was always fun to revisit.
Two things I would’ve added if I have had more time is to be able to change the pixel shader in runtime and function to preview a skeletal model’s different animations.