multiple <instance_material>s in <bind_material>

Hi,
how should i interpret multiple <instance_material>s in <bind_material> when instancing geometry? Is it a multipass effect or what?

And as i learned from the collada scheme it is possible to have multiple <instance_xxx> under the single <node>, am i correct to assume that in practice only one instance(camera or geo or controller) is present under the same node? In other words there is only one instance per node.

how should i interpret multiple <instance_material>s in <bind_material> when instancing geometry? Is it a multipass effect or what?
No, <instance_material> is used to bind the material symbol of a primitive like <triangles> to a <material> element. Multiple <instance_material>s allow you to bind multiple material symbols to multiple <material> elements. For example, I might have this setup:

<mesh>
    <triangles material="material1">...</triangles>
    <triangles material="material2">...</triangles>
</mesh>
...
<instance_geometry>
    <bind_material>
        <technique_common>
            <instance_material symbol="material1" target="#myMaterial1"/>
            <instance_material symbol="material2" target="#myMaterial2"/>

am i correct to assume that in practice only one instance(camera or geo or controller) is present under the same node? In other words there is only one instance per node.
No, you can have multiple instances per node, including multiple instances of the same type.

Steve

Thanks for reply, i got it about material, but how should i instance several geometries(or cameras or…) under the same node(and consequentally same transform) in my scene graph? My scenegraph node can store only one instance + it`s transform, but with multiply instances in collada it seems i must store a list of objects under the same node or have the transformation as the separate node (like in maya).

You could change your scene graph structure to support multiple instances per node, or you could make multiple nodes, one for each instance_geometry (or instance_whatever). For example, if you nave a Collada node N1 which instantiates geometries G1 and G2, you could add a new node in your scene graph N2 as a sibling of N1 which instantiates G2.

It’s not surprising that you might need to rework the scene graph somewhat to conform to your engine’s capabilities, just as you have to rework the materials or any other data.

Steve