Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!

Mesh Tangent Recalculator - fixes seams on skin

SCREENSHOTS
9,611 Downloads 426 Thanks  Thanks 114 Favourited 108,040 Views
Cmar unfortunately passed away in October 2023. They contributed heavily to the Simming community for many years and will be missed!
Uploaded: 22nd Jun 2012 at 11:01 PM
Updated: 27th Nov 2013 at 2:48 PM by Nysha
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.