Replies: 23 (Who?), Viewed: 8655 times.
Ms. Byte
Original Poster
#1 Old 12th May 2011 at 8:26 PM Last edited by CmarNYC : 27th Jul 2011 at 4:24 PM. Reason: New version upload
Default For beta testing: tool to simplify morphing a base mesh with vertices added or removed
It's a simple idea, really. This little tool takes a base mesh you've removed vertices from and/or added vertices to, plus the morph mesh for the original version of that base mesh, and generates a new morph mesh for your hacked base mesh.

For meshes with vertices removed, the new morph should work as is.

For meshes with vertices added, the new verts are put into the morph with a zero displacement from the base. You'll have to go into Milkshape or whatever and move the new vertices to the correct position for the morph.

The interface is pretty crude at this point, and I plan on incorporating it into MorphMaker once the bugs are worked out, unless people would prefer it as a separate tool. To use: import your modified base mesh and the morph for the original base mesh. Give a name for the new morph mesh in the third file input. Then click the button.

Pics attached: I chopped the arms off the game amTopJacketPeacoat and generated a new morph for it. I didn't take pics, but I also tried subdividing some faces in the same mesh to get new vertices, and made a successful morph for that as well. Moving new verts into the right position in the morph may be tricky, though, depending on what you're doing.

Unzip into a folder and run MorphMatchMaker.exe. Only works on Windows.

Edit: And.... It just occurred to me that this may be the wrong forum for this. Mods, do you think it belongs in the meshing forum? If so please move it.

And another edit: After making new morphs with this, you'll still have to use Wes's renumber tool in Milkshape to renumber the new base and morphs - not 100% necessary for removing verts, but definitely for adding them since they need numbers in order to be morphed in-game. Plus of course you have to do bone assignments and so on for added verts.

5/22 edit: New version uploaded with base and morph mesh renumbering added.

7/25 edit: Two months since the last update?? New version with name change to Mesh Toolkit. Updating of morphs in TSRW WSO files added. To use: Import your WSO in Milkshape, add/remove vertices and faces in the base mesh only, export and save new WSO. Run Toolkit, load your modified WSO, and save a new version with the morphs updated to match the base.

I'm not sure if the WSO export plugin for Blender was ever finished - if anyone's using it or can try it, I'd appreciate an upload of a WSO exported from Blender. The format of the WSO exported from Milkshape is slightly different from the one directly saved by TSRW, so the Blender export format may also be different.

7/27 edit: I've pulled the Toolkit with WSO support - it's not working correctly. Hopefully I can get this fixed soon.
Download - please read all instructions before downloading any files!
File Type: zip (752.5 KB, 452 downloads) - View custom content
Description: New version 5/22/2011
#2 Old 12th May 2011 at 10:18 PM
Another step closer
#3 Old 12th May 2011 at 11:40 PM
I think I love you. And in a very sick way. Just saying
Ms. Byte
Original Poster
#4 Old 13th May 2011 at 12:31 AM Last edited by CmarNYC : 13th May 2011 at 12:03 PM.
LOL, thanks. I think.

Now I'm working on doing a weighted average for the morph displacement for new verts, based on distance, using the vertices it's linked to in faces. If it works, should give added vertices a reasonable location in a morph.

Son of edit: Turns out to be harder than I thought - new vertices have to be numbered first. Back to the drawing board.
Née whiterider
retired moderator
#5 Old 13th May 2011 at 11:33 AM

What I lack in decorum, I make up for with an absence of tact.
Ms. Byte
Original Poster
#6 Old 23rd May 2011 at 2:20 AM
I've uploaded a new version of this tool in the OP - this one takes your modified base mesh and any or all of the original base mesh's morphs, renumbers all of them, and saves the renumbered base and new morph meshes that work with the modified, renumbered base. These new morphs can be used to make BGEO files.

Notes: Renumbering is optional. Keep in mind that the base and morphs must be numbered the same. You could renumber in Milkshape using Wes's plugin but this should save a step.

I was able to Frankenstein a mesh in a couple of hours using this - I chopped the bottom off the game halter top to shorten it, and chopped the top and arms off the nude mesh to get the midriff to go under it. After using MorphMatchMaker to renumber and make new morphs for both, I used the short halter as lod1 and the nude midriff as lod1-1, imported them into CTU, made new patterns, modified the base texture to make the midriff area transparent, and saved as new clothing. Then MorphMaker to make new BGEOs using the halter morphs in the first slot and the midriff morphs in the second slot under lod1; and finally to add the BGEOs to the package. Pics are below showing the morphs.
#7 Old 24th May 2011 at 12:15 AM
You might want to check wether it also works on area;s that aren't already divided on the uvmap.
Combining morphs fails 9 out of 10 times
Combining parts like sleeves or hands wich are already individual meshparts give less problems.

nm, you loaded both in a seperate meshgroup wich will work.
Combining them(regrouping) into one meshgroup seems impossible
#8 Old 24th May 2011 at 9:22 AM
Thank you CmarNYC, this tool sounds very interesting.
I'm working on it too , but somewhere must misunderstand you.

Chopping of parts of two base meshes, not the morphs->OK
Use Wes's tools to match the mesh parts where they touch->OK
Check if the mesh parts fit on one UVmap->OK

Export 1 part as Lod 1, and the other as Lod 1-1 ?
Renumber first? There are no Morphs, so nothing to renumber?
When do I make the new morphs?
Does 2 groups work on a top in CTU?

In short, maybe we need a little tutorial, how to work with your tool?
Please, please, please ?? with pictures, lots of pictures, in case we do not understand the text?

Love your work!!
One horse disagreer of the Apocalypse
#9 Old 24th May 2011 at 11:58 AM
This sounds very impressive indeed! Another step closer to the tool we need - the one that reads your thoughts and spits out the object ready for your game :D

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Ms. Byte
Original Poster
#10 Old 24th May 2011 at 1:25 PM Last edited by CmarNYC : 24th May 2011 at 2:04 PM.
@Bloom: It was your work that told me to not attempt to combine the two meshes in one group, although I'll probably experiment with it later just to see if there's any way. Should have credited you with giving me the idea of keeping the mesh parts separate!

@Cocomama: Without seeing exactly what you're trying to do:

1. Chop off unwanted parts of two base meshes - check
2. If necessary match the edges and if necessary modify UV mapping - check (I didn't have to do either of these in my little test so can't say for sure how this works)
3. Yes, export first base mesh as lod1, second base mesh as lod1_1 (Note you have not touched any morphs so far) Do NOT renumber at this point - MorphMatchMaker needs the unmodified vertex IDs to match up chopped base mesh verts with original morph mesh verts.
4. Use MorphMatchMaker - load up first base mesh and the original, unmodified game morph meshes for first mesh. Click Go and save new, renumbered base mesh and new morph meshes. New morphs should also be labeled lod1. Start the vertex ID numbers with 5000 for tops and bodies, or 15000 for bottoms.
5. Rinse and repeat step 4 for second base mesh and its original morph meshes. New morph meshes should be labeled lod1_1. Important - vertex ID numbers must start with the next number after the lod1 numbers - MorphMatchMaker will automatically fill in that number for you. See note below.
6. Import those new, renumbered base meshes into CTU - the first as LOD 1, the second under it as LOD 1_1 - and make a new clothing package. Modify your texture and make new designs as needed.
7. Use MorphMaker to generate BGEOs - import the new morph meshes as lod1 (first mesh) and lod1_1 (second mesh). Do all of the morphs one at a time, then use MorphMaker to add them to your package.

Note: If you've matched edges of your chopped base meshes, you'll probably have to go into Milkshape, import your new, renumbered bases and all their morphs, and make sure the edges of the morphs match up as well. Then just save your tweaked morph meshes with the same lod labels.

Oh, and of course you'll have to do the same for lod2 for a real project. Normally Vertex ID numbers start with lod1 and continue through lods 2 and 3, but they can start over at 5000 or 15000 for lod 2 and lod 3 which is mainly useful for high poly meshes. In CTU lod3 has only one mesh import slot so I'm not sure what to do about that right now.

That's all off the top of my head so forgive me if anything's confusing or wrong.

I do want to make a full tutorial with lots of pics - it's a confusing process at first with lots of files that have to kept straight. Give me another couple of days!

@Inge Jones: Thanks! Too bad I don't program in MindReaderCode!
#11 Old 24th May 2011 at 10:16 PM
It worked fantastic CmarNYC.
I was so suprised that CTU accepted extra groups in a mesh that didn't had them already.

I've used a child mesh because that means only one morph to make/check. And now it is a sequel to my Frankenstein Toddler tutorial.
-before exporting I changed the comments from the second mesh part (lod1-1) to be the same as the first mesh (lod1) The arms I used are from a fullbody.

-after step 5 I had to import the renumbered base and new morphmeshes back into Milkshape to match the fat morphs.
Wes his exporter needs to have the base mesh on top, so the adjusted fatmeshes had to be exported in 2 seperate exports, in between putting the other (Lod1-1) base mesh on top of the list.

-I regrouped and renumbered the 2 Lod3 parts and the 2 fat morph parts, because CTU only has 1 slot there, and it really would look stupid if the girl would lose here arms when zooming far out.
Ms. Byte
Original Poster
#12 Old 25th May 2011 at 12:36 AM
Excellent! Glad it worked for you - and that regrouping the lod3 worked. I suspect if the numbering is done correctly regrouping can work in general, and maybe I can include a mesh combination feature to make it a bit easier if that proves to be true.

Now I can take a little more time for that tutorial... long weekend coming up, thank goodness.
Test Subject
#13 Old 7th Jun 2011 at 4:19 PM
Thank you for the tool, CmarNYC! And thanks Cocomama for sharing your discoveries. I'm trying to learn how to mesh, and your comments are invaluable. And also thanks for the "Frankenstein toddler". It seems very detailed, and I'll try to follow it in Blender (I know some parts of the process will be different, but I'll adapt them with other information I've gathered).
Test Subject
#14 Old 18th Jun 2011 at 7:08 PM Last edited by Jrs1317 : 18th Jun 2011 at 7:22 PM.
Finally got a chance to play around with this. Well done, boss!

Basically did the same you did only with a bottom. Lowered the cut on the capri cargo pants by making two groups out of the chopped up mesh and the nude bottom, then created morphs for each individually with the tool.

Was able to rename and export via TSRW, import into a full body outfit that had two base groups for LOD1, then re-catagorized as lower body. Very cool.
Ms. Byte
Original Poster
#15 Old 18th Jun 2011 at 9:44 PM
Glad you had success!
Interstellar Traveler
#16 Old 19th Jul 2011 at 5:16 AM
Thank you so much for this. This will save a lot of pain in the future for me

Formally SeeMyu | Retired Mod
Ms. Byte
Original Poster
#17 Old 25th Jul 2011 at 11:49 AM
Tool name change and new version uploaded - now updates morphs in WSO files.
Test Subject
#18 Old 25th Jul 2011 at 2:48 PM
Originally Posted by CmarNYC
Tool name change and new version uploaded - now updates morphs in WSO files.

I've tested this out with WSO files. Works great with UV maps but the morphs except modifed base became dots. Or am I doing something wrong?..
Test Subject
#19 Old 25th Jul 2011 at 7:24 PM
This time I've tested MeshToolkit with mesh that already works fine,only changed base group(yellow) UV map. So I got this result. I must be stupid...
Ms. Byte
Original Poster
#20 Old 25th Jul 2011 at 7:55 PM
It's quite possible the tool is not working right. Can you describe the steps you went through that resulted in this distortion? And if you could upload your before and after WSO files for me to look at, that would be great. BTW the tool is not meant to do anything to UV except copy it from the base to the morphs. UV can't be morphed. I'll have to take a look to see if that's working correctly.
Test Subject
#21 Old 26th Jul 2011 at 8:51 PM
Originally Posted by CmarNYC
It's quite possible the tool is not working right. Can you describe the steps you went through that resulted in this distortion? And if you could upload your before and after WSO files for me to look at, that would be great. BTW the tool is not meant to do anything to UV except copy it from the base to the morphs. UV can't be morphed. I'll have to take a look to see if that's working correctly.

Well, I just exported my modifided WSO from Milkshape then loaded it and imported new WSO in MS. But the first one has modifed not only a base group and it also has many moved vertices. I wanted to make an upper part of saree. Maybe such a differense from the original morph causes that problem.
The second WSO already has morphs matched. Just wanted to see what would happen with it and got that distortion as a result.
Here they both are.

And sorry for my English
Download - please read all instructions before downloading any files!
File Type: rar became_dots.rar (122.1 KB, 12 downloads) - View custom content
File Type: rar SKIRT.rar (144.5 KB, 11 downloads) - View custom content
Ms. Byte
Original Poster
#22 Old 27th Jul 2011 at 4:23 PM
Just had a look - all the vertex IDs in the 'became dots' WSO are zero. Toolkit can't handle that situation - it needs the vertex ID numbers to match the base vertices with the morph vertices. How they all got to be zero I don't know. TSRW seems to do that sometimes. Also the base and the morphs have different parts chopped off, which Toolkit also is not designed to handle.

For the other mesh - definitely the tool is not behaving as intended. I tried to duplicate the problem with another skirt just exported to WSO and then morph-matched with the tool, and got some distortions of the normals. Back to the drawing board!
Test Subject
#23 Old 10th Dec 2011 at 11:54 PM
I am really dumb, or do not understand, I really hope you can write a detailed graphic tutorials. Sorry, my English is not good, Google translation ..... Thank you.
Ms. Byte
Original Poster
#24 Old 11th Dec 2011 at 2:08 PM
Understood - Toolkit is still not ready for primetime and won't be for a while because I'm learning a new language and want to rewrite it in that. When it's more finished and has a more final set of functions I'll do a tutorial.
Back to top