OBJ/MTL: import fails for .mtl files with texture options -o u v, -s u v #89421
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#89421
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Linux
Graphics card: Intel HD
Blender Version
Broken: 2.93
Worked:
Short description of error
MTL files allow textures to be scaled and offset with a texture option
v and w are optional, but importing currently fails with an exception for MTL files that omit v or w.
Exact steps for others to reproduce the error
Import this .obj file: MTLTextureOptionBug.zip
The important line is
Details
The error is ultimately that the one- or two-element list is passed on to be assigned to the Mapping node's inputs
It can be fixed by expanding the list of offset/scale parameters to three elements around here .
For the relevant part of the MTL spec, open http://paulbourke.net/dataformats/mtl/ and Ctrl+F for "The -o option offsets".
Context
This was found at https://blender.stackexchange.com/questions/228486/import-obj-error-sequences-of-dimension-0-contain-3-items-not-2
Added subscriber: @scurest
#95719 was marked as duplicate of this issue
blender/blender#88087 was marked as duplicate of this issue
Added subscriber: @rjg
Added subscribers: @Boostedbyniko, @lichtwerk, @ankitm, @StephenSwaney
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @aras_p
Added subscribers: @TGlinskas, @EAW
Changed status from 'Confirmed' to: 'Resolved'
The new OBJ importer (experimental in 3.2, default in 3.3) handles this correctly. Now added test coverage to prove it as well.
@aras_p Great! I noticed it still seems to get confused by things like
map_Kd -s 0.5 0.5 1.png
though.