VRML/ Intro VRML Not that many books anymore and typically they are rather expensive and sometimes out of date (always check that a book is using VRML 2.0 - otherwise known as VRML 97 - and not VRML 1.0). The one that is generally agreed to be the definitive guide is: 'The VRML Sourcebook', edition 2, Ames, Nadeau & Moreland, Wiley which like most such includes a CD-ROM. But it does cost £52 though you may find it cheaper via the web. You may want to look at the examples from it online at http://www.wiley.com/compbooks/vrml2sbk/cover/cover.htm The key resource is the VRML tutorial, which can be found locally at: http://www.macs.hw.ac.uk/cs/localinfo/facil/guides There is a chattier tutorial at: http://www.vruniverse.com/ We follow much the same approach as that given by one of the most experienced VRML/X3D guys around, Don Brutzman. The intro page for his course at http://web.nps.navy.mil/~brutzman/x3d/ lists all the resources. The Consortium is a key starting point for everything on the web in 3D: http://www.web3d.org/ and the X3D resources can be found at http://www.web3d.org/x3d/ material on human animation in VRML can be found at: http://www.h-anim.org/ Browser plug-ins These days Cortona seems to be the most stable though there are VRML nodes it doesn’t handle. Get it from http://www.parallelgraphics.com/products/cortona/via the box bottom right NIST have a really useful plugin detector page at http://cic.nist.gov/vrml/vbdetect.html which tells you what there is for your set up and where to get it when you visit it. Other good resources An X3D toolkit is at http://artis.imag.fr/Members/Yannick.Legoc/X3D/ See also: http://vrmlworks.crispen.org/ and also the following, which isn't exclusively VRML: http://www.frontiernet.net/~imaging VRML/X3D This is basically just a which allows a 3D scene to be loaded and interacted with via a . X3D is a more modern superset of VRML which uses XML syntax instead of the VRML parantheses. So you can enter VRML descriptions via any text editor you happen to like using – for example you can use Notepad on PCs. However MUCH better to use an editor which supports bracketed syntax and helps you to match them correctly as this is a major source of error in writing VRML. We have installed the White Dune editor in 1.54 which is icon-based and takes some of the pain out of writing VRML by cutting down on the typing. Use it if you want to: it is new to me too so I do not have any tutorial material for it. Browsers should be set up to use the Cortona plugin, which should activate when you load a .wrl file. Cortona is the most stable of the plugins still around as far as I know though like others it does not cover absolutely every feature of VRML. There are many other ways of generating VRML: for example using a 3D drawing package with VRML export. However this will not help you to learn exactly what is going on so we will stick to hand coding for the exercises below. You can learn a lot by looking at existing VRML files – there are a large number of examples in the tutorial, and you are recommended to look carefully at these to see how effects are achieved. Note that I may well set exam questions drawing on the detailed knowledge of VRML you should have acquired by carrying out the work below. The output of these three labs is to be handed in by end of week 4 – Friday Feb 2nd. You should do this be sending me an email, to arrive by 5pm, in which you give me the URL of the models you have created so I can take a look at them. You will also be asked to demo your sports stadium along with the rest of your assignment later in the term.

Lab 1 VRML tutorial via: http://www.macs.hw.ac.uk/cs/localinfo/facil/guides Look at the Tutorial, Part 1, and read: Introducing VRML; Building a VRML world; Building primitive shapes; and then skip to Controlling appearance with materials. Start by exploring the Shape, Appearance and Material nodes. NOTE that: a) If you type the heading to a VRML file incorrectly – and even if you put extra spaces in – then the whole file will fail to load with no particularly useful error message. So check this first! b) The error reporting is usually weak anyway: there is a console you can bring up which tells you what line the error was detected on, but any problem with brackets, and this could be a long way past the actual source of the error c) Use any text editor you feel happy with to produce VRML files. One that checks bracket matching will be a lot more useful than one that doesn’t! Exercise 1 Check you understand this by producing in turn a Box, a Cone, a Cylinder and a Sphere. Vary the dimensions and the colour and materials. Next Now read the Tutorial, section 1, Transforming shapes; Grouping nodes; Naming nodes Read about the Transform node and translation, rotation and scaling. Have a look at some of the wrl files associated with the tutorial. One of them is a’fairy castle’ – castle.wrl. Note in particular how DEF is used in this file to name component parts of the castle and then re-use them. Exercise 2 Create a sports stadium based on the fairy castle, making sure you use DEF Next Now read the sections on Building elevation grids and Building extruded shapes in section 2 (leave the rest of section 2 for the next lab!) Exercise 3 Add some extruded shapes to your stadium and use an elevation grid to create a slightly more bumpy landscape in front of it.

Lab 2

Read the Tutorial, Part 1 Introducing animation; and Part 2 - Animation, sensors, and geometry; Animating transforms; Make sure you understand how time can be handled and how Keyframe Animation works. Look at the TimeSensor node and at the PositionInterpolator and OrientationInterpolator nodes. Make sure you understand routing and events. Exercise 4 Animate a simple shape. Next Read the Tutorial section 2: Sensing viewer actions - about animation. Read about sensing viewer actions. Look at TouchSensor, PlaneSensor, Sphere Sensor and CylinderSensor nodes. Exercise 5 Adapt your animation exercise so that it is controlled by a mouseclick. Adapt some of the components of your sports stadium so that they are moved around using the various sensor nodes. Lab 3 Session 5 Skip all the way to the Tutorial, part 4 Read Introducing script use; Writing program scripts with JavaScript; Creating new node types (use of PROTO); Summary examples. Exercise 6 Look at the examples and edit them to produce your own. Exercise 7 Go back to section 3 of the tutorial and put some textures on objects of your own. Experiment with lighting and with fog.