google-code-export / papervision3d

Automatically exported from code.google.com/p/papervision3d
1 stars 1 forks source link

Single material when importing Cinema4D collada #196

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load collada file exported from Cinema4D
2.
3.

What is the expected output? What do you see instead?
Expected: 2 shapes with different materials Result: 2 shapes with the same 
material, 1 correct, 1 
wrong

What version of the product are you using? On what operating system?

rev 910 on Mac osx 10.4

Please provide any additional information below.

    <library_visual_scenes>
        <visual_scene id="ID13">
            <node id="ID14" name="bak1">
                <translate sid="translate">-556.542 0 6.10318</translate>
                <rotate sid="rotateY">0 1 0 -0</rotate>
                <rotate sid="rotateX">1 0 0 0</rotate>
                <rotate sid="rotateZ">0 0 1 -0</rotate>
                <scale sid="scale">1 1 1</scale>
                <instance_geometry url="#ID15">
                    <bind_material>
                        <technique_common>
                            <instance_material symbol="Material1" target="#ID3">
                                <bind_vertex_input semantic="UVSET0" input_semantic="TEXCOORD" 
input_set="0"/>
                            </instance_material>
                        </technique_common>
                    </bind_material>
                </instance_geometry>
            </node>
            <node id="ID23" name="baksteen_rood">
                <translate sid="translate">-211.849 0 -253.928</translate>
                <rotate sid="rotateY">0 1 0 -0</rotate>
                <rotate sid="rotateX">1 0 0 0</rotate>
                <rotate sid="rotateZ">0 0 1 -0</rotate>
                <scale sid="scale">1 1 1</scale>
                <instance_geometry url="#ID24">
                    <bind_material>
                        <technique_common>
                            <instance_material symbol="Material1" target="#ID8">
                                <bind_vertex_input semantic="UVSET0" input_semantic="TEXCOORD" 
input_set="0"/>
                            </instance_material>
                        </technique_common>
                    </bind_material>
                </instance_geometry>
            </node>
        </visual_scene>
    </library_visual_scenes>

This results in both objects having the same texture. If i change the second 
material_instance
 <instance_material symbol="Material1" target="#ID8">
into
 <instance_material symbol="Material2" target="#ID8">

everything works fine. Actually anything else than Material1 wil work.
This morning i noticed (when looking into another generated dae file that 
multiple materials 
inside a <instance_geometry> do have different names

It seems Papervision3d handles the 'symbol' attribute as a 'global' symbol. 
Thus 'overwriting' the 
first definition where they should threat them as 'local' symbols.

Original issue reported on code.google.com by pjxelpix...@gmail.com on 26 May 2009 at 9:03

Attachments:

GoogleCodeExporter commented 9 years ago
is already solved By specifying DAE.useMaterialTargetName=true

Original comment by pjxelpix...@gmail.com on 26 May 2009 at 9:26