Extending the Model Class with Wavefront Object File Support
0:00 Motivation: Moving from hard-coded model data to loading it from external .obj files for flexibility and reduced errors.
0:29 Wavefront Object Format: Introducing the Wavefront .obj file format and explaining basic components like vertex positions (v), vertex normals (vn), and texture coordinates (vt).
0:34 Wavefront Object Format: Faces: Explaining the face definitions (f) and how they reference vertex, texture, and normal indices. Simplifies the explanation by ignoring materials and other details.
0:44 Tiny Object Loader: Using the tinyobjloader.h library for parsing .obj files. Instructions provided for adding the library to the project using both Makefiles and Visual Studio.
0:57 Vertex Struct Extension: Extending the vertex struct to include normal (glm::vec3) and uv (glm::vec2) fields.
0:17 Model Loading Function: Creation of a createModelFromFile function to load model data using the tinyobjloader library.
0:45 Data Retrieval: Load object data from the file, including vertex, normal and texture coordinate information.
10:08 Vertex Position and Color: Initialized vertex position from .obj data.
12:25 Vertex Color Extention: Explaining the color specification and demonstration using a colored cube object file.
15:13 Lighting Implementation Delay: Deferred implementation of model lighting for next tutorial.
15:21 Vulkan Index Buffer Limitation: Emphasizes need for only single index buffer in Vulkan, even if different indices are used for position, texture, and normal.
16:13 Index Buffer Creation: Explaining how to create the index buffer. Checks for duplicate vertices using a std::unordered_map to avoid redundant data in the vertex buffer.
17:11 Hash Implementation: Creating lve_utils.hpp with a generic hash combine function for use with an unordered_map.
18:11 Vertex Equality Operator: Implementing an equality operator for the vertex struct.
19:22 Hash Function Implementation: Implementing a hash function for the vertex struct to be used with unordered_map.
21:54 Performance Check: Runs successfully, and observes significantly reduced vertex count from 30,888 to 5545.