Where in the world is kberg's obj loader

Member
Posts: 227
Joined: 2008.08
Post: #1
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.
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #2
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.
Quote this message in a reply
Member
Posts: 227
Joined: 2008.08
Post: #3
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.
Quote this message in a reply
Member
Posts: 268
Joined: 2005.04
Post: #4
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_l...xample.zip
Newer One: http://www.killerrobots.com/misc/ObjLoader.tgz
Quote this message in a reply
Member
Posts: 227
Joined: 2008.08
Post: #5
Thanks, mine was too buggy(EXC_BAD_ACCESS on sscanf)
Quote this message in a reply
Post Reply