Export DAE (Collada)

Collada is an open-standards 3D geometry exchange format based on XML. Currently, it is mainly used in conjunction with KML/KMZ as an embedded container for geo-referenced 3d models. You should consider it a legacy format for all other use cases as it lacks in support for modern materials (e.g. PBR) as well as in import/export support in the major 3d apps. It is recommended to use glTF as an alternative.

Export settings

See the general export options.

CGA mapping to Collada and examples

The following table lists the mapping of the major CityEngine elements to Collada elements.

Note:

The instCityEngineancing/multi-texture behavior of Collada is similar to FBX.

CityEngine

Collada Example

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/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/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/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>