Course Description
What is this course about?
- To give you a basic grounding in the principles and practices of virtual reality
- To provide an understanding of virtual reality and virtual environment concepts which can be transferred to any VR/VE environment
What is this course not about?
- Using object modelling packages
How much will we build?
We will focus on building things. Our explorations of theory will be to inform our practice, and will be coupled with building objects, scenes, and sets in each and every class.
How much reading will we do?
I anticipate assigning one or more weekly readings. This week, please read the following:
Virtual Reality Intro
What is Virtual Reality?
"virtual reality n. 1. Computer simulations that use 3-D graphics and devices such as the Dataglove to allow the user to interact with the simulation. See {cyberspace}. 2. A form of network interaction incorporating aspects of role-playing games, interactive theater, improvisational comedy, and `true confessions' magazines. In a virtual reality forum (such as USENET's alt.callahans newsgroup or the {MUD} experiments on Internet), interaction between the participants is written like a shared novel complete with scenery, `foreground characters' that may be personae utterly unlike the people who write them, and common `background characters' manipulable by all parties. The one iron law is that you may not write irreversible changes to a character without the consent of the person who `owns' it. Otherwise anything goes." from The Hackers' Dictionary of Computer Jargon
Virtual Environments Intro
What is a Virtual Environment?
"[…] we can define virtual environments as interactive, virtual image displays enhanced by special processing and by nonvisual display modalities, such as auditory and haptic, to convince users that they are immersed in a synthetic space." from "What are virtual environments", Stephen R. Ellis, 1994, IEEE Computer Graphics and Applications, 14:1 (Jan 1994) p 17-22.]
History of Web3D
Review Progress
- VRML97
- Consortium's first attempts at a DTD: 1998 - 2000
- Community's first attempts at a Schema: 2001 - 2003
- xVRML Project: 2003 - Present
Why VRML97 was good, and why it was problematical
Learning curve, notational scheme, stock of knowledge at hand
Why not the X3D DTD or Schema?
- complexity
- size
- committees build monsters
xVRML Standard Intro
The xVRML Specifications are based on the xVRML Schema, which in turn provides a "model" of the data in a virtual reality instance document (or "world"). The xVRML Schema & Specifications also form the basis for the development of "view" and "controller" software technologies to express xVRML instance documents.
In the end, xVRML is simply XML. Just as a webpage is just data for a 2D display structured by HTML tags, so an xVRML file is just data for a 3D display structured by xVRML tags. Classroom experience has taught that, if someone can read and understand .html files, then they can also read and understand .xwrl files.
xVRML scenes can be distributed across the Internet, and can currently be viewed in a free-standing application. A set of complimentary browser plugins is planned. xVRML provides all the features of a basic VR language, and only requires a text editor to create and modify objects and scenes.
xVRML works with standard Schema-aware XML editors. xVRML is simple, lightweight, easy to read, and easy to understand.
Object Representation
Objects in 3D are defined by:
- points in three-dimensional space ("3-space")
- lines linking the points to create faces
- surface qualities applied to faces (colors, textures, shininess, etc.)
Position and Orientation
The Web-pages you are used to building are essentially two-dimensional (2D). VR is an attempt to impose a sense of three-dimensionality onto that 2D surface.
Coordinate System
The three dimensions in VR are known as X and Y and Z. X goes left-right from the origin (0.0 0.0 0.0),
Y goes up-down from the origin, and Z goes in-out of the screen. Positive X is to the right, positive Y is up,
and positive Z is out from the screen. A good discussion of this can be found here.
We use what is known as a "right-handed coordinate system" to visualize things. Hold up your right hand like the picture to the right, with your forefinger (Z) pointing towards you to help with your visualization.
Transform Node Details
- translation
- review right-handed coordinate system
- rotation
- review radians vs degrees
- remember that pi = 180° = 3.14159
- scale
Sample xVRML Code
BallWorld.xwrl
<?xml version="1.0" encoding="UTF-8"?>
<World xmlns="http://www.xvrml.net/schemas/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.xvrml.net/schemas/core
http://xvrml.net/schemas/xVRML.xsd" headlight="false">
<WorldInfo>
<title>Ball World</title>
<info>A simple nested-transformations test</info>
<info>2005 Jeff Sonstein</info>
</WorldInfo>
<children>
<DirectionalLight/>
<Transform name="aBall" translation="-2.0 0.0 -5.0">
<children>
<Shape name="redBall">
<appearance>
<Material>
<diffuseColor red="1.0" green="0.0" blue="0.0" alpha="1.0"/>
</Material>
</appearance>
<geometry>
<Sphere radius="1.0"/>
</geometry>
</Shape>
</children>
</Transform>
</children>
</World>
Node Groupings
- grouping nodes (defining coordinate spaces)
- common nodes (lights, sounds, routes, etc)
- sensors (click, proximity, etc)
- geometry (boxes, spheres, cylinders, etc)
- appearance (shininess, color, etc)
- interpolators (for keyframe animations)
Basic Geometry
- Box
- Sphere
- Cone
- Cylinder
- IndexedFaceSet
Documentation
Visit the xVRML Schema documentation.
Lighting Model
A good discussion of the lighting model may be found here. Note that there are no shadows and no reflections (you have to fake those).
Objects, Sets & Scenes
- similarities to constructing a play or a video
-
discussion
- what is a set?
- what is a scene?
- what is a world?