Title: VRML in Virtual Environments
1VRML in Virtual Environments
- CS-4473 Virtual World Simulation
- David Laflam
- March 14 2000
2Objectives
- To provide a general overview of Virtual
Reality Modeling Language (VRML) and its
application in a Virtual World and Simulation. - To demonstrate a scene graph tool that uses VRML
3Outline
- History (Past, Present, Future)
- VRML Terminology
- Node, File, Events, Routes
- Naming Conventions
- Syntax
- Commercial uses of VRML
- CAVE (Cave Automatic Environment)
- References
4History (Past, Present, Future)
- May 1994 International Conference WWW
- Mark Pesce and Tony Parisi presented Labyrinth
Program - SGI offers Open Inventor format VRML 1.0
Official May 26 1995 - VRML 97 (Spec was sent to ISO)
- VRML 2.0 (ISO Standard)
- WEB3D (Future Standard)
5Web3D ISO Roadmap
6VRML Development
- VRML Roots
- Inventor from Silicon Graphics (Open Inventor)
- Provide an easy to use, scene structure, object
description based on Open Inventor format a
scene-description language to use on the Web - VRML 1.0 (October 1994)
- Goal to create static 3D worlds links
- VRML 2.0 (August 1996)
- objects move
- objects can respond to events
- use multimedia objects (sound, video)
7VRML 2.0 Features
- The goal of VRML 2.0 is to provide a richer, more
exciting, more interactive user experience than
the static boundaries of VRML 1.0. - The second goal is to provide a solid foundation
for future VRML expansion, to keep things as
simple and as fast as possible for everyone
(browser developers, world designers, end users). - Enhanced static worlds
- (ground/sky colors, fog, irregular terrain,
sound, ) - Interaction
- (Sensors, collision detection, )
- Animation
- (Interpolators, )
- Scripting
- (a scripting takes input from sensors and
generates events based on that input which can
change other nodes in the world). - Prototyping
- ( a prototype -- a new node type instances,
parameter interface )
8Changes from VRML 1.0
- New Node Types
- Group nodes (Collision, Transform)
- Browser Information (Background,NavigationInfo,
Viewpoint, WorldInfo) - Lights and Lighting (fog)
- Sound
- Shapes (geometry nodes property nodes)
- Geometry (ElevationGrid, Extrusion, Text)
- Appearance
9Changes from VRML 1.0
- Sensors
- (TouchSensor, CylinderSensor, PlaneSensor,
SphereSensor, ) - Special Nodes
- (Scripting, Interpolators, )
- Deleted Node Types
- AsciiText --gt Text (non-English)
- Info --gt WorldInfo
- PerspectiveCamera --gt Viewpoint
- Separator --gt Transform
- Transformation nodes --gt Transform
10Features of VRML
- Interactivity
- VRML worlds respond to the viewers actions
- Animation
- Objects move, and humanoid avatars walk, run, and
jump. - Audio
- VRML provides support for background music,
ambient noise, and fully spatialized stereo
sound. - Scripts
- VRML allows you to include programs for more
advanced control of animation and user
interaction - Prototyping
- Code reuse
11VRML Challenges
- Browsers compliance, consistency, performance
(plug in problems) - Authoring Tools are poorly suited to VRML 2.0's
demands - Modeling packages for offline rendering generate
too many polygons (Chisel Program polygon
reduction tool) - Animation packages don't understand VRML's
event-driven model - Optimization tools are few and far between
- Complex, open file format makes proprietary tools
difficult to integrate - Workflow difficult one way export/import isn't
good enough
12Open source
- Crucial part of our VRML/X3D strategy
- Java
- Sun commitment of Java3D code, time
- VRML 97 and X3D loaders available
- C
- multiple source bases becoming available
- nVidia, others
- CosmoPlayer status
?
13VRML Terminology
- Nodes and Fields
- Name Scoping
- Defining and Reusing
- Events and Routes
- Time-Dependent Nodes
- General VR Concepts
- Non Immerse VR
- Immerse VR
- Presence
14Naming Conventions
- Node Names Begin each word in the name with a
capital letter - Example
- CylinderSensor, Transform, IndexFaceSet
- Field Names Same as node name except the first
word uses lower case - Example (field and exposedField)
- translation, cycleTime
15Defining and Reusing
- DEF allows you to define a node
- DEF node-name node-type ..
- appearance DEF Brown Appearance material
Material diffuseColor 0.6 0.4 0.0 - USE allows you to call a defined node
- USE node-name
- appearance USE Brown
16Syntax
- used for VRML Comments
- VRML Header
- each VRML file must begin with VRML V2.0 utf8
- UTF8 is the UCS Transform Format, and UCS is the
Universal Character Set, it is defined by ISO
10646-11993 - Nested format
- Facilitates parent child format
17Reserved Words
- Reserved Words in VRML are
- DEF, EXTERPROTO, FALSE, IS, NULL, PROTO,
- ROUTE, TO, TRUE, USE,eventIn, eventOut,
exposedField, field
18Coordinate Spaces
- VRML objects are considered to exist in a 3D
virtual Space with locations descried in
rectangular(X,Y,Z) coordinates relative to an
arbitrary (0, 0, 0). - Positive Y (up), Positive X(left), Negative Z
(into the monitor). - Measured in Radian and Meters
19Nodes
- The basic unit of a VRML File is a node.
- The type of node is required
- A set of curly braces required
- Some number of fields (optional) and their values
that define the attributes of the nodes with in
the curly braces.
20Nodes
- Example
- Shape
- appearance NULL exposedField SFNode
- geometry NULL exposedField SFNode
-
- This is a shape node with appearance and
geometry fields
21Field Value Types
- SFBool Boolean True /False
- SFColor/MFColor 3 floating point to describe
color - SFFloat/MFFloat Used to describe HT and Radius
- SFImage List of values describing
the colors of digital picture - SFInt32/MFInt32 32bit integer values
- SFNode/MFNode A VRML node
- SFRotation/MFRotation To Specify how to orient a
shape - SFString/MFString To specify a list of
characters - SFTime For animation Start Time/End Time
- SFVec2f/MFVec2f 2D Floating Point Vector
- SFVec3f/SFVec3f 3D Floating Point Vector
- SF - Single Value Type , MF - Multiple Value
Type
22VRML Node Types
- 7 Types of nodes
- Geometry and Geometry Support Nodes
- Appearance Nodes
- Grouping Nodes
- Animation and Behavior Nodes
- Sensors
- Environmental Nodes
- Navigation-Related Nodes
23Geometry Nodes
- Geometry and Geometry Support Nodes represent
geometry in the VRML world ( and provide
necessary data for defining that geometry) - Node Type
- Box , Cone, Cylinder, ElevationGrid, Extrusion,
IndexFaceSet, IndexLineSet, PointSet,Shape,
Sphere, Text, Coordinate.
24Geometry Nodes
- Code
- VRML V2.0 utf8
- Shape
- geometry Cylinder
- height 2.0
- radius 2.0
-
-
- Cylinder1.wrl
25Appearance Nodes
- Appearance Nodes are used in determining how a
piece of geometry looks. - Node Types
- Appearance, Material, Color, Normal,
ImageTexture, MoiveTexture, PixelTexture,TextureTr
ansform, TextureCCoordinate, FontStyle
26Appearance Nodes
- Code
- VRML V2.0 utf8
- Draw the hut walls
- Shape
- appearance DEF Brown Appearance
- material Material
- diffuseColor 0.4 0.6 0.0
-
-
- geometry Cylinder
- height 2.0
- radius 2.0
-
-
- Cylinder2.wrl
27Appearance Nodes
- Code
- VRML V2.0 utf8
- Shape
- appearance Appearance
- material Material
-
- geometry Text
- fontStyle FontStyle
- family "SERIF"
- style "BOLD
- TEXT.wrl
28Grouping Nodes
- Grouping Nodes collect other nodes together, the
parts to the whole. - Node Types
- Transform, Group,Collision,Billboard,Inline,
- string "Hello Class"
- LOD (Level of Detail), Switch
29Grouping Nodes
- Code
- VRML V2.0 utf8
- Group children
- Draw the hut walls
- Shape appearance DEF Brown
Appearance - material Material
diffuseColor 0.4 0.6 0.0 - geometry Cylinder height 2.0
radius 2.0 , - Draw the hut roof
- Transform
- translation 0.0 2.0 0.0
- children Shape
- appearance USE Brown
- geometry Cone
- height 2.0
- bottomRadius 2.5
- Cylinder3.wrl
30Animation/ Behavior Nodes
- Animation/ Behavior Nodes provide support for
animation, sound, and other time-based activity,
as well as programed behaviors - Node Types
- TimeSensors, ColorInterpolator,
CoordinateInterpolator, NormalInterpolator,
PostionInterpolator, ScalarInterpolator,
OrientationInterpolator, Script
31Animation/ Behavior Nodes
- Code Example
- See attached page for planet code
- Animation1.wrl
32Animation/ Behavior Nodes
- Code Example
- See attached page for planet code
- ScalarInterpolator Demo
- Will use an Example for thesis
- Animation3.wrl
33Sensors
- Sensors detect viewer motion and actions, or
nodes that react to users interaction - Node Types
- CylinderSensor, PlaneSensor, ProximitySensor,
SphereSensor, TouchSensor, VisibilitySensor -
- TouchSensor senses a click
- ProximitySensor senses a distance
- PlaneSensor senses a drag action
- TimeSensor senses a time tick
- (it can be triggered by other sensors)
34Sensors
- Code Example
- See attached page for TouchSensor code
- touch.wrl
35Environmental Nodes
- Environmental Nodes distribute effects over an
area, not tied to a particular piece of geometry - Node Types
- DirectionalLight, PointLight, SpotLight, Sound,
AudioClip, Background, Fog, WorldInfo
36Environmental Nodes
- Example Code for FOG
- VRML V2.0 utf8
- Group
- children
- Fog
- color 1.0 1.0 1.0
- fogType "LINEAR"
- visibilityRange 20.0 ,
- Background skyColor 1.0 1.0 1.0 ,
- Inline url "fogworld.wrl"
- FogExample.wrl
37Environmental Nodes
- Example Code for Lighting
- See Attached Handout
- Lighting.wrl
38Navigation-Related Nodes
- Navigation-Related Nodes affect the viewers
navigation through the world or scene - Node Type
- Viewpoint, NavigationInfo, Achor
39Navigation-Related Nodes
- VRML V2.0 utf8
- Group
- children Viewpoint
- description "60.0 FOV degree corner
view" - position 3.0 1.6 3.0
- orientation 0.0 1.0 0.0 0.611
- fieldOfView 1.047
- ,
- NavigationInfo
- type "WALK"
- speed 1.0
- headlight TRUE
- avatarSize 0.5, 1.6, 0.5
- ,
- Inline url "DaveSub3.wrl"
-
- DaveSub3.wrl
40Events and Routes
- Events provide the wiring instructions for the
VRML scene, like the use of mouse to turn on
light, or trigger a sound. - The wring involves
- A pair of nodes to wire together
- A wiring route, or path, between the nodes
- Events
- A message that is passed between nodes with
eventIn or eventOut.
41Events
- Collision Node example
- Collision
- children exposedField MFNode
- proxy NULL field SFNode
- addChildren eventIn MFNode
- removeChildren eventIn MFNode
- collideTime eventOut SFTime
-
- Node Field Type Field Type
of Field Value
42Routes
- Routes describe a circuit from one nodes
eventOut to another nodes eventIn. The circuit
route remains domant until an event is sent from
the first node to the second node until the route
ends. - The type of reaction depends on
- The type of node receiving the event
- The node input jack to which the route is wired
- The values contained in the event
- The current activities of the node
43Subdivide large VRML files
- Download Time A single monolithic file is
inefficient user cannot interact until download
is complete (like Shockwave) maximum memory use
and decompress time - Reuse Subdivision allows Reuse and nesting of
subfiles - Scalability Subdivision allows very large
worlds - Single file makes unloading parts of the world
impossible - Hinting Subdivision enables browser
optimizations - Enable "trickle" downloading whenever possible
- Think about Inlining anything which is a
candidate for LOD'ing Insides of houses in a
town, contents of refrigerator
44Scene Graph
- Scene Graph
- the relationship between objects in the scene and
the way those objects interact with each other.
It provides for a graph like structure to
visualize this relationship. - VRML Scene Graph
- All nodes have a relationships (senior to
subordinate) - Group
- Viewpoint
- Navigation
- Shape
- Sphere
- Material
45Scene Graph Demo
VRML Scene Graph is the relationship between
objects in the scene and the way those objects
interact with each other. It provides for a
graph like structure to visualize this
relationship.
46Java / VRML
- VRML actions are controlled with the use of a
script node - Script
- url exposedField MFString
- mustEvaluate FALSE field SFBool
- directOuput FALSE field SFBool
- Any number of
- field fieldType FieldName intailValue
- eventIn eventInType eventInName
- eventOut eventOutType eventOutName
47Java / VRML
- In Java, the API provides the getBrowers method
of the Script class. The return object is an
instance of the Browser class, which provides
methods for - Querying the browser
- Changing world content
- Reading a new world
- In JavaScript program script, the API provides an
automatically created browser object. - Provides same functionality as above
48Java / VRML
- This defines a java script that has an eventIn as
a SFFloat called set_fraction ,and has an
eventOut of a SFVec3f called value_changed - Demo Ripple.wrl
- DEF Mover Script
- urlmove1.js
- eventIn SFFloat set_fraction
- eventOut SFVec3f value_changed
49Proto and Externproto
- Proto
- Defines a new node type that is local to the VRML
File - Externproto
- Defines a new node type that is external to the
VRML File. - This is used in the case of a library of new node
types - An example pipes proto from NIST
-
- EXTERNPROTO nodeTypeName nodeInterface
urls
50Type of Virtual Reality
51Non Immersive VR
- Systems that includes mouse-controlled navigation
through a three-dimensional environment on a
graphics monitor, stereo viewing from the monitor
via stereo glasses, stereo projection systems,
and others. - Apple's Quick Time VR , Spherical RealVR ,
Smoothmove , VRML , and Java3d , for example,
uses photographs for the modeling of
three-dimensional worlds and provides pseudo
look-around and walk-trough capabilities on a
graphics monitor.
52Non Immersive Example
53Non Immersive Example
- Scientific Visualization and Visual Simulation
54Immersive VR
- Head-referenced viewing provides a natural
interface for the navigation in three-dimensional
space and allows for look-around, walk-around,
and fly-through capabilities in virtual
environments. - Stereoscopic viewing enhances the perception of
depth and the sense of space. - The virtual world is presented in full scale and
relates properly to the human size. - Realistic interactions with virtual objects via
data glove and similar devices allow for
manipulation, operation, and control of virtual
worlds. - The convincing illusion of being fully immersed
in an artificial world can be enhanced by
auditory, haptic, and other non-visual
technologies. - Networked applications allow for shared virtual
environments
55Shared Virtual Environments
- All users see the same virtual environment from
their respective points of view. Each user is
presented as a virtual human (avatar) to the
other participants. The users can see each other,
communicated with each other, and interact with
the virtual world as a team. - Networked users at different locations (anywhere
in the world) meet in the same virtual world by
using a BOOM device, a CAVE system, and a
Head-Mounted Display, respectively.
56Shared Virtual Environments Example
57Immersive Example
58VRML and VR
- Current location
- The vrmLab Town Square US
- Operational since VRML first began, the
vrmLab is probably the oldest continuously-display
ed and -developed VRML scene in the world - Cyber-JRC Italy
- A project of the European Commission's Joint
Research Centre, Cyber-JRC extends experiments in
"Tele-presence for Entertainment, Surveillance,
and Training" through the use of VNet - The Digital Garden Germany
- A "Final year Diploma-Thesis at FH-Nürtingen
Germany" by Mirko Ross, " plays with the
characteristic garden picture formed by history"
-
59- Forest World Sweden
- The rolling hills of Niclas Olofsson's
forest world - Electra City Australia
- A peaceful island from the imagination of
Miriam English - The Ancient Village Project Germany
- A project of the German VRML Users Group
(GerVRML), Oliver Schlueter's Ancient Village is
designed to act as a set for theater performances
and role-playing games - Browser Test World Canada
- Available to test browser and plugin
combinations, EAISimple.wrl contains the minimal
elements needed to enter a VNet scene
60Blaxxun Cybertown
Please Click Window
61Some General Applications
- Engineering/Design and R D
- Vehicle interior/exterior design and analysis
- Visibility and operation design, simulation and
analysis - Rapid product prototyping
- Fluid flow dynamics
- Aerodynamic evaluation
- Pollution emission studies
- Remote collaborative design and testing
- Motion studies
62Some General Applications
- Manufacturing
- Manufacturing and assembly design and simulation
- Robotics
- Subassembly analysis
- Teleoperations and telepresence
- Medicine
- Volumetric human anatomy visualization
- Surgical simulation, research and training
- Molecular and structural biology
63Some General Applications
- Architecture
- Site plan analysis
- Structural aspect review
- Space planning ,Site line analysis
- Interior design
- Urban planning
- Shared context environments
- Marketing
- Product planning,Package design
64Some General Applications
- Geophysical Exploration
- Oceanography
- Seismology
- Other Applications
- Astrophysics
- Atmospheric science
- Ecological impact
- Geometric modeling
- Microphysics
- Hazardous material handling simulation and
training
65Demo
- NIST
- Pipes Proto
- Loader Demo
- Air Flow Demo
66VRML CAVE development
- EVL (Electronic Visualization Laboratory)
- Dave Papa (Pape_at_evl.uic.edu)
- http//www.evl.uic.edu/pape/CAVE/
- VA TECH
- Ron Kriz (kriz_at_wave.esm.vt.edu) and Debby Hix
- http//www.cave.vt.edu/
- Vnet MultiUser (Shared VRML Worlds)
- http//ariadne.iz.net/jeffs/vnet/
67CAVE (Cave Automatic Virtual Environment)
- "CAVE," the name selected for the virtual reality
theater, is both a recursive acronym (Cave
Automatic Virtual Environment) and a reference to
"The Simile of the Cave" found in Plato's
Republic, in which the philosopher explores the
ideas of perception, reality, and illusion. - Plato used the analogy of a person facing the
back of a cave alive with shadows that are
his/her only basis for ideas of what real objects
are.
68CAVE Goal
- Goals that inspired the CAVE engineering effort
include - The desire for higher-resolution color
images and good surround vision without
geometric distortion. - Less sensitivity to head-rotation induced
errors - The ability to mix virtual reality imagery
with real devices (like one's hand, for instance)
- The need to guide and teach others in a
reasonable way in artificial worlds - The desire to couple to networked
supercomputers and data sources for successive
refinement
69EVL (Electronic Visualization Laboratory)CAVE
- Demo
- Cave Demo
- Concept Prototype
70Cave Demos
- University of Illinois, Chicago
- 20 CAVE Demos at EVL in 2D (HTML)
- CAVE Demos at EVL in 3D (VRML)
- University of Illinois, Urbana-Champaign
- The Crumbs Project, "On the Trail of 3D Images"
- Iowa State University
- Virtual Prototyping
- Manufacturing
- Haptics
- Architecture
71References
- Web
- www.web3d.org , www.vrml.org ,
- http//www.fas.org/man/index.html
- http//www.rccad.com/Gallery.htm
- http//web3d.about.com/compute/web3d/msubclip.htm
- Books
- VRML 2.0 Sourcebook
- by A. L. Ames ,D.R. Nadeau, J. L. Moreland
- Late Night VRML2.0 w/Java
- B. Roehl, J. Couch, C. Reed-Ballriech, T.
Rohaly, G. Brown
72Questions
73Summary
- VMRL has many different applications, from the
entertaining to the applied. It is a tool that if
used can enable the author of content to create
anything they desire.
74Final Thought
- "Cyberspace. A consensual hallucination
experienced daily by billions of legitimate
operators, in every nation, by children being
taught mathematical concepts. A graphic
representation of data abstracted from the banks
of every computer in the human system.
Unthinkable complexity. Lines of light ranged in
the non-space of the mind, clusters and
constellations of data. Like city lights,
receding." - (William Gibson, Neuromancer, p. 103)