X3D Resources
  

VRML 2 Sourcebook, X3D Examples Archive

  
Web3D Consortium home page
VRML 2 Sourcebook

The VRML 2 Sourcebook was written by Andrea L. Ames, David R. Nadeau, and John L. Moreland, published by John Wiley & Sons, 1996. This open-source archive has translated the original examples to create corresponding example scenes using X3D. The original SIGGRAPH 98 course notes with corresponding translated Siggraph 98 Course scenes are also available.

Virtual Reality Modeling Language (VRML97) is the second-generation ISO International Standard that is fully compatible with the third-generation ISO standard, Extensible 3D (X3D) Graphics. VRML97 provides a close match to the X3D Immersive Profile.

VRML 1 Sourcebook

X3D Resources     Javadoc for translated java source 31 Directories, 416 X3D Models Open-Source License     .zip archive     Archive Information

Chapter 02 Introduction Chapter 03 Shapes Chapter 04 Text
Chapter 05 Positioning Shapes Chapter 06 Rotating Shapes Chapter 07 Scaling Shapes
Chapter 08 Animating Position Orientation Scale Chapter 09 Sensing Viewer Chapter 10 Materials
Chapter 11 Grouping Chapter 12 Inline Chapter 13 Points Lines Faces
Chapter 14 Elevation Grid Chapter 15 Extrusion Chapter 16 Color
Chapter 17 Textures Chapter 18 Texture Mapping Chapter 19 Normals Shading
Chapter 20 Lighting Chapter 21 Shiny Materials Chapter 22 Background
Chapter 23 Fog Chapter 24 Sound Chapter 25 Level Of Detail
Chapter 26 Viewpoint Chapter 27 Sensing Visibility Proximity Collision Chapter 28 Anchor
Chapter 29 World Info Chapter 30 Scripts Chapter 31 Prototypes
Siggraph 98 Course    

  31 Directory Summaries   416 X3D Models
 Directory SummaryChapter 02 Introduction
Your first VRML world - a brown hut

This chapter describes VRML file structure, a sample VRML file, understanding the header and understanding UTF8. Guidance is provided for using comments, nodes, node type name, fields and values, and using field names.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 03 Shapes

This chapter describes how to build primitive geometric shapes.

The Shape node contains Appearance and geometry. Geometry primitive nodes of interest include Box, Cone, Cylinder, Sphere, Text and FontStyle. Multiple Shape nodes can be drawn together to make new objects of interest.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Space Station, or spark plug? You decide...

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 04 Text
Figure 04.11, Text Overstrike Font With Axes

Text geometry is placed in a Shape to describe your scene.

This chapter describes how to build Text shapes with accompanying FontStyle nodes to vary how strings are presented.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 05 Positioning Shapes

This chapter describes how to position shapes within an X-Y-Z world coordinate system by adding a parent Transform node. Rotations about each axis are counter-clockwise using the right-hand rule. Nested Transform nodes can translate, rotate and scale shapes relative to each other in 3D space.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 05.11 Nested Archways With Axes

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 06 Rotating Shapes
Figure 06.09 Triple Asterisk 3D With Axes

Rotations can transform the orientation of a shape in any direction.

Rotation orients a coordinate system about a rotation axis by a rotation angle measured in radians. To help remember positive and negative rotation directions: open your hand, stick out your thumb, aim your thumb in an axis positive direction, and curl your fingers around the axis. The curl direction is a positive rotation.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 07 Scaling Shapes

Scale transformations grow or shrink a local coordinate system by a scaling factor in the X, Y, and Z directions.

Sometimes scale values are used to adjust units when the data in child nodes is not based on meters. Transform operations are bottom-up: children shapes are first scaled, rotated, then translated. Order is fixed, independent of the field order that happens to occur in the Transform node.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 07.11 Scaled Arches

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 08 Animating Position Orientation Scale
Figure 08.4 Orientation Interpolator With Axes

TimeSensor nodes produce clock events that can drive event-producing interpolators for animating position, orientation and scale.

The TimeSensor node is similar to a stop watch: you control the start and stop time, it generates time events while running. It can loop forever, or run through only one cycle and stop. To animate a scene, route time events into other nodes. PositionInterpolator can convert time events into 3D position or scale values. OrientationInterpolator can animate rotation values. ColorInterpolator can animate color values, and ScalarInterpolator can animate transparency values.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 09 Sensing Viewer

Authors can design interactivity into a scene that responds to user actions.

A scene can sense when the viewer's cursor is over a shape, has touched a shape, or is dragging atop a shape. A scene can also trigger animations on a viewer's touch, enabling the viewer to move and rotate shapes. There are four main action sensor types: TouchSensor senses touch, SphereSensor senses drags in a spherical way, CylinderSensor senses drags cylindrically, and PlaneSensor senses drags around a plane.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 09.6 Sphere Sensor With Axes

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 10 Materials
Figure 10.09 Three Blinking Shapes

Appearance and Material nodes control a shape's shading color (diffuseColor), glow color (emissiveColor), transparency, shininess, and ambient intensity.

Appearance and Material nodes control a shape's shading color (diffuseColor), glow color (emissiveColor), transparency, shininess, and ambient intensity. Colors specify a mixture of red, green, and blue (RGB) light with component values between 0.0 (none) and 1.0 (lots). ColorInterpolator can animate color values, and ScalarInterpolator can animate transparency values.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 11 Grouping

Grouping nodes are used to group shapes to compose complex shapes.

  • The Switch node creates a switched group where only one child node in the group is displayed, children implicitly numbered from 0 and a whichChoice value of -1 selects no children.
  • Transform creates a group with its own coordinate system where every child node in the group is displayed.
  • Billboard creates a group with a special coordinate system that turns to face the viewer.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 11.2 Cafe Sign Billboard

Figure 11.3 Bounding Box

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 12 Inline
Figure 12.3 Temple Of Inlined Arches

Inline nodes can load other VRML/X3D scenes into the current scene, helping authors reuse models to build larger worlds.

An Inline node creates a special group from another scene's contents. Children nodes are read from the file selected by a URL, and every child node loaded from the group is displayed.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 13 Points Lines Faces

Points, lines and mesh faces allow authors to build a complete variety of geometry.

Complex shapes are hard to build with primitive shapes (for example: terrain, animals, plants, machinery). Instead, build shapes out of atomic components: points, lines, and polygon faces. Shape building is like a 3D connect-the-dots game: place dots at 3D locations, and connect-the-dots to form shapes A coordinate specifies a 3D dot location, measured relative to a coordinate system origin. A geometry node then specifies how to connect the dots: for example, PointSet, IndexedLineSet, or IndexedFaceSet. Animation is accomplished using a CoordinateInterpolator node.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 13.16 Vaulted Ceiling

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 14 Elevation Grid
Figure 14.4b Elevation Grid Puddle Splash 40x 40

ElevationGrid nodes provide a simple way to construct terrain-like geometry.

Building terrain sets is very common: hills, valleys, mountains and other tricky uses. An ElevationGrid geometry node creates terrains using xDimension and zDimension for grid size, with xSpacing and zSpacing for row and column distances, and then includes height elevations at each of the grid points.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 15 Extrusion

Extrusion geometry is defined by a 2D cross-section that is stretched and rotated around a central spine.

Extruded shapes are very common: tubes, pipes, bars, vases, donuts, and other tricky uses. An Extrusion node efficiently creates extruded shapes. The crossSection field specifies the cross-section, and the spine field specifies the sweep path. The scale and orientation fields specify scaling and rotation at each spine point.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 15.10 Extruded Room With Axes

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 16 Color
Figure 16.7 Vertex Colored Elevation Grid Mountain

The Color node lists Red-Green-Blue (RGB) colors to use for rendering points in a geometric shape.

Color indexes select colors to use at each vertex. Colors override any accompanying Material node. The colorPerVertex field selects color per line/face/grid square or else color per coordinate.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 17 Textures

Textures are 2D images that can be wrapped on top of 3D geometry.

You can model every tiny texture detail of a world using a vast number of colored faces, but this is time consuming and difficult. Use a trick instead: take a picture of the real thing, then paste that picture on the shape, like sticking on a decal image. Specify the texture using an ImageTexture, PixelTexture, or MovieTexture node within an Appearance node. Color textures override material, greyscale textures multiply against the color values. Textures with transparency create holes that can be seen through.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 17.08b Textured Elevation Grid Mountain

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 18 Texture Mapping
Figure 18.27 Rotating Fan Animated Texture Transform

Texture coordinates transform and map pixels in a 2D image onto specific 3D points.

Texture images are in a texture coordinate system. By default, an entire texture image is mapped once around the shape. You can also extract only pieces of interest, or create repeating patterns. Texture coordinates and indexes describe a texture cookie cutter. Texture transforms translate, rotate, and scale place the cookie cutter. Texture indexes bind the cut-out cookie texture to a face on a shape.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 19 Normals Shading

Normal (perpendicular) vectors defined for individual points or polygons can change the shading of geometry.

When shaded, the faces on a shape are obvious. Creating a smooth shape may require a large number of small faces. An alternative is to instead use smooth shading to create the illusion of a smooth shape, but with a smaller number of faces.

The Normal node lists normal vectors to use for parts of a shape which can change shading. These are used as the value of the normal field, and normal index values select which normals to use (similar to color index values). Ordinarily the creaseAngle field controls faceted or smooth shading. Normals override the normal effect of the creaseAngle value. The normalPerVertex field selects normal per face/grid square or normal per coordinate. The NormalInterpolator node converts time values to normal values for animation effects.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 19.22 Normal Square Shaded

Figure 19.26 Normal Shaded Elevation Grid

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 20 Lighting

Figure 20.06b Point Light Spheres Intensity

Figure 20.13a Directional Light Sunrise

Lights provide virtual illumination that allows objects to be seen.

By default, you have one light in the scene, attached to your head. For more realism, you can add multiple lights: suns, light bulbs, candles, flashlights, spotlights, firelight. Lights can be positioned, oriented, and colored. Lights do not cast shadows.

There are three types of lights: PointLight, DirectionalLight, and SpotLight. All lights have an on/off, intensity, ambient effect, and color fields. PointLight and SpotLight nodes have a location, radius, and attenuation. DirectionalLight and SpotLight nodes have a direction.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 21 Shiny Materials

Material nodes are the primary way to define color, transparency and shininess for geometric objects.

The Material node controls overall rendering properties including the shading color (diffuseColor), glow color (emissiveColor), transparency, shininess and ambient intensity. Proper combinations of values can emulate the properties of shiny materials, such as metals.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 21.5 Shiny Gold Vase

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 22 Background
Figure 22.3c Background Sky Ground Mountains

A Background node presents a virtual sky above and land (or sea, or space) below.

Background nodes describe groundColor and skyColor gradients on the ground hemisphere and sky sphere. Background nodes can also apply panorama images on a panorama box. Of interest is that the viewer can look around and navigate, but never get any closer to the background. Backgrounds are faster to draw than if you used shapes to build them.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 23 Fog

Fog simulates atmospheric effects by blending distant objects with fog color.

Fog increases realism and can be used to set a mood, even indoors. Add fog outside to create hazy worlds, or add fog inside to create dark dungeons. Fog has a color, a type, and a visibility range. Fog limits the viewer's sight, reducing the amount of the world you have to build and the amount of the world that must be drawn.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 23.5 Binding Fogs And Backgrounds

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 24 Sound
Figure 24.1 Emitter Markers

The Sound node controls the stereo 3D spatialization of sound playback by a child AudioClip or MovieTexture node.

Sounds can be triggered by viewer actions: clicks, horn honks, door latch noises, etc. Sounds can also be continuous in the background: wind, crowd noises, elevator music. Sounds emit from a location, in a direction, and within an ellipsoidal volume. A Sound node describes a sound emitter, where a source node provides the sound and range fields describe the sound region. An AudioClip node or a MovieTexture node describe a sound source, where a url points to the sound file. AudioClip also controls playback by start time, stop time, and (optionally) looping.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 25 Level Of Detail

Level of detail (LOD) allows an overall world become very large by letting an author provide high-fidelity models when a viewer is nearby, and simpler geometry when the viewer is far away.

The further the viewer can see, the more there is to draw. Note that if a shape is distant, the shape is smaller and the viewer can't see as much detail. So... draw it with less detail. Varying detail with distance reduces initial download time and increases drawing speed.

Increase performance by making multiple levels of shapes: high detail for close up viewing, progressively lower detail for more distant viewing. Group the levels in an LOD node, ordered from high detail to low detail, and using an array of range values to select switching distances .

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: VRML 2.0 Sourcebook course notes.

Figure 25.04 Three Torches Side By Side

Figure 25.12 Dungeon Rooms With Sliding Doors

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 26 Viewpoint
Figure 26.7 Dungeon Viewpoints And Fields Of View

Viewpoints are the primary way for an author to show users what is in a scene, helping them navigate among objects of interest.

Viewpoint nodes specify a desired location, an orientation, and a camera field-of-view lens angle. By default, the viewer enters a world at position (0, 0, 10) and is looking along the -Z axis towards the origin. You can provide your own preferred viewing locations and directions in Viewpoint nodes. The first Viewpoint in the scene is the initial entry Viewpoint.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 27 Sensing Visibility Proximity Collision

Sensing viewer activity enables the scene to trigger animations. A VisibilitySensor node checks if a region is visible to the viewer, where the region is described by a center and a size. Time events are sent on entry and exit of visibility, and true/false is sent on entry and exit of visibility. A ProximitySensor node similarly checks if the viewer is within a region, also sending viewer position and orientation while within the sensed region. Collision is a grouping node that checks if the viewer has run into a shape defined by the node's children (or else simpler proxy geometry) with a collision time event sent upon contact.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 27.1 Visibility Sensor Dungeon Sliding Doors

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 28 Anchor
Figure 28.2 Anchor Load Another World

Similar to HTML web pages, the Anchor node lets an author make shapes selectable for navigating to another viewpoint, loading a new VRML/X3D world, or launching new content in a Web browser.

An Anchor node creates a group that acts as a clickable anchor where every child node in the group is displayed, and clicking one follows a url to another scene or another Web link. An Anchor can also bring the user to another Viewpoint location in the scene. A description field names each Anchor so that the user knows its purpose.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 29 World Info

The WorldInfo defines the title of the scene and can hold additional metadata.

After you've created a great world, sign it! You can provide a title and a description embedded within the file by using a WorldInfo node. The title field provides the name for your world so that the browser can show it. The info field can hold any additional information of interest.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 29.1 World Info: view image to see browser title

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 30 Scripts
Figure 30.4 Script Spiraling Ball Trace

Scripts allow authors to define their own event-handling code to improve animation sophistication.

Many actions are too complex for animation nodes, such as computed animation paths (e.g. gravity), algorithmic shapes (e.g. fractals), or collaborative environments (e.g. games). You can create new sensors, interpolators, etc., using program scripts written in Java (a powerful general-purpose language) or ECMAscript (JavaScript, an easy-to-learn language). The Script node selects a program script, specified by a url or contained source code. Program scripts have field and event interface declarations, each with a data type, a name, and an initial value (for fields only).

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummaryChapter 31 Prototypes

Prototypes are an extension mechanism that lets authors define their own customizable nodes, improving reusability and sharing of cool content.

By declaring prototype designs and then creating one or more instances, you can create new node types that encapsulate Shapes, Sensors, Interpolators, Scripts and anything else. This technique creates new high-level nodes such as robots, menus, new shapes, etc. A PROTO statement declares a new node type (a prototype) with a name (the new node type name) along with fields and events (the interfaces to the prototype). Once defined, a prototyped node can be used like any other node.

These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.

Figure 31.9 Spin Group Prototype

top
Directory Viewpoint Slideshow
Javadoc for translated java source

 Directory SummarySiggraph 98 Course

Robotic hand juggling primitives

Primitive geometry examples

This entire book was presented as a tutorial during the ACM Special Interest Group on Graphics (SIGGRAPH) conference in 1998.

The SIGGRAPH98 online course Introduction to VRML97 by David R. Nadeau, John L. Moreland, and Michael M. Heck includes all of the examples translated here. Many of these X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples.

A large number of Interesting Scenes have been added to this course for learning VRML and X3D. Source code for the original example models is also provided.

Original Course Abstract. The Virtual Reality Modeling Language (VRML) is an international standard for describing 3D shapes and scenery on the World Wide Web. VRML's technology has very broad applicability, including web-based entertainment, distributed visualization, 3D user interfaces to remote web resources, 3D collaborative environments, interactive simulations for education, virtual museums, virtual retail spaces, and more. VRML is a key technology shaping the future of the Web. Participants in this tutorial will learn how to use VRML 97 (a.k.a. ISO VRML, VRML 2.0, and Moving Worlds) to author their own 3D virtual worlds on the World Wide Web. Participants will learn VRML concepts and terminology, and be introduced to VRML's text-format syntax. Participants also will learn tips and techniques for increasing performance and realism. The tutorial includes numerous VRML examples and information on where to find out more about VRML features and use.

top
Directory Viewpoint Slideshow
Javadoc for translated java source

The X3D Resources: Examples page and Savage Developers Guide provide more information about the production of this archive.

Point of contact:
Don Brutzman (brutzman at nps.edu)
README.txt
Open-Source License
Validate XHTML 1.1 Content Catalog XML
Autogenerated 2024-09-11-07:00