Strange obj files.

Started by
2 comments, last by GameDev.net 17 years, 5 months ago
Hi there. The problem: I've write my own OBJ file parser. Currently it can parse only the vertex data, normals and faces (no texture coordinates, shading groups etc...) and drawing it. For testing i've used some obj files downloaded from some sites. And they all working good. But when my friend gives me some obj files, that was exported from 3dmax8 my parser not drawing it correctly, it looks like all the vertexes has a random coordinates etc... I've spent number of nights to debug this parser and it works good. I mean, that all data sotred in obj file are readed and stored in my structures correctly. The problem is in obj file a think. So i don't understand why some obj files are working, others - no. May be i need to do some calculations before drawing? Or may be there is a different formats for obj files? Please help.
Advertisement
I don't know much about OBJ files, but try making it really simple. So, draw a cube and export it and attempt to load it, this way you can check that the vertex coords you have loaded and the exact ones in the file, and also you can check the vertex coords from 3ds max and compare them to the ones that are in the exported OBJ file.

Edit:: Well, you said parser, so I assume that you're using the text version of OBJ files?
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
Yes, i'm using text version.

...btw, after openning this obj by Blender and then exporting it back to obj it starts working normally. I think there is problem in 3DMax obj exporter, may be there some differences. Can't find any info about this issue.
In my experience, the obj-fileformat is intensely broken from all other exporters than Maya. 3dsmax especially is crap.

This topic is closed to new replies.

Advertisement