Chris Pollett > Students >
Joom

    ( Print View )

    [Bio]

    [CS297Proposal]

    [Del1]

    [Del2]

    [Del3]

    [CS298Proposal]

    [DemoIE298]

    [DemoMozilla298]

    [CS298Report-PDF]

    [CS298Presentation-PDF]

                           

























CS298 Proposal

3D to SVG Translator

Paungkaew Sangtrakulcharoen (paungkaew@hotmail.com)

Advisor: Dr. Chris Pollett

Committee Members:. Dr. Cay Horstmann (cay@horstmann.com) Dr. Ho Kuen Ng (Ng@mathcs.sjsu.edu)

Abstract: Today 3D objects cannot be viewed on common web browsers (Netscape and Internet Explorer) without plugins. We want to develop a transformation so that users can view 3D graphics on common browsers without plugins as easy as plugins have been used. X3D (Extensible 3D) [W3DC01] is a W3C open standard for 3D on the web and SVG (Scalable Vector Graphics) [W3C01] is an XML based mark-up language for describing 2D line-art graphics. SVG is currently supported by a plugin available from Adobe and natively by the Mozilla SVG browser. It is likely that SVG will be supported natively in future versions of both Netscape and Internet Explorer. The goal of this project is to develop a transformation from X3D to SVG that would allow web sites to exploit 3D objects without having to worry about whether the client is patient enough and competent enough to download and install a plugin.

Typically, 3D objects are modelled as a mesh of 2D polygons. To present 3D objects as smooth surfaces and render the polygons effeciently involve in several non-trivial graphic algorithms. A part of the implementation is to take X3D files and produce a mesh of 2D polygons corresponding to the X3D objects. The 2D polygons will be written in SVG format. In many situations, the client wants to view 3D objects in different perspectives, so we must be able to recalculate and to display the object correctly in the desired perspectives on the client side. Hence, another challenge of this project is that we have to optimize the size and speed of the translation process to be fast and small enough as to be downloadable. This is needed so that the client will not become bored while manipulating the 3D objects.

In CS297, we proposed to use a CSS2 [W3C98] stylesheet for producing the translator of this project. In order to successfully perform the transformation task, we need to be able to use a scripting langauage on this stylesheet. However, after researching and experimenting with several CSS2 test cases, we found that a version of CSS2 supporting behaviors is not likely to be supported by any current browsers. The @script tag, which allows one to have JavaScript code inside CSS2, as proposed on Behavioral Extensions to CSS [AGW97] is not currently supported by any browsers. So, it is not feasible to generate a translation of X3D to SVG by using a CSS2 stylesheet. The translation of this project will be written by using SVG DOM ,which is compatible with the Document Object Model (DOM) specifation level 2 [DOM2], as a means to access X3D source documents and transfom X3D into SVG documents.

CS297 Results

  • Studied X3D and SVG languages and implement simple applications of these two languages.
  • Researched related computer graphic algorithms, graphics pipeline and perspective projection, which will be used to translate primitive shapes into a projection view of 3D objects.
  • Studied XSLT, CSS2, and DOM level 2.
  • Implemented a simple XSLT stylesheet for translating a 3D box into a wireframe representation of 2D polygons.

Proposed Schedule

Week 1 (Aug 26 - Sep 1)Prepare CS298 proposal
Week 2-3 (Sep 2 - 15)Enhance the translator to transform all designed primitive X3D shapes and display them in wireframe representations of 2D polygons.
Week 4-5 (Sep 16 - 29) Enhance the translator so that it can present a view of 3D scene in different perspectives in accordance with the orientations clients make.
Week 6 (Sep 30 - Oct 6)Study the techniques of graphical coloring and shading to enhance the translator and apply them on a view of 3D scenes.
Week 7-8 (Oct 7 - 13)Improve the translator to cover other X3D tags that we designed.
Week 9 - 10 (Oct 21 -27)Write up CS298 report.
Week 10 (Oct 28 - Nov3)Clean up code.
Week 11 (Nov 4 - 10) Give a CS298 draft to the committee.
Week 12 (Nov 11 - 17)Prepare final presentation.
Week 13-14 (Nov 18 - 30) Finalize the report.
Week 15 (Dec1 - 7)Oral defense.

Key Deliverables:

  • Software
    • We will deliver a translator that transforms primitive X3D shape tags to SVG tags with the abilities that users can view the 3D scene in different perspectives. Our transformation will also be fast enough to be comparable with existing plug-ins. The X3D tags that we will support are <Box>, <Cone>, <Cylinder>, <Sphere>,<Shape>, <Transform>, <Group>, <Text>, and <FontStyle>. We will also support the shading of the figures we render. The output document will have user-interactive features that allow users to view objects in different orientations. The translator will be implemented by using DOM to load input data from the source X3D file and give a parse structure for it. Using this, we will dynamically create, insert, and modify SVG tags that are put into the output document.
  • Report that contains
    • Introduction
    • Essential technical background
    • Project's Design
    • Implementation
    • Achievements

Innovations and Challenges

  • So far, there is no translator that translates an X3D document to an SVG document so that users can view X3D objects on web browsers without plugins. The unique approach that we apply in our translator is that a 3D object of X3D will be mapped into 2D objects of SVG which will be so as to display a view of a 3D screen of that X3D object.
  • Typically, 3D objects are modelled as a mesh of 2D polygons. To present 3D objects as smooth surfaces these polygons are each shaded. Many underlying techniques including non-trivial computer graphical algorithms are involved to accomplish this problem.
  • The translator of this project will be developed by using the DOM technology. We will use DOM to dynamically insert SVG nodes into an output document and modify existing nodes in order to produce a proper view of 3D objects in different perspectives. This kind of dynamic inserting into SVG is usually done on a small scale; whereas, for our application we need to insert many nodes based on how DOM represents the parse structure of the X3D document. This is both challenging and an innovative use of this dynamic inserting facility.
  • In many situations, the client wants to view 3D objects in different perspectives, so we must be able to recalculate and display the object correctly in the desired perspectives on the client side. Hence, another challenge of this project is that we have to optimize the size and speed of the translation process to be both fast and small enough as to be downloadable. This is needed so that the client will not become bored while manipulating the 3D objects.

References:

[AGW97] Behavioral Extensions to CSS. http://www.w3.org/TR/becss. W3C

[BH97] Donald Hearn, M. Pauline Baker. Computer Graphics C version 2nd ed. Prentice Hall. 1997.

[ECMA99] Standard ECMA-262 ECMAScript Language Specification 3rd ed. http://www.ecma.ch/ecma1/stand/ecma-262.htm. ECMA. 1999.

[DOM2] Document Object Model (DOM) Level 2 Specification. http://www.w3.org/TR/1999/CR-DOM-Level-2-19991210. W3C

[GH97] P. S. Heckbert and M. Garland, "Survey of polygonal surface simplification algorithms," SIGGRAPH 97, Course Notes 25, 1997.

[HM91] Heckbert, Paul S. and Henry Moreton. "Interpolation for Polygon Texture Mapping and Shading." State of Art in Computer Graphics: Visualization and Modeling, Springer-Verlag, New York, 1991, pp. 101-111.

[KTS01] Ioannis Kompatsiaris, Dimitrios Tzovaras, and Michael G. Strintzis. "Hierarchical representation and coding of surfaces using 3-D polygon meshes" IEEE Transactions on Image Processing v 10 no8 Aug 2001 p. 1133-51.

[W3C98] Cascading Style Sheets, level 2 CSS2 Specification. http://www.w3.org/TR/REC-CSS2. W3C.

[W3C01] Scalable Vector Graphics (SVG) Specification 1.0. http://www.w3.org/TR/SVG/. W3C.

[W3DC01] Extensible 3D (X3D) Graphics Working Group. http://www.web3d.org/x3d.html. Web 3D Consortium. 2001.