Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for text FBX #2

Open
200sc opened this issue Jul 29, 2018 · 4 comments
Open

Add support for text FBX #2

200sc opened this issue Jul 29, 2018 · 4 comments

Comments

@200sc
Copy link
Contributor

200sc commented Jul 29, 2018

We currently only have working (tested) code for binary FBX files.

@mewmew
Copy link
Contributor

mewmew commented Feb 14, 2021

To enable round-trip encoding and decoding of FBX files, and support further use cases (e.g. in-memory manipulation of existing FBX models), I'd like to propose adding support for text output of the FBX ASCII format.

Personally, I find support for input to be less critical as the binary and ASCII formats are isomorphic, and ofbx already support binary decoding.

The use case I have which drives this is an existing set of FBX models which I would like to further extend (for instance, add animations, textures, etc). The approach I envision using to solve this is to decode the binary FBX models into in-memory Go structures using ofbx, and then to extend these structures as see fit (e.g. adding AnimationStacks to the parsed Scene). I would then invoke scene.FBXString() (or ofbx.WriteText(w io.Writer, scene *Scene)) to output the modified FBX model (including the animation) in FBX ASCII format.

Existing conversion tools such as FBX Converter Archives may be used to convert back and forth between the isomorphic binary and ASCII representations of FBX.

Adding this as a data point for use cases and as a proposal to add support for ASCII FBX output to ofbx.

Cheers,
Robin

Edit: note, this approach is also taken by https://github.com/llir/llvm which supports output of the ASCII LLVM IR format and rely on the official LLVM opt tool for converting between isomorphic versions of the file format.

@200sc
Copy link
Contributor Author

200sc commented Feb 17, 2021

Fundamentally I'm not opposed to this, I don't know when I'll personally have time to work on it however. I'll tentatively say that I'll start looking into it in a couple of days.

@200sc
Copy link
Contributor Author

200sc commented Sep 11, 2021

Just to give an update, because I did look at this and completely forgot to come back and comment on it: to be able to output in text format we need to be able to parse in text format, otherwise testing that it works requires bringing in another tool to perform that parsing in the tests, and that's really not ideal. Obviously based on response time this project is low on my priority list, but I can review PRs and will still attempt to get around to this.

@mewmew
Copy link
Contributor

mewmew commented Sep 11, 2021

Thanks for the update @200sc! I agree, having a parser would facilitate round-trip testing a lot. No rush with the implementation, I understand if these features in ofbx are not top on the priority list. Still, would be great to have one day :)

Cheers,
Robin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants