Page MenuHome

OBJ import gives error for Ke / emmisive (single value instead of color)
Open, Confirmed, LowPublic

Description

System Information
Operating system: Windows-10 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA 419.67

Blender Version
Broken: version: 2.80 (sub 60), branch: blender2.7, commit date: 2019-04-29 17:52, hash: rB047081841113

Short description of error
Importing obj files gives an error.

Exact steps for others to reproduce the error

  1. Download any of the obj files in this link: https://stock.adobe.com/collections/opeoUn78Uq1btIwcdlRtHBpsn3vENQ12 (I uploaded one of them below)
  2. Import it in Blender and it gives this error:
(  0.0000 sec |   0.0000 sec) Importing OBJ 'C:\\Users\\filibis\\Downloads\\AdobeStock_222486460\\z2_spacesuit_zero_gravity_pose.obj'...
  (  0.0010 sec |   0.0010 sec) Parsing OBJ file...
    (  0.4475 sec |   0.4465 sec) Done, loading materials and images...
Progress:  33.33%

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.047081841113-windows64\2.80\scripts\addons\io_scene_obj\__init__.py", line 145, in execute
    return import_obj.load(context, **keywords)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.047081841113-windows64\2.80\scripts\addons\io_scene_obj\import_obj.py", line 1200, in load
    use_image_search, float_func)
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.047081841113-windows64\2.80\scripts\addons\io_scene_obj\import_obj.py", line 334, in create_materials
    float_func(line_split[1]), float_func(line_split[2]), float_func(line_split[3])]
IndexError: list index out of range

location: <unknown location>:-1

location: <unknown location>:-1

Details

Type
Bug

Event Timeline

Philipp Oeser (lichtwerk) triaged this task as Normal priority.

Hm, this mtl file has emmisive / Ke as a single value:

newmtl shield_Mat
Pr 0.0),
Ni 1.6
Ka 0 0 0
Pm 1
d 1.0
Ke 0.0

Afaict this is supposed to be a color [3 components]?

Not sure if they [adobe] are breaking the specification [not sure if this is even in there officially...wikipedia says it is an clara.io extension]
[btw. that roughness / Pr line looks a little suspicious as well ;)]

@Bastien Montagne (mont29): would be easy to check the line for 1 or 3 values (and act accordingly), could do that, question here is just [again] if we are adapting to custom flavours?

Philipp Oeser (lichtwerk) renamed this task from Importing Obj Gives Error to OBJ import gives error for Ke / emmisive (single value instead of color).
Brendon Murphy (meta-androcto) lowered the priority of this task from Normal to Confirmed, Low.

lowering priority. it's a hard call.