1 / 46

Virtual Reality Modeling Language (VRML)

Virtual Reality Modeling Language (VRML). Peter O’Grady. VRML. Background Example VRML Versions VRML language Creating a VRML world. VRML - Background. Sometimes pronounced “vermel”. A language for building 3-D worlds on the WWW. Use a VRML browser to walk around virtual world.

Download Presentation

Virtual Reality Modeling Language (VRML)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Virtual Reality Modeling Language (VRML) Peter O’Grady

  2. VRML • Background • Example VRML • Versions • VRML language • Creating a VRML world

  3. VRML - Background • Sometimes pronounced “vermel”. • A language for building 3-D worlds on the WWW. • Use a VRML browser to walk around virtual world. • Browser downloads file containing description of world (in VRML format). • Browser interprets scene descriptions and renders the resulting image.

  4. VRML - Background (2) • Manipulation is performed on client (host) computer. • Use of 3-D cards can speed performance. • Rendering performed through lens of a virtual camera. • Can move, twist and twirl. • Can alter lighting.

  5. Using VRML VRML Renderer usually browser plug-in or ActiveX control VRML text file *.wrl

  6. VRML - History • WWW conference in March 1994 - basic requirements defined. • WWW conference October 1994 - draft specification of VRML 1.0 presented. • Used language from a 3-D modeler • Version 1.0 introduced April 1995. • Version 97 now available and in use

  7. VRML Versions • 1.0 Initial version. Static images. • 97 aims to be multi-user, objects defined their behavior, “participants” can see each other

  8. VRML Language • VRML 97 provides these extensions and enhancements to VRML 1.0: • Enhanced static worlds • Interaction • Animation • Scripting • Prototyping

  9. VRML Language • Script-like language in ASCII text • Given extension .wrl • For easy identification of VRML files, every VRML 97 file must begin with the characters: #VRML V2.0 utf8 • Scene graphs consist of “nodes” • Each node has attributes • See example on web site

  10. VRML Working Process • Generation of a VRML file • Transmission of VRML file to viewer • Viewing of VRML world • Interacting with the VRML world

  11. The Structure of VRML • VRML can be viewed at a high level of abstraction as a collection of objects which are called nodes. • These objects, or nodes, are defined for 3D graphics • Nodes are arranged in hierarchical structures called scene graphs, which define an ordering for the nodes.

  12. The Structure of VRML • This was originally based on the Open Inventor 3D toolkit developed by SGI, for VRML 1.0. • The scene graph represents such aspects of a 3D world as geometry, materials, textures, geometric transformations, lights, viewpoints, and nesting structures.

  13. Characteristics of a Node • A node might be a cube, a sphere, a texture map, a transformation, etc. • The node has parameters that distinguish the node from other nodes of the same type. • The node has a name. • The node can be part of a hierarchy.

  14. Enhancement of VRML • VRML 97 adds five constructs to VRML 1.0 that can significantly improve a 3D world. • Four of these (namely node event field, routes, sensors, interpolators) connect and control animations, actions and reactions. • The fifth (script nodes) allows for the interface with JavaScript or Java programs.

  15. Enhancement of VRML • In addition, VRML 97 allows for video images (in MPEG format) to be mapped to a surface, collision detection, fog, text that always points to the user, contoured terrains, and texture mapped backgrounds.

  16. VRML Language -Nodes • Cylinder { bottom TRUE height 2 radius 1 side TRUE top TRUE }

  17. VRML Language -Nodes • Cone { bottomRadius 1 height 2 side TRUE bottom TRUE }

  18. VRML Language -Nodes • Box { size 2 2 2 }

  19. VRML Language -Nodes • Sphere { radius 1}

  20. Coordinate Systems and Transformations • VRML uses a Cartesian, right-handed, 3-dimensional coordinate system. • By default, objects are projected onto a 2-dimensional display device by projecting them in the direction of the positive Z-axis, with the positive X-axis to the right and the positive Y-axis up.

  21. VRML Language -Nodes • Transform { children [ ] scale 1 1 1 translation 0 0 0 }

  22. VRML Language -Nodes • Coordinate { point [ ] }

  23. VRML Language -Nodes • Color { color [ ] }

  24. VRML Language -Nodes • PointSet { color NULL coord NULL}

  25. VRML Language -Nodes • IndexedFaceSet { color NULL coord NULL coordIndex [ ] normalIndex [ ] normalPerVertex TRUE solid TRUE }

  26. VRML Language -Nodes • Appearance { material NULL texture NULL textureTransform NULL }

  27. VRML Language • Material - with attributes such as diffuseColor, and shininess • diffuseColor 0 0 0 is black, 1 1 1 is white • shininess 1.0 is highly reflective • Translation - to specify position of object • Level of Detail (LOD) nodes allow varying level of detail with distance • WWWAnchor creates link to another VRML world

  28. Example 1 - source code #VRML V2.0 utf8 DEF Machine3 Transform { translation 2 0 0 rotation 0 1 0 0 children [ Shape { geometry Box { size 6 10 6 } appearance Appearance { material Material { diffuseColor 0.2 0 0.8 } }

  29. Example 2 - source code

  30. Example 2 - VRML World

  31. Creating VRML Worlds • Free formed surfaces, such as that arising from imaging, are not included in the VRML specification. • Therefore, a set of polygons should approximate to a free-formed surface or curve.

  32. Creating VRML Worlds • For the purpose of rendering and shading the created polygons, their normal vectors are calculated and given to the respective polygons. • Suppose that the surface is an imaging object. Then, the surface is translated into a VRML file format.

  33. Creating VRML Worlds - One Proposal

  34. Working With VRML • Native code • Converters • Software that produces VRML code • Can be large files - problem is to make the code efficient • IIL work gives about 100:1 reduction from original data set.

  35. Examples - See IIL Site • Data from MRI • Data from CT • Lung • Lung and tumor

  36. VRML and Medical Applications • Visualization over WWW • Need advanced methods to map from data to VRML. • Acceleration • 3D boards • Better software

  37. Medical Applications - Creation of Virtual Reality Worlds from Medical Imaging Data • Image Segmentation • VRML Mapping

  38. Literature on Medical Image Segmentation • Manually • Automatically • Semi-automatically • Thresholding • Boundary finding • Mathematical Morphology • Region Growing

  39. Literature on Medical Image Segmentation • Segmentation is a challenging task, especially considering an organ like the lung. • Much of the work on lung segmentation has involved manual segmentation (Naidich et al, 1993) but this involves considerable labor and can be prone to bias.

  40. Literature on Medical Image Segmentation • Two Dimensional (2D) images require that the physician mentally determine 3D images from 2D slices, and this is difficult and error prone. • The fundamental problems with current approaches to 3D display of scans are that they are not interactive once reported.

  41. Boundary Identification (2D Segmentation) • Grouping Analysis • Vx(Px,y,z) = ABS((MEAN (Px-p,y,z ,…. Px-2,y,z , Px-1,y,z )-MEAN (Px+1,y,z , Px+2,y,z , …Px+p,y,z ))

  42. Case Study - Lung/Tumor

  43. Case Study - Lung/Tumor

  44. Other Considerations • Variety of VRML browsers available. • Netscape uses Cosmo player (from SGI, CA) for VRML • Microsoft new browser with IE 4 • For Windows 9x, Direct3D has been defined. • 3D Boards now have Direct3D drivers • Need to have VRML browser with Direct3D support.

More Related