© TMC Computer School HC20203 VRML 2 - 1 HIGHER DIPLOMA IN COMPUTING Chapter 2 – Basic VRML.

Slides:



Advertisements
Similar presentations
JavaScript I. JavaScript is an object oriented programming language used to add interactivity to web pages. Different from Java, even though bears some.
Advertisements

1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 10 VRML - An Introduction.
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 11 VRML Animation and Interaction.
11.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 11 VRML - An Introduction.
Chapter 3 – Web Design Tables & Page Layout
HTML 5 and CSS 3, Illustrated Complete Unit L: Programming Web Pages with JavaScript.
Lesson 12- Unit L Programming Web Pages with JavaScript.
The Web Warrior Guide to Web Design Technologies
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 1 – Introduction to VRML.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Modeling Notations.
Welcome to 3D §The 3D graphics pipeline §Rigid-body transform §Homogeneous coordinates §Viewing transformation §Projection §Illumination.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Introduction to VRML By Salman Yussof Diego Iglesias.
Adding Functionality To Web-Based VR Basic Concepts Client – server model Client-side static Client-side scripting Server-side scripting.
Virtual reality interfaces in connection with building process simulations. Prof. Nash Dawood Centre for Construction Innovation Research University of.
Multimedia and the WWW Howell Istance and Chris Hand, Napier University.
An Overview of VRML §Scene Graph Structure VRML files describe 3D objects and worlds using a hierarchical scene graph. Entities in the scene graph are.
© De Montfort University, D Graphics and VRML Howell Istance and Chris Hand* De Montfort University * now at
University College Dublin1 Scope ROOT Light SourceTransform Light SourceSphere.
Multimedia Web Components VRML. Introduction to VRML Case sensitive Most easy technique to provide interactive 3D environment in Web Required special.
CSC 890 Advanced Computer Graphics (Web3D System Design and Development) Ilmi Yoon Monday 4:10 - 6:45.
3D on-line representations Jan Valcik → introduction, main idea → VRML 97 → building of virtual worlds → VRML 97 at work → X3D → MUDVR → animations, navigation.
SWE 423: Multimedia Systems Chapter 4: Graphics and Images.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.
Computer-Based Animation. ● To animate something – to bring it to life ● Animation covers all changes that have visual effects – Positon (motion dynamic)
Hierarchical Transformations Hierarchical Models Scene Graphs
Basic 3D Graphics Chapter 5. Bird’s Eye View  Basic 3D Graphics –Basic concepts of 3D graphics, rendering pipeline, Java 3D programming, scene graph,
Course Textbook: Build Your Own ASP.Net Website: Chapter 2
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
 2003 Prentice Hall, Inc. All rights reserved. 1 Introduction to Classes and Objects Outline Introduction Classes, Objects, Member Functions and Data.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 3 – Object Definition in VRML.
VRML Dr. Alun Moon What is VRML The Virtual Reality Modeling Language (VRML) is a file format for describing interactive 3D objects.
VRML - 1 Virtual Reality Modeling Language (VRML) Peter O’Grady.
CMPD 434 MULTIMEDIA AUTHORING Chapter 06 Multimedia Authoring Process IV.
History of VRML and Its Development Process. Learning Objectives Understand the history of VRML Understand the purpose and functions of VRML Learn how.
1 Virtual Reality Modeling Language (VRML97) ©Anthony Steed
Object Orientated Data Topic 5: Multimedia Technology.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Computer Graphics Group Script node Jiří Žára. Computer Graphics Group Contents 1.Script node 2.Motion generators 2Script node.
H3D API Training Part 2.1: X3D. Outline  Scene graphs  X3D – XML syntax  X3D components overview.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
VRML virtual reality modeling language. what is it? standardised (sort of) notation for virtual reality over the web text file (use normal text editor)
111/16/ :14 UML Instance Transformation x y z x y z x y z x y z SRT Model Coordinates.
1 1. Representing and Parameterizing Agent Behaviors Jan Allbeck and Norm Badler 연세대학교 컴퓨터과학과 로봇 공학 특강 학기 유 지 오.
Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Chapter 2: Variables, Functions, Objects, and Events JavaScript - Introductory.
XP Tutorial 8 Adding Interactivity with ActionScript.
VRML Anthony Steed Department of Computer Science University College London ©Anthony Steed
Interface Opportunities for 3D Data and Media User Interface Software TechNote Panel Virginia Tech CS Fall 2002 Nicholas F. Polys Umur Yilmaz Will Lee.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Intro to VRML Let’s build something! The source code examples in this tutorial WORK!
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
 2008 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 6 – Texture Maps.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Introduction to Object Oriented Programming Lecture-3.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 5 – Animation in VRML.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 4 – Object Manipulation in VRML.
Institute for Computer Graphics and Vision Computer Graphics and Interactive Systems 1 Grabner HS i4, 2006/03/08 Web3D, VRVU, SGP Web3D ( ) VRVU.
Unit 4 Representing Web Data: XML
MPEG-4 Binary Information for Scenes (BIFS)
1. Introduction to Visual Basic
Introduction to Scripting
Chapter 7 Representing Web Data: XML
WEB PROGRAMMING JavaScript.
Introduction to Classes and Objects
Lecture 3. Virtual Worlds : Representation,Creation and Simulation
Presentation transcript:

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 2 – Basic VRML

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Structure of VRML File  A VRML file consists of the following major functional components  the VRML header  the scene graph which includes  Shapes  Interpolators  sensors and scripts  the prototypes  event routing

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING #VRML V2.0 utf8 # A brown hut Group { children [ # Draw the hut walls Shape { appearance DEF Brown Appearance { material Material { diffuseColor } geometry Cylinder { height 2.0 radius 2.0 } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING # Draw the hut roof Transform { translation children Shape { appearance USE Brown geometry Cone { height 2.0 bottomRadius 2.5 } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING VRML Header  For easy identification of VRML files, every VRML file shall begin with  #VRML V2.0  The is either " utf8 " or any other authorized values defined in other parts of ISO/IEC  In this course, we are using " utf8" which indicates a clear text encoding that allows for international characters to be displayed in VRML

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING UTF-8 File Format  # character begins a comment  Only the first comment (the file header) has semantic meaning  The only exception is within double-quoted SFString and MFString fields where the # character is defined to be part of the string  Commas, spaces, tabs, linefeeds, and carriage-returns are separator characters wherever they appear outside of string fields  One or more separator characters separate the syntactical entities in VRML  The separator characters collectively are termed whitespace

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING VRML Statements  VRML file may contain any combination of the following :  Any number of PROTO or EXTERNPROTO statements  Any number of root children node statements  Any number of USE statements  Any number of ROUTE statements

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Scene Graph  The scene graph contains nodes, which describe objects and their properties  It contains hierarchically grouped geometry to provide an audio-visual representation of objects  It also provides a means for nodes to participate in the event generation and routing mechanism

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Nodes  Nodes are used to describe shapes and properties of the world such as:  shapes  colors  lights  viewpoints, how to position and orient shapes  animation times, sensors and interpolators

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Nodes  A node contains the following information:  type of nodes  a set of curly brackets  fields  For example, a cylinder node could be described: cylinder { height 2.0 radius 2.0 }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Fields and Field Values  Fields define the attributes of a node  In the above example, the height field defines the height of the cylinder  Fields are optional within the nodes  If the values are not given, then a default value would be assigned  For example, the default values of cylinder have radius = 1.0 units and height = 2.0 units  Field values defines the attributes like color, size or position

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Defining and Using Node Name  Any node can be defined in the world  The name of the node must begin with a letter, followed by any combination of characters and/or digits  DEF node_name name_type  Once a node has a name, we could reuse the node.  The node with defined name is called original node while the reuse nodes are called instances  USE node_name  Note that the node names are case-sensitive

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Describing Shapes  A VRML shape has appearance (based on material), color and surface texture  These attributes are specified by the field values within a shape node  VRML supports several primitives shape geometries that include boxes, cylinders, cones, and shapes  VRML also supports advanced shape geometries like extruded shapes and elevation grids  Using these primitive shapes, we could group them and build more complex shapes  Shapes can be grouped by the Group node

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Event Routing  Some VRML nodes generate events in response to environmental changes or user interaction  Event routing provides a mechanism, which allow events to be propagated to effect changes in other nodes  Once generated, events are sent to their routed destinations in time order and processed by the receiving node  This processing can change the state of the node, generate additional events, or change the structure of the scene graph

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Event Routing  In order to build a dynamic world and propagate events based on environmental changes, we need “wiring instructions”  This process involves  a pair of nodes to wire together  a wiring route or path between these two nodes  Once the nodes are wired, messages could be sent along that route  Such message is called events which contains communicating values

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Event Routing  For a successful routing, nodes must have eventIn and the corresponding eventOut  An eventIn receives events when it is connected to a route and a message is being sent to it  An eventOut sends the events out along the connected route  VRML “wiring” architecture is built by describing a route from one node’s eventOut to another node’s eventIn

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Event Routing  The receiving node reacts based on the event depends on the following:  type of node receiving the event  node input jack to which the route is wired  values contained in the event  current activities of the node

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Presentation and Interaction  The interpretation, execution, and presentation of VRML files will typically be undertaken a browser, which displays the shapes and sounds in the scene graph  This presentation is known as a virtual world and is navigated in the browser by a human or mechanical entity, known as a user  The world is displayed as if experienced from a particular location; that position and orientation in the world is known as the viewer

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Presentation and Interaction  The browser may define navigation paradigms (such as walking or flying) that enables the user to move the viewer through the virtual world  The browser may provide a mechanism allowing the user to interact with the world through sensor nodes in the scene graph hierarchy  Sensors respond to user interaction with geometric objects in the world, the movement of the user through the world, or the passage of time

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Presentation and Interaction  The visual presentation of geometric objects in a VRML world follows a conceptual model designed to resemble the physical characteristics of light  The VRML lighting model describes how appearance properties and lights in the world are combined to produce displayed colours  Refer to the diagram for the conceptual model of the VRML browser

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Presentation and Interaction Conceptual Model of VRML Browser

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING USE Statement  The USE statement enables us to reuse all the objects that we have defined earlier in the scene graph  A USE statement consists of the USE keyword followed by a node name as follows:  USE

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING ROUTE Statement  A ROUTE statement provides the message passing mechanism from one node to another  A ROUTE statement consists of the ROUTE keyword followed in order by a node name, a period character, a field name, the TO keyword, a node name, a period character, and a field name.  Whitespace is allowed but not required before or after the period characters:  ROUTE. TO.  All these commands will be covered in more details as the course proceeds