-
Notifications
You must be signed in to change notification settings - Fork 0
3D Model Format
Description of the optimized binary model format.
There is a specialized and optimized binary file format to store models. The format includes the vertices, indices, normals, UV coordinates, material and texture names. Whenever a model is loaded, it first tries to find the optimized model file and if it is not found it imports the original file and creates an optimized file.
The Shoggoth Engine uses ASSIMP (Open Asset Import Library) to import almost any format of 3D models. For more information check the official ASSIMP site. Once the model is imported, the important information is copied into a Model object which stores all the needed information and then writes the optimized binary model file. ASSIMP is used to open many model formats, and import speed is not as important. The optimized binary model file is designed with import performance in mind.
In the Shoggoth Engine, a model is a collection of one or more meshes with materials and textures. A model is completely described in a file, so every file should describe only one model and never a complete scene. A model can consist of one or more meshes, each one with a material and textures. A RenderableMesh and a RigidBody's convex and concave hulls use a Model by giving the path to a model file. It then reads the model and stores it a resource pool with only one instance of each in memory. Internally a Model has an identifier (which is the file name) and has a vector of meshes.