What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

3D Working with .obj files and .mtl files to asign textures


AutomaticLimit

New Member
Messages
3
Likes
0
Hello,

I'm currently trying to learn the 3D capabilities of Photoshop and have a good beginning understanding of the concept of how Photoshop uses 3D.

I've downloaded a 3D model of a living room from Turbosquid. Making sure that they had the .obj file and .mtl file along with the textures themselves. I've opened the .obj file in Photoshop, but the .mtl file doesn't assign the textures. There are 7 materials all named "wire_##########" where the #'s are different for each material. There was 8 included textures along with what looks like 4 bump maps. I understand that you can add the textures to the library, but I don't know what texture goes to what mesh. One texture is the wood grain to the tables, but when I go to apply that texture, it applies to the floor, all of the objects on the table and the tables themselves. So, where do I go from here? It will not allow me to delete the materials or even apply apply different materials to the objects. What am I doing wrong?

Thank you!

S.
 
3D in PS is not the easiest of things to use but if you have downloaded a free model then point me in its direction and I'll see what I can do with it.

Without the actual files its a bit tricky to suggest anything as it really depends on how things are constructed.

Can't promise anything but I'll certainly take a look for you.

Regards.
MrToM.
 
No worries....PM me the link. :thumbsup:

Regards.
MrToM.

EDIT:
File received.
 
Last edited:
Hello,

I'm currently trying to learn the 3D capabilities of Photoshop and have a good beginning understanding of the concept of how Photoshop uses 3D.

I've downloaded a 3D model of a living room from Turbosquid. Making sure that they had the .obj file and .mtl file along with the textures themselves. I've opened the .obj file in Photoshop, but the .mtl file doesn't assign the textures. There are 7 materials all named "wire_##########" where the #'s are different for each material. There was 8 included textures along with what looks like 4 bump maps. I understand that you can add the textures to the library, but I don't know what texture goes to what mesh. One texture is the wood grain to the tables, but when I go to apply that texture, it applies to the floor, all of the objects on the table and the tables themselves. So, where do I go from here? It will not allow me to delete the materials or even apply apply different materials to the objects. What am I doing wrong?

Thank you!

S.

As MrTom mentioned, handling 3d objects in PS isn't a walk in the park. It handles textures and it's native settings differently and you don't have proper control of the material or light settings in most cases . The best option is to use 3d applications to setup the scene, render then import into PS for post production.

Unless you have an application bridge (Photoshop Bridge) like those of C4d, Lightwave, DStudio or Poser. You can view how the scene will look like in PS.
 
I'm slogging my way through this one...slowly.

I have tracked down the problem to be 3dsMax not exporting the relevant information in the .mtl file on .obj export.

Working on a solution.

Regards.
MrToM.
 
Ok...

I've not been able to sort this one out.

I've sent screenshots to the OP which relate directly to their own personal files but in case anyone else is interested here is a generalisation of what I've found out.

The problem the OP identified stems from the .mtl file not not having any reference to the image maps used in the material. The .mtl file is exported from a 3rd party 3D app, for eg 3dsMax, along with the .obj file which contains the actual vertex data.

When the .obj file is opened in 3dsMax all is fine...materials show as expected but when opened in PS as a 3D layer PS does not have any reference to any image files used in the map slots....simply because the .mtl file does not contain any reference.

Ironically, exporting a 3D layer FROM PS to an .obj file DOES add in the reference to the images used.
This is of course closing the stable door after the horse has bolted but still...its a good reference.

The .mtl file can be edited to included a ref to the image files. This isn't a practical solution by any stretch but it could certainly be used in an emergency.

The 3dsMax exported .mtl file contains the following data for each material:

newmtl my_diffuse_mat
Ka 0.525500 0.431400 0.031400
Kd 0.525500 0.431400 0.031400
Ks 0.350000 0.350000 0.350000
Ns 32.000000
d 1.000000
Tr 0.000000

The suffixes 'a', 'd', and 's' after the initial 'K' denote the property of the material they refer to.
'd' is 'diffuse'.
's' is 'specular'.
etc.

The image reference is missing from this list but uses a similar naming convention for each map.
PS outputs an .mtl file something similar to this:

newmtl my_diffuse_mat
Ka 0.525500 0.431400 0.031400
Kd 0.525500 0.431400 0.031400
Ks 0.350000 0.350000 0.350000
Ns 32.000000
d 1.000000
Tr 0.000000
map_Kd my_object - diffuse_image.png

"map_Kd" refers to the image file used in the 'Diffuse' map slot.
"my_object" refers to the object the material is applied to.
Then the image ref....this is relative to the .mtl file.

I couldn't get PS to accept this convention when used with the OP's file, which is strange, but for a file produced solely in PS it works fine.

What DOES work in PS is to remove the object reference but then it does tend to apply the same material to several different objects.....ho hum.

So....thats what I've tried and failed with.
I suggested to the OP that maybe using another app to open and then save out a .obj file may result in the .mtl file being written with the image references....I've never had to use another app than 3dsMax so I don't know what other apps would do this.

Just as an added piece of info the images used in a PS material for the properties of that material can be changed or edited from the properties panel once the material for the object in question has been selected in the 3D panel.

Any property with either a 'Folder' icon, (No image assigned), or a file icon, (Image IS assigned), can have an image as the map to define the property.

Also, hovering over the icon will, (Eventually.....sometimes), show you a very small preview of the image.

Map slots for the properties of a material:
3d_map_slots_MT_01.png


Regards.
MrToM.
 
MrToM....

I did say it's not like a walk in the park....

Which is why it's still better to open, rig and render in its 3d application. PS is still a long way from full incorporation with 3d. And I don't think PS will get that full capability - there's just too much things involved to make it happen.

But I do remember instances before that I've opened and edited certain 3d objects in PS. I think they were in .OBJ format. So you may be right in what you said to save/export the 3DMax obj as an .OBJ.

AutomaticLimit..

Turbo Squid usually offers their products in multiple formats. Since you purchased the item, check for the other available formats in your download account - .3ds or .obj format might work for you.... no guarantees but its a shot.
 

Back
Top