OBJ not opened by Rhino

… but the Windows OBJ preview shows the model and also other 3D software is able to open it. Could be great if Rhino could do it too.

cadnav.com_A0918B025.obj (2.7 MB)

Your .obj file contains illegal lines in the texture section:

vt 0.500000 0.941923 0.000000
vt 0.500000 0.919012 0.000000
vt -1.#IND00 -1.#IND00 -1.#IND00
vt -1.#IND00 -1.#IND00 -1.#IND00
vt 0.528811 0.868659 0.000000
vt 0.531615 0.862565 0.000000

Also all the textures seem to be 0.

Can you generate the .obj file without textures?

I tried reading the file with my Python/C++ code which operates independently of Rhino but it fails. I would need to improve its robustness in order to read your .obj file.


Finally I opened the file per Unfold3D and saved it again. General I hope Rhino can open files like this without additional tools in the future.

cadnav.com_A0918B025_unfold.obj (4.1 MB)

Your prior file had several separate meshes. Your latest file has combined these into one.

Which version do you prefer?


Separate meshes are better. So it’s easier to get control over specific parts.


Do you have a version of the file with the multiple meshes you prefer and legal texture lines?

If not, how do ypu want to treat the illegal texture lines? Set the texture value to 0.0 and the u,v values to 0.0, 0.0?

You have textures in the .obj file but I need an mtl file with the textures in order to apply them to the mesh inside Rhino. Can you supply the mtl file? This may also help me to better understand how to treat the illegal texture lines.


I don’t know much about meshes and UV in detail. I have this model of a suitcase from the internet and wanted to fill a scene with it. I was just wondering that the simple task to import the model failed, although other software loads it easily. I wish Rhino would just open it and not spend a long time trying to do it any other way. Texture coordianates don’t matter to me in that case, and there was no texture involved.

Are you improving the Rhino import right now?

The next build of V8 will read the original obj file. See https://mcneel.myjetbrains.com/youtrack/issue/RH-74284



I have been working on mesh tools for some time. I deal with meshes generated from drone photos and these can be quite large. My current favorite test case is a mesh with 100M faces. It is not much fun working with this mesh in Rhino as the response is so slow. So I have been creating faster procedures for a mesh of this size. For example, importing this mesh and then checking for intersecting faces, duplicate vertices or faces, degenerate faces, non-manifold edges, disjoint meshes and other problems using Rhino’s Mesh Wizard tool takes Rhino 22 min vs 26 sec in my code or about 50X faster. The speed up was achieved thru 100’s of iterations: changing the algorithm, changing the code implementation, using parallel execution, using AVX2 SIMD and lots of thinking about the architecture of the program. I am not done, and your interesting .obj file points out that my code for reading the .obj file needs to be made more robust.

I have several other tools for analyzing the mesh for drone applications. These can create maps of contours, colored maps of elevation/slope/slope direction. And the volumes of piles and holes can be computed for construction applications.

I need to add more documentation to the headers of the procedures to make it easier to understand. The body of the code is fully documented with about 1 comment line per every few code lines.


I enhanced my program to read your suitcase as 7 separate meshes.
Here are 6 of the meshes:

and here are all 7 meshes:

My program also allows you to hand edit the .obj file to split out separate meshes and it will read those even though the vertex indices are not renumbered.

I exported each of the 7 meshes to a separate .obj file:
cadnav_1st_mesh.obj (90.3 KB)
cadnav_2nd_mesh.obj (292.4 KB)
cadnav_3rd_mesh.obj (122.5 KB)
cadnav_4th_mesh.obj (91.3 KB)
cadnav_5th_mesh.obj (30.7 KB)
cadnav_6th_mesh.obj (1.1 MB)
cadnav_7th_mesh.obj (46.7 KB)

Are you using Rhino 8 WIP to do your work now? Is the enhancement Tim promised active in 8 WIP now?

If you would like to try my Python/C++ DLL script, I could clean it up and then send you links to try it out.


1 Like

I am a bit overwhelmed, because my wish was only that Rhino gets better at reading OBJ data. :wink:

I’m afraid if I start scripting for basic, small functions, I’ll lose track and there won’t be enough time. I observe with me that all too many small tools cause problems in the long run when after Rhino updates they don’t load, stop working, have to be reinstalled or … . I’m glad that Rhino 8 will read the file now.

Sounds good.