Trouble loading the associated .mtl texture from an imported .obj into Maya.

Trouble loading the associated .mtl texture from an imported .obj into Maya.

Anonymous
Not applicable
5,047 Views
16 Replies
Message 1 of 17

Trouble loading the associated .mtl texture from an imported .obj into Maya.

Anonymous
Not applicable

Hi, 

 

I have a file transformed from a point cloud format into an .obj & .mtl. The .obj is recognised by maya, but not the .mtl.

1. I have placed the .obj, the .mtl and the associated .jpeg s into a single folder in my project's data folder.

2. I have tried to load the .mtl via the hypershade, but I am not sure where exactly the connection for the .mtl should be (is it for example via the colour of a shader? If so, this did not work). I cannot just import - apply the jpegs via a uv map as I am dealing with a very complicated mesh, result from digital scanning, imported if I am not mistaken from Recap 

3. I read that the script of the .mtl file has to be in a specific format. In the first instance, and after some research into the subject, the .mtl seems ok to me, but then again I am not a programmer, can't script very well, so I am not sure about what I should be looking for. I have uploaded the .mtl file, perhaps someone can spot an issue straight away.

 

Thanking you in advance for reading this, I would appreciate all help.

 

Christo1

0 Likes
Accepted solutions (2)
5,048 Views
16 Replies
Replies (16)
Message 2 of 17

damaggio
Mentor
Mentor
You don't import the mtl into Maya , only the textures are imported , you have 9 textures you could simply reattach to the 9 shaders available. There might be some trial and error but it shouldn't take too long... for some reason your exported mesh from RC had a glitch, you could also try a new export with different settings to see if the mtl is fixed.
0 Likes
Message 3 of 17

Anonymous
Not applicable

Thank you very very much. Just one clarification. You are writing about 9 shaders. I have do not have 9 shaders though. I have 9 images (jpegs), but no shaders. As this is no ordinary simple object, but a complicated interior of a building, imported from a different software, I m not sure how to apply these images. If I understood well, I need to create 9 shaders, eg 9 lamberts and load the images on their colour attribute? My only fear is how the uv maps of the other software will match the uv created in Maya. please do answer if you can, meanwhile, I will experiment and hope it goes well 🙂 

0 Likes
Message 4 of 17

damaggio
Mentor
Mentor

Yes, naturally if you have 9 textures you would need 9 shaders, when you exported your point cloud as an obj, the original scanned shaded  file was probably exported with several texture files assigned to specific "Faces" part of the geometry with several shaders,  software like Agisoft and Reality Capture will do that, or if specified by the user to generate a single large map with one shader.

Regardless, if your file does not have the 9 shaders I'm afraid it will be impossible to find out which faces in the geometry should have a new shader attached to it and followed with a texture map.

Try a new export from your software and study the export options.

And yes if you have the UVs the textures will fall into the right spots.

Good luck.

0 Likes
Message 5 of 17

Anonymous
Not applicable

Thank you. Is there maybe a way to create a single Lambert with 9 different file connections on its colour output that is non-hierarchical? I m aware that one can create the layered shader (which unless I m mistaken is working with hierarchies - there is a dominant and a less dominant image) or combine different textures via a selection of specific faces. Is there a way though, to create a Lambert and have as its output several images? My images have transparency at different places so they will not obscure each other.

0 Likes
Message 6 of 17

Anonymous
Not applicable

Is there maybe a way to create a single Lambert with 9 different file connections on its colour output that is non-hierarchical? I m aware that one can create the layered shader (which unless I m mistaken is working with hierarchies - there is a dominant and a less dominant image) or combine different textures via a selection of specific faces. Is there a way though, to create a Lambert and have as its output several images? My images have transparency at different places so they will not obscure each other.

0 Likes
Message 7 of 17

mspeer
Consultant
Consultant
Accepted solution

Hi!

 

1. Just open the obj-file and everything should be fine (the .mtl file looks good).

Make sure the texture-file names are correct incl upper/lowercase.

 

2. If you want multiple textures on top of each other you have to layer them, there is no way around this, there are multiple nodes in Maya to achieve this.

 

For further help please upload the obj-file (+ at least 2 textures).

0 Likes
Message 8 of 17

Anonymous
Not applicable

Thank you for your time and answer.

 

I have, of course, tried to open the file, but it only loads the .obj with no textures. I am not sure how to bring the textures in, as no shaders have been created (the geometry is very very intricate, not a simple object or character on which I can play about and make the textures fit).

 

You write about making sure the upper/lower case is correct. Could you expand on this, please? Although I have been working with Maya for years, I do this from a more artistic point of view and am not very good yet at coding. Where should I check that the .mtl is correct? On Maya or an editor. If it is in Maya, would you mind please pointing me out to where (or an appropriate tutorial please?).  

 

Unfortunately, I cannot upload the file itself, as it is a huge file, to which I do not own the rights to (promised not to share), but only work on. 

 

Once again, thank you, and everyone else for all assistance. I understand it is a complicated issue and that it is hard to work online with no actual project on sight, but I am grateful for any help.

 

C.

 

0 Likes
Message 9 of 17

mspeer
Consultant
Consultant

Hi!

"UPPERcase.jpg" is not the same as "Uppercase.jpg".

Check with simple Text Editor.

 

Without more data i am not able to help you further.

Message 10 of 17

Anonymous
Not applicable

Hi,

 

I am still trying to figure out a way to make the textures of the obj show up. It is driving me nuts! I am dealing with a basilica, which has been somehow converted from a point cloud into an .obj. I do not know how, and at this point, I cannot reach out to the people who converted it to find out how. I have spent 2 weeks trying to figure out how to convert a point cloud into a mesh, and the methods that seem to make it possible do not work yet for my geometry. Therefore, because I do not like to give up after all this effort, I am going back to my original .obj, and I am trying to figure out a way to bring the textures into my scene. Could you possibly take me through the process of applying the textures to an obj, please? I read online that I need to create a Lambert and then apply it, but where should I load all the images that are related to the file (see attached image). The geometry is one solid mesh of a basilica.? I am very very grateful for all your advice and guidance.obj_mtl_01.JPG

0 Likes
Message 11 of 17

damaggio
Mentor
Mentor

if you only have one shader in the file I don't think is possible to assign new shader and textures to the existing geometry because is all done automatically from the original software.

0 Likes
Message 12 of 17

damaggio
Mentor
Mentor

you can perhaps see about the UVs as is shown in your image, if you can see the UV shells in the UV editor and they are not on top of each other, maybe there are UV sets , then you can select the each UV island or shell and start assigning new shaders and textures.

Message 13 of 17

Anonymous
Not applicable

Thank you for your answer and time. I suspect it might be something along the lines of an udim texture or https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/Maya-Lig.... I still cannot figure it out though as I only have one single texture map (see image). Are you aware of any ways I could make any multiples maps show up? I will keep on trying and I ll post my progress. Please do comment if you have any comments or ideas, hopefully, I will manage to crack this soon enough. Thanks once again, I cannot stress how important this community is and how valuable every single contribution. Marianne_04.JPG

0 Likes
Message 14 of 17

Anonymous
Not applicable

Here is a screenshot of the model as well. Screen_shot_forum_01.JPG

0 Likes
Message 15 of 17

damaggio
Mentor
Mentor
Accepted solution

I was afraid that was the case, all shells are overlapping, surgery will be required .

It could take a whole day, but I would select the shells by comparing to the corresponding map, then Control select UV shell and do a face extract, do that for all recognizable UV shells and looking at the maps, its like putting together a puzzle until all the major shells are extracted as separate meshes, then you can start assigning the shaders to those parts and their textures.

Other than that , would be to go back to the website you got the model from and re download or contact the owner.

Message 16 of 17

damaggio
Mentor
Mentor

Once they are extracted they wont be overlapping anymore when you select the extracted mesh in the UV editor...see example below...

And just to finish, these are not UDIMs, its just a common technique of assigning shaders to polygon faces (done by original software in this case) and the UVs occupy 0 to 1 space, unlike UDIms where UV shells are moved to different UV quadrants.

You can read about this later if you are interested.

Message 17 of 17

Anonymous
Not applicable

Thank you so much, so helpful!

0 Likes