.obj import working

Finally got the .obj import working. Here you can see it with a 88k poly test file. Check out the read more section for a closer look at .obj. Niven .obj Import
Test Today, I had finally some time to work on the .obj file import for Niven. Wavefront OBJ files are particulary well suited for mesh exchange with other tools as they’re extremely simple to parse/generate and supported by many popular 3D packages. OBj can be used to describe a variety of 3D primitives, from polygons over curves to NURBS surfaces, however, Niven does only support a small subset of those. Currently, the parser just recognizes the v (vertex), vn (vertex normal) and f (face) statements. It does only handle triangular faces, but this does not seem like a big limitation to me. Eventually the faces have to be triangulated anyway, in order to be rendered properly (quads might create cases in which they’re renderer incorrectly under OpenGL). I might include an on-demand tesselator at a later stage so people could export at least quads, maybe even more sided polygons and not worry about tesselating.


Comments powered by Disqus