Loading OBJ-files

I have currently managed to setup the code to load OBJ-files by which I use to render shapes. This will be necessary later on for colliding different objects. Technically one of the labs contained code for loading these files, however that code seems outdated. Also, I want to be able to load any type of OBJ-files, not just old ones. I took another course in computer graphics 1-2 years ago, there we were provided with code to load OBJ-files as well. This loader was good, but it seems to not be completely generic or contain bugs. It might be the case that I fixed a certain bug in that code, but I believe I saved that code on an external HDD which is far away from where I am at the moment. In any event, this code can be found here. So I continued my search online for finished C++ OBJ-file loading code, and found this header.

I have right now a mix of the first and secondly mentioned codes. The first one provides a better quality but crashes if it doesn't load very specific OBJ-files, because of that error in the code. I have a theory that the loading process is fundamentally the same, and that the only difference is the math-algorithms used in the two programs. The one from the course I took is more professionally written by a professor while the latter is made by a hobbyist. In any event the code "works", and it is out of scope of this project to have a perfect code for loading files. I will post two images comparing the result you get from using the different programs.

Normally I wouldn't care much if it crashed for some OBJ-files, but I need low-polygon-resolution files in order to load my project program quickly.

Poor quality OBJ-loader
Good quality OBJ-loader

Kommentarer

Populära inlägg i den här bloggen

Collisions

Optimizing Particles With VBO

Particle Generation