FBX exporter writes malformed 'Current' section #41307

Closed
opened 2014-08-04 01:19:47 +02:00 by Raul Aguaviva · 10 comments

System Information
Win7, AMD r9 290

Blender Version
just tried 2.71 hash 9337574

Short description of error
FBX exporter generates a malformed 'Current' section

Exact steps for others to reproduce the error
Created a simple scene, just suzzane with a texture. suzzane.blend
Exported and FBX with the default options. suzzane2.fbx
When tried to load the FBX with my FBX loader I realized that the string length of the property 'Current' is zero, see hexdata below undefined.
You can also see that from then on all the data is garbage and then the file finishes a few bytes later (128 bytes or so).

According to the ascii export, the string length should be "Default Take" and the string length should be 12. Also all the 'Take' nodes are missing that should come after this node are missing.

**System Information** Win7, AMD r9 290 **Blender Version** just tried 2.71 hash 9337574 **Short description of error** FBX exporter generates a malformed 'Current' section **Exact steps for others to reproduce the error** Created a simple scene, just suzzane with a texture. [suzzane.blend](https://archive.blender.org/developer/F101418/suzzane.blend) Exported and FBX with the default options. [suzzane2.fbx](https://archive.blender.org/developer/F101420/suzzane2.fbx) When tried to load the FBX with my FBX loader I realized that the string length of the property 'Current' is zero, see hexdata below ![undefined](https://archive.blender.org/developer/F101421/undefined). You can also see that from then on all the data is garbage and then the file finishes a few bytes later (128 bytes or so). According to the ascii export, the string length should be "Default Take" and the string length should be 12. Also all the 'Take' nodes are missing that should come after this node are missing.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @xchip

Added subscriber: @xchip
Bastien Montagne self-assigned this 2014-08-04 10:56:08 +02:00

I’m not en axpert in FBX format (who is? there are no official specs afaik), but from what I’ve seen so far, in recent versions (7.3, 7.4), takes are completely deprecated, animations being handled by AnimStack, so yes, 7.4 bin exporter does not really care about Takes.

I wonder why 'Current' could not be zero lenght len? Anyway, adding "Default Take" in here instead is easy, just wondering why it would be needed… FBX…

I’m not en axpert in FBX format (who is? there are no official specs afaik), but from what I’ve seen so far, in recent versions (7.3, 7.4), takes are completely deprecated, animations being handled by AnimStack, so yes, 7.4 bin exporter does not really care about Takes. I wonder why 'Current' could not be zero lenght len? Anyway, adding "Default Take" in here instead is easy, just wondering why it would be needed… FBX…
Author

Hi Mont29,

You are right, the string could be zero. In fact my loader just parses everything fine but stops right before the "ú¼« ÐÈÔf±vûƒ÷&~ " Any idea what that chunk is?

Hi Mont29, You are right, the string could be zero. In fact my loader just parses everything fine but stops right before the "ú¼« ÐÈÔf±vûƒ÷&~ " Any idea what that chunk is?

Here is the JSon-converted (exact) content of the end of the data-part of your FBX file:

  ["Connections", [], "", [
      ["C", ["OO", 93497060, 0], "SLL", []],
      ["C", ["OO", 592341770, 0], "SLL", []],
      ["C", ["OO", 850149994, 0], "SLL", []],
      ["C", ["OO", 999062126, 0], "SLL", []],
      ["C", ["OO", 923864498, 0], "SLL", []],
      ["C", ["OO", 234064505, 93497060], "SLL", []],
      ["C", ["OO", 704066782, 592341770], "SLL", []],
      ["C", ["OO", 601346663, 850149994], "SLL", []],
      ["C", ["OO", 305518367, 999062126], "SLL", []],
      ["C", ["OO", 658446846, 923864498], "SLL", []],
      ["C", ["OO", 764020131, 850149994], "SLL", []],
      ["C", ["OP", 797983990, 764020131, "DiffuseColor"], "SLLS", []],
      ["C", ["OO", 592489931, 797983990], "SLL", []]]],
  ["Takes", [], "", [
      ["Current", [""], "S", []]]]]

After that (see encode_bin.py file of the addon), we write a foot ID (fa bc ab 09 d0 c8 d4 66 b1 76 fb 83 1c f7 26 7e), some padding, the version of the file, and some final magic content…

In other words, once you hit that binary chain above, data content is finished.

Here is the JSon-converted (exact) content of the end of the data-part of your FBX file: ``` ["Connections", [], "", [ ["C", ["OO", 93497060, 0], "SLL", []], ["C", ["OO", 592341770, 0], "SLL", []], ["C", ["OO", 850149994, 0], "SLL", []], ["C", ["OO", 999062126, 0], "SLL", []], ["C", ["OO", 923864498, 0], "SLL", []], ["C", ["OO", 234064505, 93497060], "SLL", []], ["C", ["OO", 704066782, 592341770], "SLL", []], ["C", ["OO", 601346663, 850149994], "SLL", []], ["C", ["OO", 305518367, 999062126], "SLL", []], ["C", ["OO", 658446846, 923864498], "SLL", []], ["C", ["OO", 764020131, 850149994], "SLL", []], ["C", ["OP", 797983990, 764020131, "DiffuseColor"], "SLLS", []], ["C", ["OO", 592489931, 797983990], "SLL", []]]], ["Takes", [], "", [ ["Current", [""], "S", []]]]] ``` After that (see encode_bin.py file of the addon), we write a foot ID (`fa bc ab 09 d0 c8 d4 66 b1 76 fb 83 1c f7 26 7e`), some padding, the version of the file, and some final magic content… In other words, once you hit that binary chain above, data content is finished.
Author

Excellent, I am getting the same output, all is fine then :) The no string and the foot ID confused me and made me think it was garbage.

Where are you getting those 'SLL'? All I am getting is this:

Connections (0)
    C (3) OO 93497060 0
    C (3) OO 592341770 0
    C (3) OO 850149994 0
    C (3) OO 999062126 0
    C (3) OO 923864498 0
    C (3) OO 234064505 93497060
    C (3) OO 704066782 592341770
    C (3) OO 601346663 850149994
    C (3) OO 305518367 999062126
    C (3) OO 658446846 923864498
    C (3) OO 764020131 850149994
    C (4) OP 797983990 764020131 DiffuseColor
    C (3) OO 592489931 797983990
Takes (0)
    Current (1) 

And I dont see those strings in the hex dump.

Cheers!

Excellent, I am getting the same output, all is fine then :) The no string and the foot ID confused me and made me think it was garbage. Where are you getting those 'SLL'? All I am getting is this: ``` Connections (0) C (3) OO 93497060 0 C (3) OO 592341770 0 C (3) OO 850149994 0 C (3) OO 999062126 0 C (3) OO 923864498 0 C (3) OO 234064505 93497060 C (3) OO 704066782 592341770 C (3) OO 601346663 850149994 C (3) OO 305518367 999062126 C (3) OO 658446846 923864498 C (3) OO 764020131 850149994 C (4) OP 797983990 764020131 DiffuseColor C (3) OO 592489931 797983990 Takes (0) Current (1) ``` And I dont see those strings in the hex dump. Cheers!

We have a tool, fbx2json.py (I just pushed it into official addon repo), which converts bin FBX into a nice readable (and parsable!) JSon format (SLL are the type of the three values, string, long, long - FBX conventions ;) ).

See also (in case you do not know them already):

We have a tool, fbx2json.py (I just pushed it into official addon repo), which converts bin FBX into a nice readable (and parsable!) JSon format (SLL are the type of the three values, string, long, long - FBX conventions ;) ). See also (in case you do not know them already): * Binary format: http://code.blender.org/index.php/2013/08/fbx-binary-file-format-specification * Data layout (very incomplete and rather fuzzy in some areas :/ ): http://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Thinsk we can close that, btw, since this is not a bug. :)

Thinsk we can close that, btw, since this is not a bug. :)
Author

thanks for your help! I had the first link but not the second one, very useful :)

Cheers!

thanks for your help! I had the first link but not the second one, very useful :) Cheers!
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#41307
No description provided.