title: FbxSDK breaks normals
body: <p>I am trying to export a skinned mesh. For some reasones FbxSDK breaks normals on edges of segments if I add a skin cluster to a mesh. Without a skin everything looks totally fine. </p>
  
  <p>Example:
  <a href="https://i.stack.imgur.com/7uIfl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7uIfl.jpg" alt="enter image description here"></a></p>
  
  <p>Code:</p>
  
  <pre><code>FbxLayerElementNormal *layerElementNormal = FbxLayerElementNormal::Create(mesh, "");
  layerElementNormal-&gt;SetMappingMode(FbxLayerElement::eByControlPoint);
  layerElementNormal-&gt;SetReferenceMode(FbxLayerElement::eDirect);
  
  for (int vertIndex = 0; vertIndex &lt; vertexCount; ++vertIndex)
  {
      PackedNormal normal = vertices[vertIndex].normal;
      double x,y,z;
      x = (( (normal.data)        &amp; 0xFF) / 127.5f - 1.0f);
      y = ((((normal.data) &gt;&gt; 8 ) &amp; 0xFF) / 127.5f - 1.0f);
      z = ((((normal.data) &gt;&gt; 16) &amp; 0xFF) / 127.5f - 1.0f);
      layerElementNormal-&gt;GetDirectArray().Add(FbxVector4(x,-y,z));
  }
  
  layer-&gt;SetNormals(layerElementNormal);
  </code></pre>
  
  <p>I tryied different mapping mods (eg. <code>eByPolygonVertex</code>) and reference mods but so far no help. Seems like normals are completely ignored if a mesh has skin clusters. I commented out code above and skinned model looked like one on the left image. </p>
  
  <p>I also tryied different 3d software(Maya 2015, Maya 2013 and 3ds Max 2013) to review exported model but all of them give me the same results. </p>
  
  <p>P.S. this problem affects any skinned mesh.</p>
  
  <p><strong>EDIT</strong>
  Seems this problem is a bug in FBX pipeline: <a href="http://forums.autodesk.com/t5/fbx-plug-ins-import-export/maya-fbx-exporting-normal-information-disappearing/td-p/4285595" rel="nofollow noreferrer">Autodesk Forum</a>. To bypass the problem i need to "Transfer Attributes". Can anyone help with this?</p>