The model viewer is a tool used by artists and programmers to verify models, modify their in-engine properties, and as an editor for things like particles and UI.
It was primarily intended for use with model verification in our rendering pipeline, but its potential was realized when we started making meta-files for our models and animations. Shortly after that I began implementing interfaces for more and more in-engine things. Currently, some of the features I have implemented in the model viewer is: Graphics settings, scene saving and loading, controls for lights, texture preview, a particle editor, an animation tool, a bone socket editor, and a profiler.
A lot of what happens here in the model viewer has to do with other graphical stuff I've made that you can read more about in Spite and saveTheWorld.
Navigation and GUI
I took inspiration for the navigation from many other common 3D modeling programs, like Maya and Blender. I wanted it to be simple to use for our artists, who mainly use Maya. The GUI is entirely made with Dear ImGui, and I've become quite proficient in it over the course of making the model viewer. You can also drag and drop models, textures, and shaders into the window to load them.
There's a lot of freedom when making this tool, as every asset and every part of the rendering is accessible. If I wanted to change which shader is run for the fullscreen passes, I could open an interface for that. Exposing a texture is easy, even showing the current texture when hovering.
There are tons of helper functions for things like exposing a radian rotation vector as a degree rotation, opening and saving files, saving and loading json files, and so on.
Example of the model viewer in animation/bone socket mode
The animation editor allows you to map animation names to filenames, preview many configurations of animations, edit bone sockets, and edit animation events.
The model viewer uses exactly the same rendering engine as the main game, and so the models appear in the model viewer exactly as they will look in-game. There's controls for blending and additive animations. The bone socket editor doubles as being able to rotate individual bones, and test cutscenes. The bone socketing here is also our way to edit hitboxes for our enemies.
I created a particle system together with an editor for it. There's emission shapes, every value has over time, random, and curve variants. Oh, and there's bezier curve editors. There's noise, there's flipbook for sprites.