Page MenuHome

Arguments for procedural texture files not supported for MTL when importing WaveFront OBJ files
Closed, ResolvedPublic

Description

System Information
Windows 7 Ultimate 64-bit
32.0GB RAM, Intel Core i7-3770k CPU @ 3.50GHz
GFX: GeForce GTX 980 Ti (Driver 355.82)

Blender Version
Broken: 2.75a c27589e

Short description of error
The specification for MTL files states that texture maps can support optional arguments before the file name allowing the imported material to be manipulated such as texture size (http://paulbourke.net/dataformats/mtl/). When importing a WaveFront OBJ with a linked MTL file, these optional arguments are parsed as part of the filename and therefore end up producing a material with an invalid image linked.

Exact steps for others to reproduce the error

  1. Extract the 10 files included in the ZIP archive attached, consisting a WaveFront OBJ, a linked MTL file and 8 textures.
  2. Import the WaveFront OBJ file into a new Blender project.

The expected result here would be that all the materials applied to the meshes have a size manipulation of 1, -1, 1. However, instead the arguments provided to the texture map are included in the material file names, which prevent them from working at all.

Event Timeline

Kruithne (Kruithne) raised the priority of this task from to 90.
Kruithne (Kruithne) updated the task description. (Show Details)
Kruithne (Kruithne) edited a custom field.

I think that it is full specifications of the .mtl format.
The content that Wavefront OBJ Import/Export supports is written here.
I think that the specifications are not included.

Bastien Montagne (mont29) lowered the priority of this task from 90 to 50.Oct 13 2015, 10:56 AM

Well… one thing for sure, it should not break texture filepaths. ;)

Supporting those options is more a TODO really, but will try to add at least basic ones too, since I’m at it…

Bastien Montagne (mont29) changed the task status from Unknown Status to Resolved.Oct 13 2015, 12:46 PM

@Bastien Montagne (mont29):
There is an option elsewhere, but they do not seem to be excluded.

-blendu on | off
-blendv on | off
-cc on | off
-clamp on | off
-mm base gain
-o u v w
-s u v w
-t u v w
-texres value
-imfchan r | g | b | m | l | z

Alias/WaveFront Material (.mtl) File Format

@Bastien Montagne (mont29):
I'm sorry, it seems to extract only a thing to use.