Home Technical Talk

Maya 2017 FBX export sync issue, ReferenceInformationType

Bek
interpolator
Offline / Send Message
Bek interpolator
Problem: After running an .fbx through maya; normal map sync is broken.



What's different:
From comparing the two FBX ascii files, the offending change is this section:

Modo / working FBX:
<div>; Object properties<br>;------------------------------------------------------------------<br><br>Objects:&nbsp; {<br>&nbsp;&nbsp;&nbsp; Geometry: 104968000, "Geometry::", "Mesh" {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Properties70:&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; P: "PolygonPartNames", "stringlist", "", "U",0, "Default"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Vertices: *24 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: -50,-50,-50,50,-50,-50,50,-50,50,-50,-50,50,-50,50,-50,50,50,-50,50,50,50,-50,50,50<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PolygonVertexIndex: *36 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: 0,1,-4,2,3,-2,4,5,-1,1,0,-6,5,6,-2,4,0,-8,2,1,-7,3,7,-1,6,7,-3,3,2,-8,4,7,-6,6,5,-8<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Edges: *18 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: 0,1,2,3,5,6,7,8,11,12,13,16,17,20,21,24,25,31<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GeometryVersion: 124<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LayerElementNormal: 0 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Version: 102<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Name: "Vertex Normal"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MappingInformationType: "ByPolygonVertex"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ReferenceInformationType: "IndexToDirect"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Normals: *39 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: 0,-1,0,0,-0.999999940395355,0,-0.408248275518417,-0.816496551036835,0.408248275518417,0.408248275518417,-0.408248275518417,0.816496551036835,0,0.707106709480286,-0.707106709480286,0,0,-0.999999940395355,0,0,-1,1,0,0,0.816496551036835,0.408248275518417,0.408248275518417,0.999999940395355,0,0,-1,0,0,-0.999999940395355,0,0,-0.577350258827209,0.577350258827209,0.577350258827209<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NormalsW: *13 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: 0,0,0,0,0,0,0,0,0,0,0,0,0<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NormalsIndex: *36 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: 0,1,2,3,2,1,4,4,5,6,5,4,7,8,9,10,11,12,3,9,8,2,12,11,8,12,3,2,3,12,4,12,4,8,4,12<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br></div>

Maya bad FBX:
; Object properties<br>;------------------------------------------------------------------<br><br>Objects:&nbsp; {<br>&nbsp;&nbsp;&nbsp; Geometry: 2144142033008, "Geometry::", "Mesh" {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Vertices: *24 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: -50,-50,-50,50,-50,-50,50,-50,50,-50,-50,50,-50,50,-50,50,50,-50,50,50,50,-50,50,50<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PolygonVertexIndex: *36 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: 0,1,-4,2,3,-2,4,5,-1,1,0,-6,5,6,-2,4,0,-8,2,1,-7,3,7,-1,6,7,-3,3,2,-8,4,7,-6,6,5,-8<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Edges: *18 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: 0,1,2,3,5,6,7,8,11,12,13,16,17,20,21,24,25,31<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GeometryVersion: 124<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LayerElementNormal: 0 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Version: 102<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Name: ""<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MappingInformationType: "ByPolygonVertex"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ReferenceInformationType: "Direct"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Normals: *108 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: 0,-1,0,0,-1,0,-0.577350258827209,-0.577350258827209,0.577350258827209,0.577350258827209,-0.577350258827209,0.577350258827209,-0.577350258827209,-0.577350258827209,0.577350258827209,0,-1,0,0,0.70710676908493,-0.70710676908493,0,0.70710676908493,-0.70710676908493,0,0,-1,0,0,-1,0,0,-1,0,0.70710676908493,-0.70710676908493,1,0,0,0.577350258827209,0.577350258827209,0.577350258827209,1,0,0,-1,0,0,-1,0,0,-0.577350258827209,0.577350258827209,0.577350258827209,0.577350258827209,-0.577350258827209,0.577350258827209,1,0,0,0.577350258827209,0.577350258827209,0.577350258827209,-0.577350258827209,-0.577350258827209,0.577350258827209,-0.577350258827209,0.577350258827209,0.577350258827209,-1,0,0,0.577350258827209,0.577350258827209,0.577350258827209,-0.577350258827209,0.577350258827209,0.577350258827209,0.577350258827209,-0.577350258827209,0.577350258827209,-0.577350258827209,-0.577350258827209,0.577350258827209,0.577350258827209,-0.577350258827209,0.577350258827209,-0.577350258827209,0.577350258827209,0.577350258827209,0,0.70710676908493,-0.70710676908493,-0.577350258827209,0.577350258827209,0.577350258827209,0,0.70710676908493,-0.70710676908493,0.577350258827209,0.577350258827209,0.577350258827209,0,0.70710676908493,-0.70710676908493,-0.577350258827209,0.577350258827209,0.577350258827209<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NormalsW: *36 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }

If I replace the maya section with the modo section (and update the other few things needed to make it work like the Geometry id) I get the "Maya FBX edited" result. I see the vertices:24 list has different 50 and -50 values; could that have to do with changed vertex order, or the fact that fbx has a transform of -90 Y rotation on it from modo/maya? Freezing/delete history in maya locks the rotation but doesn't affect my end result.

So why is maya using a different ReferenceInformationType, and why does this cause problems? Why is there roughly 3x the number of entries in the Normals section? Are those tangents and binormals being exported even though that's disabled?

Test setup: Modo OBJ -> xNormal. Bake Y- ts NM w/compute binormal in pixel shader checked. Modo FBX 2018.1 -> Maya 2017. Maya FBX 2017 -> Marmoset/UE4. Triangulated before baking. Averaged cube w/hard edge at uv seams, cage bake. The issue is very minor, but it should be perfect, so something is going wrong somewhere. I'm 99% sure maya is not changing the vertex normals of the mesh. Perhaps it's adding tangents and binormals even when I'm telling it not to? But that doesn't make sense if I'm telling ue4 to generate mikkTspace tangents anyway, right?

Here's the weird part: I just tried the same test again with a fully averaged cube, no hard edges, and the maya fbx worked fine in UE4 but not marmoset.

Now the averaged maya fbx has:

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MappingInformationType: "ByVertice"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ReferenceInformationType: "Direct"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Normals: *24 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: -0.577350258827209,-0.577350258827209,-0.577350258827209,0.577350258827209,-0.577350258827209,-0.577350258827209,0.577350258827209,-0.577350258827209,0.577350258827209,-0.577350258827209,-0.577350258827209,0.577350258827209,-0.577350258827209,0.577350258827209,-0.577350258827209,0.577350258827209,0.577350258827209,-0.577350258827209,0.577350258827209,0.577350258827209,0.577350258827209,-0.577350258827209,0.577350258827209,0.577350258827209<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NormalsW: *8 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a: 1,1,1,1,1,1,1,1<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } 
..Vertice?

Why would hard edges cause such problems?

Things I've tried that didn't work:

OBJ. Different FBX versions (2013,2006). Confirmed issue in marmoset and UE4. Checked ue4 import settings and modo fbx output settings (not exporting tangents and normals, baking with compute binormal in the pixel shader in xNormal). Vertex normals don't seem to be affected by maya. I noticed there was a tangent space handedness option in maya; but that seems to flip the mesh tangents.

If I import normals and tangents instead of import normals and generate MikkTSpace in UE4 I notice a small change in the bending effect, but doesn't fix the maya mesh. The modo mesh is correct only with recompute tangents & mikkTspace enabled, as expected. So even with my limited (and that's being generous) knowledge of tangents and binormals, it indicates the problem is with them.

Sign In or Register to comment.