Collada 模型解析及3D顯示

    COLLADA的全名「COLLAborativeDesign Activity」起源於sony(Sony Computer Entertainment),現由Khronos Group維護管理.,此機構成立於2000年,由包括Intel、SUN、ATI、英偉達、SGI(美國硅圖)等多家國際知名公司領導者創立;致力於發展開放標準的應用程序接口 API ,以實現在多種平臺和終端設備上的富媒體創作、加速和回放。可以這麼說,凡是前面帶open的都有它主持和參與,如openCL(Open Computing Language),openWF,openML,openGL等。當然COLLADA也是一個開放的標準,最初用於3D軟件數據交換,現在則被許多著名廠家支持如Autodesk、XSI(同maya一個級別的圖形渲染引擎,《侏羅紀公園》)和google 旗下的google earth等。COLLADA不僅僅可以用於建模工具之間交換數據之用,也可以作爲場景描述語言用於小規模的實時渲染。因爲COLLADA DOM擁有豐富的內容用於表現場景中的各種元素,從多邊形幾何體到攝像機無所不包。(exchangingdigital assets among various graphicssoftware applications that might otherwisestore their assets in incompatible file formats. COLLADA documents thatdescribe digital assets are XML files, usually identified with a .dae (digital assetexchange)filename extension.)

看到XML我就想到“二叉搜索樹”,因爲它的數據文檔是樹狀的,可以進行定位搜索等操作。它的英文名extensible markup language ,中文名是可擴展標記語言,首先它是一門語言,其次它擅長存儲數據,所以在數據交換中有很大應用。

XML與HTML的設計區別是:XML是用來存儲數據的,重在數據本身。而HTML是用來定義數據的,重在數據的顯示模式。TinyXML是其中一個讀取xml文檔的庫,網上有很多相關的編譯配置資料。

 支持的遊戲引擎

支持COLLADA的3D遊戲和應用(亮點google earth):

  • ArcGIS
  • TNTmips
  • Google Earth - (release 4) has adopted COLLADA (1.4) as its native format for describing the objects populating the earth. Users can simply drag and drop a COLLADA (.dae) file on top of the virtual Earth.
  • Google SketchUp Pro (or any version of SketchUp starting with 8.0) can also be used to create .KMZ files: a zip file containing aKML file, a COLLADA (.dae) file, and all the texture images.
  • Mac OS X 10.6's Preview allows opening collada files for viewing in 3D.
  • OpenSimulator
  • Second Life

讀寫 COLLADA文件的庫(當然也可以自己利用上面提到的tinyXML或其他工具解析加載)python亮了:

  • COLLADA DOM (C++) - The COLLADA DOM is generated at compile-time from the COLLADA schema. It provides a low-level interface that eliminates the need for hand-written parsing routines, but is limited to reading and writing only one version of COLLADA, making it difficult to upgrade as new versions are released.
  • OpenCOLLADA (C++) - The OpenCOLLADA project provides the next generation plugins for3ds Max & Maya and the sources of utility libraries which were developed for the plugins.
  • FCollada (C++) - A utility library available fromFeeling Software. In contrast to the COLLADA DOM, Feeling Software's FCollada provides a higher-level interface. FCollada is used inColladaMaya, ColladaMax, and several commercial game engines. The development of the open source part was discontinued by Feeling Software in 2008. The company continues to support its paying customers and licenses improved versions of its software.
  • pycollada (python) - A python module for creating, editing and loading COLLADA. The library allows the application to load a COLLADA file and interact with it as a python object. In addition, it supports creating a collada python object from scratch, as well as in-place editing.

題目中顯示,由於時間的關係,下次補充上。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章