ands / lightmapper

A C/C++ single-file library for drop-in lightmap baking. Just use your existing OpenGL renderer to bounce light!
1.41k stars 133 forks source link

Proper obj format #6

Closed rasteron closed 7 years ago

rasteron commented 7 years ago

Hi, I'm trying to test other objs or just simply open the current example gazebo.obj model to Blender or any other modelling tool and exporting it again. The new output model crashes the example program with this error.

File: C:\ands\example\example.c, Line 319
Expression: !"unknown identifier"

Any ideas?

JDragan commented 7 years ago

I have the same problem. Im exporting from Blender, and whenever I want to generate custom UV Lightmap, the result is mess. @rasteron make sure you triangulate your mesh (Ctrl+T), import the example, then experiment with the settings. result

rasteron commented 7 years ago

@r3aktormk Thanks! but still no luck and same error even exporting with triangulate mesh..

ands commented 7 years ago

Sorry, I should have mentioned that the master branch only has the minimum viable obj parser to read that one obj file. If you switch to the development branch, you'll get a proper obj loader and slightly better lightmapping performance. :)

rasteron commented 7 years ago

Awesome, thanks works great now! :D

ands commented 7 years ago

Cool :)