Tutorial on Current and Future Web(NII) Technologies -- VRML and Applications Supercomputing 95 Monday December 4,1995 San Diego Convention Center NPAC Geoffrey Fox, Wojtek Furmanski, Marek Podgorny with Gang Cheng, Roman Markowski Syracuse University 111 College Place Syracuse NY 13244-4100 Abstract of VRML Presentation This describes VRML starting with its Open Inventor basis with examples of language and its nodes and actions Some Tools and Browsers are summarized Terrain Rendering is given as an example of use of VRML The advantages of using a ÒrealÓ database as a backend of VRML are given Illustra is described as an example of an object oriented database backjend for VRML Open Inventor and VRML -- Introduction Open Inventor is an object-oriented 3D toolkit to create interactive 3D graphics applications. It is also a high-level object-oriented model for specifying, processing, rendering, archiving and managing complex, hierarchical structures such as encountered in 3D design. VRML is intended to be a language for describing multi-participant interactive simulations - virtual worlds networked via global Internet and hyperlinked within the World Wide Web. The first, existing VRML specification is based on the Open Inventor ASCII file format and is a minimal operational subset of Open Inventor extensive class library. Open Inventor -- Overview The library was originally developed by Silicon Graphics, Inc. as the IRIS Inventor library but is now licensed to a number of implementors and is appearing for a range of platforms including Sun, IBM, HP, Windows, Mac and HP. Open Inventor characteristics: ItÕs built on top of OpenGL. It defines a standard file format for 3D data interchange. It introduces a simple event model for 3D interaction. It provides animation objects called ÔEnginesÕ. It is window system and platform independent. It supports PostScript printing. Open Inventor -- Nodes The node is the basic building block used to create three- dimensional scenes in Open Inventor. Each node holds a piece of information, such as a surface material, shape description, geometric information, light or camera. The Open Inventor nodes can be grouped as follows: Shape nodes - representing 3D geometric objects Property node - representing appearance and other qualitative characteristics of the scene such as material, lighting model, textures, or environment Group nodes - containers collecting nodes into groups Engines - can be attached to other nodes and drive animation or impose constraints Sensors - detect changes in the scene database and invoke suitable notification/callback functions Open Inventor -- Database Structure Open Inventor maintains a database of objects. The database contains information representing one or more 3D scenes. The database consists of scene graphs. A scene graph is an ordered collection of nodes. A number of actions can be applied to a scene graph. Open Inventor -- Typical Applications Geophysical Visualization, Commercial Database Visualization, CAD, Desktop Publishing, Modeling and Industrial Design, Computer-based Training, Collaborative Work, Animation, Visual Simulation, Interactive 3D games, Scientific Data, Visualization Presentations, Virtual Reality VRML - Virtual Reality Modeling Language -- Overview Mission Statement: VRML (Virtual Reality Modeling Language) is an interpreted language for describing multi-participant interactive simulations - virtual worlds networked via global Internet and hyperlinked within the World Wide Web. History: VRML concept was proposed by Tim Berners-Lee and David Ragget in spring Ô94 during the first WWW conference in Geneva. After the conference the VRML forum was created by Mark Pesce to discuss the development of a specification. In May Ô95 the first version of specification was available. Current status: VRML is still under development. The currently available specification describes version 1.0. Next version - 1.1 will specify only small changes. Version 2.0 is expected in May Ô96. VRML Goals The current form of VRML has been strongly influenced by the following requirements: - Platform independence - Extensibility - Ability to work over low-bandwidth connections VRML -- Specification The current version of VRML specification - 1.0 is a minimal starting point for a much larger concept. The specification is based on Open Inventor ASCII file format. VRML 1.0 is a subset of Open Inventor with some additions that allow linking the objects with another VRML or HTML sites on the Web. The linking concept is similar to HREF in HTML. VRML 1.0 provides only mechanisms for synthetic 3D Òclickable worldsÓ and does not specify yet any constructs for object animation, behavior and interaction. These issues are currently under intense discussion by the VRML forum and will be included in version 2.0 of the language. VRML - Language characteristics Basics: VRML defines a set of objects that can describe 3D graphics - nodes. Nodes are arranged in hierarchical structures - scene graphs Scene graphs define the ordering for the nodes - the state of the scene graph depends on the earlier and affects later nodes. Separators can limit the effects allowing parts of the scene to be isolated from other parts. Nodes are characterized by the following information: Kind of object: cube, sphere, texture map, transformation, etc. The parameters that describe the object, The optional name of the object, For some types of nodes - group nodes - the child nodes can be specified Example I - Shapes Shape nodes (Cube, Sphere) define the geometry of the objects in the scene. Example II - Properties The Material node defines the current surface material properties for all subsequent shapes. Example III - Group Nodes Separator node isolates its children from the rest of the scene graph. Example IV - Textures Texture node defines the texture map used to subsequent shapes. VRML - Nodes I VRML nodes can be classified into three categories: shape nodes - define the geometry in the scene, property nodes - define the way shape nodes are rendered, group nodes - gather other nodes into collections treated as single objects. VRML - Nodes II Shape nodes AsciiText a string of text characters Cone a simple cone along y-axis Cube a cuboid aligned with coordinate axes Cylinder a cylinder along y-axis IndexedFaceSet a polygonal shape IndexedLineSet a polyline shape PointSet a set of points in 3D space Sphere a simple sphere VRML - Nodes III -- Properties nodes Coordinate3 a set of 3D coordinates e.g. for IndexedFaceSet FontStyle font style for AsciiText Info information node LOD - Level-Of-Detail switches between various object representations Material surface material properties MaterialBinding specifies how materials are bound to shapes Normal a set of 3D surface normals, e.g. for IndexedFaceSet NormalBinding specifies how normals are bound to shapes Texture2 texture map and parameters for that map Texture2Transform 2D transformation applied to texture coordinates TextureCoordinate2 a set of 2D coordinates used by textures ShapeHints topology hints for surface rendering MatrixTransform a geometric 3D transformation matrix Rotation 3D rotation (axis and angle) Scale 3D scaling factor Transform a full 3D transform (scale, rotation, translation) Translation a translation by 3D vector OrtographicCamera a parallel projection from a viewpoint PerspectiveCamera a perspective projection from a viewpoint DirectionalLight a light source with rays parallel to a 3D vector PointLight a light source at a fixed 3D location SpotLight a light source with rays inside a cone VRML - Nodes IV Group nodes Group base class for all group nodes Separator encapsulates traversal state by push/pop Switch restricts traversal to one of its children TransformSeparator separator for transformation subspace WWWAnchor attaches URL link to a node or group of nodes Inline node WWWInline URL to a scene graph to be ÒinlinedÓ VRML - Example VRML - Tools Browsers: The browser is a program which reads and renders the VRML file. There are multiple available VRML browsers. Some of them are listed below: AmberGL VRML Browser v1.0, Fountain (AKA Caligari worldSpace), GLView, i3D, NAVFlyer, Pueblo Beta Client, Virtus Voyager, VR Scout, VRealm, VRweb, WebFX, WebOOGL, WebSpace, WebView Modelers: The modeler is a program which can be used to create three-dimensional objects or scenes. List of available modelers supporting VRML includes: ClayWorks, Ez3d Modeler, Fountain/Caligari worldSpace, G Web, Home Space Builder, Medit, Spinner, STRATA StudioPro Blitz, TriSpectives, Virtus WalkThrough Pro, WebSpace Author, World Builder VRML - Browsers VRML browser adopts VRML ascii file (gz compressed) as the communication medium and renders the scene. The MIME type for VRML is x-world/x-vrml The data may be received by the VRML browser itself or by the HTML browser. Possible methods of VRML browser integration: helper application - data is received by HTML browser and is sent to the VRML viewer. stand-alone application - the viewer is able to receive the data itself. integrated application - the HTML and VRML browsers are integrated VRML - Browsers II History The very first 3D-Web browser was written by Tony Parisi & Mark Pesce in early 1994. The first commercial browser: WebSpace - by Silicon Graphics The publication of source code for VRML parsers by Silicon Graphics in late 1994 caused involvement of multiple companies in the process of developing VRML browsers. Current status Commercial and public domain browsers are currently available for almost all platforms Limitations Browsers differ in their support of VRML features such as LOD, Texture-Mapping, and WWW-Anchor. As the result not all VRML worlds can be viewed on all browsers. VRML Browsers - Examples I -- WebSpace WebSpace was released as the first commercial browser. It is joint project of Silicon Graphics, Inc. and Template Graphics Software, Inc. It is built on the Open Inventor platform. It supports dynamic render culling, Level-Of-Detail, WWW-inlines, and texture mapping. The WWW-inline nodes can be local files or URL-s. Texture mapping is fully supported including in-file texture data and URL pointers. The graphics accepted file formats are RGB, JPG, and GIF. The source code of this browser is not available VRML Browsers - Examples II -- SDSC WebView This browser has been developed by the San Diego Supercomputer Center. This is a publicly available VRML browser for SGI and UNIX platforms. It is based on Open GL and Open Inventor formats. It supports most of the VRML 1.0 specification. The source code is publicly available. It cannot handle Textures as URL. The only texture format that it recognizes is SGI RGB. There are also problems with Level-Of-Detail nodes. VRML Browsers - Examples III -- VRWeb This browser was developed in a joint effort involving IICM (Austria), NCSA, and the University of Minnesota. It is publicly available for Unix, SGI, & Windows platforms. The source code for this browser is available. These browsers mostly run on the Mesa Library which is of OpenGL type. However, there are OpenGL versions of VRWeb for SGI, DEC Alpha, and Windows NT. This browser supports most of the VRML 1.0 WWW Inline is not supported on the WWW Version, although is supported in the Hyper-G version. Textures as URL are not supported VRML Browsers - Examples IV -- WebFX Developed by Papersoftware Inc., WebFX plug-in allows rendering of VRML images as embedded objects in Web Browsers such as Netscape. The stand-alone VRML browser for the Windows - WebFX explorer is also available. It supports most of the features of VRML 1.0. Multiple texture formats are supported: GIF, JPG, BMP, RGB, and RAS. Provides extensions for collision detection, sound, and animated textures. WebFX is currently available only for the Windows platform and in the near future it is not expected to support any other platform except Macintosh. Terrain rendering in VRML Data used: 30 meters DEM (Digital Elevation Model) data 30 meters color data - satellite image The whole surface is divided into parts covering areas 20 x 20 points. Each part is modeled in VRML separately. Only lighting is common in the main file. The main file is an ÒindexÓ that indicates the parts of world that should be loaded. While moving the viewpoint above the surface the areas that are no longer necessary disappear and new areas are loaded. The rendering resolution of the an area depends on the distance from the user viewpoint. Terrain rendering in VRML -- VRML modeling The following VRML structures are used to model the terrain data: - IndexedFaceSet - basic shape representing the surface, - Multivalued Material nodes - define colors of points, - LOD - Level-Of-Detail node - specifies portions of data to be loaded with different resolution levels depending on the distance from the viewpoint, - WWWInline enables loading of scene in portions, - WWWAnchor - allows linking with HTML description pages - DirectionalLight - lighting in the scene. Terrain rendering in VRML -- LOD - Level-Of-Detail LOD - Level-Of-Detail is a group node used to allow applications switching between various representations of objects. The child nodes of LOD represent the same object at varying levels of detail. Which child node is used for the representation of specified object depends on the distance between this object and camera. The representations for higher distances have lower resolution. Use of LOD reduces the number of polygons to be displayed and increases the rendering speed. Terrain rendering in VRML Level-Of-Detail - Example Different detail levels are achieved by creating separate VRML files for each part of the surface using different resolutions (see pics). The left picture shows an area of 21x21 points in full resolution. The right picture shows the same area with resolution 5x5 points. Terrain rendering in VRML -- Colors The demonstration uses 24-bit color. The color is information is obtained from the satellite images. The color is defined for each point separately using Material node. The color of a surface connecting points of different colors is interpolated. This solution is 2-5 times faster than the texture mapping. Terrain rendering in VRML -- Creation of VRML files The creation of VRML files is automatic - a special translator has been developed. The elevation data is transformed to a set of points. The color data defines colors of particular points. The points are linked to obtain surfaces. For each area two VRML files are created: with higher and lower resolution for use with LOD nodes. Terrain rendering in VRML -- Optimization Initially files are created in VRML format. To achieve better performance an Open Inventor optimization program - ivfix - is used. It creates an equivalent Open Inventor file. Most of Inventor based VRML viewers accept the full Open Inventor syntax. Terrain rendering in VRML - Example I Example II Database Support for VRML Goal: Enable dynamic data, scene contents and object behavior, and dynamic object interaction to support GIS Current VRML: flat files storage Disadvantages: - static data; - no user information; - virtual worlds chopped into non-interacting fixed-size sections; - no semantic object description, hence limited query possibilities; Proposed extension: use of an object-oriented database system to store VRML data Database Support for VRML The use of database to store data has several advantages: ability to select only the relevant information incremental world delivery to the browser world objects dynamic ability to introduce users to the world ability to support multiversioning objects behavior can be stored as a scripting language As the database system the Illustra ORDBS is used gives support for spatial data, enables introducing new data types, provides an interface to WWW servers. Database Support for VRML System architecture Illustra Database -- Overview The Illustra Server is an Object-Relational DBMS (ORDBMS) It supports Object-Oriented management of rich data types, and at the same time provides an efficient query language based on extensions to industry-standard SQL. Object extensions, called DataBlade modules, define specific kinds of data, extending the SQL. DataBlade modules can be self-contained or can take advantage of data types and functions defined by other DataBlade modules. Illustra Database System -- Object-Relational DBMS The features typical of Relational DBMS: Data access via standard SQL Standard security controls Full server-enforced data integrity Transactions and recovery Performance and scalability Features typical of object-oriented database technologies: Ability to create any data types Optimized access to rich data types Encapsulation, inheritance, polymorphism Direct data access through Object IDs Illustra Database System -- 2D Spatial DataBlade The 2D Spatial DataBlade module defines 10 new data types that describe planar geometric shapes and polygons. The following objects can be represented: - circle - directed graph - ellipse - line segment - path - point - polygon - polygon set - quadrangle - square/rectangle Illustra Database System -- 3D Spatial DataBlade The 3D Spatial DataBlade module adds support for data in three dimensional space. It defines 18 new data types: - 3D unit vector - 3D vector - 3D box - circle - circular arc - ellipse - line segment - path - point and ECS point - polycurve - polygon - polygon set - polyface - polyline and polyarc - polymesh - polysurface - quadrilateral - rectangle Illustra Database System -- Web DataBlade The Web DataBlade module enables use of HTML viewer to access data in the Illustra database, Provides interfaces to WWW server software, Defines the HTML anchor as a data type, Provides remote authoring capabilities.