We've applied for, but not received the 1.4.0 schema, so I'm stabbing in the dark.
For speed reasons (max exporting + game editor importing / game artwork xml compiling) we plan to export our scenes as multiple collada files. The scene contains assets which contain a path and a selection. Each asset maps to a collada file. So we need to export a index file that references these other files to recreate the scene.
We plan to use collada for this index file. At first I thought we would have to reference each object in each file. (Which would be a bit of a nightmare).
Then I noticed visual_scene and instance_visual_scene. I could just give instance_visual_scene a url containing a path as well as a name. The Scene would just be a collection of instance_visual_scene, one for each file.
So for instance:
Code :<?xml version="1.0" encoding="utf-8" ?> <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.0"> <asset> <contributor> <author>Joeb</author> <authoring_tool>3dsmax Collada exporter v2.07</authoring_tool> <source_data>file://C:/index.max</source_data> </contributor> <created>2005-12-12T17:43:43Z</created> <modified>2005-12-12T17:43:43Z</modified> <revision>1.0</revision> <unit name="Inches" meter="0.01"></unit> <up_axis>Z_UP</up_axis> </asset> <scene> <instance_visual_scene url="./file1.dae#part1_max"></instance_visual_scene> <instance_visual_scene url="./file2.dae#part2_max"></instance_visual_scene> </scene> </COLLADA>
Perfect, only it doesn't work with FCDocument. (It has one FCDSceneNode, and it has to be from the library_visual_scenes of the file.)
Looking at the code of FCDocument I'm surprised at how inflexible it is. FCDocument is quite far off a generic collada api. I hope it's nothing to do with future collada api.
I would expect a collada api to hand me an object structure version of the collada xml file. The user being able to override reader classes (that create the objects (so by overriding a reader class you can make it return your own version of it's corresponding object)). It being left up to the user weather to create writer classes or extend the reader classes to output the data in their own format.
Existing code aside, is what I'm after something permitted by the format?
Does the format permit instance_visual_scene's urls to refer to files?
Does the format permit multiple instance_visual_scenes in <scene> ?
It seams to me to be a sensible way of working with large amounts of xml data.