OBJ files exported from Blender don't show textured in macOS's file browser #78126

Closed
opened 2020-06-22 11:11:53 +02:00 by Kent Davis · 95 comments

System Information
Operating system: Darwin-19.6.0-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 575 OpenGL Engine ATI Technologies Inc. 4.1 ATI-3.10.8

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-21 14:55, hash: blender/blender@f2b5f731d5
Worked: (newest version of Blender that worked as expected)

Short description of error
object .obj doesn't appear texture

Exact steps for others to reproduce the error
June 22, 2020
Blender 2.90 Alpha
Macintosh MacOS 10.15.5 Catalina
object .obj doesn't appear texture.

Screen Shot 2020-06-22 at 1.11.51 AM.png

Screen Shot 2020-06-22 at 1.12.44 AM.png

Screen Shot 2020-06-22 at 2.06.48 AM.png

They made one Lola Bunny, but I am create 1 cube box and put texture I have fail to see all gray few times.
Apply textures to the model .obj yes
Lola Bunny model is not my create. I just download.

Blender by Kent Davis.zip

**System Information** Operating system: Darwin-19.6.0-x86_64-i386-64bit 64 Bits Graphics card: AMD Radeon Pro 575 OpenGL Engine ATI Technologies Inc. 4.1 ATI-3.10.8 **Blender Version** Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-21 14:55, hash: `blender/blender@f2b5f731d5` Worked: (newest version of Blender that worked as expected) **Short description of error** object .obj doesn't appear texture **Exact steps for others to reproduce the error** June 22, 2020 Blender 2.90 Alpha Macintosh MacOS 10.15.5 Catalina object .obj doesn't appear texture. ![Screen Shot 2020-06-22 at 1.11.51 AM.png](https://archive.blender.org/developer/F8636526/Screen_Shot_2020-06-22_at_1.11.51_AM.png) ![Screen Shot 2020-06-22 at 1.12.44 AM.png](https://archive.blender.org/developer/F8636528/Screen_Shot_2020-06-22_at_1.12.44_AM.png) ![Screen Shot 2020-06-22 at 2.06.48 AM.png](https://archive.blender.org/developer/F8636537/Screen_Shot_2020-06-22_at_2.06.48_AM.png) They made one Lola Bunny, but I am create 1 cube box and put texture I have fail to see all gray few times. Apply textures to the model .obj yes Lola Bunny model is not my create. I just download. [Blender by Kent Davis.zip](https://archive.blender.org/developer/F8636560/Blender_by_Kent_Davis.zip)
Author

Added subscriber: @Kent-Davis

Added subscriber: @Kent-Davis
Author

I forget to put my. .blend document and other they document link. https://www.dropbox.com/s/x3nz2kk8tna56s2/Blender%20by%20Kent%20Davis.zip?dl=0

I forget to put my. .blend document and other they document link. https://www.dropbox.com/s/x3nz2kk8tna56s2/Blender%20by%20Kent%20Davis.zip?dl=0
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Hm, seems to be fine here, exporting LolaBunny.blend to OBJ gives me
LolaBunny__.mtl
LolaBunny__.obj

Since the Textures paths are relative the Textures folder needs to sit next to those files.
If that is the case, this imports just fine back into Blender, can you confirm?
(so this might turn out to be a problem of the preview in Finder -- or whatever this is previewed with?)

Regarding the Cube, this seems to be a packed texture [which dont get exported afaict], if I save that manually, then export, the texture shows up everywhere, can you confirm?

Hm, seems to be fine here, exporting LolaBunny.blend to OBJ gives me [LolaBunny__.mtl](https://archive.blender.org/developer/F8636590/LolaBunny__.mtl) [LolaBunny__.obj](https://archive.blender.org/developer/F8636591/LolaBunny__.obj) Since the Textures paths are relative the Textures folder needs to sit next to those files. If that is the case, this imports just fine back into Blender, can you confirm? (so this might turn out to be a problem of the preview in Finder -- or whatever this is previewed with?) Regarding the Cube, this seems to be a packed texture [which dont get exported afaict], if I save that manually, then export, the texture shows up everywhere, can you confirm?
Author

How can I do export .obj? I am tried many times years and years I don't understand.
(Cube box) I create myself with create color grid texture on Materials. Within EEVEE

How can I do export .obj? I am tried many times years and years I don't understand. (Cube box) I create myself with create color grid texture on Materials. Within EEVEE
Member

Please @Kent-Davis:

  • apparently you have been able to export to OBJ before?... If this is a support issue, please consult the manual or https://www.blender.org/community/
  • unless you are not answering to my discrete questions above, this will either be in "Needs Information Fom User" forever or be turned down as a support request.
Please @Kent-Davis: - apparently you have been able to export to OBJ before?... If this is a support issue, please consult the manual or https://www.blender.org/community/ - unless you are not answering to my discrete questions above, this will either be in "Needs Information Fom User" forever or be turned down as a support request.
Author

I am not good english to explain text. I am deaf and do sign language.
Confirm how?

blender.org/community
image.png is they banned me out
image.png

I am not good english to explain text. I am deaf and do sign language. Confirm how? blender.org/community ![image.png](https://archive.blender.org/developer/F8636637/image.png) is they banned me out ![image.png](https://archive.blender.org/developer/F8636639/image.png)

Added subscriber: @rjg

Added subscriber: @rjg

@Kent-Davis you need to save the texture in Blender separately from the model export and place it in the same directory as the exported model. The obj/mtl file format can only reference the texture file by name.

@Kent-Davis you need to save the texture in Blender separately from the model export and place it in the same directory as the exported model. The obj/mtl file format can only reference the texture file by name.
Author

Sorry you are wrong answer.
Export Collada .dae it work auto appear texture and .dae itself very well.
Export .obj not work. I show you picture proof.
Screen Shot 2020-06-22 at 9.33.49 AM.png

Sorry you are wrong answer. Export Collada .dae it work auto appear texture and .dae itself very well. Export .obj not work. I show you picture proof. ![Screen Shot 2020-06-22 at 9.33.49 AM.png](https://archive.blender.org/developer/F8637194/Screen_Shot_2020-06-22_at_9.33.49_AM.png)

@Kent-Davis If the texture file is already saved somewhere else on disk you can set the Path Mode to Copy in the exporter settings.

@Kent-Davis If the texture file is already saved somewhere else on disk you can set the *Path Mode* to *Copy* in the exporter settings.
Author

show me your screenshot?

show me your screenshot?

@Kent-Davis obj_options.png

The next time you have a user support question, please post it either on [Blender's StackExchange ]] or [ https:*blenderartists.org/c/support/9 | blenderartists.org .

@Kent-Davis ![obj_options.png](https://archive.blender.org/developer/F8637237/obj_options.png) The next time you have a user support question, please post it either on [Blender's StackExchange ]] or [[ https:*blenderartists.org/c/support/9 | blenderartists.org ](https:*blender.stackexchange.com/).
Author

Export > .obj then " Path Mode to Copy " I did follow your screenshot.
Are you use your own Macintosh ?
Still not work did not appear texture image.png

Export > .obj then " Path Mode to Copy " I did follow your screenshot. Are you use your own Macintosh ? Still not work did not appear texture ![image.png](https://archive.blender.org/developer/F8637255/image.png)

@Kent-Davis Have you previously saved your texture to your hard drive or are you just using a procedurally generated / baked / painted texture within Blender? If you haven't previously saved the image to your hard drive, it won't copy it to the output directory. That is a limitation of the current obj exporter.

@Kent-Davis Have you previously saved your texture to your hard drive or are you just using a procedurally generated / baked / painted texture within Blender? If you haven't previously saved the image to your hard drive, it won't copy it to the output directory. That is a limitation of the current obj exporter.
Author

Collada .dae it work auto copy texture itself.
.obj doesn't auto copy texture itself.
I ask you again. Are you use your own Macintosh yourself?

  1. Open Blender 2.90 Alpha.
  2. cube already there and materials already there.
  3. Materials Screen Shot 2020-06-22 at 10.17.04 AM.png
  4. Click the New button{F8637295}
  5. rename and number then color grid then click OK button image.png
  6. click icon then save .blend Screen Shot 2020-06-22 at 10.25.25 AM.png
  7. New folder in finder.
  8. Export > .obj and Path Mode: Copy Screen Shot 2020-06-22 at 10.38.47 AM.png
  9. Finder: image.png
Collada .dae it work auto copy texture itself. .obj doesn't auto copy texture itself. I ask you again. Are you use your own Macintosh yourself? 1. Open Blender 2.90 Alpha. 2. cube already there and materials already there. 3. Materials ![Screen Shot 2020-06-22 at 10.17.04 AM.png](https://archive.blender.org/developer/F8637289/Screen_Shot_2020-06-22_at_10.17.04_AM.png) 4. Click the New button{[F8637295](https://archive.blender.org/developer/F8637295/Screen_Shot_2020-06-22_at_10.21.48_AM.png)} 5. rename and number then color grid then click OK button ![image.png](https://archive.blender.org/developer/F8637296/image.png) 6. click icon then save .blend ![Screen Shot 2020-06-22 at 10.25.25 AM.png](https://archive.blender.org/developer/F8637302/Screen_Shot_2020-06-22_at_10.25.25_AM.png) 7. New folder in finder. 8. Export > .obj and Path Mode: Copy ![Screen Shot 2020-06-22 at 10.38.47 AM.png](https://archive.blender.org/developer/F8637315/Screen_Shot_2020-06-22_at_10.38.47_AM.png) 9. Finder: ![image.png](https://archive.blender.org/developer/F8637317/image.png)
Author

Miss picture screenshot.

  1. New folder in finder.
    Screen Shot 2020-06-22 at 10.35.47 AM.png
Miss picture screenshot. 7. New folder in finder. ![Screen Shot 2020-06-22 at 10.35.47 AM.png](https://archive.blender.org/developer/F8637321/Screen_Shot_2020-06-22_at_10.35.47_AM.png)

@Kent-Davis Like I said before the .obj exporter doesn't automatically save the texture file for you. It can only copy a texture file that is already saved to your hard drive to the destination directory. This is a known limitation. You may consider this a bug, but it's more of a missing feature.

I ask you again. Are you use your own Macintosh yourself?

This is irrelevant for this particular issue since the way the obj exporter works is platform independent.

@Kent-Davis Like I said before the .obj exporter doesn't automatically save the texture file for you. It can only copy a texture file that is already saved to your hard drive to the destination directory. This is a known limitation. You may consider this a bug, but it's more of a missing feature. > I ask you again. Are you use your own Macintosh yourself? This is irrelevant for this particular issue since the way the obj exporter works is platform independent.
Author

Allright

What is consider, irrelevant, particular, platform, independent

I knowledge limit word. I do know sign language as well, I am full deaf.

Allright What is consider, irrelevant, particular, platform, independent I knowledge limit word. I do know sign language as well, I am full deaf.

@Kent-Davis I will try to simplify what I wrote:

The obj exporter does not save the texture. It can only copy a texture that is already saved. Other exporters can save the texture. That is not a bug, some exporters can do more than others. The situation is the same on all operating systems (Mac, Windows, Linux).

@Kent-Davis I will try to simplify what I wrote: The obj exporter does not save the texture. It can only copy a texture that is already saved. Other exporters can save the texture. That is not a bug, some exporters can do more than others. The situation is the same on all operating systems (Mac, Windows, Linux).
Author

Allright. Are they plan to add feature will automatic itself same as Collada .dae ?

Allright. Are they plan to add feature will automatic itself same as Collada .dae ?
Author

Texture Paint and (UV map save texture) into Finder Textures folder and export .obj and copy doesn't work image.png you can see below texture

Texture Paint and (UV map save texture) into Finder Textures folder and export .obj and copy doesn't work ![image.png](https://archive.blender.org/developer/F8637345/image.png) you can see below texture

@Kent-Davis I'm not sure. There is currently a project for faster importer/exporter. Maybe this can be added when the project is done or when a developer has time to work on it.

@Kent-Davis I'm not sure. There is currently a project for faster importer/exporter. Maybe this can be added when the project is done or when a developer has time to work on it.
Author

@rjg Yes I agree with you. Take Developers time to processing there thousand bug to fix.

I figure very hard thinking for long time many years (from 2.5x until now 2.90) until I decide to send here and now we get know each other.

@rjg Yes I agree with you. Take Developers time to processing there thousand bug to fix. I figure very hard thinking for long time many years (from 2.5x until now 2.90) until I decide to send here and now we get know each other.
Author

Still fail doesn't appear texture in .obj there file zip I know there bug.
Fail object doesn't appear texture.zip

Still fail doesn't appear texture in .obj there file zip I know there bug. [Fail object doesn't appear texture.zip](https://archive.blender.org/developer/F8656808/Fail_object_doesn_t_appear_texture.zip)
Author

Sorry first .zip wrong one I just save .blend now add Fail object doesn't appear texture v.1.0.0
Fail object doesn't appear texture v.1.0.0.zip

Sorry first .zip wrong one I just save .blend now add Fail object doesn't appear texture v.1.0.0 [Fail object doesn't appear texture v.1.0.0.zip](https://archive.blender.org/developer/F8656814/Fail_object_doesn_t_appear_texture_v.1.0.0.zip)

Added subscriber: @ideasman42

Added subscriber: @ideasman42

This is working for me:
Fail object doesn't appear texture v.1.0.0.zip.

Import the file, Press Z, Select render, the texture is shown.

This is working for me: [Fail object doesn't appear texture v.1.0.0.zip](https://archive.blender.org/developer/F8656814/Fail_object_doesn_t_appear_texture_v.1.0.0.zip). Import the file, Press Z, Select render, the texture is shown.
Author

@ideasman42
You are wrong answer.
I know already about push the "z" key and rendering.
Focus on .obj
Are you use your own Macintosh?

if you see Finder focus on .obj make sure appear texture without too white object.

@ideasman42 You are wrong answer. I know already about push the "z" key and rendering. Focus on .obj Are you use your own Macintosh? if you see Finder focus on .obj make sure appear texture without too white object.

@Kent-Davis no, I'm not on macOS, are you saying the issue is that the texture from an exported .OBJ file doesn't show in the macOS finder?

@Kent-Davis no, I'm not on macOS, are you saying the issue is that the texture from an exported .OBJ file doesn't show in the macOS finder?
Author

Yes correct answer " the issue is that the texture from an exported .OBJ file doesn't show in the macOS finder "

Yes correct answer " the issue is that the texture from an exported .OBJ file doesn't show in the macOS finder "

Did you try setting "Absolute" path mode when exporting?

Did you try setting "Absolute" path mode when exporting?
Author

I already show you on many pictures above

I already show you on many pictures above
Author

@lichtwerk you may know about .obj should appear texture itself on Mac Finder. Look above few pictures.

@lichtwerk you may know about .obj should appear texture itself on Mac Finder. Look above few pictures.

Added subscriber: @jenkm

Added subscriber: @jenkm

Not sure how it should work, but I just downloaded a random file, and re-export in Blender.

Here are both, the original and from the Blender:

cat_test.zip

And this is not only textures but also colors are not displayed in the Finder.

Not sure how it should work, but I just downloaded a random file, and re-export in Blender. Here are both, the original and from the Blender: [cat_test.zip](https://archive.blender.org/developer/F8798035/cat_test.zip) And this is not only textures but also colors are not displayed in the Finder.
Author

@jenkm
Now MacOS 11 Finder preview you can see too white did not appear texture itself of .obj.

Screen Shot 2020-08-20 at 11.54.23 AM.png

@jenkm Now MacOS 11 Finder preview you can see too white did not appear texture itself of .obj. ![Screen Shot 2020-08-20 at 11.54.23 AM.png](https://archive.blender.org/developer/F8798049/Screen_Shot_2020-08-20_at_11.54.23_AM.png)
Author

@jenkm
Now other .obj I can see texture appear this one. Screen Shot 2020-08-20 at 11.58.43 AM.png

@jenkm Now other .obj I can see texture appear this one. ![Screen Shot 2020-08-20 at 11.58.43 AM.png](https://archive.blender.org/developer/F8798060/Screen_Shot_2020-08-20_at_11.58.43_AM.png)

@rjg @ideasman42

I found the problem. There should also be map_Ka.
Adding the next line fixes the bug:

map_Ka Cat_diffuse.jpg

Also, map_Bump doesn't seem to work, it should be map_bump.
Or it is different things, but it give a different visual result in the preview in Finder.

Compare mtl files, the original and the one from the Blender:

cat_test.zip

@rjg @ideasman42 I found the problem. There should also be `map_Ka`. Adding the next line fixes the bug: ``` map_Ka Cat_diffuse.jpg ``` Also, `map_Bump` doesn't seem to work, it should be `map_bump`. Or it is different things, but it give a different visual result in the preview in Finder. Compare `mtl` files, the original and the one from the Blender: [cat_test.zip](https://archive.blender.org/developer/F8798035/cat_test.zip)

map_Ka is for ambient reflectivity and not a required parameter that must be written in the .mtl. As long as the map_Kd parameter is written to the file, it is a valid .mtl file that references the diffuse texture. Perhaps Apple's viewer requires the map_Ka parameter for displaying the preview, but that is an assumption that isn't supported by the specification.

@jenkm Thanks for investigating this and identifying the issue. That is rather strange handling of the file format by the previewer. I don't think it would be correct for the exporter to just add the diffuse texture as ambient reflectivity.

`map_Ka` is for ambient reflectivity and not a required parameter that must be written in the .mtl. As long as the `map_Kd` parameter is written to the file, it is a valid .mtl file that references the diffuse texture. Perhaps Apple's viewer requires the `map_Ka` parameter for displaying the preview, but that is an assumption that isn't supported by the specification. @jenkm Thanks for investigating this and identifying the issue. That is rather strange handling of the file format by the previewer. I don't think it would be correct for the exporter to just add the diffuse texture as ambient reflectivity.
Author

@jenkm that again still not work ReSave on .obj for Mac Finder Preview.

@jenkm that again still not work ReSave on .obj for Mac Finder Preview.
Author

Kent check copy from 3D max text then paste into Blender of .obj

This file ReSave on blender-resaved.mtl. I just let you know need to fix on Blender 2.91 Alpha
August 24, 2020

  • Blender MTL File: 'None' <== ?????? must tell Blender version which file???
  • Material Count: 1

newmtl Cat
Ns 10.000002
Ka 1.000000 1.000000 1.000000
Kd 1.000000 1.000000 1.000000
Ks 0.000000 0.000000 0.000000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
d 1.000000
illum 1

map_Ka Cat_diffuse.jpg   <== add
map_Kd Cat_diffuse.jpg   <== add
map_bump Cat_bump.jpg    <== add
bump Cat_bump.jpg        <== add

map_Bump Cat_bump.jpg <== remove
map_Kd Cat_diffuse.jpg <== remove

Kent check copy from 3D max text then paste into Blender of .obj This file ReSave on blender-resaved.mtl. I just let you know need to fix on Blender 2.91 Alpha August 24, 2020 - Blender MTL File: 'None' <== ?????? must tell Blender version which file??? - Material Count: 1 newmtl Cat Ns 10.000002 Ka 1.000000 1.000000 1.000000 Kd 1.000000 1.000000 1.000000 Ks 0.000000 0.000000 0.000000 Ke 0.000000 0.000000 0.000000 Ni 1.500000 d 1.000000 illum 1 map_Ka Cat_diffuse.jpg <== add map_Kd Cat_diffuse.jpg <== add map_bump Cat_bump.jpg <== add bump Cat_bump.jpg <== add map_Bump Cat_bump.jpg <== remove map_Kd Cat_diffuse.jpg <== remove
Author

See on iMac Preview on Finder. Screen Shot 2020-08-24 at 3.35.10 AM.png
@rjg @ideasman42 and @jenkm

See on iMac Preview on Finder. ![Screen Shot 2020-08-24 at 3.35.10 AM.png](https://archive.blender.org/developer/F8808080/Screen_Shot_2020-08-24_at_3.35.10_AM.png) @rjg @ideasman42 and @jenkm

@rjg

I have file that contain both parameters map_Ka and map_Kd.
I open this file in Blender. What happens to the map_Ka data?
Then I export back to obj. Should the map_Ka data be written back?


Oh, the Ka 1.000000 1.000000 1.000000 is also set here, which results in a white color.
Removing this returns the texture but it is look darker than the original .obj.

And map_Bump doesn't work, it must be map_bump.

It seems to me that the import process is also incorrect.


Exporting a cube with a red Base Color gives:

Kd 1.000000 0.000000 0.000000```

Which is white.
@rjg I have file that contain both parameters `map_Ka` and `map_Kd`. I open this file in Blender. What happens to the `map_Ka` data? Then I export back to obj. Should the `map_Ka` data be written back? *** Oh, the `Ka 1.000000 1.000000 1.000000` is also set here, which results in a white color. Removing this returns the texture but it is look darker than the original .obj. And `map_Bump` doesn't work, it must be `map_bump`. It seems to me that the import process is also incorrect. *** Exporting a cube with a red Base Color gives: ```Ka 1.000000 1.000000 1.000000 Kd 1.000000 0.000000 0.000000``` Which is white.

I have file that contain both parameters map_Ka and map_Kd.
I open this file in Blender. What happens to the map_Ka data?
Then I export back to obj. Should the map_Ka data be written back?

@jenkm Good question, I'll have to look at the code. I expect that map_Ka is currently ignored during import and thus can't be exported properly.

Oh, the Ka 1.000000 1.000000 1.000000 is also set here, which results in a white color. Removing this returns the texture but it is look darker than the original .obj.

Maximum ambient reflectivity does seems like it might be a wrong default.

And map_Bump doesn't work, it must be map_bump.

Yes, that appears to be incorrect.

Exporting a cube with a red Base Color gives:

Kd 1.000000 0.000000 0.000000```
Which is white.

That doesn't seem right either.

I haven't had time to test any of these myself, but there seem to be issues with the Ka related processing in import and export.

> I have file that contain both parameters `map_Ka` and `map_Kd`. > I open this file in Blender. What happens to the `map_Ka` data? > Then I export back to obj. Should the `map_Ka` data be written back? @jenkm Good question, I'll have to look at the code. I expect that `map_Ka` is currently ignored during import and thus can't be exported properly. > Oh, the Ka 1.000000 1.000000 1.000000 is also set here, which results in a white color. Removing this returns the texture but it is look darker than the original .obj. Maximum ambient reflectivity does seems like it might be a wrong default. > And map_Bump doesn't work, it must be map_bump. Yes, that appears to be incorrect. > Exporting a cube with a red Base Color gives: > ```Ka 1.000000 1.000000 1.000000 > Kd 1.000000 0.000000 0.000000``` > Which is white. That doesn't seem right either. I haven't had time to test any of these myself, but there seem to be issues with the `Ka` related processing in import and export.
Member

Added subscriber: @ankitm

Added subscriber: @ankitm

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Setting this as a paper-cut, since it's not a bug, it's an interaction issue with an external OBJ loader.

Setting this as a paper-cut, since it's not a bug, it's an interaction issue with an external OBJ loader.
Campbell Barton changed title from object .obj doesn't appear texture to OBJ files exported from Blender don't show textured in macOS's file browser 2020-08-31 12:37:47 +02:00

@ideasman42 The problem here is not how it is displayed in the Finder.
It set Ka to 1.000000 1.000000 1.000000 which gives the all-white material.
Which is definitely wrong. See a couple of comments above.

@ideasman42 The problem here is not how it is displayed in the Finder. It set `Ka` to `1.000000 1.000000 1.000000` which gives the all-white material. Which is definitely wrong. See a couple of comments above.
Author

@jenkm Good job answer.

@jenkm Good job answer.
Author

Are you still work processing about .mit match between texture and .obj preview?

Are you still work processing about .mit match between texture and .obj preview?

According to astrand135 on Twitter they are working on an updated mtl exporter. The patch hasn't been submitted yet though.

According to [astrand135 on Twitter ](https://twitter.com/astrand135/status/1304004012769906688) they are working on an updated mtl exporter. The patch hasn't been submitted yet though.
Author

Thank you for let me know no problem. I know Twitter and I never like Twitter. I had use many times they never support for deaf people. I reject Twitter.

Thank you for let me know no problem. I know Twitter and I never like Twitter. I had use many times they never support for deaf people. I reject Twitter.

Added subscriber: @KenzieMac130

Added subscriber: @KenzieMac130

According to astrand135 on Twitter they are working on an updated mtl exporter. The patch hasn't been submitted yet though.

I did on the 11th, it is here: https://developer.blender.org/D8868#220138

I expect that map_Ka is currently ignored during import and thus can't be exported properly.

Correct for import but for export its actually worse... The current version of Blender's Obj exporter actually writes a mangled metalness value... I have no idea why so I didn't touch it but now it seems that has to go as well.

Thanks for investigating this and identifying the issue. That is rather strange handling of the file format by the previewer. I don't think it would be correct for the exporter to just add the diffuse texture as ambient reflectivity.

I've investigated this issue, it stems from Autodesk messing up their loading of diffuse from MTL files in Max and Maya... As a result countless packages intentionally incorrectly swap ambient and diffuse. (I wish I was joking) I am looking for a compromise to this problem.

> According to astrand135 on Twitter they are working on an updated mtl exporter. The patch hasn't been submitted yet though. I did on the 11th, it is here: https://developer.blender.org/D8868#220138 > I expect that map_Ka is currently ignored during import and thus can't be exported properly. Correct for import but for export its actually worse... The current version of Blender's Obj exporter actually writes a mangled metalness value... I have no idea why so I didn't touch it but now it seems that has to go as well. > Thanks for investigating this and identifying the issue. That is rather strange handling of the file format by the previewer. I don't think it would be correct for the exporter to just add the diffuse texture as ambient reflectivity. I've investigated this issue, it stems from Autodesk messing up their loading of diffuse from MTL files in Max and Maya... As a result countless packages intentionally incorrectly swap ambient and diffuse. (I wish I was joking) I am looking for a compromise to this problem.

I've investigated this issue, it stems from Autodesk messing up their loading of diffuse from MTL files in Max and Maya... As a result countless packages intentionally incorrectly swap ambient and diffuse.

That explains the issue. Perhaps it would be a good idea to include a property in the add-on settings that allows to switch between the specified and Autodesk's interpretation of MTL files, if that is within scope of your update.

> I've investigated this issue, it stems from Autodesk messing up their loading of diffuse from MTL files in Max and Maya... As a result countless packages intentionally incorrectly swap ambient and diffuse. That explains the issue. Perhaps it would be a good idea to include a property in the add-on settings that allows to switch between the specified and Autodesk's interpretation of MTL files, if that is within scope of your update.

Perhaps it would be a good idea to include a property in the add-on settings that allows to switch between the specified and Autodesk's interpretation of MTL files

Current plan is to add an option to write diffuse to ambient. Walking into this task I had no idea the ecosystem was this broken... I will probably have to write up a blog about this.

> Perhaps it would be a good idea to include a property in the add-on settings that allows to switch between the specified and Autodesk's interpretation of MTL files Current plan is to add an option to write diffuse to ambient. Walking into this task I had no idea the ecosystem was this broken... I will probably have to write up a blog about this.

Added subscriber: @Raimund58

Added subscriber: @Raimund58
Author

I am still wait for you too long about MTL and OBJ

I am still wait for you too long about MTL and OBJ

In #78126#1054453, @Kent-Davis wrote:
I am still wait for you too long about MTL and OBJ

Sorry, I got sidetracked. The obj exporter is currently being moved to C based on my knowledge for better performance. blender/blender#68936 Thus I am in a bit of gridlock as my patch is a modified python script. I will try to finish up my exporter patch tomorrow but I doubt it twill be merged.

As for the current problem you are having with viewing diffuse in the mac file viewer this is a legacy compatibility issue that should be handled by Apple. I will provide a compatibility option for this kind of edge case but this goes to a bigger obj infrastructure issue and would likely cause many other applications to interpret broken materials if enabled.

> In #78126#1054453, @Kent-Davis wrote: > I am still wait for you too long about MTL and OBJ Sorry, I got sidetracked. The obj exporter is currently being moved to C based on my knowledge for better performance. blender/blender#68936 Thus I am in a bit of gridlock as my patch is a modified python script. I will try to finish up my exporter patch tomorrow but I doubt it twill be merged. As for the current problem you are having with viewing diffuse in the mac file viewer this is a legacy compatibility issue that should be handled by Apple. I will provide a compatibility option for this kind of edge case but this goes to a bigger obj infrastructure issue and would likely cause many other applications to interpret broken materials if enabled.
Author

Allright thank you for explain me.
About you will work on it tomorrow. Take your time.

Screen Shot 2020-11-13 at 6.19.18 PM.png

Screen Shot 2020-11-13 at 6.18.36 PM.png

only on MTL and obj script
Our Mac problem NO.
Blender problem yes.

Export itself on MTL
map_Kd /Users/kentdavis/Downloads/One.png

Did not make texture (One.png) into folder.

Blender 2.92 Alpha of November 12, 2020
MTL file
.# Blender MTL File: 'Test Cube November 13 2020.blend'
.# Material Count: 1

newmtl Material
Ns 323.999994
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd /Users/kentdavis/Downloads/One.png <=== see.
image.png

For example some one put texture on MTL and OBJ with Lola Bunny it work.
that come from Maya (.ma)
image.png

Allright thank you for explain me. About you will work on it tomorrow. Take your time. ![Screen Shot 2020-11-13 at 6.19.18 PM.png](https://archive.blender.org/developer/F9280159/Screen_Shot_2020-11-13_at_6.19.18_PM.png) ![Screen Shot 2020-11-13 at 6.18.36 PM.png](https://archive.blender.org/developer/F9280165/Screen_Shot_2020-11-13_at_6.18.36_PM.png) only on MTL and obj script Our Mac problem NO. Blender problem yes. Export itself on MTL map_Kd /Users/kentdavis/Downloads/One.png Did not make texture (One.png) into folder. ***Blender 2.92 Alpha of November 12, 2020*** MTL file .# Blender MTL File: 'Test Cube November 13 2020.blend' .# Material Count: 1 newmtl Material Ns 323.999994 Ka 1.000000 1.000000 1.000000 Kd 0.800000 0.800000 0.800000 Ks 0.500000 0.500000 0.500000 Ke 0.000000 0.000000 0.000000 Ni 1.450000 d 1.000000 illum 2 map_Kd /Users/kentdavis/Downloads/One.png <=== see. ![image.png](https://archive.blender.org/developer/F9280115/image.png) For example some one put texture on MTL and OBJ with Lola Bunny it work. that come from Maya (.ma) ![image.png](https://archive.blender.org/developer/F9280062/image.png)
Member

Sorry, I got sidetracked. The obj exporter is currently being moved to C based on my knowledge for better performance. blender/blender#68936 Thus I am in a bit of gridlock as my patch is a modified python script. I will try to finish up my exporter patch tomorrow but I doubt it twill be merged.

It will be easier for me to change the C++ code if your patch lands in the addon.

> Sorry, I got sidetracked. The obj exporter is currently being moved to C based on my knowledge for better performance. blender/blender#68936 Thus I am in a bit of gridlock as my patch is a modified python script. I will try to finish up my exporter patch tomorrow but I doubt it twill be merged. It will be easier for me to change the C++ code if your patch lands in the addon.
Author

That is great.

That is great.

In #78126#1054824, @ankitm wrote:

Sorry, I got sidetracked. The obj exporter is currently being moved to C based on my knowledge for better performance. blender/blender#68936 Thus I am in a bit of gridlock as my patch is a modified python script. I will try to finish up my exporter patch tomorrow but I doubt it twill be merged.

It will be easier for me to change the C++ code if your patch lands in the addon.

Good to know, I will continue work on it then.

In #78126#1054956, @Kent-Davis wrote:
That is great.

It might not make it in soon enough, there are other patches it depends on and I will have to dust it off and fix any problems. Worse comes to worse and it doesn't make it in: I can send you just a patched version of the addon to alleviate your problem.

> In #78126#1054824, @ankitm wrote: >> Sorry, I got sidetracked. The obj exporter is currently being moved to C based on my knowledge for better performance. blender/blender#68936 Thus I am in a bit of gridlock as my patch is a modified python script. I will try to finish up my exporter patch tomorrow but I doubt it twill be merged. > > It will be easier for me to change the C++ code if your patch lands in the addon. Good to know, I will continue work on it then. > In #78126#1054956, @Kent-Davis wrote: > That is great. It might not make it in soon enough, there are other patches it depends on and I will have to dust it off and fix any problems. Worse comes to worse and it doesn't make it in: I can send you just a patched version of the addon to alleviate your problem.

Okay, my most recent diff should have fixed your issue... The exporter is still not finished as of now but I figured it would be unfair to make you wait any longer seeing as though this appears to be more than a minor inconvenience to you. You can either apply this patch or use this link and replace the contents of "io_scene_obj" in your blender installation's addon folder. https://drive.google.com/drive/folders/1Var0hEkzr2l2LIZ7x57ZQKQDEgBVftc8?usp=sharing Hopefully this will smooth things over but tell me if you run into any issues (keep this issue open though, the change is not merged). Again... Sorry for the wait.

(Edit: This won't work without changes to "node_shade_utils.py" in "scripts/modules/bpy_extras". Something got broken in the most recent versions of that file and I need to fix it and re-implement the extra stuff. Here is the modified older version I am using https://drive.google.com/file/d/1zY0K1BdkMDn3lGZ_dMXHbSiO1PLYu3QW/view?usp=sharing)

Okay, my most recent diff should have fixed your issue... The exporter is still not finished as of now but I figured it would be unfair to make you wait any longer seeing as though this appears to be more than a minor inconvenience to you. You can either apply this patch or use this link and replace the contents of "io_scene_obj" in your blender installation's addon folder. https://drive.google.com/drive/folders/1Var0hEkzr2l2LIZ7x57ZQKQDEgBVftc8?usp=sharing Hopefully this will smooth things over but tell me if you run into any issues (keep this issue open though, the change is not merged). Again... Sorry for the wait. (Edit: This won't work without changes to "node_shade_utils.py" in "scripts/modules/bpy_extras". Something got broken in the most recent versions of that file and I need to fix it and re-implement the extra stuff. Here is the modified older version I am using https://drive.google.com/file/d/1zY0K1BdkMDn3lGZ_dMXHbSiO1PLYu3QW/view?usp=sharing)
Author

@astrand130 did you mean your suggest on .obj your own script able to preview on your own Mac Finder?

@astrand130 did you mean your suggest on .obj your own script able to preview on your own Mac Finder?

Haven't tested it on the mac since I do not use mac. but I am mostly sure that is what your problem is and this fixed it. The problem is likely a well over 20 year old incompatibility issue in the format's definition of diffuse and ambient term tinting between the Alias/Wavefront Specification and Autodesk's implementation in 3D Studio Max that Apple seems to have sided with the incorrect implementation in Max.

This normally isn't an issue as most exporters write a duplicate of diffuse to ambient tinting anyways... However... Blender's MTL exporter erroneously writes garbled metallic information to the ambient tint (which the mac viewer reads because of the legacy issue previously described). At a metalness of 0 it writes white to ambient otherwise a scalar gradient of the metalness value and shoves the metallic map into the cubemap texture specifer... This is utter nonsense that should not happen. It was an incorrect rushed implementation to accommodate the constraints on non-extended MTL when when moving blender to PBR. My patch fixes this issue by removing this code and duplicating diffuse to ambient while ambient is ignored on import because it is obsolete.

Please tell me if this fixes your issue.

Haven't tested it on the mac since I do not use mac. but I am mostly sure that is what your problem is and this fixed it. The problem is likely a well over 20 year old incompatibility issue in the format's definition of diffuse and ambient term tinting between the Alias/Wavefront Specification and Autodesk's implementation in 3D Studio Max that Apple seems to have sided with the incorrect implementation in Max. This normally isn't an issue as most exporters write a duplicate of diffuse to ambient tinting anyways... However... Blender's MTL exporter erroneously writes garbled metallic information to the ambient tint (which the mac viewer reads because of the legacy issue previously described). At a metalness of 0 it writes white to ambient otherwise a scalar gradient of the metalness value and shoves the metallic map into the cubemap texture specifer... This is utter nonsense that should not happen. It was an incorrect rushed implementation to accommodate the constraints on non-extended MTL when when moving blender to PBR. My patch fixes this issue by removing this code and duplicating diffuse to ambient while ambient is ignored on import because it is obsolete. Please tell me if this fixes your issue.
Author
@astrand130 [Blender of object..zip](https://archive.blender.org/developer/F9359389/Blender_of_object..zip) https://youtu.be/I47pt8HKHM0

@Kent-Davis I hope that it is Youtubes fault that it is only 360p... I would recommend that you set your screen resolution to 1080p and not to 5K. Otherwise I need a magnifying glass to see what you are doing on your screen.

@Kent-Davis I hope that it is Youtubes fault that it is only 360p... I would recommend that you set your screen resolution to 1080p and not to 5K. Otherwise I need a magnifying glass to see what you are doing on your screen.
Author

Hi @Raimund58
Yes wait until youtube processing to be 4K come soon because of youtube still processing. I do use 5K retina Display on my iMac. wait for 1 hour then try again.
I do use Command + Shift + 5 and record screen.

Hi @Raimund58 Yes wait until youtube processing to be 4K come soon because of youtube still processing. I do use 5K retina Display on my iMac. wait for 1 hour then try again. I do use Command + Shift + 5 and record screen.

In #78126#1059588, @Kent-Davis wrote:
@astrand130
Blender of object..zip
https://youtu.be/I47pt8HKHM0

I don't really need the entire process. But judging from the last bit of the video where you show the MTL file you aren't using the updated script or following the workaround people on this thread are asking by copying the line with "map_Kd" and replacing that lines definition with "map_Ka". This should fix your problem entirely. I need to know if this works for you, it should verify my theory.

> In #78126#1059588, @Kent-Davis wrote: > @astrand130 > [Blender of object..zip](https://archive.blender.org/developer/F9359389/Blender_of_object..zip) > https://youtu.be/I47pt8HKHM0 I don't really need the entire process. But judging from the last bit of the video where you show the MTL file you aren't using the updated script or following the workaround people on this thread are asking by copying the line with "map_Kd" and replacing that lines definition with "map_Ka". This should fix your problem entirely. I need to know if this works for you, it should verify my theory.
Author

@astrand130
Look at youtube I show you. https://youtu.be/h_31158dO0Q

@astrand130 Look at youtube I show you. https://youtu.be/h_31158dO0Q

In #78126#1059863, @Kent-Davis wrote:
@astrand130
Look at youtube I show you. https://youtu.be/h_31158dO0Q

It is making a difference when when switching between diffuse and ambient. There are spaces in the file path. Try removing that from the texture name. That often breaks the tokenizer and file paths with spaces is technically unsupported by MTL.

> In #78126#1059863, @Kent-Davis wrote: > @astrand130 > Look at youtube I show you. https://youtu.be/h_31158dO0Q It is making a difference when when switching between diffuse and ambient. There are spaces in the file path. Try removing that from the texture name. That often breaks the tokenizer and file paths with spaces is technically unsupported by MTL.
Author

There already support space because Maya on .obj "Lola Bunny.png" that space it work.

There already support space because Maya on .obj "Lola Bunny.png" that space it work.

In #78126#1059984, @Kent-Davis wrote:
There already support space because Maya on .obj "Lola Bunny.png" that space it work.

Weird... I guess this makes it a little more complicated than my initial assumption... Can you paste the Mtl of the Maya version and Blender version in a code comment (this button </>)? It seems there might be a formatting difference with the file path that the Apple viewer doesn't like.

> In #78126#1059984, @Kent-Davis wrote: > There already support space because Maya on .obj "Lola Bunny.png" that space it work. Weird... I guess this makes it a little more complicated than my initial assumption... Can you paste the Mtl of the Maya version and Blender version in a code comment (this button </>)? It seems there might be a formatting difference with the file path that the Apple viewer doesn't like.

@astrand130 the main problem here is that Ka set to 1.000000 1.000000 1.000000 - which is all-white material, and Finder shows it as white. Changing Ka to zeros fixes the problem in Finder. I'll assume that you only need map_Ka because of the wrong Ka.

@astrand130 the main problem here is that `Ka` set to `1.000000 1.000000 1.000000` - which is all-white material, and Finder shows it as white. Changing `Ka` to `zeros` fixes the problem in Finder. I'll assume that you only need `map_Ka` because of the wrong `Ka`.
Author

Ok I double check and take test about space on Maya of Lola Bunny .MTL and .OBJ and drag into Texture folder and rename .png within space and without space and add " _ " change more test..

Now I see body.png rename to b ody.png (doesn't appear texture.)
Now I see body.png rename to b_body.png (I can see texture there.)
Blender.app on 2.92 Alpha
Need to fix feature see step by step on collada -VS- .obj

I just find out right now.

File > External Data Pack All Into .Blend (Already have inside .blend file before)
image.png

Screen Shot 2020-11-24 at 2.15.27 AM.png

Should be appear texture plus rename from (SPACE) to + _ + but doesn't work
Example: Export > Collada (.dae) automatic appear texture copy from file to other folder into export file texture itself.

.obj doesn't.

image.png

This export collada .dae
Screen Shot 2020-11-24 at 2.24.59 AM.png

image.png

I have to drag make a copy texture from collada to object folder and rename.
image.png
image.png
image.png
image.png
from Kd to Ka
image.png
image.png
FINAL and there look too bright not normal.

Download file .zip
Blender by Kent Davis Update 1.0.0.zip

Ok I double check and take test about space on Maya of Lola Bunny .MTL and .OBJ and drag into Texture folder and rename .png within space and without space and add " _ " change more test.. Now I see body.png rename to b ody.png (doesn't appear texture.) Now I see body.png rename to b_body.png (I can see texture there.) Blender.app on 2.92 Alpha Need to fix feature see step by step on collada -VS- .obj I just find out right now. File > External Data Pack All Into .Blend (Already have inside .blend file before) ![image.png](https://archive.blender.org/developer/F9364644/image.png) ![Screen Shot 2020-11-24 at 2.15.27 AM.png](https://archive.blender.org/developer/F9364666/Screen_Shot_2020-11-24_at_2.15.27_AM.png) Should be appear texture plus rename from (SPACE) to + _ + but doesn't work Example: Export > Collada (.dae) automatic appear texture copy from file to other folder into export file texture itself. .obj doesn't. ![image.png](https://archive.blender.org/developer/F9364675/image.png) This export collada .dae ![Screen Shot 2020-11-24 at 2.24.59 AM.png](https://archive.blender.org/developer/F9364691/Screen_Shot_2020-11-24_at_2.24.59_AM.png) ![image.png](https://archive.blender.org/developer/F9364703/image.png) I have to drag make a copy texture from collada to object folder and rename. ![image.png](https://archive.blender.org/developer/F9364716/image.png) ![image.png](https://archive.blender.org/developer/F9364728/image.png) ![image.png](https://archive.blender.org/developer/F9364735/image.png) ![image.png](https://archive.blender.org/developer/F9364763/image.png) from Kd to Ka ![image.png](https://archive.blender.org/developer/F9364767/image.png) ![image.png](https://archive.blender.org/developer/F9364773/image.png) FINAL and there look too bright not normal. Download file .zip [Blender by Kent Davis Update 1.0.0.zip](https://archive.blender.org/developer/F9364785/Blender_by_Kent_Davis_Update_1.0.0.zip)
Author

This Lola Bunny still Kd not Ka.
image.png
image.png

This Lola Bunny still Kd not Ka. ![image.png](https://archive.blender.org/developer/F9364876/image.png) ![image.png](https://archive.blender.org/developer/F9364881/image.png)
Author

image.png
from
image.png
to
image.png
now you see
image.png

@jenkm was right.
Now you know @astrand130

![image.png](https://archive.blender.org/developer/F9364894/image.png) from ![image.png](https://archive.blender.org/developer/F9364898/image.png) to ![image.png](https://archive.blender.org/developer/F9364941/image.png) now you see ![image.png](https://archive.blender.org/developer/F9364911/image.png) @jenkm was right. Now you know @astrand130

In #78126#1060121, @jenkm wrote:
@astrand130 the main problem here is that Ka set to 1.000000 1.000000 1.000000 - which is all-white material, and Finder shows it as white. Changing Ka to zeros fixes the problem in Finder. I'll assume that you only need map_Ka because of the wrong Ka.

If the apple viewer is treating a Ka of white as a fullbright material then that would be out of spec on their part. The example formula from the spec states that Ka is a multiplier for the ambient light which is added to the diffuse term. A Ka of white should only appear to wash out the ambient term while zeroing out Ka should kill the ambient term. It should not be added on top in the style of emission and turn the material white. Defining the "map_Ka" here is quite possibly causing the previewer to attempt to load a texture (fail for some reason I am still trying to determine) and return a black texture and having the same effect as zeroing out Ka.

1 This is a diffuse illumination model using Lambertian shading. The
color includes an ambient constant term and a diffuse shading term for
each light source. The formula is

color = KaIa + Kd { SUM j=1..ls, (N * Lj)Ij }

~ Ramey, D., Rose, L., & Tyerman, L. (1995). MTL material format (Lightwave, OBJ). FILE FORMATS, 4.2.

Obviously this exact formula isn't set in stone but the overall intent should be preserved. But it seems that is not the issue that is happening here as demonstrated by when the OP is able to properly load a texture.

First example Ka is white and map_Ka is defined, it is tinting the ambient term but the diffuse term is white... This image is the correct result of that formula.
Second example Ka is black and map_Kd is defined, the ambient term isn't present (I assume the light is at an angle in the screenshot) and the diffuse term gets tinted by the texture... This again is the correct result of that formula.
Previous examples where the texture is not being loaded it appears white because Ka is white and (I assume) the map_Kd is failing to load and returning a black texture... All that is left visible is the white ambient term, failed to load texture but still correct.

The ideal result happens when both the ambient and diffuse term gets tinted by the texture (and the texture is successfully loaded), for this to happen Ka and Kd should be white, and map_Ka and map_Kd should be the base color texture.

In #78126#1060166, @Kent-Davis wrote:
Ok I double check and take test about space on Maya of Lola Bunny .MTL and .OBJ and drag into Texture folder and rename .png within space and without space and add " _ " change more test..

Now I see body.png rename to b ody.png (doesn't appear texture.)
Now I see body.png rename to b_body.png (I can see texture there.)
Blender.app on 2.92 Alpha
Need to fix feature see step by step on collada -VS- .obj

I just find out right now.

File > External Data Pack All Into .Blend (Already have inside .blend file before)
image.png

Screen Shot 2020-11-24 at 2.15.27 AM.png

Should be appear texture plus rename from (SPACE) to + _ + but doesn't work
Example: Export > Collada (.dae) automatic appear texture copy from file to other folder into export file texture itself.

.obj doesn't.

image.png

This export collada .dae
Screen Shot 2020-11-24 at 2.24.59 AM.png

image.png

I have to drag make a copy texture from collada to object folder and rename.
image.png
image.png
image.png
image.png
from Kd to Ka
image.png
image.png
FINAL and there look too bright not normal.

Download file .zip
Blender by Kent Davis Update 1.0.0.zip

Okay, I see where I was going wrong here. I missed the part where the texture file the MTL is pointing to is literally unable to be loaded, not just invisible on the surface but in memory. Since the other developers where talking about the ambient term being incorrect and since I was aware of an common issue surrounding ambient, I incorrectly assumed that was the issue that was occurring here. map_Ka and map_Kd seem like they are not being swapped here after all.

As it seems you were able to see your texture when removing the spaces entirely from the file path, this is the expected behavior as spaces should not be supported because of the way the string is parsed... Actually there is an exact comment in the importer code that mentions this.

    Mainly uses comprehensiveImageLoad
    But we try all space-separated items from current line when file is not found with last one
    (users keep generating/using image files with spaces in a format that does not support them, sigh...)
    Also tries to replace '_' with ' ' for Max's exporter replaces spaces with underscores.
    Also handle " chars (some software use those to protect filenames with spaces, see T67266... sic).
    Also corrects img_data (in case filenames with spaces have been split up in multiple entries, see T72148).

Based on your screenshot it seems like Maya is writing a copy of the image file to the directory with spaces stripped from the name. This explains why it is able to get around the issue with spaces. Blender doesn't make a copy of the file and just writes the relative path to this file (or absolute if specified, please don't use this though). If there are spaces in the resulting "map_XXX" line where the file path is you will encounter this issue in lots of software, as spaces are used by MTL to separate optional parameters for the texture.

To get around this limitation with the format try structuring your project folder structure something like this:

My Project Name/
	My Blend File Name.blend
	my_exported_file_name.obj
	my_exported_file_name.mtl
	textures/
		base_texture.png
		bump_texture.png
		etc.png
		...

Notice how the relative path from the blend file's folder to the texture contains no spaces or other special characters: ("textures/base_texture.png" or "textures/bump_texture.png") After exporting you can move the obj/mtl/texture directory structure wherever you want and the file should still be loadable, if not then make sure absolute path is unchecked.

The format is very old and perhaps this limitation isn't being made clear to the user (maybe there could be a warning).

So yes this is technically user error but given it's obscurity I don't blame you.

> In #78126#1060121, @jenkm wrote: > @astrand130 the main problem here is that `Ka` set to `1.000000 1.000000 1.000000` - which is all-white material, and Finder shows it as white. Changing `Ka` to `zeros` fixes the problem in Finder. I'll assume that you only need `map_Ka` because of the wrong `Ka`. If the apple viewer is treating a Ka of white as a fullbright material then that would be out of spec on their part. The example formula from the spec states that Ka is a multiplier for the ambient light which is added to the diffuse term. A Ka of white should only appear to wash out the ambient term while zeroing out Ka should kill the ambient term. It should not be added on top in the style of emission and turn the material white. Defining the "map_Ka" here is quite possibly causing the previewer to attempt to load a texture (fail for some reason I am still trying to determine) and return a black texture and having the same effect as zeroing out Ka. > 1 This is a diffuse illumination model using Lambertian shading. The > color includes an ambient constant term and a diffuse shading term for > each light source. The formula is > > color = KaIa + Kd { SUM j=1..ls, (N * Lj)Ij } > > ~ Ramey, D., Rose, L., &amp; Tyerman, L. (1995). MTL material format (Lightwave, OBJ). FILE FORMATS, 4.2. Obviously this exact formula isn't set in stone but the overall intent should be preserved. But it seems that is not the issue that is happening here as demonstrated by when the OP is able to properly load a texture. First example Ka is white and map_Ka is defined, it is tinting the ambient term but the diffuse term is white... This image is the correct result of that formula. Second example Ka is black and map_Kd is defined, the ambient term isn't present (I assume the light is at an angle in the screenshot) and the diffuse term gets tinted by the texture... This again is the correct result of that formula. Previous examples where the texture is not being loaded it appears white because Ka is white and (I assume) the map_Kd is failing to load and returning a black texture... All that is left visible is the white ambient term, failed to load texture but still correct. The ideal result happens when both the ambient and diffuse term gets tinted by the texture (and the texture is successfully loaded), for this to happen Ka and Kd should be white, and map_Ka and map_Kd should be the base color texture. > In #78126#1060166, @Kent-Davis wrote: > Ok I double check and take test about space on Maya of Lola Bunny .MTL and .OBJ and drag into Texture folder and rename .png within space and without space and add " _ " change more test.. > > Now I see body.png rename to b ody.png (doesn't appear texture.) > Now I see body.png rename to b_body.png (I can see texture there.) > Blender.app on 2.92 Alpha > Need to fix feature see step by step on collada -VS- .obj > > I just find out right now. > > File > External Data Pack All Into .Blend (Already have inside .blend file before) > ![image.png](https://archive.blender.org/developer/F9364644/image.png) > > ![Screen Shot 2020-11-24 at 2.15.27 AM.png](https://archive.blender.org/developer/F9364666/Screen_Shot_2020-11-24_at_2.15.27_AM.png) > > Should be appear texture plus rename from (SPACE) to + _ + but doesn't work > Example: Export > Collada (.dae) automatic appear texture copy from file to other folder into export file texture itself. > > .obj doesn't. > > > ![image.png](https://archive.blender.org/developer/F9364675/image.png) > > This export collada .dae > ![Screen Shot 2020-11-24 at 2.24.59 AM.png](https://archive.blender.org/developer/F9364691/Screen_Shot_2020-11-24_at_2.24.59_AM.png) > > ![image.png](https://archive.blender.org/developer/F9364703/image.png) > > I have to drag make a copy texture from collada to object folder and rename. > ![image.png](https://archive.blender.org/developer/F9364716/image.png) > ![image.png](https://archive.blender.org/developer/F9364728/image.png) > ![image.png](https://archive.blender.org/developer/F9364735/image.png) > ![image.png](https://archive.blender.org/developer/F9364763/image.png) > from Kd to Ka > ![image.png](https://archive.blender.org/developer/F9364767/image.png) > ![image.png](https://archive.blender.org/developer/F9364773/image.png) > FINAL and there look too bright not normal. > > Download file .zip > [Blender by Kent Davis Update 1.0.0.zip](https://archive.blender.org/developer/F9364785/Blender_by_Kent_Davis_Update_1.0.0.zip) Okay, I see where I was going wrong here. I missed the part where the texture file the MTL is pointing to is literally unable to be loaded, not just invisible on the surface but in memory. Since the other developers where talking about the ambient term being incorrect and since I was aware of an common issue surrounding ambient, I incorrectly assumed that was the issue that was occurring here. map_Ka and map_Kd seem like they are not being swapped here after all. As it seems you were able to see your texture when removing the spaces entirely from the file path, this is the expected behavior as spaces should not be supported because of the way the string is parsed... Actually there is an exact comment in the importer code that mentions this. ``` Mainly uses comprehensiveImageLoad But we try all space-separated items from current line when file is not found with last one (users keep generating/using image files with spaces in a format that does not support them, sigh...) Also tries to replace '_' with ' ' for Max's exporter replaces spaces with underscores. Also handle " chars (some software use those to protect filenames with spaces, see T67266... sic). Also corrects img_data (in case filenames with spaces have been split up in multiple entries, see T72148). ``` Based on your screenshot it seems like Maya is writing a copy of the image file to the directory with spaces stripped from the name. This explains why it is able to get around the issue with spaces. Blender doesn't make a copy of the file and just writes the relative path to this file (or absolute if specified, please don't use this though). If there are spaces in the resulting "map_XXX" line where the file path is you will encounter this issue in lots of software, as spaces are used by MTL to separate optional parameters for the texture. To get around this limitation with the format try structuring your project folder structure something like this: ``` My Project Name/ My Blend File Name.blend my_exported_file_name.obj my_exported_file_name.mtl textures/ base_texture.png bump_texture.png etc.png ... ``` Notice how the relative path from the blend file's folder to the texture contains no spaces or other special characters: ("textures/base_texture.png" or "textures/bump_texture.png") After exporting you can move the obj/mtl/texture directory structure wherever you want and the file should still be loadable, if not then make sure absolute path is unchecked. The format is very old and perhaps this limitation isn't being made clear to the user (maybe there could be a warning). So yes this is technically user error but given it's obscurity I don't blame you.
Author

Gooooooooood and I am wait for Blender.app update when they fix code.
Export > Collada there have texture make a copy check box turn on.
Export > .obj doesn't have texture make a copy and rename from " " to "_" automatic.

Collada -VS- .obj

Gooooooooood and I am wait for Blender.app update when they fix code. Export > Collada there have texture make a copy check box turn on. Export > .obj doesn't have texture make a copy and rename from " " to "_" automatic. Collada -VS- .obj

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'

In #78126#1060584, @Kent-Davis wrote:
Gooooooooood and I am wait for Blender.app update when they fix code.
Export > Collada there have texture make a copy check box turn on.
Export > .obj doesn't have texture make a copy and rename from " " to "_" automatic.

Collada -VS- .obj

Believe me I have noticed this when working on the exporter. To my knowledge the GLTF and DAE exporters are the only ones that write texture files... And only GLTF has a valid reason as it supports channel packing. This difference is definitely a bit of an inconsistency but there are many others as well. Exporting from blender in general could be made a bit more unified.

It seems like we figured out your issue so in the future just make sure to avoid white spaces in file paths with MTL, especially if your target application can't read them.

> In #78126#1060584, @Kent-Davis wrote: > Gooooooooood and I am wait for Blender.app update when they fix code. > Export > Collada there have texture make a copy check box turn on. > Export > .obj doesn't have texture make a copy and rename from " " to "_" automatic. > > Collada -VS- .obj Believe me I have noticed this when working on the exporter. To my knowledge the GLTF and DAE exporters are the only ones that write texture files... And only GLTF has a valid reason as it supports channel packing. This difference is definitely a bit of an inconsistency but there are many others as well. Exporting from blender in general could be made a bit more unified. It seems like we figured out your issue so in the future just make sure to avoid white spaces in file paths with MTL, especially if your target application can't read them.
Author

Allright

Allright
Author

Why you put invalid. They must work on .obj code.
I can get mad at you. You hate me as well.

Why you put invalid. They must work on .obj code. I can get mad at you. You hate me as well.
Author

You are use Windows only and you reject me about Macintosh.

You are use Windows only and you reject me about Macintosh.

In #78126#1060681, @Kent-Davis wrote:
Why you put invalid. They must work on .obj code.
I can get mad at you. You hate me as well.

We found your problem. I don't hate you, I spent quite some time trying to figure out your issue and it appears to be an issue with your setup, marking as invalid is just means it is not a bug. I didn't reject this potential problem altogether, assigned myself a task to give a warning on white spaces about potential incompatibility but otherwise there was nothing really to fix about this. Please don't open duplicate tasks or get angry with me over this. I tried to help, and found your answer.

I don't want this thread to go on any longer. Too many people have tried to help you just for you to feel unsatisfied with the answer and throw a tantrum. Please just walk away and cool down.

> In #78126#1060681, @Kent-Davis wrote: > Why you put invalid. They must work on .obj code. > I can get mad at you. You hate me as well. We found your problem. I don't hate you, I spent quite some time trying to figure out your issue and it appears to be an issue with your setup, marking as invalid is just means it is not a bug. I didn't reject this potential problem altogether, assigned myself a task to give a warning on white spaces about potential incompatibility but otherwise there was nothing really to fix about this. Please don't open duplicate tasks or get angry with me over this. I tried to help, and found your answer. I don't want this thread to go on any longer. Too many people have tried to help you just for you to feel unsatisfied with the answer and throw a tantrum. Please just walk away and cool down.

@astrand130 - I still don't understand how this is supposed to work.

Let's take the simplest example, without any textures. I just set the color to red, and exported.
The Ka set to 1.0 1.0 1.0 - is this correct? And it's wrong that the Mac viewer shows this in white?

I also noticed that the "Metallic" value is copied to Ka,
but if Metallic = 0, it set Ka = 1.0, why?
If I set some Metallic (0.001) and Ka becomes not zero, Mac viewer shows red, as I expected.

It looks quite reasonable, a value of 1.0 gives a fully specular reflection, which simply reflects an all-white environment.

@astrand130 - I still don't understand how this is supposed to work. Let's take the simplest example, **without any textures**. I just set the color to red, and exported. The `Ka` set to `1.0 1.0 1.0` - is this correct? And it's wrong that the Mac viewer shows this in white? I also noticed that the "Metallic" value is copied to `Ka`, but if Metallic = 0, it set Ka = 1.0, why? If I set some Metallic (0.001) and Ka becomes not zero, Mac viewer shows red, as I expected. It looks quite reasonable, a value of 1.0 gives a fully specular reflection, which simply reflects an all-white environment.

In #78126#1060800, @jenkm wrote:
@astrand130 - I still don't understand how this is supposed to work.

Let's take the simplest example, without any textures. I just set the color to red, and exported.
The Ka set to 1.0 1.0 1.0 - is this correct? And it's wrong that the Mac viewer shows this in white?

If your model isn't being lit by diffuse then it should appear white or depending on the ambient light strength it might be added together to be out of the visible range. That might be the issue.
Ka of white for a red material is not correct.

I also noticed that the "Metallic" value is copied to Ka,
but if Metallic = 0, it set Ka = 1.0, why?

I think this was an off spec hack to swizzle the metallic into the ambient while using "illum" as a flag to swap out for dialectics. This is an incorrect approach as extensions for metal/rough have been proposed, this just mangles the file for existing software.

If I set some Metallic (0.001) and Ka becomes not zero, Mac viewer shows red, as I expected.

It looks quite reasonable, a value of 1.0 gives a fully specular reflection, which simply reflects an all-white environment.

Ka is basically the diffuse tint but only applied to the ambient light, ambient does not get affected by Kd.
So Ka should in pretty much every case be the same as Kd.
Ka is not specular and should not be tied to metallic at all. I've already being solving the issue with incorrect ambient tied to metallic in my patch.

Hopefully this clears up any confusion but since things appear to be getting heated I honestly I feel like this thread is not worth continuing.

> In #78126#1060800, @jenkm wrote: > @astrand130 - I still don't understand how this is supposed to work. > > Let's take the simplest example, **without any textures**. I just set the color to red, and exported. > The `Ka` set to `1.0 1.0 1.0` - is this correct? And it's wrong that the Mac viewer shows this in white? If your model isn't being lit by diffuse then it should appear white or depending on the ambient light strength it might be added together to be out of the visible range. That might be the issue. Ka of white for a red material is not correct. > I also noticed that the "Metallic" value is copied to `Ka`, > but if Metallic = 0, it set Ka = 1.0, why? I think this was an off spec hack to swizzle the metallic into the ambient while using "illum" as a flag to swap out for dialectics. This is an incorrect approach as extensions for metal/rough have been proposed, this just mangles the file for existing software. > If I set some Metallic (0.001) and Ka becomes not zero, Mac viewer shows red, as I expected. > > It looks quite reasonable, a value of 1.0 gives a fully specular reflection, which simply reflects an all-white environment. Ka is basically the diffuse tint but only applied to the ambient light, ambient does not get affected by Kd. So Ka should in pretty much every case be the same as Kd. Ka is not specular and should not be tied to metallic at all. I've already being solving the issue with incorrect ambient tied to metallic in my patch. Hopefully this clears up any confusion but since things appear to be getting heated I honestly I feel like this thread is not worth continuing.
Author

Check youtube to explain to you. Please do it fix code on Blen der. Our Mac have no issue. Blender does issue. See youtube
https://youtu.be/VZ_-Je6OUY0

Check youtube to explain to you. Please do it fix code on Blen der. Our Mac have no issue. Blender does issue. See youtube https://youtu.be/VZ_-Je6OUY0
Author
FINAL I show you youtube https://youtu.be/VZ_-Je6OUY0 @lichtwerk @rjg @ideasman42 @jenkm @ankitm

This is spam. We told you what the issue is and how to fix it but you aren't listening. Please stop.

This is spam. We told you what the issue is and how to fix it but you aren't listening. Please stop.

Removed subscriber: @KenzieMac130

Removed subscriber: @KenzieMac130
Sign in to join this conversation.
No Milestone
No project
No Assignees
8 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#78126
No description provided.