Virtual Reality Modeling Language 97 Whats VRML Virtual

  • Slides: 17
Download presentation
Virtual Reality Modeling Language 97

Virtual Reality Modeling Language 97

What’s VRML? • Virtual Reality Modeling Language 2 D/3 D graphics Audio: . wav,

What’s VRML? • Virtual Reality Modeling Language 2 D/3 D graphics Audio: . wav, . mid Video: MPEG-1 Interactivity: time- and action-based Hyperlinks Java • VRML 97 International Standard (IS) ISO/IEC 14772 -1: 1997

Basic Concepts • VRML File Structure Prototypes Scene Graph Event Routing • A VRML

Basic Concepts • VRML File Structure Prototypes Scene Graph Event Routing • A VRML browser

VRML File Structure • A VRML file contains #VRML V 2. 0 utf 8

VRML File Structure • A VRML file contains #VRML V 2. 0 utf 8 # A sample VRML 97 file Prototypes Scene graph Event routing

Prototypes • Provides a capability to extend VRML node types • Can reuse defined

Prototypes • Provides a capability to extend VRML node types • Can reuse defined nodes – e. g. , defines different chairs, tables, etc.

Scene Graph • A hierarchical structures for nodes • Good for transformations • Good

Scene Graph • A hierarchical structures for nodes • Good for transformations • Good for event generation and routing

Event Routing • For interactivity • User, time, or script triggered • Routing path

Event Routing • For interactivity • User, time, or script triggered • Routing path defined by authors – e. g. , collide --> alarm --> crash -->. . .

A VRML Browser user input VRML file Parser built-in nodes prototypes World scene graph

A VRML Browser user input VRML file Parser built-in nodes prototypes World scene graph routing path Audio/Visual Presentation user

Node Reference (1) Group Nodes (2) Coordinates (3) Anchor (4) Sound (5) Sensor (6)

Node Reference (1) Group Nodes (2) Coordinates (3) Anchor (4) Sound (5) Sensor (6) Interpolator (7) Script

Group Nodes • Transformations, events, etc. occur within a group • Includes: • Group:

Group Nodes • Transformations, events, etc. occur within a group • Includes: • Group: all children • Transform: all children, new coordinate • Switch: one child Group { children [ Shape { … }. . . ] }

Coordinates Transform { # X Y Z translation 2. 0 0. 0 children [

Coordinates Transform { # X Y Z translation 2. 0 0. 0 children [ Shape Cylinder { radius 1. 0 height 1. 0 }, ] }

Anchor • A group node • Select any child in the group jumps to

Anchor • A group node • Select any child in the group jumps to a new VRML file Anchor { url "stairway. wrl" } description "Floating Stairs" children [. . . ] }

Sound • Audio. Clip: signal source • Sound: place to play Sound { source

Sound • Audio. Clip: signal source • Sound: place to play Sound { source Audio. Clip { url "bach. wav" description ”music" loop TRUE start. Time 1 stop. Time 0 }, location 0 0 0 min. Front 10 min. Back 10 max. Front 40 max. Back 40 spatialize TRUE },

Sensor • Generated from depressed buttons, collision, timer, etc. • Define a route path

Sensor • Generated from depressed buttons, collision, timer, etc. • Define a route path to trigger other nodes • Each node has event. In and event. Out interfaces out A B in

Interpolator Position. Interpolator { key [ 0. 0, 0. 5, 1. 0 ] key.

Interpolator Position. Interpolator { key [ 0. 0, 0. 5, 1. 0 ] key. Value [ 0. 0, 3. 0 0. 0, 0. 0 ] } • Given a fraction [0. . 1], interpolate a new value – e. g. , given 0. 3 --> key = 0. 3 --> key. Value = (0. 0+3. 0)/0. 5*0. 3 = 1. 8, i. e. , (1. 8, 0. 0)

Script • Extend VRML’s capabilities to more complex objects/behaviors Script { field … event.

Script • Extend VRML’s capabilities to more complex objects/behaviors Script { field … event. In …set_zzz event. Out … xxx_changed url "circle. class" or. . . url "circle. js" or. . . url "javascript: . . . " }

References • Official site: www. vrml. org • VRML repository: www. sdsc. edu/vrml •

References • Official site: www. vrml. org • VRML repository: www. sdsc. edu/vrml • Industry: – vrml. sgi. com – www. intervista. com – www. microsoft. com/vrml