Introduction
VRML, the Virtual Reality Modeling Language, was the first standard for 3D scenes on
the web. Version 1.0 appeared in 1995, based on the file format of SGI’s Open
Inventor. VRML 2.0 followed in 1996 with animation, sound and scripting, and became
the ISO standard VRML97. Files are called worlds and use the extension
.wrl; gzip-compressed worlds often use .wrz.
Browser plugins for VRML have long gone, and its successor is X3D. VRML is still written by CAD, scientific and 3D printing software as a simple way to export coloured meshes.
Structure
A VRML97 file is text. The first line is #VRML V2.0 utf8: the version and
the character set (VRML 1.0 starts
#VRML V1.0 ascii and its syntax differs). The rest is a tree of nodes, each a type name
followed by its fields in braces. Common nodes are Transform,
Shape, Appearance, Material and
IndexedFaceSet, whose coordIndex lists each face’s vertices
and ends it with -1.
#VRML V2.0 utf8
Shape {
appearance Appearance { material Material { diffuseColor 0 0.5 1 } }
geometry IndexedFaceSet {
coord Coordinate { point [ 0 0 0, 1 0 0, 0 1 0 ] }
coordIndex [ 0, 1, 2, -1 ]
}
}
In this reference
- Syntax and field types – the header, separators, names, statements, prototypes and routes, and the twenty field types
- Nodes – all 54 VRML97 nodes with every field, event, default and range
Also used for
- VRML world – The first web 3D standard: VRML 1.0 and VRML97 text worlds, still used to export meshes.
- VRML world (gzip-compressed) – A gzip-compressed VRML world; unpack it to read the .wrl text.
Not described
What this reference and the explorer leave out.
- Reference: written without the ISO/IEC 14772 text to check against; the sub-pages were not verified line by line. External prototypes, event cascade rules and browser behaviour are described only briefly.
- Viewer: draws Group, Transform, Switch, LOD, Shape and PROTO instances with material colours. Textures, lighting, transparency, Text, Inline, animation, sensors and scripts are not drawn or run; they are listed, and Script source is shown as text. A bare word where a value belongs (as Live3D files wrote) is read and reported.
Variants
- VRML 1.0 – the 1995 version, based on Open Inventor: a state machine of properties and shapes inside Separator nodes
- VRML97 – VRML 2.0, ISO/IEC 14772: a scene graph with PROTO, ROUTE, sensors and scripts
- X3D classic encoding – the same text syntax as VRML97, with PROFILE, COMPONENT and META statements (.x3dv)
Links
Software
- Castle Model Viewer – free viewer for VRML, X3D and other 3D formats (Windows, macOS, Linux)
- MeshLab – free open source mesh viewer and editor (Windows, macOS, Linux)
- Blender – free open source 3D suite that reads and writes VRML through its X3D add-on (Windows, macOS, Linux)
Developers
- X_ITE – X3D browser for web pages that also loads VRML (JavaScript)
Reference
- Web3D Consortium – the standards body that maintains VRML97 and X3D