An Introduction to Virtual Reality Modeling Language 1.0 (VRML 1.0)
Steven K. Feiner
Department of Computer Science
Columbia University
Goal
- Universal language for specifying multi-user, interactive
simulations:
- 3D display
- interaction
- networking through Internet/WWW
Reality
- VRML Version v1.0 allows
- static 3D models (worlds)
- WWW links to other VRML models, HTML, and MIME.
- Browsers support
- loading models
- navigation
- selecting links
Example Browser
History
- Spring 1994, First WWW Conf., Geneva: Need expressed for
common language for 3D scenes with WWW links ("HTML for VR"):
- VRML (Virtual Reality Markup Language)
- Mailing list created. Moderator Mark Pesce announces
intent to have draft spec ready for Fall 1994 WWW Conf.
- Decision not to extend HTML, but to adapt existing format.
- Choose SGI Open Inventor ASCII File Format:
- Select subset
- Extend for networking.
- Gavin Bell (SGI) adapts file format, Paul Strauss (SGI) develops
parser to be released by SGI.
Language
- Node: Container for objects.
- Scene graph: Ordered hierarchy of nodes
- Scene graph has state: Earlier nodes can affect later ones
Syntax
Programs
Nodes
- Shape: Specify geometry
- AsciiText, Cone, Cube, Cylinder, IndexedFaceSet, IndexedLineSet, PointSet, Sphere
Sample shapes
- Property: Affect how shapes are drawn
- Geometry/appearance: Coordinate3, FontStyle, Material,
MaterialBinding, Normal, NormalBinding, Texture2, Texture2Transform,
TextureCoordinate2, ShapeHints
- Matrix/transform: MatrixTransform, Rotation, Scale,
Transform, Translation
- Camera: OrthographicCamera, PerspectiveCamera
- Light: DirectionalLight, PointLight, SpotLight
- Group: Induce hierarchy, etc.
- Traversal State: Separator
- Conditional: LOD, Switch
- Link: WWWAnchor, WWWInline
- Miscellaneous
Fields
- Single-valued: Name begins with "SF"
- Multiple-valued: Name begins with "MF"
Traversal State
- Traversal state:Value of all properties (geometry,
appearance, transform, camera, light)
- Properties are global: affect/are affected by nodes in order enountered
- Separator: Pushes state, traverses children, pops state
Linking
Instancing
- Node definition (named)
DEF objectname objecttype { fields children }
- Defines a named object and creates an instance of it
- Node instancing
USE objectname
- Creates instance of most recently defined node of that name
- Names are not shared between files
- Example
Separator {
DEF Box Cube {width 1.5 height 3}
Separator {
Translation {translation 4 0 0}
DEF Box Cube {width 1}
}
Translation {translation 0 4 0}
USE Box
}
- Creates 2 instances of second, smaller Cube
Extensibility
- Non-standard nodes can be defined using a standard self-describing
syntax:
Cube {
fields [ SFFloat width, SFFloat height, SFFloat depth ]
width 2 height 2 depth 2
}
- A VRML 1.0 implementation must parse all properly defined nodes, but may
ignore them.
- It is not an error to specify fields for a standard VRML 1.0 node.
- Is-a relationships
Die {
fields [ MFString isA
SFFloat width, SFFloat height, SFFloat depth
SFFloat bevel ]
isA [ "BeveledCube" "Cube" ]
width 2 height 2 depth 2
bevel .1
}
- Means that a Die will be treated, in order of preference, as a
BeveledCube or Cube by a VRML 1.0 implementation that doesn't support Die.
Examples
References
G. Bell, A. Parisi, and M. Pesce,
The Virtual
Reality Modeling Language Version 1.0 Specification
VRML*Tech: The Virtual
Reality Modeling Language Technical Forum
Virtual Reality Modeling Language
Repository
Template Graphics Software, Inc.,
Template Graphics Software
Home (Access to WebSpace Navigator v1.0)
National Center for Supercomputer Applications Relativity Group,
NCSA Relativity Group
VRML Page