Export to OBJ with textures in MTL file

Export to OBJ with textures in MTL file

ThomasB44
Mentor Mentor
6,156 Views
14 Replies
Message 1 of 15

Export to OBJ with textures in MTL file

ThomasB44
Mentor
Mentor

Hi, I encountered a problem when exporting to OBJ :

If I set an unique folder for custom textures (in appearence) AND textures folder (Application options/Files), then texture is not exported in the MTL file.

Here below how I've proceed :

Capture.JPGCapture.JPG

This folder must contain at least one *.dds file such as "Chrome.dds" and be set in Application Options/colors

Then, I create a new part and a new appearence, and I set a picture stored in this folder

Capture.JPG

Finally, I save this part as an OBJ file, and I can see that this picture is not properly exported.

Capture.JPG

If I set my picture appearence outside of this folder, then it work as expected.

Capture.JPG

 

Why this "texture folder" is not the right place for these textures pictures ? Smiley Indifferent

This "texture folder" is only needed for the reflexion files ? Smiley Frustrated

For now, I've create 2 folders, one for the reflexion environment files, and one for pictures appearences.


Thomas
Mechanical Designer / Inventor Professional 2025
Inventor Professional EESignature

Accepted solutions (1)
6,157 Views
14 Replies
Replies (14)
Message 2 of 15

JarFu
Autodesk
Autodesk

Thanks for the post! What's your Inventor version? Is it possible to attach your obj, mtl and jpg files for our investigation? Many thanks!



Jar Fu
SW Engineer
Inventor QA
Autodesk, Inc.
0 Likes
Message 3 of 15

ThomasB44
Mentor
Mentor

Hi @JarFu 

I'm using IV2020 Smiley Happy

You will find some example files here attached, to reproduce what I've done

Just need to set the right options in Application and appearance. Smiley Wink


Thomas
Mechanical Designer / Inventor Professional 2025
Inventor Professional EESignature

0 Likes
Message 4 of 15

JarFu
Autodesk
Autodesk

Hi @ThomasB44,

Many thanks your quick update, I could see the texture with importing the obj file you attached. It's wonderful that you could export texture info to mtl successfully with Inventor. I can't do that on my machine and will try more as you mentioned.



Jar Fu
SW Engineer
Inventor QA
Autodesk, Inc.
0 Likes
Message 5 of 15

ThomasB44
Mentor
Mentor

Yes, this is really great, and I can export my IV models to multi OBJ files (1 OBJ per part), and then import them into others softwares with textures, the rendering is really good Smiley Very Happy

It's just a pity that the texture folder don't work as expected in this case ! Smiley Embarassed


Thomas
Mechanical Designer / Inventor Professional 2025
Inventor Professional EESignature

0 Likes
Message 6 of 15

JarFu
Autodesk
Autodesk

I see why I could not export texture, Smiley Frustrated I used Inventor 2020.1- export texture function does not work for obj anyway. With Inventor 2020 RTM, it works fine. Could you please help confirm if this function necessary for business case? Many thanks!



Jar Fu
SW Engineer
Inventor QA
Autodesk, Inc.
0 Likes
Message 7 of 15

JarFu
Autodesk
Autodesk

@ThomasB44, about image folder problem, I could reproduce it with Inventor 2018~2020 and tracked it as INVGEN-30717. Product team will investigate this and let you know if there is any update.Smiley Wink



Jar Fu
SW Engineer
Inventor QA
Autodesk, Inc.
Message 8 of 15

ThomasB44
Mentor
Mentor

Hi @JarFu 

I'm using IV2020.0.1. And I confirm you that I need this function to export my models from IV to a mobile application. As stated, I have 2 folders, one for texture, and one for reflexion environment and it works this way.

But this is not the way it should works Smiley Wink


Thomas
Mechanical Designer / Inventor Professional 2025
Inventor Professional EESignature

0 Likes
Message 9 of 15

JarFu
Autodesk
Autodesk

Got it and thanks your confirm @ThomasB44 . You're correct, there are two tickects for the obj export problems now:

INVGEN-30721:Regress_2020: Export OBJ missing the texture image info in the mtl file

INVGEN-30717:NG: Color & Texture info could not export to obj mtl if put custom image under the Texture folder

I'll keep you update once there is any progressSmiley Happy



Jar Fu
SW Engineer
Inventor QA
Autodesk, Inc.
Message 10 of 15

ThomasB44
Mentor
Mentor

Hi @JarFu 

Since the IV 2020.1 update, I'm not able anymore to export the texture images in the MTL file.

I've tried as far as I know, I can't achieve a way to export them again.

So the only way is to coming back with IV 2020.0.1...

 

Have you got some news ?


Thomas
Mechanical Designer / Inventor Professional 2025
Inventor Professional EESignature

0 Likes
Message 11 of 15

JarFu
Autodesk
Autodesk

Thanks your quick update, @ThomasB44. Yes and sorry about that, the texture could not be exported in 2020.1 and product team has a fix already which will deliver it in later dot release. 



Jar Fu
SW Engineer
Inventor QA
Autodesk, Inc.
Message 12 of 15

ThomasB44
Mentor
Mentor

Thanks a lot for this good news 😀


Thomas
Mechanical Designer / Inventor Professional 2025
Inventor Professional EESignature

0 Likes
Message 13 of 15

software
Explorer
Explorer

Hi,

 

I am working on inventor 2020.3.

 

I created a part as attached.

 

when i create the obj file (as attached), the texture information is generated in the mtl file, but when i import the obj file into unity3d, the texture is not shown.

 

i created another part with only colours and that seems to work fine.

 

i noticed that this error was supposed to be fixed. has it not been fixed yet.

 

also attached are my settings. is there something i need to change.

0 Likes
Message 14 of 15

JarFu
Autodesk
Autodesk
Accepted solution

hi @software,

 

It looks due to there is an additional SHEET folder. When we export obj file, Inventor will create a folder with the same name and put the texture png files into it directly. We import the obj file, it will load png files from this folder. 

 

After move these png to the SHEET folder directly, import your obj can show the texture as expected in 2020.3. Please double check and let me know if it can work on your side.

OBJ_PNGFolder.png

 

 



Jar Fu
SW Engineer
Inventor QA
Autodesk, Inc.
Message 15 of 15

software
Explorer
Explorer

Hi,

 

Thanks a lot. that works well now.

0 Likes