SlideShare uma empresa Scribd logo
1 de 24
Baixar para ler offline
X3DOM
An Overview and Examples
     WebGL Seminar, 7.1.2011
  Tampere University of Technology



         Jaakko Salonen
  Tampere University of Technology
      Hypermedia Laboratory


                                     1
Introduction



               2
X3DOM – Purpose and High-level Overview                          [1]




• Experimental open source framework and runtime for
  X3D
   – The library is written in JavaScript
   – Implementation was initially done for discussing integration of
     HTML5 and declarative 3D content
• Goal
   – To have a live X3D scene that can be manipulated through
     HTML DOM
   – No plugins required when WebGL support is available




                                                                       3
Background - X3D


• ”A royalty-free open standards file format and run-time
  architecture to represent and communicate 3D scenes
  and objects using XML” [2]
• An analogy: X3D is to 3D what SVG is to 2D
  (at least could be)
• A very extensive set of specifications that creates a
  modular architecture with layered ”profiles” [2]
• X3D Baseline Profiles: [2]
   – Interchange (geometry, texturing, basic lighting, animation)
   – Interactive (basic interaction, timing, additional lighting)
   – Immersive (full 3D graphics and interaction, e.g. audio,
     collision, fog, and scripting)
   – Full (all defined nodes; NURBS, H-Anim, GeoSpatial)
                                                                    4
Background – Applying X3D in X3DOM


• When using a web browser as an X3D runtime, the
  focus is slightly different from the basic profiles
   – X3D defines Scene Access Interface (SAI), but web browser
     readily provide DOM
   – Browsers also readily implement scripting capabilities
     (JavaScript)
  → X3DOM group proposes a new X3D profile, HTML
  that extends X3D-Interchange profile[3][4]




              X3DOM integration model[3]
                                                                 5
X3DOM – Status of the Implementation[5]


• Homepage: http://www.x3dom.org/
• Dual licensed under MIT and GPL licenses.
• Latest stable version is 1.1 (22.10.2010)
   – Version 1.0 released 7 months earlier
• More recent dev version is also available
   – Under active development
   – Already new features such as navigation modes and smooth
     camera animation added to dev version[6]
• Roadmap available up to version 1.2[7]



                                                                6
X3DOM - Features


• A complete list of features is missing
   – Release notes for version 1.0 and 1.1 list new features
   – Examples in the homepage demonstrate some features
• Features (as we know)
   –   Support for loading and displaying X3D models
   –   Manupulation of the scene via DOM
   –   HTML events (onclick, etc.) on 3D objects
   –   Support for large meshes (>65k indices per mesh)
   –   Textures (images and movies) and sound
   –   Transparency, fog and shadows
   –   Multiple light sources (spot, point, directional)
   –   Animations (mesh, camera)
   –   Fallback model for non-WebGL browsers
                                                               7
Technical Overview



                     8
Technical Overview


• Library in a single JavaScript file (x3dom.js)
• When loaded, creates new a DOM object, x3dom
• When loaded, X3DOM automatically parses the HTML
  document for 3D-models
   – Specifically, 3D-models specified inside <x3d> tag
• 3D model is displayed using best possible alternative,
  according to a fallback model (see next slide)
   – Theoretically speaking, a web browser could natively support
     displaying X3D models (option 1)
   – Second preferred alternative is an X3D/SAI plugin (2)
   – WebGL is only the third alternative in the model (3)
   – Non-webGL browser could still use Flash (4)
   – If everything else fails, display alternative content (5)
                                                                    9
Fallback-model[8]




                    10
Technical Overview (Continued)


• Key in X3DOM's usage is X3D markup
   – A standardised binding for XML is available[9]
• Navigation capabilities are provided by the library
  (dev version)
• Build-in navigation modes[10]
• → X3DOM is an X3D model viewer/player for web
  browsers




                                                        11
Examples



           12
”Hello World” (1/2) [11]


• Hello X3D World – demonstrates how a simple X3D
  scene can be displayed in browser




                                                    13
”Hello World” (2/2)


• HTML file structure:
                                                 XHTML document
  <!DOCTYPE html … >
  <html xmlns="http://www.w3.org/1999/xhtml">
   <body>
    <X3D xmlns="http://www.web3d.org...” width=...>
      <Scene>
       <Shape>
        <Appearance>                                          Embedded
          <Material diffuseColor='1 0 0' />
        </Appearance>
                                                                   X3D
        <Box DEF='box'/>                                        content
       </Shape>
      </Scene>
    </X3D>
    <script type="text/javascript" src="x3dom.js"></script>
   </body>
  </html>
                                     Loads X3DOM library
                                                                          14
Render Feature Examples


• Single Mesh Model with flat hierarchy
   – http://x3dom.org/x3dom/example/x3dom_singleMesh-small.xhtml
• Multiple textures:
   – http://x3dom.org/x3dom/example/x3dom_texture.xhtml
• Multiple animated lights:
   – http://x3dom.org/x3dom/example/x3dom_animatedLights.xhtml
• Fog:
   – http://x3dom.org/x3dom/example/x3dom_fog.xhtml
• Shadows:
   – http://x3dom.org/x3dom/example/x3dom_shadows.xhtml



                                                                   15
Navigating an X3D Model


• http://x3dom.org/x3dom/example/x3dom_walkThrough.html
• Navigate using X3DOM's built-in navigation keys:
   – Examine mode ('E') – rotate, pan, zoom, set center of
     rotation
   – Walk mode ('W') – move forward/backward
   – Fly mode ('F') – same as walk
   – Look at ('L') – move closer/farther




                                                             16
Mashup Application Example


• Ajax Mashup: Combining Flickr Data and Physics
   – By Michael Zoellner
• http://dev.m05.de/x3dom/flickrdump/




                                                   17
Evaluation



             18
Evaluation (1/2)


• Benefits
   –   Easy to start using
   –   Works as an X3D player without any additional programming
   –   Integration to DOM → nicely works with for instance jQuery
   –   Has a fallback model for non-WebGL browsers
• Drawsbacks
   – Scattered documentation (a lot of examples, not
   – More like an X3D player than a WebGL framework
   – Supports only X3D content (conversions needed)
   – Fallback model is, well, just a model – it has not been fully
     implemented
   – Testing not comprehensive


                                                                     19
Evaluation (2/2)


• General Usefulness
   – Sweet spot: display X3D content in web browsers
   – Stable enough for most prototypes, stability for production is
     very questionable
   – The more you need low-level customisations, the less useful
     X3DOM is
• Measurements
   – Active community, but … very much W3C/Web3D driven →
     reference implemention is more important than production-
     readiness




                                                                      20
Summary



          21
Summary


• X3DOM is a maturing X3D library for web browsers
   – Not actually a WebGL framework, but more like an X3D viewer
     with notable emphasis on WebGL
• Fulfills its promise in exploring X3D's HTML integration
   – From this point of view, the library is surprisingly good
• At this point, could recommend for content-driven
  prototyping
   – For instance, when we already have X3D content which we
     want to display in a web browser




                                                                   22
Thank you!


• Questions?




               23
References


[1] http://www.x3dom.org/?page_id=2
[2] http://www.web3d.org/about/overview/
[3] http://www.x3dom.org/?page_id=158
[4] Behr, J., Eschler, P., Jung, Y., Zöllner, M. (200). X3DOM – A DOM-based HTML5/X3D
Integration Model. In Web3D '09: Proceedings of the 14 th International Conference on 3D Web
Technology.
[5] http://www.x3dom.org/?page_id=7
[6] http://www.x3dom.org/?p=1443
[7] http://sourceforge.net/apps/trac/x3dom/roadmap
[8] http://www.x3dom.org/?page_id=7
[9] http://www.web3d.org/x3d/specifications/ISO-IEC-19776-X3DEncodings-All-Edition-1/
[10] http://www.x3dom.org/?page_id=293
[11] http://x3dom.org/x3dom/example/x3dom_helloWorld.html




                                                                                               24

Mais conteúdo relacionado

Mais procurados

Ipv6 소켓프로그래밍
Ipv6 소켓프로그래밍Ipv6 소켓프로그래밍
Ipv6 소켓프로그래밍
Heo Seungwook
 

Mais procurados (20)

ProxySQL on Kubernetes
ProxySQL on KubernetesProxySQL on Kubernetes
ProxySQL on Kubernetes
 
2022 COSCUP - Let's speed up your PostgreSQL services!.pptx
2022 COSCUP - Let's speed up your PostgreSQL services!.pptx2022 COSCUP - Let's speed up your PostgreSQL services!.pptx
2022 COSCUP - Let's speed up your PostgreSQL services!.pptx
 
PostgreSQL and Benchmarks
PostgreSQL and BenchmarksPostgreSQL and Benchmarks
PostgreSQL and Benchmarks
 
Ipv6 소켓프로그래밍
Ipv6 소켓프로그래밍Ipv6 소켓프로그래밍
Ipv6 소켓프로그래밍
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
 
Docker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutesDocker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutes
 
Distributed fun with etcd
Distributed fun with etcdDistributed fun with etcd
Distributed fun with etcd
 
Flutterでscroll viewとexpandedを併用してsign in sign up画面 などの レイアウトを作成する
Flutterでscroll viewとexpandedを併用してsign in sign up画面 などの レイアウトを作成するFlutterでscroll viewとexpandedを併用してsign in sign up画面 などの レイアウトを作成する
Flutterでscroll viewとexpandedを併用してsign in sign up画面 などの レイアウトを作成する
 
presentation on Docker
presentation on Dockerpresentation on Docker
presentation on Docker
 
Visual Studio를 이용한 어셈블리어 학습 part 2
Visual Studio를 이용한 어셈블리어 학습 part 2Visual Studio를 이용한 어셈블리어 학습 part 2
Visual Studio를 이용한 어셈블리어 학습 part 2
 
[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)
[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)
[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)
 
Solaris Linux Performance, Tools and Tuning
Solaris Linux Performance, Tools and TuningSolaris Linux Performance, Tools and Tuning
Solaris Linux Performance, Tools and Tuning
 
Web開発者が始める .NET MAUI Blazor App
Web開発者が始める .NET MAUI Blazor AppWeb開発者が始める .NET MAUI Blazor App
Web開発者が始める .NET MAUI Blazor App
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConAnatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
 
react-scriptsはwebpackで何をしているのか
react-scriptsはwebpackで何をしているのかreact-scriptsはwebpackで何をしているのか
react-scriptsはwebpackで何をしているのか
 
ヤフー社内でやってるMySQLチューニングセミナー大公開
ヤフー社内でやってるMySQLチューニングセミナー大公開ヤフー社内でやってるMySQLチューニングセミナー大公開
ヤフー社内でやってるMySQLチューニングセミナー大公開
 
DDDのモデリングとは何なのか、 そしてどうコードに落とすのか
DDDのモデリングとは何なのか、 そしてどうコードに落とすのかDDDのモデリングとは何なのか、 そしてどうコードに落とすのか
DDDのモデリングとは何なのか、 そしてどうコードに落とすのか
 
190119 unreal engine c++ 입문 및 팁
190119 unreal engine c++ 입문 및 팁190119 unreal engine c++ 입문 및 팁
190119 unreal engine c++ 입문 및 팁
 
FreeBSD jail+vnetと戯れた話
FreeBSD jail+vnetと戯れた話FreeBSD jail+vnetと戯れた話
FreeBSD jail+vnetと戯れた話
 

Semelhante a X3DOM - An Overview and Examples

Rest3d BOF presentation at SigGraph 2013
Rest3d BOF presentation at SigGraph 2013Rest3d BOF presentation at SigGraph 2013
Rest3d BOF presentation at SigGraph 2013
Remi Arnaud
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
Ron Reiter
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
Andrew Ferrier
 
3D Geo-standaarden workshop
3D Geo-standaarden workshop3D Geo-standaarden workshop
3D Geo-standaarden workshop
Léon Berlo
 

Semelhante a X3DOM - An Overview and Examples (20)

Introduction to 3D Mapping with X3D
Introduction to 3D Mapping with X3DIntroduction to 3D Mapping with X3D
Introduction to 3D Mapping with X3D
 
Rest3d BOF presentation at SigGraph 2013
Rest3d BOF presentation at SigGraph 2013Rest3d BOF presentation at SigGraph 2013
Rest3d BOF presentation at SigGraph 2013
 
Interacting with In Mrs. Goldberg’s Kitchen
Interacting with In Mrs. Goldberg’s KitchenInteracting with In Mrs. Goldberg’s Kitchen
Interacting with In Mrs. Goldberg’s Kitchen
 
three.js WebGL library presentation
three.js WebGL library presentationthree.js WebGL library presentation
three.js WebGL library presentation
 
Collada Overview GDC 2009
Collada Overview GDC 2009Collada Overview GDC 2009
Collada Overview GDC 2009
 
Javascript Update May 2013
Javascript Update May 2013Javascript Update May 2013
Javascript Update May 2013
 
Introduction to X3D
Introduction to X3DIntroduction to X3D
Introduction to X3D
 
XUL - Mozilla Application Framework
XUL - Mozilla Application FrameworkXUL - Mozilla Application Framework
XUL - Mozilla Application Framework
 
Initiation & hands-on Moovweb 5's new feature
Initiation & hands-on Moovweb 5's new featureInitiation & hands-on Moovweb 5's new feature
Initiation & hands-on Moovweb 5's new feature
 
FIWARE Developers Week_Bootcamp_presentation
FIWARE Developers Week_Bootcamp_presentationFIWARE Developers Week_Bootcamp_presentation
FIWARE Developers Week_Bootcamp_presentation
 
Drupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with DrupalDrupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with Drupal
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
 
In the DOM, no one will hear you scream
In the DOM, no one will hear you screamIn the DOM, no one will hear you scream
In the DOM, no one will hear you scream
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
Duke Docker Day 2014: Research Applications with Docker
Duke Docker Day 2014: Research Applications with DockerDuke Docker Day 2014: Research Applications with Docker
Duke Docker Day 2014: Research Applications with Docker
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 
Front end for back end developers
Front end for back end developersFront end for back end developers
Front end for back end developers
 
Sx sw speaker proposal slides
Sx sw speaker proposal slidesSx sw speaker proposal slides
Sx sw speaker proposal slides
 
3D Geo-standaarden workshop
3D Geo-standaarden workshop3D Geo-standaarden workshop
3D Geo-standaarden workshop
 
Begining Android Development
Begining Android DevelopmentBegining Android Development
Begining Android Development
 

X3DOM - An Overview and Examples

  • 1. X3DOM An Overview and Examples WebGL Seminar, 7.1.2011 Tampere University of Technology Jaakko Salonen Tampere University of Technology Hypermedia Laboratory 1
  • 3. X3DOM – Purpose and High-level Overview [1] • Experimental open source framework and runtime for X3D – The library is written in JavaScript – Implementation was initially done for discussing integration of HTML5 and declarative 3D content • Goal – To have a live X3D scene that can be manipulated through HTML DOM – No plugins required when WebGL support is available 3
  • 4. Background - X3D • ”A royalty-free open standards file format and run-time architecture to represent and communicate 3D scenes and objects using XML” [2] • An analogy: X3D is to 3D what SVG is to 2D (at least could be) • A very extensive set of specifications that creates a modular architecture with layered ”profiles” [2] • X3D Baseline Profiles: [2] – Interchange (geometry, texturing, basic lighting, animation) – Interactive (basic interaction, timing, additional lighting) – Immersive (full 3D graphics and interaction, e.g. audio, collision, fog, and scripting) – Full (all defined nodes; NURBS, H-Anim, GeoSpatial) 4
  • 5. Background – Applying X3D in X3DOM • When using a web browser as an X3D runtime, the focus is slightly different from the basic profiles – X3D defines Scene Access Interface (SAI), but web browser readily provide DOM – Browsers also readily implement scripting capabilities (JavaScript) → X3DOM group proposes a new X3D profile, HTML that extends X3D-Interchange profile[3][4] X3DOM integration model[3] 5
  • 6. X3DOM – Status of the Implementation[5] • Homepage: http://www.x3dom.org/ • Dual licensed under MIT and GPL licenses. • Latest stable version is 1.1 (22.10.2010) – Version 1.0 released 7 months earlier • More recent dev version is also available – Under active development – Already new features such as navigation modes and smooth camera animation added to dev version[6] • Roadmap available up to version 1.2[7] 6
  • 7. X3DOM - Features • A complete list of features is missing – Release notes for version 1.0 and 1.1 list new features – Examples in the homepage demonstrate some features • Features (as we know) – Support for loading and displaying X3D models – Manupulation of the scene via DOM – HTML events (onclick, etc.) on 3D objects – Support for large meshes (>65k indices per mesh) – Textures (images and movies) and sound – Transparency, fog and shadows – Multiple light sources (spot, point, directional) – Animations (mesh, camera) – Fallback model for non-WebGL browsers 7
  • 9. Technical Overview • Library in a single JavaScript file (x3dom.js) • When loaded, creates new a DOM object, x3dom • When loaded, X3DOM automatically parses the HTML document for 3D-models – Specifically, 3D-models specified inside <x3d> tag • 3D model is displayed using best possible alternative, according to a fallback model (see next slide) – Theoretically speaking, a web browser could natively support displaying X3D models (option 1) – Second preferred alternative is an X3D/SAI plugin (2) – WebGL is only the third alternative in the model (3) – Non-webGL browser could still use Flash (4) – If everything else fails, display alternative content (5) 9
  • 11. Technical Overview (Continued) • Key in X3DOM's usage is X3D markup – A standardised binding for XML is available[9] • Navigation capabilities are provided by the library (dev version) • Build-in navigation modes[10] • → X3DOM is an X3D model viewer/player for web browsers 11
  • 12. Examples 12
  • 13. ”Hello World” (1/2) [11] • Hello X3D World – demonstrates how a simple X3D scene can be displayed in browser 13
  • 14. ”Hello World” (2/2) • HTML file structure: XHTML document <!DOCTYPE html … > <html xmlns="http://www.w3.org/1999/xhtml"> <body> <X3D xmlns="http://www.web3d.org...” width=...> <Scene> <Shape> <Appearance> Embedded <Material diffuseColor='1 0 0' /> </Appearance> X3D <Box DEF='box'/> content </Shape> </Scene> </X3D> <script type="text/javascript" src="x3dom.js"></script> </body> </html> Loads X3DOM library 14
  • 15. Render Feature Examples • Single Mesh Model with flat hierarchy – http://x3dom.org/x3dom/example/x3dom_singleMesh-small.xhtml • Multiple textures: – http://x3dom.org/x3dom/example/x3dom_texture.xhtml • Multiple animated lights: – http://x3dom.org/x3dom/example/x3dom_animatedLights.xhtml • Fog: – http://x3dom.org/x3dom/example/x3dom_fog.xhtml • Shadows: – http://x3dom.org/x3dom/example/x3dom_shadows.xhtml 15
  • 16. Navigating an X3D Model • http://x3dom.org/x3dom/example/x3dom_walkThrough.html • Navigate using X3DOM's built-in navigation keys: – Examine mode ('E') – rotate, pan, zoom, set center of rotation – Walk mode ('W') – move forward/backward – Fly mode ('F') – same as walk – Look at ('L') – move closer/farther 16
  • 17. Mashup Application Example • Ajax Mashup: Combining Flickr Data and Physics – By Michael Zoellner • http://dev.m05.de/x3dom/flickrdump/ 17
  • 19. Evaluation (1/2) • Benefits – Easy to start using – Works as an X3D player without any additional programming – Integration to DOM → nicely works with for instance jQuery – Has a fallback model for non-WebGL browsers • Drawsbacks – Scattered documentation (a lot of examples, not – More like an X3D player than a WebGL framework – Supports only X3D content (conversions needed) – Fallback model is, well, just a model – it has not been fully implemented – Testing not comprehensive 19
  • 20. Evaluation (2/2) • General Usefulness – Sweet spot: display X3D content in web browsers – Stable enough for most prototypes, stability for production is very questionable – The more you need low-level customisations, the less useful X3DOM is • Measurements – Active community, but … very much W3C/Web3D driven → reference implemention is more important than production- readiness 20
  • 21. Summary 21
  • 22. Summary • X3DOM is a maturing X3D library for web browsers – Not actually a WebGL framework, but more like an X3D viewer with notable emphasis on WebGL • Fulfills its promise in exploring X3D's HTML integration – From this point of view, the library is surprisingly good • At this point, could recommend for content-driven prototyping – For instance, when we already have X3D content which we want to display in a web browser 22
  • 24. References [1] http://www.x3dom.org/?page_id=2 [2] http://www.web3d.org/about/overview/ [3] http://www.x3dom.org/?page_id=158 [4] Behr, J., Eschler, P., Jung, Y., Zöllner, M. (200). X3DOM – A DOM-based HTML5/X3D Integration Model. In Web3D '09: Proceedings of the 14 th International Conference on 3D Web Technology. [5] http://www.x3dom.org/?page_id=7 [6] http://www.x3dom.org/?p=1443 [7] http://sourceforge.net/apps/trac/x3dom/roadmap [8] http://www.x3dom.org/?page_id=7 [9] http://www.web3d.org/x3d/specifications/ISO-IEC-19776-X3DEncodings-All-Edition-1/ [10] http://www.x3dom.org/?page_id=293 [11] http://x3dom.org/x3dom/example/x3dom_helloWorld.html 24