mercoledì 11 maggio 2016

Day 124: A better model loader

The major flaw of the engine is the inability to automatically load complex model.
No material loading is supported, nor the abilty to load a model composed by multiple meshes.

This morning I decided to implement a better obj loader, so I studied the specifications of the obj and mtl formats, and then I decided to avoid doing it myself, because it's quite a huge amount of work, and not a rewarding one.
So I'll use a single-header opensource class, tiny_obj_loader, which does exactly that and supports groups and materials. My job will be to pass these raw data to the correct structures, to add the support for multiple meshes, and to improve my other managers, like the texture loader, to avoid reloading textures with the same name. Quite a long (and boring) job on its own. I'll start implementing it tomorrow.

Nessun commento:

Posta un commento