How can i get the texture of a mtl&obj import?

so i imported a mtl and obj file from roblox, and i needed the texture of said import, but there is no texture to unwrap, just color of the blocks in the model, how would i “make” one using the model?

Open the .MTL file with a text editor…it should give a hint as to what the textures/colors are…
READ

a screenshot of the Roblox and the color dropper will come in very handy…
Just select a Block…add new material…use the color dropper in the Color to grab a close color from the screenshot ( or actual Screen in-game)

well, i am trying to get the whole texture png for a mesh, not to color individual parts

Since you don’t have an image file from Roblox and your model is only using Diffuse color…then just about the only 2 options you have is to …
1> save the UV as an image file…and add the colors in Gimp or whatever 2d paint prog you use…or …
2> add the colors as I said in the first reply and then bake a diffuse texture from that…make sure to save the image…

Check the .mtl file and make sure that it doesn’t have an image texture referenced in it!
If it does…then load the Obj file with the option Search for Materials/Textures selected…
You might still have to manually create the materials but it should point you to any image file…if there is one…

1 Like

Generally there is an accompanying texture file (.png, .jpg, .dds, etc.) for obj files. That texture is probably stored somewhere in the program’s files. You’ll have to find the texture file to use it in Blender.
As @RSEhlers stated, open the .mtl file in a text editor (MS Notepad will work) and look for any lines in the code that are a file name. It shouldn’t be too hard to find. You can then search for the filename in the program files or in the app data (generally roaming).

1 Like

this is the mtl file:

newmtl Part30Mtl
Material Color
Ka 0.353741 0.363604 0.420508
Kd 0.353741 0.363604 0.420508
Ks 0.0221955 0.0228144 0.0263848 

d 1

Ns 0

newmtl Part12Mtl
Material Color
Ka 0.00143313 0.14198 0.420508
Kd 0.00143313 0.14198 0.420508
Ks 0.000129263 0.0128061 0.0379282 

d 1

Ns 0

newmtl Part1Mtl
Material Color
Ka 0.154152 0.151058 0.160444
Kd 0.154152 0.151058 0.160444
Ks 0.0096723 0.00947815 0.010067 

d 1

Ns 0

newmtl Part4Mtl
Material Color
Ka 0.91575 0.618686 0.0253713
Kd 0.91575 0.618686 0.0253713
Ks 0.0825971 0.055803 0.00228839 

d 1

Ns 0

newmtl Handle1Mtl
Material Color
Ka 0.0399472 0.0399472 0.0414519
Kd 0.0399472 0.0399472 0.0414519
Ks 0.00250649 0.00250649 0.0026009 

d 1

Ns 0

It looks like there are no textures for that object. This could mean you have the wrong .mtl file or .obj file. There may be old and new versions of the .obj file. You could have an older version.

This is what a .mtl that refrences a texture will look like.

newmtl castleRender:towercastle:lambert4SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd ground009b.jpg
bump  -bm 1 ground009b.jpg
Ni 1.00

See the texture referenced (ground009b.jpg)? You can also see the “bump” map that’s referenced (ground009b.jpg).

there is no texture, but how can i make one, like take the color and stuff and turn it into a texture

You’d have to do some baking.
This might help you.

1 Like

Just as I said in my post…
Add the color to a saved UV image ( I think this is the best way to go)
or
Add the colors manually in the shader editor…

Sharing the file would also help you…

1 Like

ree.mtl (701 Bytes)
ree.obj (57.1 KB)

As I thought …since just using color data and not an image it imports directly with the original color as referenced in the .MTL file…

This will work a bit better if you set up your windows as I have …then you have everything in 1 space to work with… AND IF ANYTHING IS UN-CLEAR … pm ME OR WATCH YOUTUBE VIDEOS ON HOW TO BAKE DIFFUSE TEXTURE

Enter edit mode… UV Editor
Add a New Image… I called it Roblox-Bake ( I did use UN-Wrap as the UV was a Mess) so- In the 3dView …select UV > Unwrap…
In the pop-up lower left set Margin to .02…

In the Material Properties…add new Material —re-name it Roblox-Bake…

In the Node Editor…add a new Texture > Image Texture
Set the Image as the New Roblox-Bake you just finished adding… make sure it is selected
Since it has 5 materials add ready you need to copy this NODE to each of the other 5 Materials…Ctrl+C will copy the node…then in the material editor, Ctrl+V will paste it into the other 5 materials. You don’t need to connect anything…

Once all this is done…
open the Render Properties Tab…on the Right, second from the top…
Set it to Cycles…CPU…set render sample down to 1…
towards the bottom is the Bake tab…open it
Set Bake Type to Diffuse
Set Influence — only Color ( uncheck Direct and Indirect)

Cross your fingers and hit the BAKE button…if all went as it should in the UV Window you should see your New Texture Image…There is an asterisk beside the Image Tab!!! OPEN THE TAB AND SAVE AS what ever you want…!!!

SAVE THE IMAGE
or it will be lost when you quit Blender!!!

You can now connect the image in the material to the Base color…and in object mode, delete all the other original materials by hitting the -Minus button…

can you just post the texture image here? you lost me at margin lol

No, as I said…I unwrapped the Roblox…and you will have to also…chances are that the UV map will not be the exact same… and I don’t have the time to re-do what I showed you, as I rarely save these demo Blend files and even Blender versions would be a factor…

So now you need to follow @BlenderTimer advise and Watch @RyanKingArt’s video…
on baking Multiple Materials to a single Texture Map…

Just bite the bullet and watch the video ( which you should have done anyway ) and learn how to do it! It’s not that painful!

1 Like

where is margin? i can’t find it anywhere

i clicked use node on the properties, but i couldn’t paste the material into the node editor or paste the image node into the material

Get out of Geometry nodes…change that window to either the Shading Tab or Layout ( at the TOP) …open another window or just split the screen…and change one of them to Shader Editor…

But just by seeing your questions, I see you don’t even have the Basics on how to USE Blender as yet… The best thing you can do is watch some of the Blender Basics Vids…

Older videos but still viable with basic operations…like how to get to the right window for Materials…
Better to learn how to walk before running in Blender…as Baking stumps even some of those that know how to use Blender!

1 Like

Yep, still stumps me 98% of the time. LOL :rofl:

1 Like

Yep…Me too! :upside_down_face:

1 Like

is there a way to paint the texture one by one? sounds tedious but sounds less hard than baking and more achieveable for me… i tried the fill button and the fill button just fills the background, how would i do this?