What are the pros. and cons. of different representations a custom geometry format for a mobile based engine?
I am trying to create 3D model importer for my mobile based engine.
These are what I am considering:
Convert .obj file to text based structure like JSON or custom.
- So, basically, convert .obj file to structure to fit my engine, so, it could be a little bit faster for loading time.
- Pros: Easy, and cross platform.
- Cons: This is text file, and maybe could be slow for parsing and string manipulation?
Convert .obj file to Binary that fits to my engine.
- Use serialization and save with specific structure to binary format
- Pros: Faster
- Cons: It may painful for multi-platform like Java and Objective-c?
Convert .obj file to .java or .h(.m) file, and attach to source code.
- Export .obj file as .java and .h(.m), so I can use inside of code
- Pros: Easy and Faster(?)
- Cons: (?)
First time, I didn’t know about #3 method, but I found some article that people doing this for simple small game. And my game is also small too, so I am considering more #3 method.
Which method is popular and is there more pros and cons ?