[Bf-gamedev] FBX-exporter (initial progress)

Campbell Barton ideasman42 at gmail.com
Tue Sep 24 04:49:38 CEST 2013


He Bastien,

I'm not so fussed who starts on the binary exporter and probably I
won't get time in the next 2 days either.

I've been thinking about how best to do the update,

On the surface it would seem most obvious to use the current exporter
and update it to write binary files, then make changes needed to write
FBX-7.3, however there are enough changed between FBX 6.1 - 7.3 that I
think a rewrite isn't such a big deal.

Main differences are:
- instancing support (like blender FBX can instance object data).
- fbx-elements use UUID's to reference each other (not name).
- property templates (avoid writing a lot of redundant data).

So at the moment Im inclined to do a rewrite, The script isnt so big
with an API for handling various property types it should be more
compact then writing ascii directly.

Areas like animation writing and armature support can take logic from
existing exporter so there shouldn't be any troubleshooting WRT matrix
multiplication order, parenting etc.


Proposed steps:

- write an empty FBX file using, encode_bin.py (runs outside of
blender) - quick task.
- add basic blender support (instanced meshes, lamps, cameras).
- review utility API's for writing binary data and check this is good
basis to continue development.
- add back support to all features in the current exporter.


On Tue, Sep 24, 2013 at 6:32 AM, Bastien Montagne <montagne29 at wanadoo.fr> wrote:
> Hi Campbell,
>
> Nice and great work! :) Do you intend to keep on and write the bin
> exporter itself as well? I won’t have much time for Blender in the next
> two days as well… :/
>
> Bastien
>
> On 23/09/2013 16:44, Campbell Barton wrote:
>> Heres an update on FBX exporter progress.
>> I was going to mail Bastian directly (since we're looking to work on
>> FBX-exporter re-upgrade) but no reason to keep it private.
>>
>>
>> Over the weekend I worked on writing binary FBX data, mostly this was
>> just a matter of reversing the logic of the parser used for the new
>> fbx-importer,
>> however there were some problems writing the footer (Which the FBX-SDK
>> is highly picky about).
>>
>> Just finished with this, and have written up a test script that parses
>> an FBX into Python data, then re-encodes it back into a valid FBX that
>> Blender and the FBX-SDK can read.
>>
>> Repo:
>> https://github.com/ideasman42/pyfbx_i42
>>
>> Encode (main part needed for exporting):
>> https://github.com/ideasman42/pyfbx_i42/blob/master/pyfbx/encode_bin.py
>>
>> Test re-encode:
>> https://github.com/ideasman42/pyfbx_i42/blob/master/tests/reencode.py
>>
>>
>> Now upgrading the existing exporter should be fairly straightforward.
>> and not so hard to debug since we can convert the binary data into ascii/json.
>>
>> --
>> - Campbell
>> _______________________________________________
>> Bf-gamedev mailing list
>> Bf-gamedev at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-gamedev
>>
> _______________________________________________
> Bf-gamedev mailing list
> Bf-gamedev at blender.org
> http://lists.blender.org/mailman/listinfo/bf-gamedev



-- 
- Campbell


More information about the Bf-gamedev mailing list