MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...

Mesh Tangent Recalculator - fixes seams on skin

by CmarNYC Posted 22nd Jun 2012 at 11:01 PM - Updated 27th Nov 2013 at 2:48 PM by Nysha
397 Thanks  Thanks     100 Favourited
After a custom body/clothing mesh has been edited in Milkshape, often lines will appear on the skin of the sim when the muscle definition slider is increased past very low settings. This is a tool to modify those meshes and fix this problem.

What the problem is and what the tool does:
The skin lines are caused by some kind of mismatch of the mesh tangents calculated by Milkshape at the seams. If you look closely at EA meshes vs Milkshape-edited meshes, there are also more subtle differences in the way the muscle definition appears. This tool recalculates the tangents for the entire mesh. The results are not identical to the EA values, but the appearance is much closer to the EA meshes and the skin seams are fixed.

I don't know if the same problem appears with meshes edited with Blender.

Since TSRW meshes (.wso) don't contain any tangent information, those meshes can't be fixed directly with this tool. If necessary, when done with working in TSRW you could export the project contents as a .package, export the meshes, run this tool on them, and import them to the .package again.

Edit: TSRW has been updated to use my calculation for the tangents when it imports a .wso mesh, so if you're using a recent version skin seams should no longer be a problem.

Installation and use:
Unzip the files into a folder and run MeshTangentCalculator.exe.

Compatibility:
Requires .NET 2.0 or higher and DirectX3D. Any Windows system running Sims 3 probably already has these installed. May run on Unix and possibly Mac using Wine. The same functionality is included in my upcoming MeshToolkit which should run on Mac and Unix using Mono.

Instructions for use with an existing clothing package:
  1. I recommend making a backup copy of your package first, just in case.
  2. If it's your first time using s3pe, make sure you have both the Display: Names and Tags boxes checked in the bottom part.
  3. Open the package with s3pe, highlight each GEOM file, right-click and Extract them to File. They'll extract to a .simgeom file.
  4. Run MeshTangentCalculator, select each of the .simgeom files you just extracted, and click the Calculate button to fix them and save a fixed version.
  5. Either right-click each GEOM in S3PE again and use Replace to replace them with the fixed version, or select all the fixed files and drag them into S3PE making sure you have 'Replace Duplicates' selected.
  6. Save the package and you're done.

Still experimental!
While I've tested on several meshes, this is still somewhat experimental. When you use the tool it's a good idea to save the mesh as a new version instead of replacing your mesh. Please report any problems.

Additional Credits:
NOAA_Julien on Unity forums for the C# tangent calculation code, which I adapted for Sims 3 meshes.
BloomsBase and Omegastarr82 for testing.



Download files

Filename Size Downloads Date
MeshTangentCalculator_1_0_1_0.zip | Mesh Tangent Calculator tool

Size: 20.1 KB · Downloads: 8,843 · 22nd Jun 2012
20.1 KB 8,843 22nd Jun 2012

Key: - File was updated after upload was posted
Tip: You can click the magnifying glass to see the archive contents

Need help with downloading or installing content? Click here!
 
26 Comments / Replies (Who?)

Expansion/Stuff packs required:
Sims 3

26 Comments / replies (Who?)

8,835 Downloads

102,154 Views

Operating System: Windows
Utility Type: CC Editors Meshing Tools
Plugin Type: Not Applicable

Tags: #mesh, #tangents, #seam, #muscle, #definition, #skin, #tool