According to the OBJ specification, OBJ supports groups, but not hierarchy.
According to lib3ds, which should know, 3DS models have hierarchy. According to UpSpring however it does not. That's simply incorrect. Perhaps it's a legacy of lib3ds or UpSpring implementations.
You create hierarchies in 3DS Max using the "link" tool.
As far as the proposed loader goes, it's largely irrelevant. Your hierarchy will be converted to Lua which means you only have an issue when re-editing in a 3D tool (because no 3D packages support additional Lua metadata). The issue isn't that important as long as you name any new pieces and update your Lua (via Upspring or by hand).
Most modern 3D formats DO support hierarchy, so if you use 3DS or upgrade to Collada or other formats then your hierarchy will be preserved without the need for Lua.
However, should you remap your pieces via Lua then Spring will always obey the Lua, allowing you to remap any model regardless of whether it has hierarchy internally or not.
Most of peoples misunderstandings on this topic are based on UpSpring - and Upsring is simply wrong about 3DS and wrong about how it loads certain objects. I'm working on that problem right now.
It is not essential for UpSpring to read your model. That's just a courtesy to people who want a GUI for setting piece hierarchy (for OBJ only) and radius/height.
Maybe one day someone will plug assimp into UpSpring this will allow direct Lua generation for every format Spring supports. For now 3DS/OBJ is sufficient as a common format because most tools can write one or both of these.
Upspring supports 2 additional formats other than S3O/3DO. One is called Object Package (OPK), the other is called Common 3D
MdlObject (C3O). I've yet to see a tool that supports either or even find any information. I think it's pretty safe to call these formats legacy and irrelevant.
Hoi wrote:But why would you want to set hierarchy in your modeling program?
Why wouldn't you? Do you have a hard-on for UpSpring?