Converting MMD models to Gmod/Source

So I’ve been trying to convert an MMD (.pmd) model to an SMD file. Converting the model isn’t the problem but, the converted model is missing some textures, because apparently, MMD doesn’t use textures for every part of the models (uses diffuse colour shades instead).

There’s a 3ds Max script on an older thread which I’ve tried to use but gives me a “-- Compile error: Unexpected end-of-script” error. (Script: [thread]1134352[/thread])
That script is supposed to replace the coloured bits of the mesh with 8x8 texture files. (I know squat about scripts)

http://imageshack.com/a/img34/6353/8iqq.png

I just can’t figure out how to work those textures in 3ds Max…

http://imageshack.com/a/img691/1342/k2lf.png

Oh god… it’s kind of creeping me out.

Help is greatly appreciated!

I have no idea how well that script actually works, but it might be fine if you just replace the face texture. You can fix up all of those nasty breaks by either welding all verts to 0.001 or by adjusting smoothing groups (depending on which issue was created). This is probably from the PMD script rather than the texture script you’re using.

Lastly, Source has a 32 material limit per model. Be sure to check how many materials that model ends up using at the end of this. Some MMD models (such as the Kio miku base) use well over 32. If this happens, you can fix it by combining certain materials into a little palette-like texture.

Alright…

I’m one step closer now but (I managed to colour her face and a bit of hair), it still looks horrible T _T

http://imageshack.com/a/img546/4066/nza9.png

The smoothing errors on her face is the only problem (and the darker textures).
I think the textures can be lightened up a bit with a few vmt settings.

Anyway, I’ve tried separating the head to another object and tried to use the Smooth modifier again to no avail. Using it only makes it worse (a whole lot worse . _.)

I’ve already tried to get rid of some of the random floating polygons which just left holes inside of her face… (Pretty obvious after realising what I’ve done)

Next up is trying to move the outer vertices of the eyebrow part and eyes so I can weld them together with the face.

I think you downloaded the creepypasta version of Miku.

On a more serious note, I did some experimenting on the model and I suppose I came to a conclusion. Firstly, you can fix the shoulders with welds and smoothing fixes. The model is scattered across the first 16 or so smoothing groups and you really only need 2-4, more or less depending on the model’s complexity. In other words, just set everything to 1 and go back and modify smoothing groups on necessary areas to prevent nasty dark spots. The skirt and clothes are basically just a plane, so you don’t need to worry about those areas. You can use $nocull one in on those materials to draw it on both sides to fix that in-game.

As for the face, it’s just built extremely awkwardly. The “face” is one static object. The mouth isn’t a dynamic part of the face. Instead, the lips are welded together and the real mouth sits inside her face under a probably transparent layer of lips. The eyes are also completely separate from the face to make it like she’s wearing a mask for absolutely no reason. This might make things extremely awkward in-game, but you might be fine when it’s in-game if you can get lightwarps working correctly. You’re probably going to have to use an awkward method of toon shading though to make sure her face is lit consistently to avoid the strange shading you see in 3ds max.

As for the eyebrows, you probably don’t really need to weld them to the face. The topology there isn’t going to be happy without reconstructing it to compensate for the eyebrows and there isn’t a fully painted material for them. If you don’t plan on using face flexes, you could probably just move them closer to the face or even leave it as is – it’s not bad enough to cause any notice, really.

Honestly, before I rig a model, I usually compile it as a static object and start playing around with the materials to make sure I’m happy with how it looks in the engine so I know what edits I might need. I’d give that a go to see if you can get it look how you like. You may not need to worry about fixing everything as much as you think (unless of course you’d rather rebuild the face anyway).

Her face looks like something from Thomas the tank engine.

Thanks for the feedback!

I think I’ll have to play around with the alpha channels (for $selfillum) on the texture files, just to see which brightness would look best in-game.

Unless there’s some kind of vmt setting that prevents shaders from showing on texture files…

The dark spots that show up in 3ds max are gone when I use the selfillum vmt setting so… I think that covers most of it.

She’ll be glowing in the dark all the time though D:

Thanks again!

I’ve never worked with $lightwarp before, I’m glad I’ve tried it out now :smiley: (thanks for that!)

http://imageshack.com/a/img577/340/n33r.png

http://imageshack.com/a/img836/9946/oe89.png

The results are a lot better (in dark places), I just really need to tone down on the brightness there, also, I’ll have to fix the face after all T _T

http://imageshack.com/a/img545/4272/rzeo.png

http://imageshack.com/a/img713/4358/1nea.png

I’m still trying to get rid of those “dark spots” when I’m smoothing the model out now.