It seems that trying to import this .obj file (in babylonjs sandbox), it can’t be read and I can’t understand the error in console. It works fine in other 3d viewers.
The error is the following:
solidParser.ts:212 Uncaught TypeError: Cannot read properties of undefined (reading ‘x’)
at e._unwrapData (solidParser.ts:212:76)
at e.parse (solidParser.ts:745:22)
at e._parseSolid (objFileLoader.ts:242:21)
at e.importMeshAsync (objFileLoader.ts:156:21)
at e.loadAsync (objFileLoader.ts:178:21)
at sceneLoader.ts:1050:26
at f (sceneLoader.ts:571:13)
at o.onload (fileTools.ts:369:9) aaa.zip (1.1 MB)
the expected format here would be the f 1//1 2//2 etc...
The other viewers are probably trying to fix this under the hood by assuming that, if you have a face in the f 1/1 2/2... format, but there are no UV coordinates, then the second index refers to the normals instead of the UVs. Should we do the same @sebavan ? We could perform this correction by default, or throw an error in the default case, and pass an option to correct.
That would be the cherry on the cake Though, I think the current behavior is quite expected. No UV, no tex projection == no money, no candy, no cando I actually encountered this before while being careless with my assets and in fine, I’m fine with it the way it is (of course, personal opinion only).
May be you could have control over the user? I.E. providing some guidelines for import files?
Simple suggestion of course. Don’t mind me and meanwhile, have a great day