17
Virtual Reali ty Modeling L anguage 97

Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Embed Size (px)

Citation preview

Page 1: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Virtual Reality Modeling Language 9

7

Page 2: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

What’s VRML?

•Virtual Reality Modeling Language2D/3D graphicsAudio: .wav, .midVideo: MPEG-1Interactivity: time- and action-basedHyperlinksJava

•VRML97 International Standard (IS) ISO/IEC 14772-1:1997

Page 3: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Basic Concepts

•VRML File StructurePrototypesScene GraphEvent Routing

•A VRML browser

Page 4: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

VRML File Structure

• A VRML file contains#VRML V2.0 utf8

# A sample VRML 97 file

Prototypes

Scene graph

Event routing

Page 5: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Prototypes

• Provides a capability to extend VRML node types

• Can reuse defined nodes– e.g., defines different chairs, tables, etc.

Page 6: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Scene Graph

• A hierarchical structures for nodes

• Good for transformations

• Good for event generation and routing

Page 7: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Event Routing

• For interactivity

• User, time, or script triggered

• Routing path defined by authors– e.g., collide --> alarm --> crash --> ...

Page 8: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

A VRML Browser

Parser

prototypesbuilt-in nodes

World

routing pathscene graph

Audio/Visual Presentation

VRML file user input

user

Page 9: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Node Reference

(1) Group Nodes (2) Coordinates

(3) Anchor (4) Sound

(5) Sensor (6) Interpolator

(7) Script

Page 10: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Group Nodes

• Transformations, events, etc. occur within a group

• Includes:• Group: all children

• Transform: all children, new coordinate

• Switch: one child

Group {children [

Shape { … }Shape { … }...

]}

Page 11: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Coordinates

Transform { # X Y Z translation 2.0 0.0 0.0 children [

Shape Cylinder {radius 1.0height 1.0

}, ]}

Page 12: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Anchor

• A group node

• Select any child in the group jumps to a new VRML file

Anchor { url "stairway.wrl" } description "Floating Stairs" children [ . . . ]}

Page 13: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Sound

• AudioClip: signal source

• Sound: place to play

Sound { source AudioClip { url "bach.wav" description ”music" loop TRUE startTime 1 stopTime 0 }, location 0 0 0 minFront 10 minBack 10 maxFront 40 maxBack 40 spatialize TRUE },

Page 14: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Sensor

• Generated from depressed buttons, collision, timer, etc.

• Define a route path to trigger other nodes

• Each node has eventIn and eventOut interfaces

A B

out

in

Page 15: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Interpolator

PositionInterpolator { key [ 0.0, 0.5, 1.0 ] keyValue [ 0.0 0.0 0.0, 3.0 0.0 0.0, 0.0 0.0 0.0 ]}

• Given a fraction [0..1], interpolate a new value– e.g., given 0.3 --> key = 0.3 --> keyValue =

(0.0+3.0)/0.5*0.3 = 1.8, i.e., (1.8, 0.0, 0.0)

Page 16: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

Script { field … eventIn …set_zzz eventOut … xxx_changed url "circle.class"or... url "circle.js"or... url "javascript: ..."}

Script

• Extend VRML’s capabilities to more complex objects/behaviors

Page 17: Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-

References

• Official site: www.vrml.org

• VRML repository: www.sdsc.edu/vrml

• Industry:– vrml.sgi.com– www.intervista.com– www.microsoft.com/vrml