groverburger / g3d

Simple and easy 3D engine for LÖVE.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

objloader.lua attempt to index a nil value

JakeOJeff opened this issue · comments

commented

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.

commented

Can you attach a file that causes this error?

commented

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.