Only search projects.blender.org
Log In
New Account
Home
My Page
Projects
Blender 2.x BF release
Summary
Activity
Tracker
SCM
Files
Blender 2.6 Bug Tracker: Browse
[#32637] OBJ Import Alpha Map Problem
Date:
2012-09-23 11:37
Priority:
3
State:
Closed
Submitted by:
Hikmet Koyuncu (
spiderh
)
Assigned to:
Campbell Barton (campbellbarton)
Category:
Import/Export
Status:
Fixed / Closed
Relates to:
Duplicates:
Patches:
Summary:
OBJ Import Alpha Map Problem
Detailed description
Intel Pentium Core 4 I5 2500K
Intel HD 3000
8 GB RAM
Windows 7 Ultimate 64-bit
Blender 2.63a and 2.64 RC1
When import an OBJ model in Blender, if Texture has an Alpha Channel, this channel is skipped.
I opened "import_obj.py" script file and checked.
if image:
texture.image = image
has_data = image.has_data
In this code, "image.has_data" always return "False" value. If change this code:
if image:
texture.image = image
has_data = True
Fix this problem.
And use "map_d" in MTL file, and load "Alpha Map", then this texture slot must up on the Diffuse Texture, otherwise not work properly and user be obliged to change this order manual.
map_d Texture_ALPHA.png
map_Kd Texture.png
This order work.
map_Kd Texture.png
map_d Texture_ALPHA.png
This order is not work. Import script must fix order automaticly, but not do.
Followup
Message
Date
: 2012-10-02 08:08
Sender
:
Thomas Dinges
Campbell, can you please check on that? Not a stopper, can be fixed after release though.
Date
: 2012-10-26 14:10
Sender
:
Campbell Barton
This makes sense, if textures are not assigned to alpha textrue channels we dont have to set the alpha values.
Having the image data available isn''t a given so probably we better jabe it check for map_d or map_tr
Date
: 2012-10-26 15:55
Sender
:
dan grauer
note that map_tr stands for "Translucency" and map_d for "transparency"
Date
: 2012-10-27 20:30
Sender
:
Hikmet Koyuncu
Order problem fixed on 2.64a.
Some programs not write "map_d", if image has an alpha channel, only write "map_Kd". Example XFrog export from "DEEP Exploration" program.
Some programs cannot read space characters in path. Path value get inside double quotes. So all programs will able to read OBJ files export from Blender (example DAZ Studio).
In Blender, alpha masked materials should "Alpha = 0" and when export OBJ file, write "d 0.000000". But most programs cannot reads this value correctly, because in this programs use "d 1.000000" value (example 3ds Max, DAZ Studio). And on this programs surface appear completely transparent (invisible).
Date
: 2012-10-27 21:35
Sender
:
dan grauer
the problem is that blender interpretes "tr" values as transparency while all others follow the obj documentation and use it as translucency which has inverted values to alpha.
i already tried to explain this in irc but seems its really hard to understand that d!=tr / transparency != TRANSLUCENCY and need to be handled seperately.
this is why it fails.
Date
: 2012-11-14 10:08
Sender
:
Campbell Barton
Hi, looking into this report, since its opened some of the issues with material setting import/export have been resolved.
Hikmet Koyuncu: You say...
In Blender, alpha masked materials should "Alpha = 0" and when export OBJ file, write "d 0.000000". ...
This should be reported as a separate bug, with example of expected output and blend file which produces incorrect output.
Date
: 2012-11-14 10:21
Sender
:
Campbell Barton
Could you include an OBJ that doesnt import correctly?
I can see how the code might not work but Id like to verify the changes fix this bug.
Date
: 2012-12-04 02:28
Sender
:
Campbell Barton
fixed r4028. now has_data works as it used to.
Attached Files:
No Files Currently Attached
Changes:
Field
Old Value
Date
By
Status
Incomplete
2012-12-04 02:28
campbellbarton
close_date
None
2012-12-04 02:28
campbellbarton
status_id
Open
2012-12-04 02:28
campbellbarton
Status
New
2012-11-14 10:21
campbellbarton
assigned_to
none
2012-10-02 08:08
dingto