I’m writing an egg exporter for my favorite modelling app, Rhino3d. At this stage, it is only to export static geometry. Ive got it working ok, but it currently generates a horizontal node structure.
I’m hoping someone can give me some advice / point me to some information on the best export node structure for display speed in panda.
I could compare the bounding boxes of the geometry, and if one box is entirely within another, make it a child node. Does that make sense?
What kind of optimisation occurs when an egg is imported into panda?
Most exporters simply copy the structure of the file from the original. Does Rhino3d support a graph-based hierarchy? If so, you should preserve it. If it doesn’t, then it’s still probably better to convert it as a horizontal structure, as you say.
The scene graph structure is more for developer’s convenience than for any particular optimization. There is some benefit from a performance standpoint to intelligent structure–keeping things grouped based on physical locality, as you suggest–but making these kinds of decisions automatically seems too problematic to be worthwhile.