Part 04: Textures



Tab Interface

Editing textures is simple. All you have to make certain of it that there's a file you want to use, and it's saved to the same directory as the model. Jpg and Png texture support have recently been added to MMD, so you're no longer limited to just Bmp or Tga UNLESS you're using an older version. Anything under 6 probably won't be able to support it.

You control textures via the little text input in the tab where the color swatches are.


Note that there are two boxes on the bottom-right. This is the case as of the addition of the sphere map feature. Before, there was one box for textures. Generally, you should see textures on the top and sphere maps on the bottom. The program will show you some red text next to the box you typed in if you're got them backwards.

Fixing Broken Textures

There are several reasons that a texture will 'break', or not display in MMD.

  • The files were in Japanese so Winrar 'renamed' them, thus breaking the link to the texture.
  • You're missing a file from the download package.
  • The files are in a format not supported by MMD.
  • The texture conflicts with a spheremap (I'm still not sure why this is).

Older versions of MMD wouldn't have cared if filenames had Japanese characters, though in most cases with Version 522a or later you'll get a "Cannot open file 2:" dialog. So in order to use your files, you now have to rename them. This could be a good thing, as it encourages better organization. I myself always used to have issues with duplicates of models.

The first thing you need to do is open up PMD Editor (if you have it) and go to the Material tab. Find the Material with the texture that's broken, and check the filename.

  1. Does it match the filename of the texture in the folder?
  2. If they're both in Japanese, do both the texture and the filename have the same character?
  3. Is the file type supported by the version of MMD you're using?

If the answer was no to any of the following questions, edit either the filename given in PMD or the filename of the texture in the model folder. Or both, but they MUST MATCH!! For example, have a look at Sweet Anne's textures...


I'll choose her SAme.bmp (her eye file)


Note that the filename is exactly the same as what we just saw in Windows Explorer. If the text in the box is "C://Documents and Settings...." etc. the link won't work. You'll get some red text above the text input.

Transparent Textures

Say you're using MMD version 707 (the one that just came out). Because Png textures are supported, you should also know that the Png file format supports transparency, (It's great for forum signatures and website layouts too). As an example, open up Photoshop, Fireworks, or any image-editing program that lets you make a transparent background. Gimp or Paint.net should also allow you to do this.

Create a new file with no white background (or delete the background in the case of paint.net) draw anything you want on it, and save it as a Png. In Fireworks/Photoshop you may need to specify what kind of Png you want to use. Shoot for Png 32 instead of Png 8. When you see a 'Matte' option, make sure it's set to Transparent (the little checkerboard image).

Next, go into Metasequoia and create a flat square using the default options. Create a new material, select the whole square, and set the texture to that object. Bring up the material for that object again, and load the texture you just created. Save the file for later, and save another copy as a .x file.

Open up PMD Editor and go the the Material tab. Since there's only one entry (you only added one texture), it should be pretty obvious which one you're going to work with. Change the path of the texture so it says '<whateverfilenamehere>.x'  and NOT 'C:/Documents and settings...' etc.

Most importantly make SURE you put the name of your own file (:

OR, if you don't have PMD Editor...


First, make a copy of the file you're going to be working on. But you should be backing up your files anyway...


Some versions of Windows won't let you copy and paste the file back in the folder, if that's the case just save a second one and name it differently. But make sure you can recognize it!


The result... self explanatory!


Remember to open the program with Notepad, don't just hit 'Open' or it'll open the file with whatever software that filetype is associated with...

You should get something like this. Now because we know we're working with a .png file, this gives us an advantage! This next step can be done no matter what file format the texture is, but in most files you'll be looking for one of the 4 formats. Bmp, Tga, Jpg, and Png. Most models or accessories will still have Bmp or Tga, mostly Bmp. Jpg/Png support is still new so you won't see alot of models that use it just yet...


Hit Ctrl + F, to bring up this dialog, and type in '.png' (or whatever extension you're using) and click 'Find Next' or 'Find', whichever you're given. Find will take you to one result, but Find Next can be used multiple times in succession.

And the search takes us right to the texture! This one's already been edited, but when you Export from Metasequoia the textures will use an absolute file path. Absolute meaning it's position on your hard drive, folders and all.

Now once you've made changes to your file, SAVE IT! Close Notepad, load up MMD, and try to load the .x file you just edited. If the images work, congratulations! If they don't, double check your version of MMD, and make sure the files are in the right place. Also check that your images aren't corrupt (but that shouldn't happen if you've just created a new image). Also, check your transparency. Can you see through the image where you should? If the answer is no, go back and check the settings you used to export.

Here's an example that I made earlier...


I don't have better pictures as of yet (it'd have been fun to have a picture of Miku and the gang poking their fingers through the transparent areas to show it was really see-through xD), but this is the same file on bot white AND Black Backgrounds. If I had a White background, the White would show against the Black, and vice-versa.

If you're wanting to do a texture-heavy model with transparency, (or in this case ripped/converted one from a game) you may want to read this over.

Absolute VS Relative Linking

MMD does not support linking to a texture file with an absolute file path. In order to link to your textures, you need to use a relative file path.

A relative link is shorter than an absolute link, but unlike it's counterpart, it won't break when the file is moved so long as it stays relative to the position of the file that links to it. An absolute file path is the exact location of the file. If you move it, you have to change it.

Personally, I have a bit of background as a Webmaster, so I'm more familiar with absolute and relative linking. If you'd like a simpler explanation, take a look at this article.

UV Mapping

We all know this as the feature that is not available in Metasequoia. In actuality, the feature is called UV Unwrapping. The program takes the Mesh co-ordinates and flattens them out. From there you can save this as an image (or take a screenshot), load it in a graphics program, and paint your textures using the guidelines (so that they'll line up when applied to the model). Metasequoia still has basic texture mappingcapabilities, but that consists of using presets or scaling the image on a flat plane.

The feature is included in Blender, though it may be a bit tricky to master. I myself am still having issues getting the painted texture to... well.... load. There are tutorials for UV mapping in Blender (in fact, there are MANY Blender tutorials, Youtube is a good source for video demos), though for the most part they seem to be version specific.

If you're aiming to texture an accessory, (and I hate to suggest this) you could use Google Sketchup's system. You can 'bend' textures (at this point, sadly, there's no real 'unwrapping' utility, but yet somebody made models of Link from Ocarina of Time/Majora's Mask) around corners. For solid objects like walls or edges that form some sort of box this is fairly simple. But trying to wrap textures around a complex structure is counter-intuitive (if it looks like it'd be a pain in the neck to map, that's what I mean).

It's alternatively possible to project textures onto a surface, but again, you have no way of unwrapping the mesh. It's going to be tough to get the exact proportion right unless you have a good idea of what you're doing.