Collada .dae model format concise tutorial

When you download 3D models from the internet, you may see the .dae format in the list of formats. what is it?
insert image description here

Recommendation: Use NSDT editor to quickly build programmable 3D scenes.

1. Overview of Collada DAE

COLLADA is the abbreviation of COLLAborative Design Activity (Chinese: Collaborative Design Activity), which is an exchange file format for interactive 3D applications. It is managed by the Khronos Group, a not-for-profit technology consortium, and has been adopted by ISO as a publicly available specification ISO/PAS 17506.

COLLADA defines an open standard XML schema for exchanging digital assets between various graphics software applications that might otherwise store their assets in incompatible file formats. COLLADA documents that describe digital assets are XML files, typically identified with the .dae file extension—DAE is an acronym for Digital Asset Exchange (which stands for Digital Asset Exchange).

Because Collada DAE is in XML format, all elements are defined by XML tags. You can use XML tags defined in this way to connect 3D assets (assets) with 3D processing tools.

A 3D asset refers to a concept, including models, animations, textures, colors, etc. The 3D processing tool can be an Android app or CAD or Photoshop.

In other words, connecting 3D resources with 3D processing tools means that after downloading a 3D model from the Internet in .dae file format, the downloaded .dae file can be processed or displayed on an Android application, or the .dae file downloaded Go to your computer and paint the 3D model in Photoshop. Of course, parsing a .dae file and drawing it to the screen is a very, very difficult task.

2. Introduction to Collada DAE file structure

A COLLADA XML schema has the following structure:

<?xml version=“1.0”?>
<COLLADA
  xmlns=“http://www.collada.org/2005/11/COLLADASchema”
  version=“1.4.1”
>
</COLLADA>

COLLADA XML Schema defines many tags, but let me briefly describe a few. The full COLLADA specification can be accessed here.

2.1 asset label

The asset tag contains information about the author of the file and the environment settings.

<asset>
  <author>rulia</author>
  <up_axis>Y_UP</up_axis>
</asset>

2.2 geometry tag

The geometry tag contains information for specifying OpenGL properties.

OpenGL attributes represent vertex positions, normals, or UV coordinates.

UV Mapping: A 3D modeling operation that turns a 2D image into the skin of a 3D model.

<library_geometries>
  <geometry id=”box-lib” name=”box”>
    <mesh>
      <source id=”box-lib-positions” name=”position”></source>
      <source id=”box-lib-normals” name=”normal”></source>
      <vertices id=”box-lib-vertices”>
        <input semantic=”POSITION” source=”#box-lib-positions”/>
      </vertices>
      <polylist count=”6" material=”BlueSG”>
        <input offset=”0" semantic=”VERTEX” source=”#box-lib-vertices”/>
        <input offset=”1" semantic=”NORMAL” source=”#box-lib-normals”/>
        <vcount>4 4 4 4 4 4 </vcount>
        <p>0 0 2 1 3 2 1 3 0 4 1 5 5 6 4 7 …</p>
      </polylist>
    </mesh>
  </geometry>
</library_geometries>

2.3 visual_scene tag

The visual_scene tag contains information about the node hierarchy that contains the content.

<library_visual_scenes>
  <visual_scene id=”VisualSceneNode” name=”untitled”>
    <node id=”Camera” name=”Camera”></node>
  </visual_scene>
</library_visual_scenes>

3. Collada DAE file viewing and processing tool

COLLADA was originally intended as an intermediate format for transferring data from one digital content creation (DCC) tool to another application. Now there are many applications that support the reading, writing and processing of Collada DAE models, such as 3dx max, maya, blender, sketchup, solidworks and other traditional software. I will not go into details here, but only two online tools are listed for Collada DAE model files. Viewing and format conversion of:

  • BimAnt 3DViewer : BimAnt 3DViewer supports online viewing of 3D models in dozens of formats such as GLTF, GLB, FBX, OBJ, DAE, etc., directly decodes and renders on the browser side, without uploading to the server, so the model opening speed is very fast.
  • NSDT 3DConvert : NSDT 3DConvert supports online format conversion of 3D models in dozens of formats such as GLT, GLB, FBX, OBJ, DAE, etc., and supports online preview.

4. Collada DAE file reading and writing development library

There are several development libraries available for reading and writing COLLADA DAE files:

  • COLLADA DOM (C++) - COLLADA DOM is generated from COLLADA schema at compile time. It provides a low-level interface that eliminates the need for hand-written parsing routines, but is limited to reading and writing to one version of COLLADA, making it difficult to upgrade when new versions are released.
  • FCollada (C++) - Utility library by Feeling Software. Feeling Software's FCollada provides a higher-level interface than COLLADA DOM. FCollada is used in ColladaMaya, ColladaMax and several commercial game engines. Feeling Software ceased development of the open source portion in 2008. The company continues to support its paying customers and licenses with improved versions of its software.
  • OpenCOLLADA (C++) - The OpenCOLLADA project provides sources for 3ds Max and Maya plug-ins and utility libraries developed for the plug-ins.
  • pycollada Archived on 2013-01-27 in Wayback Machine (Python) - Python module for creating, editing and loading COLLADA. This library allows applications to load COLLADA files and interact with them as Python objects. Additionally, it supports creation of COLLADA Python objects from scratch, as well as in-place editing.
  • Scene Kit (Objective-C) - An Objective-C framework introduced in OS X 10.8 Mountain Lion that allows reading, advanced manipulation, and display of COLLADA scenes.
  • GLGE (JavaScript) - A JavaScript library that uses WebGL to render COLLADA files in a web browser.
  • Three.js (JavaScript) - A 3D Javascript library capable of loading COLLADA files in a web browser.
  • StormEngineC (JavaScript) - Javascript 3D graphics library with option to load COLLADA files.

Original link: Collada DAE Format Concise Tutorial—BimAnt

Guess you like

Origin blog.csdn.net/shebao3333/article/details/132289687