Abstract
Three-dimensional modelling is not built into today's most popular browsers, and is perhaps considered too specialized to be added in the near future. Although browser plug-ins have been created for formats such as VRML [VRML] and X3D [X3D], such plug-ins are far from ubiquitous. This creates a problem for anyone wishing to publish 3D content online. The current paper offers a practical solution that takes full advantage of XML and related standards.
3D viewing software generally provides users with the ability to explore a scene by changing viewpoint. The scene is typically made up of polyhedra or multi-faceted surfaces while the view is constructed by transformation to 2D and application of a lighting model. The 2D requirement arises as a physical limitation of typical computer display devices. However, it also begs the question, "Is a 2D format sufficient for the viewing of 3D content?"
As long as 2D renditions can be generated on the fly in response to changing viewpoint, the behaviour of a 3D viewer can be reproduced. A Web application that generates these renditions on the server would be too unresponsive to be practical, so there is a need to interactively generate views on the client. Our solution is to use Scalable Vector Graphics [SVG], in conjunction with compatible W3C standards for client-side processing. In particular,
an XML grammar for 3D modelling is embedded within the SVG as metadata with its own namespace,
projections and lighting models are applied by ECMAScript,
the resulting 2D rendition is constructed as SVG DOM nodes, and
user interactivity making it possible to explore a 3D scene is triggered by DOM events on an SVG GUI, and handled by ECMAScript event-handlers.
Although SVG comes with an implicit z-order as well as filter effects designed to simulate a three-dimensional appearance, these effects assume an unchanging view direction, and have to be adapted for use on re-computed geometry.
We present an online 3D viewer implementation called Aquila, demonstrate its applicability to arbitrary 3D content, and discuss further enhancements that can add to the realism of the rendered output. Along the way we illustrate how to use SVG to achieve standard 3D algorithms such as backface culling, shadows, Gouraud shading and Phong shading.
Keywords
![]() ![]() |
Design & Development by deepX Ltd. |