COLLADA 是一种基于 XML 的开放标准 3D 几何交换格式。 该格式主要作为经过地理配准的 3D 模型的嵌入式容器与 KML 和 KMZ 结合使用。 可以将其视为所有其他用例的传统格式,因为该格式缺少对现代材料(例如 PBR)的支持,也缺少对主要 3D 应用程序中的导入和导出的支持。 在这些情况下,建议您改为使用 glTF

导出设置

请参阅常规导出选项

CGA 映射到 COLLADA

下表列出了主要 CityEngine 元素到 COLLADA 元素的映射。

注:

COLLADA 的实例化和多纹理行为类似于 FBX

整个场景或选择内容

<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>
模型或形状

<scene>
  <instance_visual_scene url="#VisualSceneNode"/>
</scene>
叶形状(具有资产和材料的引用以及可选的变换矩阵)

<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 资产和网格

<library_geometries>
  <geometry id="Geometry" name="mesh1">
    <mesh>
      ... <triangles> or <polylist> ...
    </mesh>
  </geometry>
</library_geometries>
CityEngine 材料

<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 凹凸和法线地图

<effect id="MyEffect">
  <profile_COMMON>
    <technique sid="common">
      <lambert>...</lambert>
      <extra>
        <technique>
          <bump>
            <texture>...</texture>
          </bump>
        </technique>
      </extra>
    </technique>
  </profile_COMMON>
</effect>
CityEngine 纹理

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