Hi all,

I'm trying to attach a texture to a surface of similar aspect ratio. The surface is rectangular but made up of 7 coordinates. When I load the .dae in collada, the texture is very tiny and repeated many times across the surface instead of printed once within the surface boundary. Can someone explain why this is happening?

Note: if I rewrite the file as a rectangle with 4 points I get the desired effect however I am not looking for a quick fix... I'd like to understand what exactly is going on at a fundamental level.

Thanks for your help.

Adam

Code :
<?xml version="1.0" encoding="utf-8"?>
<COLLADA version="1.4.1">
   <asset>
      <contributor>
         <authoring_tool>MATLAB:BHA2SketchUp</authoring_tool>
      </contributor>
      <created>01-Jun-2014 16:46:47</created>
      <modified>01-Jun-2014 16:46:47</modified>
      <unit meter="0.0254" name="inch"/>
      <up_axis>Z_UP</up_axis>
   </asset>
   <library_images>
      <image id="T2">
         <init_from>surface2.jpg</init_from>
      </image>
   </library_images>
   <library_effects>
      <effect id="E2">
         <profile_COMMON>
            <newparam sid="E2T2">
               <surface type="2D">
                  <init_from>T2</init_from>
               </surface>
            </newparam>
            <newparam sid="E2T1">
               <sampler2D>
                  <source>E2T2</source>
               </sampler2D>
            </newparam>
            <technique sid="COMMON">
               <lambert>
                  <diffuse>
                     <texture texcoord="UVSET0" texture="E2T1"/>
                  </diffuse>
               </lambert>
            </technique>
         </profile_COMMON>
      </effect>
   </library_effects>
   <library_materials>
      <material id="M2" name="surface2">
         <instance_effect url="#E2"/>
      </material>
   </library_materials>
   <library_geometries>
      <geometry id="G2">
         <mesh>
            <source id="G2T1F1">
               <float_array count="21" id="G2T2F1">679.2815       34.6073           360       770.453       34.6073      247.0536       770.453      187.2948      247.0536       770.453      514.6073      247.0536      679.2815      514.6073           360      679.2815       318.326           360      679.2815      122.0448           360</float_array>
               <technique_common>
                  <accessor count="7" source="#G2T2F1" stride="3">
                     <param name="X" type="float"/>
                     <param name="Y" type="float"/>
                     <param name="Z" type="float"/>
                  </accessor>
               </technique_common>
            </source>
            <source id="G2T1F2">
               <float_array count="21" id="G2T2F2">0.77812  6.1721e-18     0.62811     0.77812  6.1721e-18     0.62811     0.77812  6.1721e-18     0.62811     0.77812  6.1721e-18     0.62811     0.77812  6.1721e-18     0.62811     0.77812  6.1721e-18     0.62811     0.77812  6.1721e-18     0.62811</float_array>
               <technique_common>
                  <accessor count="7" source="#G2T2F2" stride="3">
                     <param name="X" type="float"/>
                     <param name="Y" type="float"/>
                     <param name="Z" type="float"/>
                  </accessor>
               </technique_common>
            </source>
            <source id="G2T1F3">
               <float_array count="14" id="G2T2F3">0  1.4803e-17           1           0           1      0.3181           1           1           0           1           0     0.59108           0     0.18216</float_array>
               <technique_common>
                  <accessor count="7" source="#G2T2F3" stride="2">
                     <param name="S" type="float"/>
                     <param name="T" type="float"/>
                  </accessor>
               </technique_common>
            </source>
            <vertices id="G2T3">
               <input semantic="POSITION" source="#G2T1F1"/>
               <input semantic="NORMAL" source="#G2T1F2"/>
            </vertices>
            <polylist count="1" material="surface2">
               <input offset="0" semantic="VERTEX" source="#G2T3"/>
               <input offset="1" semantic="TEXCOORD" source="#G2T1F3"/>
               <vcount>7</vcount>
               <p>0  0  1  1  2  2  3  3  4  4  5  5  6  6</p>
            </polylist>
         </mesh>
      </geometry>
   </library_geometries>
   <library_visual_scenes>
      <visual_scene id="V1">
         <node name="SketchUp">
            <instance_geometry url="#G2">
               <bind_material>
                  <technique_common>
                     <instance_material symbol="surface2" target="#M2">
                        <bind_vertex_input input_semantic="TEXCOORD" input_set="0" semantic="UVSET0"/>
                     </instance_material>
                  </technique_common>
               </bind_material>
            </instance_geometry>
         </node>
      </visual_scene>
   </library_visual_scenes>
   <scene>
      <instance_visual_scene url="#V1"/>
   </scene>
</COLLADA>