Results 1 to 3 of 3

Thread: occurence of "intance_material" in a "bind_ma

  1. #1
    JeanPrince
    Guest

    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.

  2. #2
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    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.
    Code :
    <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.

  3. #3
    JeanPrince
    Guest
    Great thanks for your answers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •