What is VRML?

 

VRML stands for Virtual Reality Modeling Language. It is intimately connected with the entire concept known as "virtual reality." Virtual reality is a computer-generated simulation of a three-dimensional environment in which the user is able to both view and manipulate the contents of that environment.

VRML often pronounced, as "vermal" is the file format standard for 3D multimedia and shared virtual worlds on the Internet. It adds to the next level of interaction, structural graphics, and extra dimensions (z and time) to the on-line experience. The applications of VRML are broad; ranging from prosaic business graphics to entering web page graphics, to manufacturing, scientific, entertainment, and educational applications and of course to 3D shared virtual worlds and communities.

 

How did VRML come about?

 

At around the same time as Virtural Reality (VR) systems began to mature, the Internet began growing exponentially. The advent of the World Wide Web was the single most important factor in that growth. HTML (HyperText Markup Language) was, of course, the language that has allowed this to happen. It did not take long for people to realize that the fusion of virtual reality and the Internet had tremendous potential. What was needed was the conceptual equivalent of HTML, a language that could be used to store three-dimensional worlds the same way HTML let us store documents.

In 1994 two men by the name of Mark Pesce and Toni Parisi sat down and wrote a program called Labyrinth. Labyrinth was not really a VRML browser, since VRML had been developed yet; it was more of a "proof -of-concept." Labyrinth had the ability to retrieve three-dimensional objects over the Web. After months of studying the Labyrinth program, an electronic mailing list was set up for discussions of VRML, which originally stood for Virtual Reality Markup Language. Markup was later changed to a more appropriate word "modeling," since storing 3D models was what VRML was all about.

Since its inception in 1994, VRML has been an open standard instilled with the principle that high quality infrastructures can be built out in the open on level playing fields. This result in faster and better product as well as more interesting and productive market competition based on value, not history, or platform dependency. With the ISO Standard VRML 97 approved, attention is turning to the next generation of VRML.

 

Building a VRML world

 

A VRML file structure contains a file header, comments, nodes, and fields. When writing a VRML file you must always began a file with the VRML header:       #VRML V2.0 utf8.
   #VRML means tat the file contains VRML text.
       V2.0 means that the text conforms to version 2.0 syntax.
         UTF8 stands for Universal Character Set Transformation Format, 8-bit.

Next, you have comments. Comments start with the number sign (#) and extends to the end of the line. They are simply notes to you. Following comments are nodes. Nodes describe shapes, light, sounds, etc. Every node has a node type (Shape, Cylinder, etc.), a pair of curly braces, and zero or more fields inside of the curly braces.

                                                            Example:
                                                                    Cylinder {
                                                                          }

Within the nodes are fields and values. Fields describe node attributes. Every field has a field name data type (integer, float, etc.) and default value. Fields are optional and given in any order and values are attribute values.

Example:
         Cylinder {
             Height 2.0
             Radius 1.5
                                                                   }

                                                     View example of cone world cylinder.wrl

In order to bring life to a VRML world shapes are used. Shapes are the building blocks of a VRML world. Primitive Shapes are standard building blocks such as:

Cylinder
Box
Cone
Sphere
Text

To build these shapes, a shape node is use. A shape node builds shape, appearance and geometry. Appearance defines color and texture. Geometry defines form or structure. Shape geometry is built with geometry nodes:

Box {…}
Cone{…}

Geometry node fields control dimensions. Dimensions are usually described in meters, but it can be anything.

Once shapes are defined, building a VRML world becomes simple. In order to organize the structure of a world, one must be able to visualize the coordinate system.

To understand the coordinate system, look at the far-left corner of your desk. For a moment, imagine that it's a mathematical point and that it's the center of the entire universe; everything is measured relative to the specific point. Now imagine that there are lines, called axes, that cross through the corner of your desk; let's say the long side of you desk is called the X-axis, the short side is the Z-axis and the Y-axis points straight up towards the ceiling. Every point in the entire universe can be measured relative to the corner of your desk where X, Y, and Z will have zero values. That area would be known as the origin of a coordinate system.

With the coordinate system, shapes can be transformed. A transform creates a coordinate system that is positioned, rotated, and scaled relative to parent coordinate system. Shapes built in a new coordinate system are portioned, rotated, and scaled along with it. The Transform group node creates a group with its own coordinate system. Within the group you have: children - shape

translation - position

rotation - orientation

scale - size

Example: Transform{
Translation…….
Rotation…….
Scale…….
Children [….]
}
  Transform {

# X Y Z

translation 2.0 0.0 0.0

children [….]

}

Transform{

# X Y Z Angle

rotation 0.0 0.0 1.0 0.52

children […]

}


All of the above techniques and formatting are the basic fundamentals to building a VRML world. Once you have an understanding for building shape nodes and visualizing a coordinate system, building a world becomes as simple as learning your ABC's. Below are lists of worlds that I've created.

                                                                                        Click Here: Door

 

 

The "Door" world shows how easy it is to change the background colors to a world. This is done by simply adding a Background Node. A Background node describes background colors

                                                      ground colors and angles - ground gradation
 
                                                      sky colors and angles - sky gradation
 

                                       Example
                                               Background {

                                                  groundColor [ 0.0 0.2 0.7, . . . ]

                                                 groundAngle [ 1.309, 1.571 ]

                                                skyColor [ 0.1 0.1 0.0, . . . ]

                                               skyAngle [ 1.309, 1.571 ]

                                              }

The shape node creates the door itself and the appearance field called "texture" creates the wood look.

 

The stairs are basic rectangular shapes given the size and translation node to give it its floating appearance.

 

An Anchor node creates the doorknob. An Anchor node creates a group that acts as a clikable anchor. Every child node in the group is displayed and clicking any child follow a url (a linked file).

Anchor {

url "Door.wrl"

description "A door"

children […]

}

                   Click Here: Rotation

 

In this world, basic primitive shapes have different textures and colors. With the VRML language, you can make objects appear in any textured form. There is also motion to each object. As you touch each shape, they began to rotate. This is done by using a touch sensor node. A TouchSensor node senses the cursor's touch

                                                          isOver - send true/false when cursor over/not over

                                                          isActive - send true/false when mouse button pressed/released

                                                         touchTime - send time when mouse button released

 
                                               Example
                                                    Transform {
                                                      children [
                                             DEF Touched TouchSensor { }
                                                                        ]
                                                                   }

The next and final world is entitled:

                                                        Click Here: Push Button Fantasy
 
 

In this world, you are in control of what you want to see happened. No matter what button you push, you could light up a shape of your choice. This world was created by using the functions Proto and Routing. A PROTO statement declares a new node type

                                                                    name - the new node type name

                                                                    fields and events - interface to the prototype

 
                                             Example
                                                  PROTO BouncingBall [
                                                       field SFFloat bounceHeight 1.0
                                                     field SFTime cycleInterval 1.0
                                                                                         ] { . . . }

 

PROTO defines:
body - nodes and routes for the new node type

                                           Example
                                                PROTO BouncingBall [ . . . ] {
                                                Transform {
                                            children [ . . . ]
                                            }

ROUTE . . .
A ROUTE statement connects two nodes together using

                                                    The sender's node name and eventOut name
                                                    The receiver's node name and eventIn name

                                        Example
                                            ROUTE MySender.rotation_changed 
                                            TO MyReceiver.set_rotation
 

In all, VRML blends the intuitive human sense of space and time with user interface interaction and programming language integration producing a truly new and exiting technology for the Internet. The evolution of the Net from command-line to 2D graphical to emergent 3D interfaces reflects ongoing, fundamental progress towards human-cnetered interface computer-mediated experience.