View Full Version : Meshing Toolkit - testers needed! Update 7/7/12
CmarNYC
25th Mar 2012, 09:15 PM
Hi, all. For the last few months I've been working on learning C# and .NET and doing a conversion of some of my existing tools plus several new ones. It's kind of turning into a Swiss Army knife of fiddling with meshes. :) Anyway, it's become apparent that I need other people to test the functions and to give suggestions/criticisms/ideas.
This is a work in progress - some functions are not yet written.
Completed stuff AS OF 6/27/12:
Open and examine data in GEOMs, WSOs, BGEOs, SKCONs
FrankenMesh - take two or three base meshes with parts removed and their original morph meshes OR BGEOs: update the morphs, combine into one set of base and morph meshes, and renumber. Can also be used to renumber and/or match morphs on a single mesh.
Update GEOM morphs to match an altered base with vertices added/removed
Renumber base GEOM and morphs
Replace GEOM values - replace your choice of IDs, position, normals, UV, bones, tangents, and/or tagvals with data from another mesh
Convert GEOM to TSRW WSO
Update WSO morph mesh groups to match an altered base with vertices added/removed
Make clothing BGEO; make morph BGEO including for pets
Take a BGEO and the corresponding GEOM base mesh(es) and create morph meshes
Auto-assign bones using a reference mesh - copies bone assignments from nearest vertex in the reference
Scan for and fix bone problems (Gives false positives for EA meshes)
Recalculate mesh tangents to fix muscle definition seams on skin (same as MeshTangentRecalculator)
Auto-assign vertex ID numbers using a reference mesh or the same mesh
Options that are grayed out aren't functional yet.
Planned/tentative stuff:
Frankenstein WSO meshes
Package tools - add morphs to a clothing package using your choice of BGEO or morph meshes, extract and identify GEOMs from package
Open and examine RIG files
Better support for multiple UVs (?)
Maybe take base + morph and create a morphed base mesh
Maybe convert GEOM to some other mesh format that can be opened by Milkshape and Blender - if I find a suitable format
While I've tested everything that's completed on a superficial level, it needs lots more testing by experienced modders to find subtle (and probably not-so-subtle) problems, and by less experienced modders to find where it needs more user-friendliness and easier functionality. I'm also open to suggestions of more stuff that would be useful.
All you need to do is unzip to a folder and run MeshToolKit.exe. It needs .NET 2.0 or higher. In theory at least this should also run on Mac/Unix using Mono or Wine, and I'd appreciate feedback from anyone who tries it.
3/26/12: Beta 2.0, Build 0.0.2.0 - added Miscellaneous tab with an experimental function to fix the LN muscle slider seam problem without needing an original mesh.
6/27/12: Beta 5.0, Build 0.0.5.0 - major overhaul. I'm pulling the various intermediate versions that are floating around on different threads, to avoid confusion.
7/7/12: Beta 6.0, Build 0.0.6.0 - Rearranged some functions - tangent recalculate is in the GEOM tab; Auto bones assignment is now in Auto tools tab. Added Auto-morph function: takes base mesh A with reference base mesh Rb and its morph mesh Rm, and calculates a morph for A. Not perfect but it's not bad for regular-poly meshes. (Very high-poly comes out lumpy. If I can get interpolation working it may produce good morphs for high-poly too. Interpolation should also improve auto-bone assignment.)
The beta version has been removed because the official version is now available: http://www.modthesims.info/download.php?t=481950
Jasumi
26th Mar 2012, 01:42 AM
Oh, I had just submitted a post about the Late Night slider not corroborating properly with female clothing. I imagine this could fix that issue?
CmarNYC
26th Mar 2012, 02:41 AM
The problem you posted about is not the one MeshToolKit can fix, which is a mismatch of the muscle definition shading along seams in the skin texture where it's wrapped around the body. In male meshes it's most obvious on the left inner thigh, as in the pic below. Editing the mesh in any way with Milkshape somehow causes this by changing the tangents values in the mesh, and ToolKit can copy the original tangents to the altered mesh to fix it.
It's not a bad idea to include editing/replacement of the mesh MTNF which could correct your no-muscle-definition problem, though. :)
http://thumbs2.modthesims2.com/img/3/2/1/6/5/9/6/MTS_CmarNYC-1282846-LegSeam.jpg
CmarNYC
27th Jun 2012, 09:34 PM
New version available in OP. All beta downloads should be from this thread in the future.
meyomey
28th Jun 2012, 09:30 AM
Hi Cmar,
I tested conversion of my Hi-LOD mesh (hulaskirt, other thread) to WSO... since I added the "inner" part to the mesh, does this count as "Frankensteined"? Either way, it's a single simgeom file exported by MS but has more vertices than the original. I added the original morphs, but ran into an error message (attached).
Also, trying the lod3 (TSRW:Low) base+morphs which are of the same vertex number as their originals, the WSO creation was succesful but TSRW refuses to import it due to "could not locate 'fat' blending data".
Mesh was left as two-part (mesh0:skirt part, mesh1: legs), I tried to import it based on the original hulaskirt.
All source files were GEOMS from the original Hula mesh extracted with S3PE as *.simgeom and hand-sorted for type (evaluated by MS).
Definitely looking forward for your project's progress.
Torsten
CmarNYC
28th Jun 2012, 02:13 PM
Frankensteined usually means taking pieces from two or more different meshes and smushing them together, but close enough! :)
Man, I HATE those 'Index outside array bounds' messages that don't give a line number! Could you upload the meshes you were trying to convert when you got the error? I have to track down where the bug is.
For the missing 'fat' data, you could try the Examine WSO' function in Toolkit - look at the converted WSO and see if it has a fat morph listed. Possibly you did what I did once, and didn't name the fat mesh group to 'group_fat'? The name probably has to be exact.
meyomey
29th Jun 2012, 05:41 AM
Hi CMar,
attached there's a 7zip containing the simgeoms for the base mesh (w/ inner skirt) and the three morphs.. I think you'll have no prob identifying them by name.
I also check the created "Low" (Lod3) WSO which appears to be fine (pic attached). Went the other way 'round, imported all in MS and saved as WSO from there - same result. Maybe it's a matter of bringing simgeoms over to wso...
EDIT: Doodling on, I wondered... would I need actual morphs or standalone morph (target) meshes like from the basegame stuff???
CmarNYC
29th Jun 2012, 02:21 PM
Thanks! Could you also upload the low/lod3 WSO mesh that's giving you trouble, and maybe the GEOM meshes it was converted from? Sounds like a problem with the mesh itself, if you got the same result from Toolkit and MS.
By actual morphs do you mean the BGEOs? Those are normally what's used for clothing morphs, but store packages use the morph meshes. As of right now there's no tool to construct a CC package using the morph meshes, but it's fairly easy to convert them to BGEO and there's a tool to add the BGEOs to a package.
Update:
The conversion to WSO error happened because the morph meshes did not match your base mesh - you had added the inner skirt to the base but not the morphs, so there are more vertices in the base than the morphs. TSRW won't import it without the morphs matching up anyway. I'm going to add an error check for that with advice to use the morph match function before conversion.
meyomey
30th Jun 2012, 06:46 AM
Sure. You'll find them attached. LOD3 has no "inner" part, it's just stretched from the original, so vertex numbers should match this time.
I extracted the simgeoms with S3PE directly from the (store-) package, just renamed them a little for easier identification. Sorry, this is a little new to me, but inside the package they were definitely tagged as GEOM not BGEO. If the morph files are of the wrong type for your toolkit, how can I convert them?
Thanks,
Torsten
CmarNYC
30th Jun 2012, 02:03 PM
Thanks, will take a look!
Morph data comes in two forms: morph meshes (GEOM, .simgeom or .geom) and BGEO (blend geometry, .bgeo or .blendgeom). Morph meshes are in mesh format but contain only vertex position, normals, and vertex ID data. The positions and normals are deltas instead of absolute - they are the amount by which the vertex should be moved to get the morph, not the actual position. So they're not 'complete' meshes; they have to be loaded on top of a base mesh. (This is why if you only move vertices in a base mesh the original morphs will probably still work fine - each vertex still gets moved the same distance in the same direction.) Morph meshes are one for each LOD for each mesh part for each morph. BGEOs are a sort of compact form of the morph data - they take the delta positions and normals for each vertex ID, convert them to a smaller data size, and put them into one file. BGEOs are one for all the lods and all the mesh parts of each morph. Toolkit has tools in the BGEO tab to convert between the two.
TSRW meshes are a format that combines the base and the morphs, all in the form of 'complete' meshes. When you make CC with TSRW it converts to BGEO.
The clothing that comes with the game uses BGEOs for morphs, although for some reason all the morph meshes are included in the game packages. Clothing from the store uses the morph meshes. Most CC uses the BGEOs.
If you have the latest version of Toolkit, it'll take either morph meshes or BGEOs for the Frankenstein function, and I'm working on have it take either for the other conversion functions.
CmarNYC
1st Jul 2012, 03:38 PM
Hi - I had no problem importing either of your lod3 .wso meshes into TSRW, so I'm not sure what's going on. I imported them separately, however, since I don't have the hula skirt and couldn't find another two-part bottom.
BloomsBase
1st Jul 2012, 08:18 PM
i didn't have problems either, even uploaded the file in the other thread.
BloomsBase
28th Sep 2012, 08:49 PM
Yay, picture spam! :D
I tried to autoboneassigne Jessica's head.
http://imageshack.us/a/img833/5144/43735481.jpg
http://imageshack.us/a/img152/3052/30760472.jpg
http://imageshack.us/a/img838/6950/39654617.jpg
And the horror lol:
http://imageshack.us/a/img515/4094/05horror.jpg
http://imageshack.us/a/img692/8147/06horror.jpg
I think i better lower the polygons and try again. :anime:
CmarNYC
29th Sep 2012, 03:55 PM
LOL! It's in areas with a lot of bones close together like fingers and apparently the face where you get into trouble.
BloomsBase
29th Sep 2012, 07:45 PM
yup, problem is that mouth, nose to eye distances are diffrent(and ear)
And i dont want to change them. :P
But i found a easier way by scaling/updating the reference head so it fits hers, this should give much better results.
Lips and eyelids i have to finetune by hand, lips are sealed(cos of same joints on both upper and underlip now)
I know this is not the thread but if i use skininator to make a skin can it include custom ambient textures?
CmarNYC
29th Sep 2012, 11:31 PM
Skintones can have speculars, bumpmaps, and body overlays in addition to the base texture - I'm not sure what you mean by ambient.
BloomsBase
29th Sep 2012, 11:57 PM
well, if i want a skintone for her i need to edit the skin ambient files aswell.
The light is totally wrong now
I could relink it tho, to a standalone custom texture but that means that i need to change that reference on each outfit i make for her in the future
http://imageshack.us/a/img849/3307/skinambient.jpg
BloomsBase
5th Oct 2012, 08:38 PM
I have this little bug in toolkit, well not a bug but when using the autobonetool alot(sometimes 80% of the mesh) vertice gets assigned to the root or root bind joint.
This gives a nasty result when using the ANIM tool in Milkshape, and shows on my meshes in tsrw
Could be due underweighted reference meshes, i dont know(i had the same results on sims 2 meshes were i wrote the rigging tut for)
Other issues are that arms sometimes are assigned to spine1 and vice versa
CmarNYC
6th Oct 2012, 12:23 PM
Could you upload a mesh that you've had this problem with?
BloomsBase
8th Oct 2012, 08:27 AM
sorry, missed your post....
I have this with pretty much every mesh i run through toolkit.
Here is one, Jill valentines Res. Evil WSO meshes.
The top i fixed by a smd export/import described here: http://www.modthesims.info/showthread.php?t=487443
I can also fix it by renaming the root joints and do a GEOM export/import with Wes his GEOM plugin.
So no need to jump right on it :)
I used the military dress as reference mesh(af body dress collar_military)
If you click the ANIM button in Milkshape you see all verts drop that are assigned to the ROOT joints.
It doesn't show ingame on this one tho but it did on the top earlier.(her wrists were deformed)
I am pretty sure its due the fact that most meshes aren't assigned to a 100%(alot are arround 98%)
Toolkit assignes that last 2 % to the ROOT joint instead of a blanc joint(None)
BloomsBase
8th Oct 2012, 09:00 PM
Ok, its not Toolkit but the bug in the WSO meshes.
For ages TSRW assignes meshes to random bones, often with hardly any weight on them but it does mess up things when you use them as reference mesh.
I tried the process 2 or 3 times with Simgeoms and they get assigned properly.
However, Toolkit has a bug when it comes to those(simgeom)
It messes up the normals by welding vertice on seams, sciguy had similar results on his meshes
CmarNYC
8th Oct 2012, 09:46 PM
Do you mean Toolkit messes up the normals while doing the auto-bones? Or the auto-morph? It doesn't change the number of verts so I don't think it's welding anything, but it's likely it's copying the wrong normals/UVs at seams since the coordinates are the same for the verts on seams and Toolkit uses location as the primary way of identifying which verts in the reference mesh to copy data from. I have to see if I can improve that algorithm.
As for the bones, I do remember using the Root for unused bone assignments - have to take another look at that code but I think you're saying it's TSRW creating the problem, not Toolkit. You could try the Toolkit Bonescan function in the Bones tab to fix bad bone assignments.
BloomsBase
8th Oct 2012, 09:57 PM
My last mesh(a top) had right toe assignements all over it, then i remembered that WSO meshes have these random assignements.
And when simgeoms worked fine i was pretty sure its not toolkit but the WSO meshes, ill try the badbone fix.
Yes, it was the geom bonetool that messed up the normals while the WSO bonetool doesn't do this.
CmarNYC
9th Oct 2012, 12:07 AM
I'll have a look. :)
omegastarr82
10th Dec 2012, 07:25 AM
Hi Cmar, I'm not sure if it's working as intended or not, but I ran into a hiccup with wso match morph. I deleted and moved around some things and the match morph tool only updated what was deleted, it didn't move what I moved to where I moved it in the morphs. I hope that makes sense.
CmarNYC
10th Dec 2012, 03:22 PM
Hi Cmar, I'm not sure if it's working as intended or not, but I ran into a hiccup with wso match morph. I deleted and moved around some things and the match morph tool only updated what was deleted, it didn't move what I moved to where I moved it in the morphs. I hope that makes sense.
The tool is meant to update the morphs to match the base in terms of added/removed vertices only. I just tested with removing verts in the base, moving some verts in the base, and moving some verts in one of the morphs. The result has the removed base verts also removed from the morphs but nothing else changed. I think you mean that the verts that were moved in the base were not also moved in the morphs? That's not what the tool is meant to do.
If you want to update WSO morphs to reflect moved vertices in the base, use Wes's Morph Mangle tool in Milkshape. Just duplicate the base meshgroup, rename it Reference, and run Vertex / Q-Mesh Morph Mangle. (Download in case you don't have it: http://www6.modthesims.info/showthread.php?p=2975684#post2975684) It's handier since you're already in Milkshape and can see what the result looks like.
If there's a need for this as part of Toolkit I can add it to the list of upcoming features/improvements, but it seems redundant with Wes's tool available.
omegastarr82
10th Dec 2012, 04:50 PM
Cool, I've forgotten about that one, will do.
BloomsBase
21st Jan 2013, 12:19 PM
i am still having trouble with the WSO autoboneassigne tool.
Made a edit on the af body swimsuit_plunge, making just one mesh without morphs to start with.
When satisfied i tried to boneassigne it with the original af body swimsuit_plunge as reference but it goes all wrong.
After reopening the mesh in Milkshape it has thigh assignements all over the place.
The reference mesh also has thigh assignements as 4th boneassignement but without any weight on the vertice.
My new mesh has 1 to 2 % thigh assignements to all vertice
edit,
And there is another minor thing, not sure if it is Toolkit or TSRW.
But when having both programs open and generating morphs with Toolkit WSO tools makes TSRW crash when i go back to it..
If i close Toolkit before going back all is fine tho.
omegastarr82
23rd Jan 2013, 05:58 AM
When using the auto assign bones for GEOMs with the "replace only empty bone assignments" ticked it throws out the "unhandled exception has occurred in your game" error.
CmarNYC
23rd Jan 2013, 01:14 PM
@Bloom: Thanks for tracking down and reporting this issue - I'll work on it for the upcoming new version.
@Omega: Could you upload the mesh you're having this problem with?
omegastarr82
23rd Jan 2013, 05:50 PM
@Omega: Could you upload the mesh you're having this problem with?
Sure thing. I want to say this has happened to me before, but I can't say for certain. The donebasmesh is the mesh that needs the bones assigned and the fullbody mesh is what I'm using for the reference.
CmarNYC
23rd Jan 2013, 06:55 PM
Did you forget the attachment? :)
omegastarr82
23rd Jan 2013, 07:33 PM
Yes I did :)
BloomsBase
23rd Jan 2013, 09:41 PM
strange, Toolkit assigned the donebasemesh correct on my comp.
had interpolation ticked and replacing all boneassignements.
CmarNYC
23rd Jan 2013, 10:19 PM
Got the same error with 'replace only empty'. I'll look into it!
BloomsBase
24th Jan 2013, 05:51 AM
me too, srry...didn't read the post very well...
CmarNYC
31st Jan 2013, 12:25 PM
Been neglecting this... The error in 'assign only empty' is a data error - a vertex assigned to a bone that doesn't exist. I'll put something in to catch that error. Still have to look at the TSRW problems.
BloomsBase
31st Jan 2013, 12:45 PM
i am afraid the problem with WSO is due the plugin...not much you can do about it i guess...
I like working with TSRW but with frenkensteining and reassigning i now tmp switch back to GEOM for the boneassignements.
When done i convert to WSO and redo the morphs, no errors then.
vBulletin v3.0.14, Copyright ©2000-2013, Jelsoft Enterprises Ltd.