It not quite sync with MikkT Tangent basis yet. I tried the same the mesh and normal map in UE4.7.1. it looks perfect from all angles. You can download the file(tangent space normal map, low,high) to test here:
https://copy.com/mQGH1aNYud0vaM1e
this was baked in Modo as OS normal map, converted to tangent space normal in Xnormal.
UE4.7.1.
SP 1.3
Replies
I'd also love an option to dither textures on export so I can skip the photoshop conversion step.
Update is awesome so far though!
@Warren, nice! I haven't tried baking within SP or SD, good to know it works. I think Jerc mention the viewport in 1.3 would sync to MikkT...
I'll give baking in SP a try, though for many of my bakes I need to stick to modo because I use the round edge shader.
It should work in 1.3, and it seems to work with some meshes, but apparently it's still not 100% perfect as you have found a problem with that test mesh from hell. It could be due to some changes done by Painter on the geometry to remove edge cases like 0-area triangles, counter-clockwise orientation or non manifold edges, because we just integrated the MikkT code without any change applied to it.
Strange thing, I'm pretty sure we used the same mesh to double check that the tangent basis were correctly sync'ed. Maybe we did not look hard enough.
Did you triangulate that mesh before exporting it ? We can only guarantee the tangent basis to be synced with triangle meshes, because we don't know how UE4 will split non-triangular polygons.
yup it's triangulated before exporting(you can download the file in my first post to test/check out). I understand syncing issue being not perfect at the start, I believe Marmoset 2 had the same issue with their initial support for MikkT.
Normal appears perfect within painter itself, but in marmoset and UE4 it does not. I'm attaching an image comparing an xnormal bake (with compute binormal in the pixel shader option ON) vs painter. This is in the marmoset viewport, but the same issues happen in unreal.
This is a cube with a single smoothing group and a single uv island.
I don't have any textures to hide any error. The reflections should be flat.
Can you try with an obj file (triangulated of course) ? Just to be sure there is no tangents/binormals in the file before importing it in Painter.
There is an option to set that in the XNormal MikkTSpace plugin. It is conveniently set by default to "compute binormal in pixel shader" so that it works by default with UE4. If you set it off you will get the same result you currently get with Designer/Painter. We'll have to expose that option also in Designer and Painter (and set it by default to "on").
Indeed I have "compute binormal in shader" ON,per UE4 documentation recommendation. Any idea when we can see a fix for this?
For Designer, giving an ETA is complicated as we will have to update multiple things inside Designer. We can't simply switch the computing, we need to update the bakers and the shaders but keep some compatibility at the same time for other users and other tangent spaces (such as Unity). We will do our best to give a proper solution as soon as possible.
I've noticed that you haven't split your uv where you used hard edge. Maybe this can be the cause for your issue. Try it.
uncheck "tangents and binormals" was a reference for exporting out from a 3D app, AFAIK that's different from turning ON "compute binormal in pixel shader" for Xnormal,which is still recommend by the Unreal Engine programmer.
In a sync workflow you won't need to split UV at hard edges, beside I don't have any hard edges for both of my example, they both use 1 smoothing group,which should work if it was properly sync. If you try to bake the same cube example with 1 smoothing group and cross UV in SD, you'll probably get a normal error in UE4 too.
Anyway, as Froyok mention this issue will be resolve in the next update to SP.
edit: it might be fix already in 1.3.2? I'll have to run some test tomorrow.
"[Bakers][3D View] Use Mikkt tangent space computation if no tangents/binormals are found"?
The part of the changelog you mention only means we changed our custom tangent space to mikkt. We still perform the computation in the vertex shader, which makes the sync not correct for the moment.
When opening the exported normal map from Substance Painter in PS I recognize the pixel densitiy was odd (72,099999 px/zoll).
I opened a new document with a normal ration (e.g. 72 px/zoll) and dublicated the SP Normal into it.
After saving this new file as .tga the issue was gone.
Screenshots are from 3Do with normal map only.
With .png file direct from Substance Painter
Normal map copied to .tga file with 72 px/zoll resolution:
Still not perfect but much better, or not ?
It's official: I'm a normal-map noob.
I also improved the quality a little by baking directly to .tga and removing the alpha channel with PS.