Jump to content

Need someone with some math(s) skills


Recommended Posts

So, I've got a UV problem. I'm porting a mesh from another game which conveniently is set up so that the normal maps aren't affected by the direction of UV triangles - unfortunately Starfield very much cares about that sort of thing.

 

Now typically a 3d application has the ability to decect flipped or inverted UV triangles, but the method of detecting this is by getting the area of the UV triangle and its corresponding mesh triangle- if one is a positive number and the other is negative, it's considered to be flipped.

The problem is twofold - first UV triangles have to be in the same direction as the normal map  was baked from, and technically speaking, if you flip a UV triangle horizontally and vertically, you're effectively just rotating it 180º and thus isn't considered to be flipped, leaving this method of identifying them fairly inaccurate. 

So, I need a way, having both the vertex positions of each triangle and the UV coordinates of the corresponding UV triangles to determine whether a UV is flipped, and which direction(s)

Everything else to fix these UVs and textures has already been figured out, and possibly a basic method of determining the direction by comparing edge vectors. Unfortunately I'm pretty stupid when it comes to that sort of maths so I could really use some help. 

Thanks for any assistance!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...