![]() So if we want to import a model from these file formats, we'd have to write an importer ourselves for each of the file formats we want to import. This should give you a basic perception of how model file formats are generally structured.Īll by all, there are many different file formats where a common general structure between them usually does not exist. It is recommended to visit the Wavefront's wiki page at least once to see how such a file format's data is structured. The wavefront object format is generally considered to be an easy-to-parse model format. ![]() obj only contains model data with minor material information like model colors and diffuse/specular maps, while model formats like the XML-based Collada file format are extremely extensive and contain models, lights, many types of materials, animation data, cameras, complete scene information, and much more. A common issue is that there are dozens of different file formats where each exports the model data in its own unique way. It is our job to parse these exported model files and extract all the relevant information so we can store them in a format that OpenGL understands. ![]() We, as graphics programmers, do have to care about these technical details though. All the technical aspects are hidden in the exported model file. This way, artists have an extensive toolkit to create high quality models without having to care too much about the technical details. The tools then automatically generate all the vertex coordinates, vertex normals, and texture coordinates while exporting them to a model file format we can use. These so called 3D modeling tools allow artists to create complicated shapes and apply textures to them via a process called uv-mapping. What we want instead, is to import these models into the application models that were carefully designed by 3D artists in tools like Blender, 3DS Max or Maya. ![]() However, unlike the container object, we can't really manually define all the vertices, normals, and texture coordinates of complicated shapes like houses, vehicles, or human-like characters. In bigger graphics applications, there are usually lots of complicated and interesting models that are much prettier to look at than a static container. In all the scenes so far we've been extensively playing with our little container friend, but over time, even our best friends can get a little boring.
0 Comments
Leave a Reply. |