0
$\begingroup$

So reading that title may confuse a lot of people, I mainly just want to take a .obj along with its .mtl and the textures and turn it into a .obj file with one large texture instead of using the .mtl and a dozen smaller textures.

Main reason for this is because there is a program by the name of Bridge. for the game Minecraft that can convert an OBJ file along with a texture map into a JSON file that Minecraft can read. I downloaded a model off of the internet of the Super Mario 64 peaches castle exterior and noticed it came with a .mtl and a bunch of textures along with the .obj this lead me to problems because the program only accepts a texture and a .obj model. So I was wondering how I could possibly use blender to change the individual textures and the .mtl file into one large mapped texture for the model.

Any ideas? Because I am completely new to the entire blender thing...

$\endgroup$
1
  • $\begingroup$ PS: one alternative to Bridge is a script by Martin O Hallon, which uses Raspberry Juice (or raspberry jam in 1.12.2 forge), and although it does not support textures AFAIK, it does support multiple materials, and you can assign a unique minecraft block to each one. $\endgroup$
    – TheLabCat
    Aug 13, 2021 at 2:23

1 Answer 1

0
$\begingroup$

Not directly: the blender built in OBJ exporter creates and uses mtl files automatically. You could possibly do the following to reconfigure the UV maps to use one texture and thus make the model only need one material.

Note: If the images are square, this should work easily. If they are not square but all the same aspect ratio, this is still probably fine. If they are different aspect ratios, things could be tricky, because the UV maps are ratio relative: a UV map says “cover the bottom left quarter of the image” no matter what size the image is. Still, you could do some math and scale the UVs individually in step 2.

Tip: If increment snap is snapping in the wrong places, use the operator panel (bottom left pop-up after using an operator) to adjust the operation as needed. Works on whatever operator you just did.

  1. Use an external image program (like GIMP) to put all the image textures together in one giant quilt if you will.
  2. Import the OBJ into Blender, and for each material: select it’s assigned faces; select all the UV of those faces in the UV editor; with increment snap on, move the UV to a unique location, preferably lining up with the quilt pattern you made, but aiming towards DEFINITELY being unique. You’ll have to remember approximately where the other UV parts are as they will be invisible when their mesh is unselected (don’t turn on sync select to try and fight this).
  3. Open the quilt texture in the UV editor. The UVs will be too big for it right now, but don’t worry; hold on a moment.
  4. Select the entire mesh, and work to arrange the UVs in exactly the same way as the quilt (as opposed to the same size), then scale the whole UV down to fit on the quilt properly.
  5. Remove all materials on the mesh, and configure it with just one that uses the quilt texture.

Hope this works! I have not tested it yet. Good luck

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .