groverburger/g3d

objloader.lua attempt to index a nil value

JakeOJeff opened this issue · 4 comments

I Get Error

g3d/objloader.lua:55: attempt to index a nil value

after trying to load a Tourus.
I have triangulated in modifiers , and i triangulated faces in Export but still this error prevails. Im fairly new so , i am not an expert at this!

hi! I am having the same issue. I looked in the .obj files that were included with the g3d demo and it seems they are a little different from the ones that I am getting from blender. There are more slashed and less numbers? Maybe blender has changed the way they encode files (atleast, by default) since then? I don't know.

Can you attach a file that causes this error?

Thanks! I just pushed a fix to the master branch.

The problem was that your OBJ file for whatever reason doesn't contain texture data in the vertices components. You should check your export settings as you probably want texture coordinates, but at least now the file won't crash g3d.