An Introduction to Google's O3D
- Installing the Tools
- How O3D Works
- The HTML File
- JavaScript File
- Summary
There have been numerous attempts to add a third dimension to the Web over the years. Unfortunately, most have limitations: Open formats like X3D never gained much popularity, Flash-based 3D engines are limited by the performance of the Flash runtime, and commercial offerings can cost several hundred to several thousand dollars.
A new project from Google, O3D, aims to overcome these limitations by providing a free, open source, cross-platform and cross-browser plug-in that delivers the flexibility and speed of a low-level graphics API like OpenGL or Direct3D, while addressing the constraints of running inside a web browser. This plug-in gives web developers the ability to utilize the underlying graphics hardware of the host PC directly, allowing detailed 3D scenes to be displayed directly in a web browser. And because O3D is free to use, there's no cost barrier.
Installing the Tools
This article demonstrates how to write a very simple O3D application. The first step is to install the O3D plug-in. By running some of the sample applications, you can test that the plug-in has been installed correctly and that your PC meets the O3D minimum requirements
Most O3D applications will make use of the O3D JavaScript utility library. The samples.zip file, which you can get on the O3D Downloads page, contains the o3djs directory, which holds the O3D JavaScript utility library files. To function properly, the o3djs directory must be copied into the same directory as the HTML file that displays the O3D application.