Organizing mesh data storage
In the previous chapters, we used fixed, hardcoded vertex formats for our meshes, which changed between demos, and also implicitly included the material description. For example, a hardcoded texture was used to provide color information. A triangle mesh is defined by indices and vertices, with each vertex consisting of a set of attributes with distinct data formats that correspond to the lvk::VertexInput
vertex input description. All auxiliary physical properties of an object, such as collision detection data, mass, and moments of inertia, can be represented by a mesh, while other information, like surface material properties, can be stored outside the mesh as external metadata. It’s also worth noting that small 3D models, like the rubber duck we used earlier, can be loaded quite quickly.
However, larger and more intricate real-world 3D models, especially when using transmission formats like .gltf
, may take several minutes to load. Using a...