Export DAE (COLLADA)

COLLADA is an open-standards 3D geometry exchange format based on XML. It is typically used in conjunction with KML and KMZ as an embedded container for georeferenced 3D models. It is considered a legacy format for all other use cases, as it lacks modern materials support (for example, PBR) and import and export support in may 3D apps. It is recommended that you use glTF in these cases instead.

Export options

See the general export options.

CGA mapping to COLLADA

The following table lists the mapping of the main CityEngine elements to COLLADA elements.

Note:

The instancing and multitexture behavior of COLLADA is similar to FBX.

Whole scene or selection
<library_visual_scenes>
  <visual_scene id="VisualSceneNode">
    <node id="rootInst_lot1697" type="NODE">
      <instance_node url="./model_lot1697.dae#root_lot1697"/>
    </node>
  </visual_scene>
</library_visual_scenes>
Model or shape
<scene>
  <instance_visual_scene url="#VisualSceneNode"/>
</scene>
Leaf shapes (with references to assets and materials and optional transformation matrices)
<library_visual_scenes>
  <visual_scene id="VisualSceneNode" name="scene_lot1697">
    <node id="root_lot1697" type="NODE">
      <node id="VisualSceneNode1"
          name="mat0_CityEngineMaterial_CE" type="NODE">
        <instance_geometry name="mat0_CityEngineMaterial_CE" 
            url="#Geometry">
          <bind_material>
            <technique_common>
              <instance_material symbol="mat0_CityEngineMaterial_CE" 
                target="#VisualMaterial">
                <bind_vertex_input semantic="cityengine_colormap" 
                    input_semantic="TEXCOORD" input_set="0"/>
                <bind_vertex_input semantic="cityengine_dirtmap" 
                    input_semantic="TEXCOORD" input_set="2"/>
              </instance_material>
            </technique_common>
          </bind_material>
        </instance_geometry>
      </node>
    </node>
  </visual_scene>
</library_visual_scenes>
CityEngine assets and meshes
<library_geometries>
  <geometry id="Geometry" name="mesh1">
    <mesh>
      ... <triangles> or <polylist> ...
    </mesh>
  </geometry>
</library_geometries>
CityEngine materials
<library_materials>
  <material id="VisualMaterial" name="mat0_CityEngineMaterial_CE">
    <instance_effect url="#Effect"/>
  </material>
</library_materials>

<library_effects>
  <effect id="Effect">
    <profile_COMMON>
      <newparam sid="Image-surface">
        <surface type="2D">...</surface>
      </newparam>
      <newparam sid="Image-sampler">
        <sampler2D>...</sampler2D>
      </newparam>
      <newparam sid="Image1-surface">
        <surface type="2D">...</surface>          
      </newparam>
      <newparam sid="Image1-sampler">
        <sampler2D>...</sampler2D>
      </newparam>
      <technique sid="common">
        <lambert>
          <emission><color>0 0 0 1</color></emission>
          <ambient><color>0 0 1 1</color></ambient>
          <diffuse>
            <texture texture="Image-sampler" 
                texcoord="cityengine_colormap">
              ...
            </texture>
            <texture texture="Image1-sampler" 
                texcoord="cityengine_dirtmap">
              ...
            </texture>
          </diffuse>
          ...
        </lambert>
        ...
      </technique>
    </profile_COMMON>
  </effect>
</library_effects>
CityEngine bump and normal maps
<effect id="MyEffect">
  <profile_COMMON>
    <technique sid="common">
      <lambert>...</lambert>
      <extra>
        <technique>
          <bump>
            <texture>...</texture>
          </bump>
        </technique>
      </extra>
    </technique>
  </profile_COMMON>
</effect>
CityEngine textures
 <library_images>    
  <image id="Image">
    <init_from>./brickwall2.tif</init_from>
  </image>
  <image id="Image1">
    <init_from>./dirtmap.15.tif</init_from>
  </image>
</library_images>