Ok I run some more experiments and things seem to be better.
I made the following modification to my importer/exporter
1- I am naming the Texture sampler on the effect tag the same way as the Texture Image name, this trick will make it work fine for collada 1.41.1 and 1.4.0 since the sampler is just one more level of indirection that tell the loader what properties apply to the texture. This does not created any clash because even if an effect have more than one sampler parameter, each sampler have to point to a unique texture, and textures can not be duplicated.
2-I made the geometry like you guys said, by defining the vertex format in the polygon. And setting the offsets to zero. To determine if the vertex is unified I added an extra tag to the geometry that tell my loader if the mesh can be render in one bash.
Here are tfour samples I am using for testing, if you want to check it out.
http://rapidshare.de/files/35047536/col … t.zip.html
a)the cube used as my control model
b)a simple formula one model in a simple hierarchy (to replace the Subaru)
c)a dirt tractor is much more complex hierarchy.
d)A giant robot (I model after a plastic model for XSI practice, still do not know wow to texture very well)
All the models load correctly in XSI, in my viewer, in MAX, and in Feeling Collada Viewer. The collada feeling viewer they do not show the textures, but I think it is because I do not know how to make it show in the program.
I think that you are right and it is not really important to support complex vertex formats in the vertices tag of teh mesh, but I think there are still few problems that if fixed or improved will make it more compatible.
These happen with Files exported from XSI.
The first one is that XSI write the vertex format in the polygon and that is fine, however it does not write the format completely. So when you try to load the file with other packages the models come out incomplete.
This is what the documentation say abut the input tag
“ 4-32 COLLADA – Digital Asset Schema Release 1.4.1
set =
Which inputs should be grouped together as a single set. This is helpful
when multiple inputs share the same semantics. Optional if <input> is
a child of a Group B parent; not valid for Group A parents.”
To me that means that if you have more that one set of fields in a vertex you must identify then with the set member of the input tag, SXI leave dos not even write the field value.
Here is what SXI writes for a simple cube
<triangles count="12" material="Library.Material_2">
<input semantic="VERTEX" source="#geometries_0-Vtx" offset="0"/>
<input semantic="NORMAL" source="#geometries_0-ImplicitNormal" offset="1"/>
<input semantic="NORMAL" source="#geometries_0-NORMAL" offset="2"/>
<input semantic="TEXCOORD" source="#geometries_0-TEXCOORD" offset="3"/>
This is how I am writing it
<triangles material="Material_2" count="12">
<input semantic="VERTEX" source="#Box01-vertices" offset="0"/>
<input semantic="NORMAL" source="#Box01_normal" offset="0"/>
<input semantic="TEXCOORD" source="#Box01_UV" offset="0" set="1"/>
If I edit the file exported by SXI by adding the set = “1” then they load fine in Max and Feeling Collada
The other problem is that I do not think XSI obey the up axis Tag,
If I export my file with the z axis up when I load it in XSI it should come upright, but is does not, In my opinion the axis tag is there to tell the loader how to orient the data.
The feeling viewer I think it does that properly, mine does too, but Max and XSI totally ignore that coordinates system just like XSI.
It would be nice if at lease one of the mayor package did it right, it is not that complex.
In the samples I saved the f1 model with the Z axis up like it is done in Maya and Max by default, it you load that model in XSI you will see that it comes with the front pointing up. If you load it in Maya or MAX it is right.
If you save the model from SXI and you load it in Maya or Max it will come incorrect (that a problem in both those packages, I think)
The feeling viewer load all kind of orientation correctly.
I think that all exporter should abide by the rules if you people want to have truly file sharing standard.
Finally I think XSI is very good, and the Collada plug in is not as bad I first thought.
Blender is the only package that does not loads any of the files correctly in any way. :?