Help Support the Baja Engine! Donate to Breezeway Studios!

Baja Engine -> Forum -> Engine -> Engine General -> engine crashes when loading obj files   |   [Search Forum]

engine crashes when loading obj files

New Post New Topic New Poll
MacBorow Posted: October 13, 2008, 8:36 PM quote

Newbie
*
Group: Testers
Member Id: 1819
Joined: Oct 12 2008
Posts: 0
Hello,
Perhaps the solution is obvious but I cannot figure out this one. I'm experiencing problems while loading models from obj files - either in the editor or from script. I've remove the references to mtl file and other lines that might have caused problems (i.e. empty lines with whitespace characters seemed to be a problem for the parser) but still the engine crashes on level.load('xxxx.obj'). This is what I found in the logs:
[9/13/108 22:54:16]: loading 'main.lua'
[9/13/108 22:54:17]: Material::addTexture error, file '' not found!
[9/13/108 22:54:17]: face dropped, incorrect size

[9/13/108 22:54:16]: adding vertex shader ../../tools/shaders/mixer3_hardware.vp
[9/13/108 22:54:16]: adding vertex shader ../../tools/shaders/envelope.vp
[9/13/108 22:54:17]: Material::addTexture error, file '' not found!

Am I missing some necessary initialization?
The obj file is very simple - I first tried to load a small scene created in Wings3D but when it didn't work I used a simple "box" model with v and f lines only.
Thanks in advance,
Maciej
pm  email   
MacBorow Posted: October 15, 2008, 5:52 PM quote

Newbie
*
Group: Testers
Member Id: 1819
Joined: Oct 12 2008
Posts: 0
Ok, I've spent some time to check what is acceptable and what is not. It seems that the .obj format is not fully supported - I needed to remove the following tags:
usemtl (mentioned in the docs) but also: o, g
(Object and group names are not supported either?)
I'm not sure about the comments ('#')
Additionally I noticed that the Baja engine cannot read numbers written using scientific notation (0.0000e+0, etc.) - this format was used by Wings3D.

Are these things going to be supported in one of the next builds of the engine or there is little chance?
Does anyone use Blender to convert obj to dotXSI? Is all info (object names, materials) preserved?
pm  email   
New Post New Topic New Poll

Options