🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How to store a node tree (tree of bone animation) into a file

Started by
1 comment, last by ddlox 3 years, 6 months ago

Im trying to load an FBX file using Assimp, read all vertices and data and dump it to my own format for my own engine usage, however im having trouble figuring out how to store the node tree that contains the transformation of each node and other information to a file and read them to restore the heirarchy?
I cant just store them in sequence as one node can have multiple child or sometimes none, so I cant figure out how to determine, which node is a child of which node, etc.

any tips and tricks?

Advertisement

if you are asking about serialising in textual formats such as xml (like colladae) or json, then just look for c++ libs that support this and save yourself time and money (google: pugixml, json for modern c++) respectively

if you are asking about binary serialisation then:

u will need to read this: https://isocpp.org/wiki/faq/serialization

and this : https://www.codeguru.com/cpp/cpp/algorithms/general/an-introduction-to-object-serialization-in-c.html

word of advice: code this in a small test app outside of your larger project just to see that it works, it shouldn't take u more than a half-day to code… ok maybe a day for u -lol-

alright! this is it! this should get u goin';

all the best ?

This topic is closed to new replies.

Advertisement