i am getting this error. i've tried multiple versions of blender 2.8 but none work.
-
$\begingroup$ Are you sure that the path is correct? It says that it can't find the file or directory. $\endgroup$– Robert Gützkow ♦Jul 19, 2019 at 16:21
-
$\begingroup$ Ya I've tried taking the .obj out of every folder and just placing it on my desktop and still can't find it $\endgroup$– Thomas BurnsJul 19, 2019 at 16:28
-
$\begingroup$ Can you try uploading the OBJ file? Blender 2.8 candidate release can open OBJ files no problem for me $\endgroup$– AskejmJul 19, 2019 at 16:46
-
$\begingroup$ drive.google.com/open?id=1SuKy7ZHatMfOcir6rG2HINaDT1loZjjb $\endgroup$– Thomas BurnsJul 19, 2019 at 17:03
-
$\begingroup$ Thanks for sharing the file. I can confirm something goes wrong and I have to investigate this further. $\endgroup$– Robert Gützkow ♦Jul 19, 2019 at 18:06
1 Answer
You stumbled upon a curious problem with filename handling in the .obj format, that isn't well defined in the specification. I will discuss this with the Blender devs, perhaps the importer needs small adjustments to parse the file correctly under these specific circumstances. Since it worked in 2.79b it can be considered a regression.
TL;DR The handling for filenames with blanks isn't well defined in the .obj format specification and Blender expected a different format than what was provided in your file.
The Problem
The .obj is a text format for storing 3D models. The format contains various attributes that describe the geometry of the model. Typically the .obj is accompanied by a .mtl which describes the material and textures applied to the model. In order to keep track which files belong together, the .obj may contain a mtllib attribute followed by the filename of the .mtl.
Usually the beginning of an .obj would look something like this:
# Blender v2.80 (sub 74) OBJ File: ''
# www.blender.org
mtllib test.mtl
o Cube
v 1.000000 1.000000 -1.000000
v 1.000000 -1.000000 -1.000000
In case of your file it is:
#
mtllib "tree stump1 original model.mtl"
usemtl tree_stump1_original_model
v 4.136163 -1.200306 -10.798826 0.113725 0.152941 0.141176
v 4.140683 -1.205297 -10.794383 0.117647 0.156863 0.145098
Notice that the filename contains quotations marks. This is causing the problem. The software you used to export this model quoted the filename to avoid confusion on how to interpret the filename. While this is common practice in other file formats the specification for .obj doesn't mention quoting filenames and says specifically:
Blank space and blank lines can be freely added to the file to aid in formatting and readability.
Which can be interpreted as blanks in filenames can be stored as is, which is precisely what Blender does. Unfortunately Blender's importer doesn't expect the quotation marks in the filename therefore misinterpreting the correct filepath. This results in the aforementioned error in your question.
The Fix
Open the .obj file in a text editor of your choice an remove the quotes and save. It should look like this:
#
mtllib tree stump1 original model.mtl
usemtl tree_stump1_original_model
v 4.136163 -1.200306 -10.798826 0.113725 0.152941 0.141176
The file can now be imported by Blender.
-
1$\begingroup$ The ticket for this issue can be found here: developer.blender.org/T67266 $\endgroup$– Robert Gützkow ♦Jul 19, 2019 at 22:38
