Site icon Learn MikuMikuDance – MMD Tutorials – Free 3D Animation Software

Creating and Editing UV Morphs for MMD Models


How can I make UV morphs in MMD? What can you do with UV morphs? How can I make four-way UV morphs in MMD?

4-way UV morphs

Have you seen some models that have morphs that change their textures? You can make those yourself. And once you know how to, you can get creative with them!

Even if you don’t want a four-way UV morph, that’s the only thing that the PMXE interface wants you to make. Don’t worry, we can get tricky with them later. Let’s start with a basic four-way morph.

Preparing your texture

You probably only have one texture for your material, but if you want a four-way, you’ll have to find three more. Once you do, edit your texture in an image editor like GIMP so that each image takes up a quarter of the screen. You can use a larger final texture if you want, up to 4096×4096 pixels!

Select your vertices

Unfortunately, PMXE won’t let you create UV morphs in multiple materials at once. That’s okay, we’ll see how to join them later. So you probably will want to mask by a single material. Then select all the vertices you want affected by the morph. You can always edit it later.

The UV Morph Creation Interface

From PMXE’s 3D window, select Edit-> UV Morph -> Create UV Morph. That’s a complicated window, but don’t worry, most of it isn’t important.

For whatever reason, PMXE won’t let you create UV morphs without a texture loaded. I don’t know why– it should just load the texture. But click the Load Texture button and select the model’s texture. You can use a different picture, but it will replace the texture on that material with the image you use.

PMXE expects you to only want to create a four-way morph. The first texture is your default, and the last morph, PMXE will name automatically, but it still needs two names. Click in the Morph Name panel of the window and enter a name, then hit return and enter another name. I’ll just use red and yellow for my names right now.

Then hit the Create Morph button. Click on the confirmation dialogue when you’re done and check out the morphs in the tabbed view!

 

Tabbed View Morphs

Take a look at the bottom of your list of morphs. PMXE created three new morphs: two UV Morphs named red and yellow, and a flip morph named UVSkinFlip.

UV Morph Tabbed View

Select red or yellow and take a look at the window. That list to the right is the list of all of the vertices affected by the morph; each one has two components: a U, or X coordinate shift, and a V, or Y coordinate shift. Red moves all of your UV coordinates 0.5 units to the right– halfway across the texture. Yellow moves them halfway down the texture.

Select UVSkinFlip and check it out. It’s a different kind of morph. In its window it refers not to vertices, but to other morphs– to red and yellow! In the group impact box, it says how much to use of each. So UVSkinFlip just applies both red and yellow morphs fully, giving you the lower right-hand corner of your texture space.  Except– flip morphs can cause problems with loading MMD models!  That’s okay, because group morphs work the same way.  So for right now, delete UVSkinFlip.  We’ll remake it later.

Undoing UV

The four-way UV morph creation screen alters your model’s UV mapping to use only a fourth of the space. I hope that’s what you wanted, but if not, you can always change it back.

Open the Object Edit panel from PMXE’s 3D view (View->Object Edit, or F4, or click the Mov button on the top bar). Switch to the UV tab of the new Object Manipulation panel. Click on the Change button and select Scale. In the fields immediately below, enter 2 (for scaling horizontally) and 2 (for scaling vertically) then click the Value button. Now, your UV coordinates are shifted to double of their previous values– taking up the full texture space.

Making a Dial from a Switch

Some kinds of animations are like switches– they should either be on or off. Most four-way UV morphs are like that. They should either be registered to 0 or to 1. But with some texture editing, you can use them as dials instead– smoothly interpolating across a texture. By creating a single wide texture, I did that to Teto’s kimono, which I can now animate using the UV morph.

Since I don’t need vertical UV shift for this effect, I just deleted my yellow morph (and the UVSkinFlip morph that references it). PMXE only lets me make a four-way, but I can still edit or delete the morphs after creation.

If you do this, you’ll probably want to arrange your UV map a little more carefully than I did– look at those sleeves, uggh!  I think I forgot to disable physics when I did a transform earlier.

Editing UV Morphs

There’s other things you can do with UV morphs if you want to get fancy. You’ll still have to start with a four-way morph. But then you can edit it.

Morph Edit

You can edit morphs with a graphical interface by selecting a morph in the tabbed view, right clicking on it, and selecting Vertex/UV Editing Morph. This will take to a morph editing view where you can use the Object Edit controls on selected vertices to edit their final, morphed UV coordinates. Try using the Object Manipulation panel to scale your morph. On the Morph Edit panel, hit the Reflect button, then drag the slider across to see how the morph has changed. If you’re happy, hit the Update button to update the morph to your edit.  Click Cancel to get out of the editing screen when you’re done.

Manual Edit

You can also manually edit the values on the tabbed view. Select the morph, select an index (representing a vertex) and change the values in the Vertex/bone movement/speed impulse/UV fields.

You can edit multiple vertices at once (for instance, to change all vertices to different numbers– for instance, to change your morph to be a quarter shift rather than a half shift, with values like 0.25, 0.

There’s a bug in PMXE where it won’t permit numeric entry with multiple indices selected. You can get around this by copying a number and pasting it in when you have multiple indices selected, rather than entering it manually.

Export to .csv

There’s one more way to edit UV morphs (or any kind of morphs), which is to export to .csv, a spreadsheet-friendly file format you can edit in a program like Excel. (Or in a text editor, if that floats your boat.) Select a morph, right click on it, and select Save as CSV, then give it a file name and save it in the following dialogue. You can edit this file to your heart’s content– you should see that it contains all of the morph information, although not as helpfully labelled as it might be. To get this info back into your model, right click on the morph list, select Load from CSV, and navigate to your edited .csv file. This will create a new morph, so you may have to delete the old version.

 

Grouping UV morphs

What if you want to make a UV morph that affects multiple materials? You can create UV morphs for each material, then use a group morph to call them all at once. Right click on your morph list and select New->Group. Hit the + button to create a new index entry, then enter the number of a UV morph you want included in the Target Index field. If you want the morph to scale differently than the group morph, you can enter a Flip/group (impact) entry different than 1. Add as many morphs to the group morph as you want. You can even hide the original morphs, although that requires using a different program, or editing the morphs as .csv files.

Remember when I said to delete UVSkinFlip?  Here’s where we can recreate it– with a group morph referencing both red and yellow UV morphs.

AddUV

AddUV is a feature very rarely used in MMD. It’s only ever used by MME, AutoLuminous is the only effect that I’ve ever seen that uses it, and I’ve never seen a model that uses addUV in a fashion expected by AutoLuminous. If your model uses addUV, you can create addUV morphs from regular UV morphs.

Creating an AddUV morph

To create an addUV morph, select an existing UV morph. Right underneath the Panel field on PMXE’s tabbed view, you’ll see a drop-down list. Select UV1, then click the << button to the left of the drop-down, to change the UV morph to an addUV1 morph. Or select UV2, UV3, or UV4.

.ZW Components

AddUV morphs are a little different than regular UV morphs. That’s because .pmx models have only two components for regular UV– U and V, duh– but four components for addUV. Don’t be fooled by the name.  AddUV is a way to encode extra information in each vertex, but it has very little in common with regular UV. You could use it as UV, but why?  You already have UV!

So an addUV morph is going to have two extra components beyond the x and y coordinates. I call those extra components z and w components. If you need to edit these meaningfully, PMXE is not a sufficient tool, and you’ll probably have to export to .csv to edit them. (Although you could always copy/paste fields from another exported morph into these fields in a spreadsheet.)

Mip-mapping Errors

Have you ever seen a wierd model glitch at the seam that disappears when the camera gets close? Those are mip-mapping errors. Have you ever heard to use thick margins on your textures? That’s to prevent mip-mapping errors. You might run into mip-mapping errors even without using UV morphs. But using UV morphs makes them more likely.

When MMD reads a texture, it does some automatic blurring based on how distant the textured face is from the camera. That’s a good thing, because it prevents moiré. But if your camera is distant, and your texture contains really dissimilar colors, sometimes this blurring can lead to color changes near the borders. Since the size of the blur depends on the camera distance, you’ll see this at distance, but it will disappear when you get closer to inspect.

Just understanding the issue should be enough to help you come up with ideas to fix it. If you’re running into the problem, consider scaling down your UV coordinates to create a healthier margin for your textures, so they don’t get blurred pixels from differently colored areas of the same texture. You might be able to rearrange your textures to fit better inside a smaller area. Blender is a great resource for UV editing for this purpose.

Keep the Faith and credit your sources!  I’m using my own Tda 0401 Bliss.  Shoes and kimono are edited from work by Espirea!  Tentacle is based on work by Mehmet for the Bad King Monster Brush Pack!  Also featured are my own glasses, bicycle, and teddy models!


– SEE BELOW for MORE MMD TUTORIALS…


— — —


– _ — –


Exit mobile version