ﻃ\ SSI-IS2006 DSE LAB REPORT-Web3DデãŸã‚デX3D

ï¼’ïƒVïƒVïƒV–åƒPƒG広’ ゃLゃPテム情å@ƒA科僅ƒ’牃PåˆEæ¼”çƒ\’ïƒVˆã‚¤ãƒƒEトロダゃbトリゃTミナッV)関é€v技術èƒFƒ\柃Tッƒãƒãƒ¼ãƒˆ

Web3DデãŸã‚デX3D (X3D for Web3D)


  1. What is X3D?

    Extensible 3D (X3D) is a software standard for defining interactive web- and broadcast-based 3D content integrated with multimedia. X3D is intended for use on a variety of hardware devices and in a broad range of application areas such as engineering and scientific visualization, multimedia presentations, entertainment and educational titles, web pages, and shared virtual worlds. X3D is also intended to be a universal interchange format for integrated 3D graphics and multimedia. X3D is the successor to the Virtual Reality Modeling Language (VRML), the original ISO standard for web-based 3D graphics (ISO/IEC 14772). X3D improves upon VRML with new features, advanced application programmer interfaces, additional data encoding formats, stricter conformance, and a componentized architecture that allows for a modular approach to supporting the standard.

  2. Ten reasons why use X3D over VRML97?

    • VRML compatible.
    • XML encoding to integrate smoothly with other applications.
    • X3D scenes and environments operate predictably between different players(プレッVãƒAッV).
    • X3D is componentized.
    • X3D authoring for any player is consistent and simpler.
    • X3D is more feature rich.
    • X3D is continually being enhanced and updated.
    • X3D applications can be certified as reliable and predictable.
    • An X3D open source conformant application is available as a developer resource.
    • X3D binary format offers encryption (i.e. security) and compression (i.e. speed).

  3. Encoding and extension

    Tab.1 Encoding and extension
    EncodingExtension
    VRML.x3dv
    XML.x3d
    Binary.x3db

    X3D file can be written using the syntax of XML or VRML, and encoded by UTF-8 or binary code. Therefore, basic knowledge about XML or VRML is helpful to study the syntax of X3D for beginners.

  4. Why XML?

    EXtensible markup language(XML) syntax is introduced to X3D. According to Yumetech. Inc.'s President, Alan Hudson, who is chair of the Web3D Open Source Working Group, the reasons are that

    • We need XML to interoperate with the Web.
    • We need to incorporate new graphics technologies in a standardized way.
    • We need VRML content to run the same across browsers.
    • We need a standard which can evolve faster then every 5 years.

  5. Preparations for viewing and developing X3D documents

    • To browse X3D files
      To display .x3d files on your computer correctly, X3D browser plugin (e.g. BS Contact) is needed. To check if the X3D-browser is installed in your computer correctly, please try the example of HelloWorld.x3d. Installing plug-in is the current weakness of X3D, however, I believe it will be improved by the future support from browsers(e.g. IE).
    • To edit X3D files
      NotePad or X3D-Edit can be used to edit X3D files. In the case of X3D-Edit, after the installation, you'd better check the file Xeena.bat at ./Ibm/Xeena to see if the value of JAVA_HOME is set correctly, because sometime the default value should be changed. You can open X3D-Edit (Fig.1) by clicking X3D-Edit at ./www.web3d.org/x3d/content.


      Fig.1 X3D-Edit

  6. The basic concepts of X3D

    • Standard units and the coordinate system
      X3D uses a Cartesian, right-handed, three-dimensional coordinate system. By default, the viewer is on the Z-axis looking down the ?Z-axis toward the origin with +X to the right and +Y straight up. We use the same convention when writing VRML files.
    • The scene graph
      The scene graph contains all the objects in the system and their relations. For instance, in Fig.2, the Root node includes two child nodes Transform A and Transform B. The node of Transform A includes a child node Shape A, and Shape A includes Appearance A and Geometry A.


      Fig.2 A scene graph

      Obviously, to draw a scene graph before writing X3D files is beneficial to avoid logical mistakes.
    • Components: Geometry, Environment, Animation, Appearance, Sensors, Structure, etc.
      The nodes of X3D are categorized according to their functionalities, and every category is a kind of component. For example, Geometry3D component includes all 3 dimensional geometric nodes, such as Box, Cone, Cylinder, ElevationGrid, Extrusion, IndexedFaceSet, and Sphere. In other words, the nodes within the same component have the same functionality.
    • Profiles
      A profile is a named collection of functionality and requirements that shall be supported in order for an implementation to conform to that profile. Profiles are defined as a set of components and levels of each component as well as the minimum support criteria for all of the objects contained within that set.
      ISO/IEC 19775: 2004 Part1 defines six initial profiles satisfying varying sets of requirements:
      • Core profile
      • Interchange profile
      • Interactive profile
      • MPEG-4 interactive profile
      • Immersive profile
      • Full profile

  7. X3D by a simple example

    The following simple example will acquaint you with the basics of X3D modeling. You can see more examples here.

    • Header (XML Declaration)
      <?xml version="1.0" encoding="UTF-8"?>
      Header tells us that this file uses XML syntax and is encoded by UTF-8.
    • DOCTYPE (Document Type Definition Statement)
      <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd"> <!--Document type definition (DTD)-->
      This provides both PUBLIC and SYSTEM literals for the X3D Document Type Definition (DTD).
    • Root
      <X3D profile='Immersive'> <head> </head> <Scene> <!--Scene graph nodes are added here.--> </Scene> </X3D>
      In Root, the head element is optional. Scene element is necessary, and only one Scene is permitted in one X3D file. All nodes in the scene should be put in the node of Scene. If we want to draw a box like


      Fig.2 Blue box

      the following is the complete code of the corresponding .x3d file.
      <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd"> <X3D profile="IMMERSIVE" > <head> <meta name='filename' content='BlueBox.x3d'/> </head> <Scene> <Transform> <Transform rotation='0.0 0.707 0.707 0.9'> <Shape> <Box size='2.0 2.0 2.0'/> <Appearance> <Material diffuseColor='0.0 0.0 1.0'/> </Appearance> </Shape> </Transform> </Transform> </Scene> </X3D>
      Now, you can copy the above code to NotePad, and save it with the name of BlueBox.x3d as your first X3D work. The following is some tips you should know when writing X3D files.
    • Tags
      Tags are case SeNsiTiVe. All tags must be close. <X3D>, <head>, <meta>, and <Scene> are non-node tags.
    • To add notes in X3D files
      You can use the following clause to add notes in X3D files.
      <!--This is a note-->
    • Quotes
      The value of attribute should be quoted by " " according to XML syntax. And, ' ' is also permitted by X3D. The following two clauses are both legal.
      <Box size='2 2 2'/> <Box size="2 2 2"/>
      However, some X3D players(e.g. BS Contact) do not support " " according to my experience.
X3D Tooltips provide hints for each node and field in X3D, available in English, Chinese, French, German, Italian, Portuguese, and Spanish. This resource is helpful for us to study X3D and develop related projects.

References:

 [1] X3D International Standard: ISO/IEC 19775:2004.
 [2] Len Bullard, Extensible 3D: XML Meets VRML, Aug. 6, 2003.
 [3] Sujan Inala, Uday Viyyure, and David Chiu, An X3D Presentation.
 [4]
X3D Tutorial (Traditional Chinese only) from Taiwan University.


誃\柃Tæ‹…åƒX“: ゃLゃPテム埃R礎èƒH–ç@”çƒDƒJå®A 郃X æ·ƒV (æ凃R幃G月日:ïƒV’ïƒVïƒVïƒV–åƒPƒG6月2ïƒV—日)