B582 - Lecture 6.1
VRML for Virtual Environments & Visualization


Outline

  1. Brief history of VRML
  2. Examples of VRML for Vis & VE
  3. VRML - Pros and Cons for VR & Vis
  4. Comparison of low level and high level graphics
  5. Modeling with VRML
  6. Animation & Interaction with VRML
  7. Extending VRML
  8. VRML Software
  9. VRML Repositories & Information Sources

Brief History of VRML

(dates are approximate)

Examples of VRML in Vis & VE

Visualization

Virtual Environments


Pros & Cons of VRML for VR & Vis

Pros

Cons


Comparison of low-level & high-level graphics

 
Low-level graphics High-level graphics
  • examples: OpenGL, DirectX, QuickDraw
  • built around hardware implementation - direct access to hardware features
  • possible to create very efficient or very inefficient code
  • limited set of primitives: points, lines, polygons
  • must specify all parameters (e.g. material, lights, texture coordinates, normals, etc.)
  • good for visualization - geometry derived algorithmically from data at run time
  • programmer devises and maintains own data structure
  • immediate mode rendering - programmer must detect events and re-draw scene and swap buffers when appropriate
  • no fundamental object-oriented paradigm
  • programmer develops all interaction
  • examples: VRML, Open Inventor, Iris Performer
  • independent of hardware - indirect or limited access to hardware features
  • built-in optimizers assure some minimal level of efficiency
  • rich set of primitives: cones, spheres, indexed face sets, etc.
  • usually provides reasonable default behaviors if parameters are not specified explicitly
  • good for simulation or environments - geometry designed by hand prior to run time
  • specific scene graph data structure enforced by language
  • retained mode rendering - system handles all drawing, buffer swaps, and exposure events
  • fundamental object-oriented paradigm
  • default interactors usually provided

Homebuilder analogy from Open Inventor manual: work with raw materials vs. pre-fabricated components


Modeling with VRML

VRML2.0 supports a hierarchical scene graph, similar to Open Inventor or Iris Performer. (Actually, VRML2.0 is more like Performer and less like Inventor and VRML1.0 in that it does not permit state inheritance between siblings.) The modeling units are meters; angles are specified in radians.

VRML 2.0 Modeling Nodes

Geometry
  • Primitive Shapes 
    • Box 
    • Cone 
    • Cylinder 
    • Sphere 
    • Text 
  • Vertex-based Shapes 
    • IndexedLineSet 
    • IndexedFaceSet 
    • PointSet 
  • Other Shapes 
    • ElevationGrid 
    • Extrusion 
Appearance
  • Material 
    • OpenGL-style 
  • Texture 
    • ImageTexture 
    • MovieTexture 
    • PixelTexture 
Appearance-modifying
Geometry
  • Normal* 
  • TextureCoordinate* 
  • TextureTransform 

  •  

     

* explicit for vertex-based shapes; implicit for primitives
Grouping Nodes
  • Group 
  • Transform 
    • scale 
    • rotation 
    • translation 
  • Billboard 
  • Anchor (WWW Link) 
  • LOD (Level of Detail) 
  • Inline 
  • Switch 
  • Collision 
Lights & Camera
  • Lights 
    • DirectionalLight 
    • PointLight 
    • SpotLight 
  • Camera 
    • Viewpoint 
    • NavigationInfo 
Environment
  • Background 
  • Fog 
  • Sound 
    • Sound (ambient) 
    • AudioClip (file access) 

Instancing Method

any node may be given a name (defined with DEF keyword) and then instanced again later in the file (using the USE keyword)

e.g.
        DEF RED_CUBE Shape {
                appearance Appearance {
                        material Material {
                            diffuseColor 1 0 0
                        }
                }
                geometry Cube {}
        }
        :
        :
        Transform {
            translation 10 0 0
            children [
                USE RED_CUBE
            ]
        }
        Transform {
            translation 20 0 0
            children [
                USE RED_CUBE
            ]
        }
 

Translating Models into VRML2.0

Use Inventor (~VRML1.0) as an intermediate file format. Tip: Inventor is an easier file format to read and modify, plus, you can use several SGI desktop tools to view and modify the file (ivview, SceneViewer, gview, showcase). Work with files as long as possible in Inventor format; commit them to VRML as late as possible.

Animation & Interaction with VRML

The VRML1.0 standard supported only static models and hyperlinks. The key additions for VRML2.0 (originally know as the Living Worlds or Moving Worlds standard) are nodes which support animation and interaction and mechanisms for extending VRML through scripting.

VRML2.0 Action & Interaction Nodes

Interpolators
  • ColorInterpolator 
  • CoordinateInterpolator 
  • NormalInterpolator 
  • OrientationInterpolator 
  • PositionInterpolator 
  • ScalarInterpolator 
Timer
  • TimeSensor 
Sensors
  • CylinderSensor 
  • PlaneSensor 
  • ProximitySensor 
  • SphereSensor 
  • TouchSensor 
  • VisibilitySensor 

ROUTE-ing Mechanism


Extending VRML

PROTOtypes

Scripting

EAI - Interfacing Java and VRML


VRML Software


VRML Repositories & Information Sources

Local versions of: (coming soon)