Normal Map Workflow with Xnormal is not working

Import that pyramid as a skeletal mesh, calculating tangents, and see if it has the same tangents. If it doesn’t (which I really doubt it would, since I’ve read your code), your tangent space code isn’t even consistent within your engine.

Also, your pyramid has a different UV layout from mine, which would of course lead to different tangent vectors. Try exporting that pyramid from Blender, with smoothing off (i.e. explicit split normals) and tangents exported, and import the tangents. This will give you a good idea of the tangents that the reference MikkTSpace implementation would calculate.

I’ve put up a pull request on GitHub that has a fix in it. Please give it a try and let me know if anything else needs to be done for this fix to be integrated upstream for 4.6.

Pull request 561

I’ve tested this locally and it works perfectly with xNormal bakes and FBX files exported from MODO (meshes with mirrored UVs, too). Completely solves all the issues outlined here.

Nice work, Spencer :smiley:

Hi, I’ve updated my pull request that fixes these issues for both static and skeletal meshes by incorporating the reference MikkTSpace implementation. If you could find a guy to help get it merged for 4.6 I would really appreciate it. This is a really important thing to get right, and Mikkelsen’s, James’, and my implementation has a lot of real benefits, including lower vertex counts for static meshes that have imported tangents and more reliable normal map mirroring that’s guaranteed to be seamless (!) without needing to overlay a detail normal map. Both James and I have tested this extensively and it passes.

Pull request in question, please test it internally and get it merged for 4.6!

In case any one has missed the GitHub comments:

"An update here – after an internal review by artists MikkTSpace is now enabled by default on both new and existing static meshes. When you update to 4.7 you won’t have to do anything special. The engine will automatically recompute tangents with MikkTSpace, assuming the asset has “Recompute Tangents” checked.

Skeletal meshes are a bit trickier because we can only handle import time. We’ll update that code as well but have to do a separate review process.

Thanks for your patience :)" - Nick Penwarden

Is xnormal STILL the suggested app for ue4 or is ue4 doing this internally ?

thx
Sorry for late post, but it seems relevant.

Not really, most baking softwares support MikkTSpace these days.

Marmoset, Substance, Modo, Blender, XNormal, MightyBake, etc…

Just be sure and invert the green channel so that Unreal likes it (when Unreal deviates from the MikkTSpace standard by inverting the bitangent vector).