Results 1 to 3 of 3

Thread: creating a single face

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Posts
    4

    creating a single face

    I'm trying to get my ColladaMax importer to create a simple face, yet with
    both <triangles> and <polygons> it just creates a single line 1 unit in length.

    Any help is appreciated

    Code :
    <?xml version="1.0" encoding="utf-8"?>
    <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
    <asset><created>2007-07-27T06:55:19Z</created><modified>2007-07-27T06:55:27Z</modified></asset>
    <library_geometries>
    <geometry id="face">
    <mesh>
    <source id="face-pos">
    <float_array id="face-pos-array" count="24">
    1 0 0 
    3 0 0 
    4 1 0 
    4 3 0 
    3 4 0 
    1 4 0 
    0 3 0 
    0 1 0 
    </float_array>
    <technique_common>
    <accessor source="#face-pos-array" count="8" stride="3">
    <param name="X" type="float"/>
    <param name="Y" type="float"/>
    <param name="Z" type="float"/>
    </accessor>
    </technique_common>
    </source>
    <vertices id="face-vertices">
    <input semantic="POSITION" source="face-pos"/>
    </vertices>
     
    <polygons count="1">
    <input semantic="VERTEX" source="face-vertices" offset="0"/> 
     
     
     
    0 2 3 1 
    </p>
    </polygons>
     
    <!--
    <triangles count="4">
    <input semantic="VERTEX" source="face-vertices" offset="0"/>
     
     
     
    0 1 3 3 2 0 4 5 7 7 6 4 
    </p>
    </triangles>
    -->
    </mesh>
    </geometry>
    </library_geometries>
     
    <library_visual_scenes>
    <visual_scene id="the_face">
    <node id="face-node">
    <instance_geometry url="#face"/>
    </node>
    </visual_scene>
    </library_visual_scenes>
     
    <scene> 
    <instance_visual_scene url="#the_face"/>
    </scene>
    </COLLADA>

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    When you have a problem with a COLLADA document, please use the Coherency test.

    Once you have done this, please come back here and let us know if you need help interpreting the output of the coherency test.

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: creating a single face

    Quote Originally Posted by rjm
    Code :
    <float_array id="face-pos-array" count="24">
    1 0 0 
    3 0 0 
    4 1 0 
    4 3 0 
    3 4 0 
    1 4 0 
    0 3 0 
    0 1 0 
    </float_array>
     
    <polygons count="1">
    <input semantic="VERTEX" source="face-vertices" offset="0"/> 
     
     
     
    0 2 3 1 
    </p>
    </polygons>
    The polygon you are collating has vertices:
    [1 0 0] [4 1 0] [4 3 0] [3 0 0]

    I doubt that is the simple test case that you are intending

Posting Permissions

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