Page MenuHome

OBJ importer - reflection map texture assigned to base color node during import
Closed, ResolvedPublic

Description

System Information
Operating system: Windows 10
Graphics card: GeForce GTX 1060 6GB

Blender Version
Broken:
Blender 2.82 (sub 7) (hash 375c7dc4caf4 built 2020-03-12 15:41:08)

Short description of error
When importing .obj with materials (.mtl file) base color node is assigned to relfection texture map ('refl' option in mtl) instead of diffuse texture map('map_Kd' option in mtl).

Exact steps for others to reproduce the error
Import any obj file with .mtl with material such as:

newmtl Black
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.207131 0.039412
Ks 0.500000 0.500000 0.500000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 2
map_Kd base_color.jpg
refl metallic.jpg

In result base color of Black material will be matallic.jpg texture instead of base_color.jpg.

Problem seems to be in line 221 of rBA/io_scene_obj/import_obj.py, where refl map is saved as base_color_texture instead of metallic_texture as is specified in obj exporter rBA/io_scene_obj/export_obj.py in line 119

I attached a zip file with sample obj that doesn't import properly

Event Timeline

Kenzie (kenziemac130) changed the task status from Needs Triage to Confirmed.Nov 24 2020, 11:14 PM

The new C++ based .obj importer handles this correctly ("experimental" in the menu in 3.2, no experimental label in 3.3). The python based importer will likely get removed soon, and very unlikely to get fixes.