Author Topic: Compute tangent space per fragment for assets being used in both engines  (Read 4625 times)

Now I understand the purpose of compute tangent space per fragment in the Project Configuration, but my question involves "universal" assets.

I aim to create assets available to both UE4 and Unity, but how exactly do I deal with the compute tangent space per fragment option without basically retexturing every asset twice? It needs to be On for UE4 and Off for Unity, but the project configuration chooses it at the start. How can I create both a Unity and UE4 asset with this option being On/Off for each one?

Quickly put: in theory you can't.

In practice, there are probably ways to reduce the differences between different tangent space normal maps if the only difference is the way tangent spaces are interpolated. Unfortunately, this would involve increasing the number of triangles in your mesh. The idea is to add geometry so that the vertex normals in your mesh are as parallel as possible when they belong to the same triangle (particularly if it is a large triangle). If you are working on a "hard surface" mesh, adding edge loops around bevels can help.

Quickly put: in theory you can't.

Thanks Cyrille. I notice "compute tangent space per fragment" is off for most of the default configurations, except for UE4 and also Lens Studio (which is the only template to use both Open GL and the "compute tangent" setting). If you're making an asset to be sold on sites like Turbosquid, etc, would you typically leave this setting off?

Thank you.

-Adam

Yes, I would leave it off as most renderers out there don't expect it.

Now I understand the purpose of compute tangent space per fragment in the Project Configuration, but my question involves "universal" assets.

I aim to create assets available to both UE4 and Unity, but how exactly do I deal with the compute tangent space per fragment option without basically retexturing every asset twice? It needs to be On for UE4 and Off for Unity, but the project configuration chooses it at the start. How can I create both a Unity and UE4 asset with this option being On/Off for each one?

I thought you can go into project settings and switch it off or on... ???



Then would you just rebake all your maps? Would any existing painting be affected?

I haven't tested it as I make assets for Unity not Unreal.

Edit: I'll do a test later today and give it a try.
Last Edit: January 31, 2019, 02:02:17 am
I teach people how to use Substance Painter. :)

I made a quick test mesh, low and high, then baked in Painter and exported out to Unreal Engine 4.21.1

I cannot find any difference in using a standard setup with DirectX normals, or by ticking the box for Compute tangent space per fragment.

1. Just with DirectX normals and Compute tangent space per fragment unchecked





2. With DirectX normals and Compute tangent space per fragment checked





I even took a Game Ready model that was made with the OpenGL setting, and exported it out with DirectX Normals, with both Compute tangent space per fragment checked and unchecked after rebaking, but no visible difference could be found during Building and Running the EXE test.

Now I'm very confused on why this feature is recommend for Unreal Engine 4 if I cannot find any differences using it.

FYI, all texture maps were imported as PNG 8bit and at 2k Res.
I teach people how to use Substance Painter. :)

I did another test with metal and rust. I noticed prior someone made a car with rust and without checking the box for Compute tangent space per fragment they had issues.

Both meshes presented themselves the same:





1. Not Ticked
2. Ticked

My FBX files from blender do not include binormals or tangents, I bake in Painter as usual, then when I import in Unreal I make sure to follow this:



I'm extremely curious if now this prior requirement is no longer needed. I researched problems prior and they were years back, and extremely noticeable.
I teach people how to use Substance Painter. :)

Yes, I would leave it off as most renderers out there don't expect it.
Great; thank you so much, Jeremie, for your reply. :)

I'm extremely curious if now this prior requirement is no longer needed. I researched problems prior and they were years back, and extremely noticeable.

Thanks CAGameDEV for your time in contributing those comparison tests. :) This is a topic I too would like to know more on... maybe someone from Substance can expound with example images to show the difference of having this box checked / unchecked.

This will really only be visible on hard surface objects with flat surfaces and hard edges, where slight differences in the normal map will be more obvious.

This will really only be visible on hard surface objects with flat surfaces and hard edges, where slight differences in the normal map will be more obvious.

I'll try a few more tests to see if I can get something noticeable on my end. I plan on creating some assets for Unreal soon so this is actually important to know.

If for whatever reason I do get any issues, wouldn't I just need to go into project settings, toggle it on, then re-bake my maps, and re-export my texture maps? I'm assuming this is all I would have to do to keep assets compatible with both Unity and Unreal.

Thank you for your reply Jeremie.
I teach people how to use Substance Painter. :)

If for whatever reason I do get any issues, wouldn't I just need to go into project settings, toggle it on, then re-bake my maps, and re-export my texture maps? I'm assuming this is all I would have to do to keep assets compatible with both Unity and Unreal.

Exactly.

This will really only be visible on hard surface objects with flat surfaces and hard edges, where slight differences in the normal map will be more obvious.
Thanks Jeremie for that explanation. :)