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!
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
 
26 Comments / Replies (Who?) - 17 Feedback Posts, 8 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Page 1 of 2
Test Subject
#2 Old 22nd Jun 2012 at 11:51 PM
"I don't know if the same problem appears with meshes edited with Blender."

I have just started meshing for TS3. I have imported and tweaked a couple of downloaded meshes in Blender. One mesh that I imported had really obvious seams. I noticed that it had duplicated vertices along the seams. Just recalculating tangents or normals won't fix that, although it could also be cleaned up automatically.
Née whiterider
retired moderator THANKS POST
#3 Old 22nd Jun 2012 at 11:57 PM
Fabulous! Will this also fix those unfortunate situations in which someone has forgotten to untick Autosmooth before starting the six-week process of meshing? .
Ms. Byte (Deceased)
Original Poster
#4 Old 23rd Jun 2012 at 12:25 AM
@danceguy: The seams you're seeing are related to the tangent problem only if they appear with the muscle definition slider set high and disappear with it set to zero. If they're not muscle definition seams they could be caused by bad smoothing, as Whiterider mentions in the comment after yours. The duplicated vertices along the seam are necessary - the two vertices are UV mapped to different locations on the texture, so the texture can be wrapped around the mesh and joined at the seams properly. You may also see duplicate vertices along a line that's meant to be an edge, like the crease in a pair of trousers - the two vertices will have different normals.

@whiterider: LOL! Sorry, you'll have to wait for the fixes-normals-also-reads-minds version. But the more serious answer is that my upcoming (Any Time Now) MeshToolkit can copy the normals from the original mesh so in most cases the autosmooth damage can be undone.
Test Subject
#5 Old 23rd Jun 2012 at 12:33 AM
I know about duplicating vertices to create a discontinuous edge, which is why I thought they were related to the seams. I did not realize the duplicated vertices were necessary for UV mapping. That may be why I have had trouble exporting meshes where I have done more than just pushing existing vertices around.
Lab Assistant
THANKS POST
#6 Old 23rd Jun 2012 at 8:40 AM
Great tool! It helped me a lot with fixing my dress mesh. Thank you very much for it
Née whiterider
retired moderator
#7 Old 23rd Jun 2012 at 12:49 PM
Fab, thanks Cmar - I never did quite understand what tangents are, suddenly had the thought that the word "tangent" could really describe normals pretty well. Evidently not, though!

I look forward to having my mind read by a mesh tool. Will it then automagically create the mesh based on what I imagine it looking like? :D

What was that? Optimists only ever get disappointed? Psh.

What I lack in decorum, I make up for with an absence of tact.
Mad Poster
THANKS POST
#8 Old 23rd Jun 2012 at 1:49 PM
You've done it again! I know this is going to come in handy particularly with creators who make lowriding pants and undies, and that horrid waist line seam ruins the effect of sexy bottoms. Not to mention, all the nudist sims out there looking like something out of a Mattel shop.
Ms. Byte (Deceased)
Original Poster
#9 Old 23rd Jun 2012 at 2:30 PM
Quote: Originally posted by whiterider
Fab, thanks Cmar - I never did quite understand what tangents are, suddenly had the thought that the word "tangent" could really describe normals pretty well. Evidently not, though!


Actually you're right the first time - tangents are also called tangent normals and are used for lighting. Exactly how they're different from, er, normal normals I haven't a clue, except that they're calculated from the position, normal, and UV of the vertex and all the vertices it shares a face with. I don't understand the calculation, just found it online and adapted it for geom meshes and to my surprise it worked.
Test Subject
THANKS POST
#10 Old 23rd Jun 2012 at 5:20 PM
wow!! awesome, you are my hero!!!!!
Test Subject
#11 Old 23rd Jun 2012 at 5:27 PM
Does this also fix the issue with Bloom's sexy feet for female?
Ms. Byte (Deceased)
Original Poster
#12 Old 23rd Jun 2012 at 7:28 PM
Quote: Originally posted by DarkWitchVampire
Does this also fix the issue with Bloom's sexy feet for female?


Sorry, I don't use Sexy Feet and don't know what issue you're talking about. If it only appears with the muscle definition slider increased, then this tool may fix it.
Sockpuppet
THANKS POST
#13 Old 24th Jun 2012 at 1:31 AM
Didn't know there was a issue with them....
But ill check.
Thnx again Cmar, best fix ever!!
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#14 Old 24th Jun 2012 at 6:00 AM
Quote: Originally posted by danceguy
"I don't know if the same problem appears with meshes edited with Blender."

I have just started meshing for TS3. I have imported and tweaked a couple of downloaded meshes in Blender. One mesh that I imported had really obvious seams. I noticed that it had duplicated vertices along the seams. Just recalculating tangents or normals won't fix that, although it could also be cleaned up automatically.
Blender gets seams on import because Blender recalculates the normals, regardless of how they are imported. This is why I put a seam fix function into the geom tools.

Blender probably does have the same tangent problems, because I got the tangent code from Wes. Awesome app, btw.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Sockpuppet
#15 Old 24th Jun 2012 at 6:53 PM
Quote:
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.



If you have imported the meshes in TSRW you can edit the GEOM directly with the S3PE plugin.
project contents/select GEOM/open as package in s3PE/export the GEOMasfile/run Tangent Tool on it/replace the GEOM in s3PE/Save.
Works like a charm
Ms. Byte (Deceased)
Original Poster
#16 Old 24th Jun 2012 at 7:18 PM
Quote: Originally posted by BloomsBase
If you have imported the meshes in TSRW you can edit the GEOM directly with the S3PE plugin.
project contents/select GEOM/open as package in s3PE/export the GEOMasfile/run Tangent Tool on it/replace the GEOM in s3PE/Save.
Works like a charm


Thanks for the info and the test, Bloom!
Test Subject
THANKS POST
#17 Old 3rd Jul 2012 at 10:10 AM
this issue happen to me, but i dont know nothing about Mesh file, but i have s3pe. can u make a tutorial please?
Ms. Byte (Deceased)
Original Poster
#18 Old 3rd Jul 2012 at 2:45 PM
It's way too simple for a whole tutorial, but I'll add the instructions to the tool description.
  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.
Test Subject
THANKS POST
#19 Old 19th Oct 2012 at 3:24 AM
This is exactly what I've been looking for! Thanks Cmar, use alot of your mods. Going to try this out, as soon as I get off work!
Inventor
#20 Old 15th Dec 2012 at 10:06 AM
Cmar, a special < sorry I forget to say this
Lab Assistant
#21 Old 25th Jan 2013 at 3:31 AM
For some reason when I tried running this to the GEOM files of a certain item, it give sme an error.

I attached it here.
Attached files:
File Type: rar  error.rar (1.3 KB, 13 downloads)
Ms. Byte (Deceased)
Original Poster
#22 Old 25th Jan 2013 at 6:17 PM
Quote: Originally posted by Mur4s4me
For some reason when I tried running this to the GEOM files of a certain item, it give sme an error.

I attached it here.


You apparently don't have Microsoft DirectX installed on your computer. Use my Toolkit instead; it has a mesh tangent recalculator tool included which doesn't need DirectX: http://www.modthesims.info/download.php?t=481950
Lab Assistant
#23 Old 1st Feb 2013 at 5:27 PM
Thank you for the link Cmar. I have another question.

The seam issue is present very often on older custom content, but all of that are merged in my folders. Therefore, I won't know which GEOM are for the clothing, and which are for accessories for instance.

My question is: is there any issue in running the tool in any GEOM files? If there's no real known issue that can occur, I can just try running the tool on all the GEOM files I find in my merged packages for clothing.
Ms. Byte (Deceased)
Original Poster
#24 Old 2nd Feb 2013 at 2:02 AM
There are no issues I know of - the effect should be visible only on skin anyway. In some cases the the mesh may not have tangents, but in that case Toolkit should give you an error.

I keep meaning to add a feature to Toolkit to directly work on packages and recalculate the meshes in them.
Lab Assistant
#25 Old 4th Feb 2013 at 1:35 AM
Quote: Originally posted by CmarNYC
There are no issues I know of - the effect should be visible only on skin anyway. In some cases the the mesh may not have tangents, but in that case Toolkit should give you an error.

I keep meaning to add a feature to Toolkit to directly work on packages and recalculate the meshes in them.

Interesting! That could save up a lot of time for many people I believe. Should I wait for that instead of doing the "individual GEOM" fix, or I shouldn't hold my breath yet?
Page 1 of 2