occurence of "intance_material" in a "bind_ma

hello everybody,
i want to know how a collada reader may perform many “instance_material” in a bind material attached to an instance_geometry.
I know that if there is just one instance_material in the bind material, the associated material will be apply to the associated mesh but what’s happened with many instance_materials.
Thanks in advance.

I know that if there is just one instance_material in the bind material, the associated material will be apply to the associated mesh
It’s a little bit more complicated than that actually. Each primitive inside a <mesh> (e.g. <triangles>, <polygons>, etc) references a material ‘symbol’, and then that symbol is bound to a specific <material> element in <instance_material>. Here’s an example using multiple <instance_material>s.


<material id="material1">...</material>
<material id="material2">...</material>
...
<mesh>
    
    <triangles material="mat1">...</triangles>
    <triangles material="mat2">...</triangles>
</mesh>
...
<bind_material>
    <technique_common>
        
        <instance_material symbol="mat1" target="#material1"/>
        <instance_material symbol="mat2" target="#material2"/>

Once you understand how materials are actually bound, it’s easy to understand how many <instance_material>s work, since they work exactly the same as one <instance_material>.

See the documentation on the <bind_material> element in the spec for more info.

Great thanks for your answers.