What is VRML? VRML Modeling Language (aka “vermal”) & scene description language for 3D web content Virtual Reality Modeling Language HTML is standard for text, VRML is for 3D

1 2

VRML Standards What you need to view VRML

VRML 1.0 Any of the following: Static scene description A VRML Browser (e.g. WorldView) No client side behavior A plug-in or add-in for your 3.0 or greater (standard version) VRML 2.0 (ISO approved as VRML97) A fast computer Supports simple behavior Pentium II or better strongly recommended Java API for complex behavior 3D accelerator card fast network connection

3 4

1 What you need to create Other ways to create VRML VRML content

A text editor and lots of patience, or Existing 3D modeling programs A VRML authoring tool, like: Existing CAD packages that export DXF Existing object libraries plus translators: 3D Studio Space Builder Cosmo Lightwave InterChange (commercial product) WCVT2POV (shareware) “Roll your own” using languages such as perl or Java

5 6

What you need to serve VRML VRML

An ordinary web server VRML is a high level 3d graphics format. Need to configure server to serve VRML I.e. low level graphics issues such as hidden MIME type is x-world/x-vrml or line removal, z-ordering, shading etc. are encapsulated in the rendering engine, and model/vrml need not be addressed by the content File extension is “.wrl”, “.vml” or “.vrml” developer. (“.wrz” if using compression)

7 8

2 VRML VRML

VRML is based on the concept of a scene This diagram (from the VRML spec) illustrates how the world graph.The scene graph contains nodes is presented to the user. which describe objects and their properties. It contains hierarchically grouped geometry to provide an audio- visual representation of objects, as well as nodes that participate in the event generation and routing mechanism.

9 10

New features in VRML 2.0 Basic VRML Syntax

Sound Behavior Files begin with a header line: supports WAV, MIDI Sensors #VRML V1.0 ascii 3D sound placement Interpolators #VRML V2.0 utf8 greater realism Routes Prototypes Script nodes World is made up of “nodes” object-oriented ⌧Java Nodes contain “fields” ⌧VRMLScript cleanly extend VRML 2.0 adds “Events”, “Routes” and “Prototypes”

11 12

3 Node types Node types (continued)

Geometry nodes Light nodes Appearance properties Grouping nodes Box DirectionalLight Material Group Cone PointLight ⌧colors Transform (creates Cylinder SpotLight ⌧shininess transformation hierarchies) Sphere ⌧transparency LOD (automatic level-of- Environment nodes detail switching for IndexedFaceSet FontStyle (for Text) Background performance) IndexedLineSet Texture nodes Fog ⌧ImageTexture Collision (makes objects PointSet NavigationInfo ⌧PixelTexture “solid”) Text WorldInfo ⌧MovieTexture Switch Extrusion TextureTransform ElevationGrid

13 14

Still more nodes... Other features

Sensors Interpolators 3D objects can be anchors, like in HTML TimeSensor PositionInterpolator (“Anchor” node) TouchSensor OrientationInterpolator Worlds can be “inlined” in other world ProximitySensor ColorInterpolator VisibilitySensor CoordinateInterpolator (“Inline” node) CylinderSensor ScalarInterpolator Multiple viewpoints can be defined DiskSensor Sound (“Viewpoint” node) PlaneSensor Sound node Sub-trees can be multiply instanced (DEF SphereSEnsor AudioClip node and USE)

15 16

4 Degrees & Radians 2D coordinate systems

VRML expresses angles 2D Cartesian counterclockwise in coordinates radians, you may be allow every more used to working point on a in degrees plane to be uniquely Most calculators have degrees identified: a conversion function radians = π 180 π 2 radians = 360° radians degrees = 180 π

17 18

3D coordinate systems Transformation hierarchy

3D coordinate The transformation hierarchy includes all of systems add the root nodes and root node descendants another axis to that are considered to have one or more allow any point systems in 3D space to particular locations in the virtual world. VRML be defined includes the notion of local coordinate Use right-hand , defined in terms of transformations rule to from ancestor coordinate systems (using determine Transformsystem or Billboard nodes). The positive Z coordinate system in which the root nodes direction are displayed is called the world coordinate

19 . 20

5 A simple world

#VRML V2.0 utf8 Group { children [ WorldInfo { World info [" Inline { url "ground.wrl"}, Transform { Email: WorldInfo [email protected]"] translation 20 2 20 title "demo space" children [ DirectionalLight } DEF Tree Inline { Background url "firtree.wrl" } ] DirectionalLight {} Viewpoint }, Background { Transform { Group skyColor [ 0.0 0.2 0.7, translation 22 2 20 0.0 0.5 1.0, children USE Tree Inline "Ground" }, 1.0 1.0 1.0 Transform ] Transform { skyAngle [ 1.3, 1.6 ] translation 22 2 25 Inline "Tree" } children USE Tree }, Transform USE "Tree" Viewpoint { Transform { Transform USE "Tree" position 50 2 50 translation 22 2 22 description "Entry" children USE Tree Transform USE "Tree" } } ] 21 22 }

3D illusions VRML Resources

#VRML V2.0 utf8 The Annotated VRML 2.0 Reference Manual DEF Firtree Billboard { axisOfRotation 0.0 1.0 0.0 ⌧R. Carey & G. Bell. Addison-Wesley Longman children [ 1997 Shape { appearance Appearance { VRML 2.0 Sourcebook texture ImageTexture { url "firtree.gif" ⌧A. Ames, D. R. Nadeau & J. Morland. Wiley 1997 } This file defines a billboard web site: http://vrml.sgi.com } node which will always rotate geometry Box { size 1 2 0.1 } about the Y-axis to face the newsgroup: comp.lang.vrml } viewer. This makes the 2D ] image appear 3 dimensional SpaceBuilder: } http://cosmo.sgi.com/products/homespace/spacebuilder/

23 24

6 Some example apps: Bookmark Browsing

25 26

7