Lighthouse3d.com

Send me bugs and suggestions, please
VRML Script Tutorial
Full list

VRML Interactive Tutorial

Introduction
VRML File Structure
Drawing: Shape node
Geometry Nodes:
Box
Sphere
Cone
Cylinder
PointSet
IndexedLineSet
IndexedFaceSet
Extrusion
ElevationGrid
Example: Chessboard
Text
FontStyle
Appearance
Material
Textures
Image Texture
Movie Texture
Pixel Texture
Texture Coordinate
Texture Transform
Let there be Light
Directional Light
Point Light
Spot Light
Materials with Colored Lights
Hierarchical Node Structures
Group
Transform
Collision
Anchor
Billboard
Switch
Inlining Files
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Creating Paths between events: ROUTE
Generating Events based on Timers or User Actions
Timers
Touch Sensor
Visibility Sensor
Dragging Sensors
Plane Sensor
Sphere Sensor
Cylinder Sensor
Proximity Sensors
Example: Proximity sensor
Interpolators
Color
Coordinate
Normal
Orientation
Position
Scalar
Example
Let the Music Play
Sound
AudioClip
Bindable Nodes
Who Am I: NavigationInfo
Where Am I: ViewPoint
Adding Realism to the world
Background
Fog
Information about your world
WorldInfo
Definition for Auxiliary Nodes
Coordinate
Color
Normal

VRML File Structure


A VRML file always starts with the header:

#VRML V2.0 utf8

The identifier "utf8" which appears on the header lets you use international characters in your VRML models.

Comments start with #, all characters until the end of the line being ignored.

After the header the following can appear:
nodes
prototypes
routes
In the next sections one shall see what each of the above is used for.

Note: For precise syntax and semantic definition please consult the VRML 2.0 Specification.

The color model in VRML is RGB. In order to define a color three values are needed: Red Green and Blue, these values are between 0.0 and 1.0. For instance 0.0 0.0 0.0 is Black, 0.0 0.0 1.0 is Blue, and 1.0 1.0 1.0 is White.

The units in VRML are assumed to be meters. Although you do not have to follow this convention it is advisable that you do. If everyone follows this convention then all worlds will be scale compatible.

The angles in VRML are measured in radians, not in degrees.