Import wavefront OBJ does not correctly parse the '-bm' parameter. (bump map too strong). #57055

Closed
opened 2018-10-03 21:43:27 +02:00 by Jim Gaston · 3 comments

System Information
n/a

Blender Version
Broken: 2.79
Worked: n/a

Short description of error

when importing an obj file,
the bump multiplier is ignored.

Exact steps for others to reproduce the error

  1. export an obj file.
    set the normal_factor on a material to a value other than 1.0
    export to wavefront obj, with materials.

the resulting .mtl file will correctlyinclude the factor.
e.g.

  map_Bump -bm 0.025400 bumpmap.png
  1. import data (import error)
    import the obj file.

notice that:

the bump map material now has a factor of 1.0
and that the bump texture is too strong.

  1. It seems, when digging into the source that.

in import_obj.py
near the line

   elif type == 'Bump':

the bump_mult will be replaced with 1.0 because

 len(bump_mult) > 1 # never true

this occurs because bump_mult is not a string,
bump_mult is an array with the first element being a bytearray


Thank you.

**System Information** n/a **Blender Version** Broken: 2.79 Worked: n/a **Short description of error** when importing an obj file, the bump multiplier is ignored. **Exact steps for others to reproduce the error** 1) export an obj file. set the normal_factor on a material to a value other than 1.0 export to wavefront obj, with materials. the resulting .mtl file will *correctly*include the factor. e.g. ``` map_Bump -bm 0.025400 bumpmap.png ``` 2) import data (import error) import the obj file. notice that: > the bump map material now has a factor of 1.0 > and that the bump texture is too strong. 3) It seems, when digging into the source that. in import_obj.py near the line ``` elif type == 'Bump': ``` the bump_mult will be replaced with 1.0 because ``` len(bump_mult) > 1 # never true ``` this occurs because bump_mult is not a string, bump_mult is an array with the first element being a bytearray --- Thank you.
Author

Added subscriber: @JimG

Added subscriber: @JimG
Bastien Montagne self-assigned this 2018-10-04 14:40:55 +02:00

This issue was referenced by 6d62e07f8b

This issue was referenced by 6d62e07f8bcd6d09ced189796b26ed905586f267

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#57055
No description provided.