Presentation is loading. Please wait.

Presentation is loading. Please wait.

11.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 11 VRML - An Introduction.

Similar presentations


Presentation on theme: "11.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 11 VRML - An Introduction."— Presentation transcript:

1 11.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 11 VRML - An Introduction

2 11.2 si31_2001 Good Ideas are Simple n Realization 1: – Hypertext + Internet = World Wide Web n Realization 2: – Adding images makes pages more interesting n Realization 3: – Images are pictures taken by the publisher - why not send 3D scenes and allow the user to take the picture! n VRML: Virtual Reality Modelling Language – a language to describe 3D worlds - for the Web

3 11.3 si31_2001 World Wide Web Pages AUTHORING PROCESS HTML file server INTERNET client WEB BROWSER text/ html.html MIME type

4 11.4 si31_2001 VRML AUTHORING PROCESS VRML file server INTERNET client VRML BROWSER x-world/ x-vrml.wrl Major browsers: CosmoPlayer WorldView Cortona Blaxxun

5 11.5 si31_2001 Advantages of VRML n Transferring a 3D model - rather than a 2D image - to the browser has great advantages – viewer can choose how to look at the model - or world – viewer can navigate the world – file size can often be much less

6 11.6 si31_2001 How Did It All Begin? n Original brainwave – Mark Pesce and Tony Parisi - early 1994 – vision of a VR interface to the Web n VRML 1.0 – practical realisation based on Open Inventor (Silicon Graphics toolkit - similar to OpenGL but higher level) – Open Inventor file format PLUS hyperlinks – static, non-interactive worlds – Gavin Bell (SGI) - late 1994

7 11.7 si31_2001 Where are we now? n VRML97 dynamic – adds object behaviours and interaction to allow creation of dynamic worlds – ISO standard - December 1997 – Gavin Bell, Rikk Carey (ex-SGI) and Chris Marrin (SGI) n 2001 – being reworked as XML (X3D) – many new developments

8 11.8 si31_2001 A VRML File VRML file consists of: n header n nodes – Shape is the generic geometric node – specific objects such as cylinders and spheres – operations such as transformations n fields – parameters of nodes #VRML V2.0 utf8 Shape { geometry Cylinder { radius3 height6 } }

9 11.9 si31_2001 As Seen By A Browser #VRML V2.0 utf8 Shape { geometry Cylinder { radius2 height4 }

10 11.10 si31_2001 Adding Colour to the Scene #VRML V2.0 utf8 Shape { geometry Cylinder { radius2 height4 } appearance Appearance { material Material { diffuseColor 1 0 0 specularColor1 1 1 } }

11 11.11 si31_2001 Co-ordinate Systems n Each node is drawn within its own local co-ordinate system.. x z y

12 11.12 si31_2001 Modelling Transformations n...and can be subjected to a modelling transformation to scale, rotate, translate n Transform is a VRML node - treated just like an object n It applies to a group of children nodes #VRML V2.0 utf8 Transform{ scale5.0 0.5 1.0 children [ Shape { geometry Cylinder { radius2 height4 } appearance Appearance { material Material { diffuseColor 1 0 0 specularColor1 1 1 } } } ] }

13 11.13 si31_2001 Hierarchical Structure #VRML V2.0 utf8 Transform{ scale5.0 0.5 1.0 children [ Shape { geometry Cylinder { radius2 height4 } appearance Appearance { material Material { diffuseColor 1 0 0 specularColor1 1 1 } } } ] } TRANSFORM SHAPE parent child

14 11.14 si31_2001 Hierarchical Structure n This generalises to allow nodes to appear in a hierarchy scene graph n This is known as the VRML scene graph TRANSFORM SHAPE TRANSFORM SHAPE

15 11.15 si31_2001 Transformations n Here we see Cylinder, Sphere and Cone nodes n Each has been subjected to a modelling transformation in order to position them

16 11.16 si31_2001 Instances n A node can be given a name and then used multiple times - with different transformations applied to each n DEF kwb Shape {...} gives it a name n USE kwb allows it to be included at other points in the scene graph

17 11.17 si31_2001 Anchors n A piece of geometry can act as a link to another URL

18 11.18 si31_2001 Textures n Texture mapping: Images can be mapped to geometry to provide texturing n VRML looks like: Shape{ geometry Sphere { } appearance Appearance{ texture ImageTexture{ url http://..../kwb.gif}

19 11.19 si31_2001 Polygonal Surfaces n The general primitive for drawing polygonal surfaces is: – IndexedFaceSet – coord field lists the points – coordIndex describes the polygons Shape{ geometry IndexedFaceSet { coord Coordinate { point [ 17.5 11.2 -1.2, 17.5 15.0 -1.2, … ] } coordIndex [ 0 1 2 3 -1, 4 1 0 5 -1, …] }

20 11.20 si31_2001 Lights n VRML includes: – DirectionalLight – PointLight – SpotLight n Note # sign is a comment Example: PointLight{ onTRUE intensity0.75 color1 0 0 #red location0 0 0 radius100 }

21 11.21 si31_2001 Viewing n Specified via the Viewpoint node n VRML file can have a number of Viewpoint nodes - browsers allow a user to jump from one viewpoint to another n Orientation = axis + angle of rotation Example: Viewpoint { position0 0 5 orientation 0 0 1 0.3 descriptionfrontview }

22 11.22 si31_2001 Other Basic Features n Inline node – incorporate VRML code from another url compose – this allows us to compose large worlds from many smaller ones n Level of Detail – different geometric representations depending on distance

23 11.23 si31_2001 Information About VRML n Web3D Consortium – http://www.web3d.org – links to specifications and resources – new SDK just released n Web3D Information – http://web3d.about.com/compute/web3d n Tutorials include: – Floppys guide: www.vapourtech.com/vrmlguide n Many, many examples: – eg www.intoronto.com

24 11.24 si31_2001 n Range of books now available – The VRML 2.0 Handbook (Addison Wesley) Jed Hartman and Josie Wernecke – The Annotated VRML Reference Book (Addison Wesley) Rikk Carey and Gavin Bell http://www.best.com/~rikk/Book/ Books


Download ppt "11.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 11 VRML - An Introduction."

Similar presentations


Ads by Google