iDevGames Forums
Where in the world is kberg's obj loader - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Where in the world is kberg's obj loader (/thread-2071.html)



Where in the world is kberg's obj loader - Oddity007 - Dec 5, 2008 06:07 PM

I've been searching the net-world over for the kberg obj loader but on every link I get a 404 not found error.
Can any one tell me a place I missed or re-upload it?
I need this loader as all the other ones on the net give me errors up the a##,
and I'm in the phase of testing with things other than the legendary hard-coded cube.


Where in the world is kberg's obj loader - AnotherJake - Dec 5, 2008 07:34 PM

The last version I tried of kberg's obj loader had problems reading many obj files, so it may not solve your problem with loading errors anyway (but if you find it let us know!).

In my experience with obj, you have three options:

1) study the output from your favorite obj exporting program and parse based on that -- good practical route to take
2) write one that covers all kinds of inconsistencies with as many obj files as possible -- doable but labor-intensive in practice, which I've done, but do not recommend
3) use some other lib, like the fbx SDK -- sometimes hard to find and use 3rd party libs, but theoretically best approach

Do keep in mind that many many obj files are not to spec, and are often corrupt in various ways, so it's a good idea to re-convert anything you get off the net with something you know outputs a consistent obj file. I tested lots of models from turbosquid, which is how I know this. Many uploaders don't bother to verify their files, they just click export in whatever odd program they're using and assume it's valid.

Lastly, it is not terribly difficult to write your own basic obj parser, and is a recommended exercise. If you want to tackle it yourself, here are some links I have sitting around:

http://www.martinreddy.net/gfx/3d/OBJ.spec
http://www.royriggs.com/obj.html
http://www.fileformat.info/format/material/

Like I said, if you do it yourself, it's best to stick with the output obj files from your favorite 3D editor so you have something consistent to work with.


Where in the world is kberg's obj loader - Oddity007 - Dec 6, 2008 02:36 PM

Oh, I've already written an .obj loader, I would have to do it eventually,
I just thought that kberg's supported more features than mine.


Where in the world is kberg's obj loader - Bachus - Dec 6, 2008 04:41 PM

I assume it's okay to redistribute these. Anybody heard from Karl recently?

I've got two different versions.

Older One: http://www.killerrobots.com/misc/model_loader_example.zip
Newer One: http://www.killerrobots.com/misc/ObjLoader.tgz


Where in the world is kberg's obj loader - Oddity007 - Dec 6, 2008 05:48 PM

Thanks, mine was too buggy(EXC_BAD_ACCESS on sscanf)