<div dir="ltr">Hi All,<div>Over the past few weeks I did some work on the FBX importer and exporter. I just want to report the results and give some suggestions for further discussions.</div><div><br></div><div>Excluding minor bugfixes, the main patches are:</div>
<div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px"><a href="https://developer.blender.org/D687" target="_blank">https://developer.blender.org/D687</a> Import custom properties<br></div><div style="font-family:arial,sans-serif;font-size:13px">
<a href="https://developer.blender.org/D732" target="_blank">https://developer.blender.org/D732</a> Bone orientation during import<br></div><div style="font-family:arial,sans-serif;font-size:13px"><a href="https://developer.blender.org/D735" target="_blank">https://developer.blender.org/D735</a> Bone orientation during export<br>
</div></div><div><div style="font-family:arial,sans-serif;font-size:13px"><a href="https://developer.blender.org/D607" target="_blank">https://developer.blender.org/D607</a> Transform baking during export<br></div><div style="font-family:arial,sans-serif;font-size:13px">
<a href="https://developer.blender.org/D739" target="_blank">https://developer.blender.org/D739</a> Transform baking during import<br></div></div><div><br></div><div>They are not all approved, yet, so they are not in git. I included more detailed documentation in the patch notes, but a summary:</div>
<div><br></div><div>Import custom properties is relatively simple: If you add dynamic properties to a node for example in Maya they are written to an FBX as user properties. The importer should pick most of them up and add them to the corresponding Blender node. Additionally it supports 3DS-Max style custom properties that are just stored as a single key/value string.</div>
<div><br></div><div>This is similar to the custom properties that can be exported from Blender, and used for example in Unity3D with AssetPostprocessor.OnPostprocessGameObjectWithUserProperties .</div><div><br></div><div>
Bone orientation during import tries to orient bones so that the Y-axis of a joint is aligned with the bone. Other modelling applications (for example Maya) don&#39;t manage bones, but instead the joints between bones. Additionally there is no orientation enforced, so the code needs to do some auto-detection. It does some good work, IMHO.</div>
<div>Additionally the code can ignore &quot;leaf&quot; or &quot;end&quot; joints that are added to the end of a bone chain to set the length of the last bone.</div><div><br></div><div>Bone orientation during export does the reverse: If you have an application that needs a specific orientation when a bone is exported the code can change this during export. I&#39;m not sure if any application strictly requires a change to the bone orientation, so it would be a matter of discussion if you want this change. Additionally it can add a &quot;leaf&quot; or &quot;end&quot; bone to all bones that don&#39;t have children, so they work as expected in other applications. The patch documentation has pictures.</div>
<div><br></div><div>Transform baking gets rid of the 90 degree rotation on transforms if you export to another program that works with Y up instead of Z up, and for example makes instancing terrain geometry a PITA in Unity3D. This works by baking the necessary axis conversion into vertex data and fixing up the transforms properly. The math for that is quite complicated, but I was happy with the results for my work.</div>
<div><br></div><div>Ton suggested to investigate if some of this code could be generalised for use in other exporters. <span style="font-family:arial,sans-serif;font-size:13px">I think best candidate for that is to generalise the ObjectWrapper class from fbx_utils and the new FbxImportHelperNode class from my importer code. That way you can apply changes to hierarchy and transforms without modifying the Blender scene or introducing special cases. I do have some other work coming up, so I can&#39;t do it myself, though.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Cheers,</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Jens</span></div>
</div>