This action might not be possible to undo. Are you sure you want to continue?
Rita Turkowski – June 30, 2010
The web is built on standard document formats (HTML, XML, CSS) and standard communication protocols (HTTP, TCP/IP), gaining momentum by the principle and power of the hyperlink (URL / URI) (1). Browsers and servers implementing those standards have revolutionized publishing and searching. Not only can documents be linked by other documents, but since the data is provided in a standard open language it also provides the ability to link to specific content inside a document, enabling the rich navigation and search functionalities that we take for granted today. Two standard technologies developed by the Khronos Group (2), WebGL and COLLADA, are opening the way for enhancing the web experience into the third dimension (3D) of imaging. Thanks to this work, 3D applications can now take advantage of the fundamentals of the web while natively exploiting 3D graphics hardware acceleration. This white paper describes both Khronos standards at an abstract level and the evolution of an ecosystem that will enable immersive 3D Web applications to evolve from currently disparate implementations (i.e. “walled gardens” or “silos”) to become standard web publishing accessible natively in a web browser.
What is WebGL?
What is COLLADA?
COLLADA (5) is an intermediate language for interactive 3D applications. It has been designed from the ground-up with well-settled web technologies: it is essentially XML for 3D assets, using URLs for linking content. COLLADA enables content to flow from content creation tools to interactive applications; it is a lossless, extensible declarative language well suited for content (persistent) serialization and retrieval. The content can then be processed with standard tools in its native XML encoding and adapted to any target application. COLLADA is also being used as an interchange format, providing a bridge between authoring applications. Because COLLADA is a royaltyfree open standard based on standard XML technology, its use as a publishing format has been steadily growing with its adoption by Google Earth(6) and other GIS applications, web 3D engines such as Papervision3D(7), Google O3D(8) and asset repository systems such as 3DVIA(9) and Google 3D warehouse(10).
Motivation for WebGL
Motivation for COLLADA
The burden COLLADA set out to alleviate is that 3D environments are difficult, expensive and time-consuming to create and manage. Content creation represents by far the largest budget in the cost of
creating 3D applications. The more that existing content and code for models, shading, animation, special effects, physics etc., can be shared and syndicated, the more efficiently production pipelines can be made available. For instance, as virtual goods are a growing business model for the game industry, and increasingly end-users aspire to evolve from consumers to creators and publishers of (their own) content, COLLADA’s popularity is growing as an asset exchange and publishing format. Many 3D web applications that are being developed with WebGL are leveraging this trend of content reuse and taking advantage of COLLADA.
Taking advantage of COLLADA and WebGL
and streaming technology after 3D content bandwidth usage grows significantly.1 This said, there is no formal web based approach between WebGL and COLLADA. Work needs to be done outside of implementing both specifications to realize COLLADA content in a WebGL enabled browser. WebGL is a low-level, immediate mode graphics API with little concept of even higher level visual scene elements such as hierarchical transforms, shapes, instancing, and materials etc. that are central to COLLADA. Therefore, in order to connect these two, some sort of transformation or glue code must be implemented, albeit a retained mode rendering engine in its most simple form. However, this is not something Khronos specifies or has any control over. So while COLLADA will be a very important part of the WebGL ecosystem as a vehicle for getting content into WebGL applications, it is not yet clear how these two standards will work together more officially. COLLADA as a Khronos standard should work in synergy with WebGL in order to bring content to WebGL applications. It would likely increase WebGL adoption by providing a wealth of ready content and a (open source) WebGL viewer for COLLADA, especially including robust support for the GLSL shading language. So in short - COLLADA is using web technologies (XML, URI) and is well suited for 3D content delivery for the web, although compression and streaming technologies such as MPEG 4 part 25(14) will most likely be used in the near future to enhance downloading and streaming performance.
How to get COLLADA content into the browser
As stated above, WebGL is a low-level, immediate mode graphics API with no direct access to high-level content, while COLLADA is the 1Compression
and streaming are technologies that should be used to provide a better experience for web delivery of 3D content. Currently the gzip compression and embedding of COLLADA documents into a swf, a kmz,or a json compressed stream provides a 10x compression. (Note that COLLADA 1.5 already defines the .zae format in its specification in order to provide the identical technology as part of the standard, which matches with the current compression delivery mechanisms in use for 3D content delivery on the web). More advanced compression technology for COLLADA is already published by MPEG-4 Part 25 and can provide a 200x compression and better streaming capabilities (using dedicated algorithms for compression depending on the data semantic), but the web community has not yet shown interest in higher compression technology (as opposed to video/images/audio). Mobile network operators will be interested in this technology only when 3D content bandwidth usage grows significantly.
Figure 1: The SpiderGL library architecture:
Code to prepare the WebGL scene (to render this COLLADA experiment into) is shown here:
With GLGE, it is possible to declare a scene object and then import a sub-scene from a COLLADA document. Importing a sub scene from a COLLADA document provides maximum flexibility. It allows use of COLLADA in more then one use-case to play to the strengths of the COLLADA format and its versatility. For example, you can layout an entire scene, as Paul Brunt did in his FPS (first person shooter) level, shown in the image below, which is imported into GLGE as a single COLLADA document (including the animations), or just import a single object such as the duck and plane to use in a larger scene.
Bringing COLLADA to WebGL through URL
It is possible to bring any COLLADA asset - from geometry to effects into a WebGL enabled browser. One common example of COLLADA content needing to be purposed into WebGL is shaders. COLLADA documents include coexisting shader programs for several target platforms (HLSL, Cg, GLSL,…). A WebGL application would want to look at the GLES2 profile, which provides the shader program in the GLSLES language used by WebGL, as well as all the input variables of the shader directly available in XML. This encapsulation provides a standard mechanism to deliver information about the embedded shader without having to parse the shader itself. Tools such as ATI Rendermonkey(23) and Imagination Technology PVRShaman(24) already have support for creating shaders for GLSL-ES and export/import in the COLLADA format. Such tools will be useful to create/test/tweak WebGL shaders. The web application can simply retrieve the shader text from the GLES profile inside the COLLADA XML document once it is created using desktop tools. Another example on how COLLADA and WebGL work together is the mechanism used to bring images into WebGL to be used as textures. WebGL is relying on the browser to provide the image bits from a URL. COLLADA specifies the image as an URL that can be passed directly to the browser. COLLADA also specifies all the additional parameters to create a texture (such as sampler and surface parameters), directly in XML form. It is up to the web application’s COLLADA loader to parse all the information and set up the WebGL state appropriately before rendering the geometry. The application would browse the COLLADA ‘material’ information to extract the sampler and surface parameters and the URL of the image before invoking the browser image loading capabilities. I.e., the application provides all these parameters to WebGL.
WebGL and COLLADA enabling the 3D Web
The hyperlink mechanism allows documents to link to other documents, providing the fundamentals of a rich semantic navigation system. The content of a 3D interactive web won’t be integrated as native web technology until this same hyperlink philosophy is built into the document viewers (i.e. directly into 3D engines built for the web) as well. Soon web applications will be taking advantage of the client/server architectures and web technologies for dynamic content and partial refresh (see Ajax(25) as a good example). With such applications it will 1
be possible to click on a link and be launched immediately into a 3D immersive environment in the browser, or click an element of a 3D content and navigate to another 2D or 3D document, truly enabling 3D content in the web. It is a worthwhile investigation to revisit the classic WWW client / server schematic to see where COLLADA and WebGL fit in. The architecture of WebGL and COLLADA can best be described through the following web architecture diagram.
Figure 3: COLLADA and WebGL integration from a client/server perspective:
Value of the Khronos Group Conformance Effort
An important service provided by Khronos that adds lasting value to organizations adopting Khronos specifications is conformance testing. The purpose of conformance testing is to determine to what extent a single implementation of a particular standard conforms to the individual requirements of that standard. Conformance testing already exists for many Khronos specifications. Information about Khronos technology implementation & adoption/conformance testing as well as a list of specifications for which conformance testing is available can be found on the Khronos web site at http://www.khronos.org/adopters/. As of the Summer of 2010, the COLLADA conformance suite is also available and can be found at http://www.khronos.org/adopters/. The WebGL Working Group has started an effort to develop test suites. For 1
WebGL 1.0 test cases, of particular interest are tests that exercise use of shaders. It is the author’s opinion that a joint COLLADA/WebGL working group effort could support the development of a sample implementation of a COLLADA based WebGL reader that is made publicly available. Thus, COLLADA content would need to be verified to work within a WebGL standardized viewer and a set of COLLADA tests created to test this new WebGL implementation. Khronos acts as the governing body to support the creation, evaluation and reference of implementations that are compliant with their publicly published specifications. It is important to vet applications against the conformance test suite for each API or format published by Khronos. Likewise, vendors should want to be adopters for the benefit of their customers and users. Users should demand that applications pass the test suite at the highest conformance level available (that makes sense for the application). The health of the ecosystem is assured by adoption with conformance, not by unproven implementations that may lead to market fragmentation and implementation chaos. There are two ways in which an individual or company can make use of the Khronos developed technologies: 1. Implementers - for no cost or license fees you may:
• • •
Create and deliver a product using the publicly released specifications and technologies But you may not claim that it is "compliant" unless they enter and pass conformance testing And if the product is a software or hardware engine, you may not advertise it using the Khronos API technology logos or trademarks
2. Adoption/Conformance Testing - for a fee and under legal agreement, you may:
Download and run the conformance tests and if the implementation passes, you may
Advertise and promote the product as being "compliant" using the technology logos and trademarks under a royalty-free license Gain Access to:
The Conformance Tests source code Any sample implementations
The Adopters technical Mailing list; a private priority channel for 2-way interaction with Khronos Member developers who can offer feedback and modifications to the specification, as well as feedback on conformance tests
Use the technology logo in printed marketing or packaging materials of the product Use the technology logo in the actual software application startup screens Receive a company listing on the Adopting Members with Conformant Products pages
Adopter's applications may be promoted on the Khronos web site and other activities.
Outside the scope of the Khronos Group
WebGL is defined to be as a close to the hardware as possible. The WebGL specification is purposely lean so it can run on many different types of devices, many with limited resources. COLLADA provides a standard language to describe 3D assets but steers clear of a specific run-time policies or scene-graph specification. As such, definition and implementation of how the application will use the content, (or what subset of content will be used), and how the WebGL API will be used to display the content is left to the WebGL/COLLADA developer. Khronos’ goal is to provide the technology to the developer but chooses to stay out of the business of specifying a run-time or scene-graph implementation for the web. Another important piece missing from the ecosystem are the tools necessary to develop such applications. Since WebGL and COLLADA are based on existing standards, many existing tools such as GLSL-ES shader creation, XML editors and modelers can already be used to create content. One can imagine HTML editors or publishing tools to enable 3D interactive content by incorporating WebGL and COLLADA content. One can also imagine evolution of user content web applications such as wikis to be able to incorporate live editing of 3D content inside a browser, demonstrated by already existing experiments such as Shader Toy (28) that enable on line live editing of GLSL-ES WebGL shaders.
As browsers incorporate the implementations of WebGL and web applications take advantage of WebGL and COLLADA, it will be possible 1
Vangelis Kokkevis (Khronos WebGL Working Group) for their input and reviews. A special thanks to Marco Di Benedetto of SpiderGL and and Paul Brunt of GLGE for their WebGL examples.
About the Author
Rita Turkowski has been the Khronos COLLADA Marketing Working Group Chair since 2007 and was previously the Executive Director of the Web3D Consortium. She can be reached at firstname.lastname@example.org.
Background and references
A great place to get started with WebGL is this Mozilla Developer Center site dedicated to teaching WebGL https://developer.mozilla.org/en/WebGL, http://hacks.mozilla.org/2009/09/webgl-for-firefox/, and Planet WebGL http://planet-webgl.org/ A great place to get started with COLLADA is the COLLADA Sailing the Gulf of 3D Digital Content Creation book: http://www.akpeters.com/product.asp?ProdCode=2876 and the COLLADA wiki/forum http://www.collada.org/ A great place to get started with OpenGL ES is http://www.khronos.org/opengles/2_X/. Regarding HTML5: This is the next major revision of the core language used to write code for web pages. It aims to reduce the need for (mostly proprietary) rich Internet application (RIA) technologies such as Adobe Flash, Microsoft Silverlight, and Sun JavaFX. HTML5 parts are expected to be ready for implementation in the next two years. Find the HTML 5 canvas element specifications here: http://www.w3.org/TR/html5/. 1. http://en.wikipedia.org/wiki/Hyperlink - standardized by the URL. [Online] 2. http://khronos.org - home of the Khronos Group . [Online] 3. http://khronos.org/webgl - WebGL is a cross-platform, royalty-free web standard for a low-level 3D graphics API based on OpenGL ES 2.0, exposed through the HTML5 Canvas element as Document Object Model interfaces. [Online] 4. http://en.wikipedia.org/wiki/Canvas_element - Html Canvas Element. [Online] 5. http://khronos.org/collada- COLLADA™ defines an XML-based schema to make it easy to transport 3D assets between applications 1
enabling diverse 3D authoring and content processing tools be combined into a production pipeline. . [Online] 6. http://earth.google.com - Google Earth lets you fly anywhere on Earth to view satellite imagery, maps, terrain, 3D buildings, from galaxies in outer space to the canyons of the ocean. . [Online] 7. http://blog.papervision3d.org - Papervision3D (PV3D) is a popular open source 3D engine for Flash. It enables to create advanced threedimensional objects displayed real time right in the web browser. [Online] 8. http://code.google.com/apis/o3d/ - Google O3D home page. [Online] 9. http://www.3dvia.com - 3DVIA allows you to find, upload & create your 3D models and content online. [Online] 10. http://sketchup.google.com/3dwarehouse - The Google 3D Warehouse is a free, online repository where you can find, share, store, and collaborate on 3D models. . [Online] 11. http://code.google.com/p/angelengine/http://news.softpedia.com/news/Google-s-ANGLE-ProjectWebGL-Based-on-DirectX-137892.shtml [Online] 12. http://msdn.microsoft.com/en-us/library/dd919276.aspx D3D9 home page [Online] 13. http://en.wikipedia.org/wiki/Cloud_computing - Cloud computing is Internet-based computing, whereby shared resources, software and information are provided to computers and other devices on-demand, like a public utility. [Online]
31. http://www.ambiera.com/copperlicht/index.html - Copperlicht engine home page. [Online] 32. http://www.c3dl.org/. [Online]
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.