TS4 CAS/Mesh Tools V188.8.131.52: Tools for cloning, editing CC properties, recolors, preview, mesh editing. BETA, new version 7/4/2016
Well, since this is rapidly evolving into a TS4 version of Mesh Toolkit, I've renamed it yet again.
Mesh Cloner. Clones from Sims 4 game packages. You can make either a default replacement or a new item. Only the CASP is cloned; other parts will be cloned and added as needed in the package editor.
Clone Package Editor. *new*
This is a beta test. Please report problems.
Credits to Peter and Inge Jones, Granthes, Kuree, and everyone who has worked on s4pe and s4pi. Couldn't have done it without you!
The reported bugs have been fixed:
You can now clone more than one package in a session.
I've successfully cloned glasses, the flutter dress, and the velvet hat and been able to use them in CAS.
The buttons, etc., at the bottoms of screens will move correctly when the window is resized.
You can now clone non-mesh items like makeup and tattoos.
You can now filter the list by age, gender, and type. (This can be tricky since many items are unisex and all adult clothing seems to be valid for teen through elder.)
You can now select multiple colors/patterns of one item and the tool will make one package with all of them. (In the next version I'll add something to make it easier to identify and export/import the textures and swatches.)
In the GEOM Convert/Update tab you can now convert a modified TS3 mesh with (or without) vertices removed (with it's original TS4 mesh as reference), and you can combine two TS4 meshes.
The tool will now warn you if your new mesh has too many bones and if possible will resolve the problem by removing unused bones. (There's still a 60 bone limit.)
And there's the inevitable name change since the tool has gone beyond meshed items!
Uploaded V0.4.0.0 which hopefully will resolved the problem of non-mesh items not cloning.
Uploaded V0.4.1.0 which has a more robust method of locating the game packages and hopefully will resolve the "Can't find game packages" problem.
Uploaded V0.4.2.0 which corrects a bonehead bug introduced in the previous version, affecting TS3 to TS4 geom conversions.
Uploaded V0.5.0.0. Added cloning of bumpmap/normalmap, with optional removal of bumpmaps and/or specular maps. Corrected failure to update all mesh links in the RegionMap. (Please test if this resolves some of the crashing and clipping problems.) Added ability to convert a TS3-format mesh to TS4 with no reference mesh - please note this applies ONLY to meshes with no morphs, like accessories and maybe some hairs.
Uploaded V0.5.1.0 which corrects a problem with very long CAS Part names, and implements specular removal for default replacements.
Uploaded V0.5.2.0 which corrects failure to add a valid MTNF if needed during TS3-format to TS4-format with no reference mesh, and will now correctly write bone assignments for meshes with only one bone.
Update 10/2/14: Uploaded V0.5.3.0 which is updated for the Oct 1 patch.
You now have the option to clone from the base game packages or the delta game packages. Delta packages include resources added by patches.
Update 10/9/14: Uploaded V0.5.4.0.
Bug fixes and minor enhancement:
Fixed bug causing the wrong geom to be saved when using the Frankenmesh function, and for those meshes to give a vertex number mismatch error when imported to the package. Frankened meshes should now save correctly with the correct mesh version.
Fixed bug causing the specular image to be included in non-default-replacement cloned packages when using the Remove Specular option. (Speculars were removed from all CASP references but a copy of the image itself was being added to the package.)
Fixed bug causing the specular not to be removed from CASP references in default replacement cloned packages when using the Remove Specular option.
Added ability to export/import/convert meshes with three or more UV sets.
Update 10/13/14: Uploaded V0.6.0.0
Fix: When converting from an S3 mesh with the original S4 mesh as reference, CM Tools will now keep the same exact bone assignments (including empty bone weights) as the original. Hopefully this will fix the mystery crashing problems with hats and hairs and possibly other items! If you have existing creations with this problem: Clone the package again and convert your modified S3 meshes (if any) back to S4 again using the newly cloned original mesh as reference.
Enhancement: Added the ability to customize a new item with an image overlaid on the thumbnail and text that appears when you hover your cursor over it:
Update 10/14/14: Uploaded V0.6.1.0
Fixes: Fixed bone weights being lost when converting from S4 meshes to S3 meshes; fixed cleanup of Milkshape bone assignments for zero weights.
Update 10/15/14: Uploaded V0.6.2.0
Fix: Fixed missing languages for item name and description when using customization.
Update 11/8/2014: Uploaded V0.6.3.0
Added conversion from Sims3 and OBJ meshes using a reference mesh for auto-bone assignments. Use the Vertex Color and Transform Data at your own risk; I haven't specifically tested them yet. In general this should be used ONLY for non-morphing hair and accessories.
You can now convert a TS4 mesh to TS3, in Milkshape add vertices and faces by subdividing faces by 2 and/or dividing edges, and convert back to TS4. This will be useful only for adding detail in some areas. Note this will not work correctly if you subdivide faces by 3 or 4.
The Package Import/Export now is fully able to handle conversions - export a TS3-format mesh, modify it, and import it back to the same TS4 mesh you exported it from.
Updated for pools patch.
Made GEOM convert tab hopefully less confusing.
Added bone-crash fixer in 'Misc Package Tools' tab.
Added GEOM data viewer in the 'Misc Other Tools' tab. This will show data for both TS3 and TS4 meshes. It's got some charts for visualizing UV and stitch data which are kind of interesting.
Tested cloning of custom packages and was unable to replicate errors some of you have mentioned. If you have problems, please comment and if possible upload or link to the package you were cloning.
Added GPL licensing info.
Added a nifty icon. Thanks, LumiaLover!
On the list: Custom thumbnails, recolors added to existing EA and custom items, easy replacement of swatches and reordering of colors, editing of CASP flags.
11/9/2014: Uploaded version 0.6.4.0
Fix: Corrected the conversion of S3 to S4 with no original or reference S4 mesh not doing anything.
Enhancements: Added ability to export OBJ meshes from the Package Mesh Import/Export tab.
1/8/2015: Uploaded version 0.7.0.0
Fix and enhancement: Overhauled the path-finding and cloning processes - All game items now appear in one list, which can be filtered to select add-on packs. The only pack at this time is FP01, the free holiday pack. PLEASE NOTE THAT TO TAKE FULL ADVANTAGE OF THIS FEATURE YOUR PATH MUST BE SET TO THE TOP SIMS4 INSTALLATION DIRECTORY (ex: C:\Program Files (x86)\Origin Games\The Sims 4\) NOT A SUBFOLDER.
Enhancement: Auto conversion now allows you to use a hard-coded vertex color instead of copying it from the reference mesh. This may resolve problems of hair, accessory, etc. meshes morphing unexpectedly with sliders.
2/4/2015: Uploaded version 0.8.0.0
Fix for "No CASP files found in package" error that appeared with the February patch. PLEASE NOTE THAT TO FIND GAME AND FREE PACK ITEMS YOUR PATH MUST BE SET TO THE TOP SIMS4 INSTALLATION DIRECTORY (ex: C:\Program Files (x86)\Origin Games\The Sims 4\) NOT A SUBFOLDER.
Minor changes: Reorganization including moving "Examine GEOM" from Misc Tools to GEOM Tools tab; the Customization options are removed since they no longer work.
Updated source will be provided with the upcoming major version update.
4/8/2015: Uploaded version 0.9.0.0
Various fixes and updates for the 'Get to Work' patch. Will now handle the new CAS Part format.
Addition of conversion of TS4 meshes to/from MS3D format, with full support for bone assignment.
Minor bug fixes.
In the cloning screen, two options have been added:
5/5/15: Uploaded version 0.10.0.0
This is a quick fix for the new version of the CASP resource that was introduced with the 5/4/15 game patch. It also again automatically sets the high bits in custom resource TGIs since the classification bug has been fixed in the game.
0.10.0.0 will probably be the last of this series. Version 1.0, with a major revamp to support clone package editing, will probably go right into the downloads section.
6/22/15: Uploaded version 184.108.40.206
After some self-debate, I decided to upload this version here for testing since I don't seem to be constitutionally capable of the patience needed to give it the degree of testing it needs. A few notes:
Speculars will be exported as DDS images which can be edited in your favorite program. According to SimGuruMeatball: Red = cube map blur (blurriness of reflections?), Green = cube map strength (brightness of reflections?), Blue = specular falloff (focus, or size of highlights), Alpha = specular strength (shininess - lighter/more opaque is shinier, darker/more transparent is less shiny) In general, lightening all four channels will give you added shine, but you should experiment.
Speaking of images, CAS Tools takes a while to process them. In particular it may take several seconds to load a cloned package in the editor and a bizarrely long time to process imported textures. I'll look at whether there's a way to speed this up.
I want this to be an easy-to-use tool, so I didn't include every setting and property, only the ones that seem most useful. Suggestions of other properties to include will be considered.
6/22/15: Uploaded version 220.127.116.11
Corrected to prevent dropping of mipmaps (which ARE needed) and format of the bumpmap. Fix for the program exiting very rudely if the game packages path is invalid.
7/4/15: Uploaded version 18.104.22.168
Note on bone weights when using Milkshape MS3D meshes: Due to the way Milkshape works, bone weights in an MS3D mesh are less precise than in a TS4 mesh. (Milkshape uses a value of 0 - 100; TS4 uses a value of 0 - 255) Any flaw or discrepancy in bone weights in a TS4 mesh may be magnified in the process of conversion to and from MS3D and become noticeable in the game. There's nothing I can do about this. You should be able to fix it manually by adjusting weights in Milkshape so that vertices in the same location have exactly the same bone assignments and weights so they don't separate during animations.
Note on the Glow Maps: The alpha channel controls the frequency at which the glow brightens and dims. A completely black/transparent alpha results in a steady glow (which just looks like a lighter part of the texture unfortunately) while a completely white/opaque alpha results in a very rapid blink that could probably induce seizures. Also, you can make the glow any color you want.
7/6/15: Uploaded version 22.214.171.124
Fixed faulty detection of local user thumbnail cache package, which was causing the program to exit with no errors on some non-English systems.
Fixed anchoring of controls in the clone package editing tabs, which was causing some controls to float in unexpected ways when resizing the window.
7/7/15: Uploaded version 126.96.36.199
Fixed stripping of mipmaps from DDS images caused by changing to a newer and faster DDS support library. This bug resulted in textures becoming transparent when zoomed out and/or when using lower graphics settings, with the sim's skin showing through. If this happens with CC you've created, please re-import your textures using 188.8.131.52.
Fixed failure to correctly remove CC glow maps.
7/21/15: Uploaded version 184.108.40.206
Added two new functions in the Clone Package Editor tab:
Preview: Now includes a 3D preview of the CAS part package. In the Recolor Manager tab you can click on each recolor to update the preview with the recolor texture. Using the controls on the left you can add/remove the model head, top, bottom, and feet; add/remove the skin details (shadowing/highlighting, lip color, etc.); add/remove underwear; change skin color; and change the lighting.
Mesh Region Manager: Lists the regions in the RegionMap resource with their assigned meshes. You can modify and remove regions and the CASPs will be automatically updated / meshes removed to reflect changes.
Bugfix: "Save As" will now save your package under a new name and continue work on that new package.
Known bugs/issues: The previewer currently only does lod0. Hair does not display perfectly in the preview. Most meshes using the SimSkin shader will have discoloration around the scalp where there are layers of mesh, but you can minimize this by turning off the skin details. Meshes using the SimGlass shader will display with alpha transparency but may have issues with the layering of transparent meshes.
Plans: I'm working on adding regions/meshes, and on previewing the lower lods.
Special thanks to Plasticbox for being a very thorough beta tester and suggesting several improvements!
7/21/15: Uploaded version 220.127.116.11
A fix for importing of meshes with triangles that have two or all three vertices in the same location. The tangents can't be calculated for these triangles so a zero tangent will be used so the mesh will still save correctly. This fix only affects meshes with this problem.
8/8/15: Uploaded version 18.104.22.168
Fixed issue of buttons and other controls being placed outside the program window and unreachable on systems using a font/icon setting of 96 dpi.
Enhancements to the Previewer: Turn on or off display of the diffuse texture, specular, glowmap, and bumpmap. Select which parts of a multipart/multiregion mesh to display. Note that the bumpmap will be displayed as a grayscale overlay, not a true bumpmap. Also note that the specular display is only an approximation since EA uses a non-standard format for their speculars. It's very close for most clothes but clothes such as alien uniforms which make extensive use of the non-standard features won't preview as accurately.
Added the SortLayer in the Clone Editor / General Properties tab.
12/5/15: Uploaded version 22.214.171.124
Updated for the patch of 12/4/15.
Added export of ms3d mesh with choice of UV0 or UV1.
Various enhancements and bugfixes.
1/22/16: Uploaded version 126.96.36.199
Loading of property tags is now from a separate file which can be updated after every patch without requiring a new version of CAS Tools.
A couple of property tag categories are now included in the recolor editing tab which don't seem to be implemented by EA, but may be in the future.
Corrected anchoring of the Pack ID field.
2/14/16: Added the source for the XmodsDataLib support library which I have up to now forgotten to include.
6/9/16: Uploaded version 188.8.131.52
Updated to be compatible with the changes to CASP and GEOM in the EA 6/2 patch. If you open an older version package in CAS Tools, it will automatically update your CASP and any custom GEOMs to conform to the new versions. The flags to disable for the opposite gender and opposite frame will be checked by default. CAS Tools will add the necessary data to the GEOMS to enable gender morphing, and if you want that function you should enable it for the opposite gender and optionally opposite frame (in the General Properties tab) and test in-game. I saw some strange distortions with an older mesh so you should test for problems.
6/10/16: Uploaded version 184.108.40.206
Fix for the tool not correctly recognizing the new version of GEOM in the mesh conversions and some fixes to how the conversions handle which GEOM version to produce. Note that the new seam stitch data needed for gender morphing is added when older version meshes are imported to a package.
6/11/16: Uploaded version 220.127.116.11
Fix for more conversion errors and an error in the package editor clones management tab preventing commitment of changes.
6/17/16: Uploaded version 18.104.22.168
Fix for error in reading OppositeGenderPart and FallbackPart fields, added ability to fix/create seam stitch data and UV stitch data, added display of Slotray Intersection data.
6/18/16: Uploaded version 22.214.171.124
Fix for error in mesh import/export/conversions caused by a mistake in adding a new feature in the previous version.
6/25/16: Uploaded version 126.96.36.199
Fixes: More mesh version conversion errors corrected.
- Clone Package Editor / Mesh Manager: Quick fixes for seam gapping and arm positioning. Ability to adjust how far from the body the arms are positioned. UV1 can be exported and imported.
- Mesh Tools tab is reorganized. Frankenmesh is gone, now you can do the same function by exporting two TS meshes to another format for editing, converting them back using the original as reference, then use the mesh combination tab to combine them. Conversion with no original mesh is also gone - use the auto-convert instead.
- There is now an extensive and overhauled auto-conversion tab, including auto-uv1 mapping. TS3, OBJ, and MS3D meshes can be converted with all necessary data generated for you, provided a suitable TS4 reference mesh is used. A standard nude/underwear mesh can optionally be used for clothing. Please note: The conversion takes time. It works best if your new mesh is similar in shape and structure to the TS4 mesh you use as a reference. The UV1 mapping is far from perfect - the clothing meshes I tested on work fine in CAS but the mapping looks like a mess, which could be a problem is you need to edit it. I'll keep working on that.
This will probably be the last version before I finally put this sucker in Downloads, after most of the remaining bugs are found and corrected.
6/25/16: Uploaded version 188.8.131.52
Auto-uv1 is now splitting seams correctly and making neat and editable maps.
Fixes: Fixed thumbnail import to wrong format, an error causing the neck/waist/ankle seam fixer to do very wrong bone assignments, and failure of the Mesh Manager TS3 importer to include seam stitch data (prevents gaps in opposite gender/frame).
7/4/16: Uploaded version 184.108.40.206
'Auto-conversion to TS4 mesh' is now 'Conversion to TS4 mesh' and includes an option to not use a reference mesh when converting TS3 meshes.
Auto-uv1 adds fewer vertices to the mesh as a result of unnecessary seam splitting. (Still working on this.)
The child skeleton is now used when converting child meshes to ms3d.
Fixes: Conversion with the lod level not filled in no longer results in a 'mesh is not valid' message.
Notes: Currently if you use the standard reference option when auto-converting hair the head and body will be used which may result in hair getting some bone assignments from the facial features. In the next version I plan to include a standard hair reference which should also be usable for hats.
8/28/16: This tool is now in Downloads: http://www.modthesims.info/download.php?t=582348
just a short feedback for now, only received my S4 yesterday.
I tried MeshTools for a first simple run - I shortened a yf (fullbody)-long dress and the yf-maxiskirt; just pushing vertices around in MS from the exported (S3-)LOD0 since I found that was the lowermost part and raised the hem that way. Worked flawless - i checked it in CAS.
However, I tried to modify the yf wedge hair by erasing (LOD0) points in MS (shorten the bangs) - which resulted in an error message since number differed. So what would be the way to get this done... could this be done with the Frankenmesh routines? If yes, coudl you give me a hint how?
Thanks for your ongoing work anyway - I hope I am not seen as complaining, au contraire.
Of course you're not complaining, you're showing me where more info is needed.
Yes, you can use Frankenmesh. Just load your modified S3 mesh and the original S4 mesh in the fist pair of slots and it will give you an S4 mesh with the vertices removed. I'll update the description.
Hey just wanted to get back on this -- YOU ROCK!!!
Worked like a charm. I was able to cut the "YF hair wedge" mesh so it now is an asymmetric bob. :-) Had to extract and franken the 3(!) LOD0 meshes though - Lod0_3 is "complete" and the other two are partia meshes... so far I have no idea what they are for at all. Well, I guess, it's kinda open season now to remove unwanted crap on the EA meshes...
Thanks again -
So now there are two tasks left - 1) adjust texture so it will better match the mesh, 2) add hair colors
Still feeling like a star, despite Cmar did all the relevant work...
For me, coding is the fun part - fiddling with textures and swatches etc. is the hard - and tedious - real work!
Is there any chance to get a clone package with ALL the original's textures (and swatches)? I selected them all, but only the last one selected (in this case white) made it into the package. In theory, I could clone each single colour, but that would be such a waste of resources.
That's not a bad idea. I've been thinking about some way to do multiple colors in one clone since Color Magic isn't really geared towards complete clones or combining recolors in a single package. I'll work on it.
Thank you so much, this was most definitely needed. =]
I'm having a slight problem. When I attempt to export the same mesh twice, I get a "Unhandled exception" error message the second time, every time. I end up having to exit the program and come back in. It's not a huge pain, just though you'd like to know!
Other than that, this program is fantastic! Thank you so much!
I second that - happended to me, too, when I exported all the wedge hairs.
Some feed back for you Cmar...first of all...nice work getting this up and running so fast! I've been eager to take a look at some of the meshes, even if I will leave editing them until everything is a little more streamlined.
2 things, well 1 is more of a suggestion/request really.
The first thing, on Windows 8, (yes I know it's a complete pain in the jaxie), first run prompts Windows to warn as a potentially unsafe file and I had to select "run anyway". After that it launches ok.
Second thing, maybe something for further down the line once the core functions have been done, any chance of a filter similar to the one Colour Magic has, where you can filter male/female/type etc?
Sorry if I'm exhibiting blatant noobness, but when I tried the Package Mesh Import/Export all the meshes had the same name -- ymMakeupEyebrows_Unibrow_lod-1 (all the TGI codes are different though). Is there a way to change the package names the way we could in the TS3 Mesh Toolkit?
I tried the Mesh Cloner as well, and it showed all the right names, and everything had different instance IDs too.
@MaclimesZero & meyomey: Yes, I've seen the 'can't export twice' bug and will try to get it fixed in the next version.
@FifthAce2007: This might be because the assembly is unsigned. I don't have Windows 8 so I can't test, and it doesn't sound like a huge problem. Sure, further down the line I can do filtering. For now you can sort on the Name and find things pretty easily.
@Murfee: How did you clone the package? Eyebrows don't have a mesh and shouldn't appear in the Cloner list. I'd be curious to see what's in the package if you want to upload it.
I just opened the fullbuild package in the Client folder -- I only just realized it's only supposed to be used for packages with just ONE mesh in it.
Told ya -- NOOB.
I just matched up the Instance IDs from the Mesh Cloner tab to the Instance IDs in S4PE to extract the meshes and textures, but S4PE's about to start cussing me out.
I'm still puzzled - like I said eyebrows don't have a mesh and shouldn't show up at all in the mesh cloner, so I don't know what instance IDs you matched up to find those meshes. Also it looks like there are several different instance IDs, but all the meshes for one item have the same instance.
I think what's happening in that screenshot is that the tool is trying to find the lod and meshpart numbers for the meshes, but they're not actually linked from the CASP or meshpart map resource so it defaults to lod-1 for all of them.
I don't seem to be able to export glasses at all. Every time, I get that same "Unhandled exception" error.
Why when I clone a mesh it says: "not all sources were found?" Why weren't found?
What mesh are you cloning?
Love it and found a bug
The yf flutter dress causes the program to crash every time I try to clone it.
What an interesting toolkit so early on! I'll take a few hours and mess around with the tools you so kindly provided. Hopefully, I can provide some relevant feedback for you.
Thanks for pointing out specific problems! I'm in the process of rewriting the tool to handle multiple recolors in one package, and I'll test on glasses and the flutter dress. I was able to clone the flutter dress, btw, but for some reason it couldn't find all the GEOMs. Maybe you didn't click on a color - that will cause an exception.
unhanded exception.... is that what u mean? :D
ah...sorry again Cmar. I ran into another error when I tried using the frankenmesh.
http://puu.sh/bq8Kf/3c8a1560a1.txt What I'm trying to convert is a hair that I edited. I didn't add any verticals but I removed some.
|All times are GMT +1. The time now is 5:11 AM.|
Powered by: vBulletin Version 3.0.14
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.