- Home /
Importing textured OBJ Assets doesn't work.
For some time I'm trying to develop an importer, which can transfer large scenarios from other visualization programs into Unity. These scenarios consists of multiple OBJ-Files with Material (.mtl) and Textures (.jpg, *.png).
Now my problem is, that the internal Unity-Loader is not in a position to load the geometries correctly textured and i dont know why. I copy all Geometry-Files to the Unity-Ressource-Folder and leave the unity-engine to interpret the files. In most cases the objects aren't textured like i would expect it and like other cad tools, which load these files correctly.
Can someone give a hint, where i can find the problem or maybe a solution?
Unfortunately at the moment, I am instructed to use exactly these OBJ files. So changing the file format is currently not an option.
Thank you.
here a link to the example obj file:
Answer by Eric5h5 · Jun 04, 2013 at 03:38 PM
The Unity importer is working correctly. The problem is that the .obj file is messed up, since for some reason it has 4 materials specified, and only one of them includes a texture. The .obj file needs to be fixed and output correctly.
The Obj-structure was really broken. In my OBJ files all groups had the same name. Unity uses this as an ID and thats why the sub-geometries were merged. Thus, the texture coordinates and materials are not assignable.