VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the...
-
date post
22-Dec-2015 -
Category
Documents
-
view
226 -
download
0
Transcript of VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the...
![Page 1: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/1.jpg)
VRMLVRML
Virtual Reality Virtual Reality Modeling LanguageModeling Language
![Page 2: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/2.jpg)
What Are We Going to See?What Are We Going to See?
What is VRML?Syntax of the languageFeaturesExamples
![Page 3: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/3.jpg)
CreditsCredits
Most of the demos Are based on demos from “Floppy's VRML Guide - VRML97 “Floppy's VRML Guide - VRML97
Tutorial” Tutorial” The demos are localy saved to increase
efficiency end accessibility. The originals and many more can be found in :
http://www.vapourtech.com/vrmlguide
![Page 4: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/4.jpg)
A Bit Of HistoryA Bit Of History
In the beginning there was In the beginning there was VRML 1.0.VRML 1.0.– It was the first attempt at an internet 3D language.
VRML 2.0 replaced VRML 1.0 and add many features (animation).
Version 2.0 was submitted to ISO for standardization, the outcome was VRML97 which is almost identical to VRML 2.0.
![Page 5: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/5.jpg)
Technical Stuff - Technical Stuff - ViewingViewing
In order to see VRML worlds, worlds, we need to install a VRML browserVRML browser (or player).
Internet Explorer comes with a default VRML browser, and almost all other internet browsers can install one.
![Page 6: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/6.jpg)
Technical Stuff - Technical Stuff - EditingEditingVRML can be edited by any text editor.There are many available VRML editors
(with context highlighting).For more complex worldsworlds, 3D modeling
programs can be used and the result can be translated to VRML.
The basic output file format is TEXT, but the browsers can read compressed files (compressed with gzip).
![Page 7: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/7.jpg)
Demo!!Demo!!
This is a simple demo to demonstrate basic features of the VRML environment
![Page 8: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/8.jpg)
VRML SyntaxVRML SyntaxEach VRML file must start with the
comment line:
![Page 9: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/9.jpg)
BasicsBasicsVRML world is made out of nodesnodes,
which are types of objects.Inside the nodes there are fields which are
properties of the node and have a DefaultDefault.A node structure is :
NodeName {NodeName {filedName filedName valuevalue
}}
NodeName {NodeName {filedName filedName valuevalue
}}
![Page 10: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/10.jpg)
Nodes Cont.Nodes Cont.Nodes can be nested:
![Page 11: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/11.jpg)
Some Important NodesSome Important NodesLets look at this simple code:
NodeNode
FieldsFields
NodeNode
FieldsFields
NodeNode
WHAT IS THIS:WHAT IS THIS:
![Page 12: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/12.jpg)
Reuse of NodesReuse of Nodes
![Page 13: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/13.jpg)
Transformations:Transformations:
Regular affin transformations:– Translation– Rotation– Scaling
Direction of the axes are standard Every thing works by the right hand rule
![Page 14: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/14.jpg)
Example:Example:
![Page 15: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/15.jpg)
Apperence:Apperence:
Appearance node can have two fields:– material– texture
![Page 16: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/16.jpg)
Materials:Materials:The material field can have a Material node.The material node can have these fields:
diffuseColor.diffuseColor.The normal color of the object.
specularColor.specularColor.The color of highlights on shiny objects.
![Page 17: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/17.jpg)
Materials:Materials:emissiveColor.emissiveColor.
The object 'glows' with a light of its own of this color. It doesn't cast light on any other objects though.
ambientIntensity.ambientIntensity. The amount of ambient light that the object reflects.
shininessshininess.. How reflective the object is.
transparencytransparency.. How transparent the object is. Note, some browsers
will not support partly-transparent objects.
![Page 18: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/18.jpg)
Some Materials:Some Materials:
![Page 19: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/19.jpg)
Textures:Textures:
appearance field can specify a texture.There are several types of textures.
– Image texturesImage textures: defined by a jpgjpg files.– Movie texturesMovie textures: defined by a mpgmpg file.– Pixel texturesPixel textures: user defined textures.
![Page 20: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/20.jpg)
Other Basic Shapes:Other Basic Shapes:
BoxCylinderConeSphereText
![Page 21: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/21.jpg)
Cameras & ViewpointsCameras & Viewpoints
We can set many viewpoints to our world. A viewpoint is defined by :
– positionposition : [z,y,z] coordinates of the camera.– orientationorientation : were the camera looks at
( [x,y,z] =axes + angle of rotation).– fieldOfViewfieldOfView: angle in radians between 0 and pi.– descriptiondescription : name of the viewPoint.
Some VRML browsers allow specification of entrance camera in the link to the world:
world.wrl#CAM1 world.wrl#CAM1
![Page 22: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/22.jpg)
Cameras Cont.Cameras Cont.
![Page 23: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/23.jpg)
Background & Fog Background & Fog
Background of the world can be set in two ways:– Map a texture over a surrounding box.– Define a gradient of sky & ground around the
center.
Fog enables creating the allusion of distance.
![Page 24: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/24.jpg)
SoundSound
![Page 25: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/25.jpg)
Sound NodeSound NodeSound {Sound { SFVec3f direction SFVec3f direction 0 0 1 0 0 1 SFFloat intensity SFFloat intensity 11SFVec3f location SFVec3f location 0 0 0 0 0 0 SFFloat maxBack SFFloat maxBack 10 10 SFFloat maxFront SFFloat maxFront 10 10 SFFloat minBack SFFloat minBack 1 1 SFFloat minFront SFFloat minFront 1 1 SFFloat priority SFFloat priority 0 0 SFNode SFNode source source NULL NULL SFBool SFBool spatialize spatialize TRUE TRUE
}}
![Page 26: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/26.jpg)
Sound Node Cont.Sound Node Cont.
directiondirection
Min backMin back
Max backMax back Max FrontMax FrontMin FrontMin Front
![Page 27: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/27.jpg)
AudioClip NodeAudioClip Node
AudioClip { AudioClip {
SFString SFString description description "" ""
SFBool SFBool loop loop FALSE FALSE
SFFloat SFFloat pitch pitch 1.0 1.0
SFTime SFTime startTime startTime 0 0
SFTime SFTime stopTime stopTime 0 0
MFString MFString urlurl [] []
} }
![Page 28: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/28.jpg)
Objects of DesireObjects of Desire
We can build objects other than the three default shapes by specifying coordinates of the vertexes.
Specify coordinates:Specify Normals:Specify direction:
![Page 29: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/29.jpg)
General ObjectsGeneral Objects
![Page 30: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/30.jpg)
Setting NormalsSetting Normals
![Page 31: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/31.jpg)
LightingLighting
There are three kinds of lights in VRML:– Directional LightDirectional Light: A light with no specific
location in space only a direction. (gives a sun effect).
– Point LightPoint Light: A light that have a specific location and shines evenly to all directions.
– Spot LightSpot Light: A light with a specific location that shins in a set angle to a specific direction.
![Page 32: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/32.jpg)
Spot Light:Spot Light:
Cutoff angle
Beam width
Spot Light
Direction
![Page 33: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/33.jpg)
Dynamic WorldsDynamic Worlds
We can specify to the browser what Navigation capabilities the user will have:– Walk– Examine– None
![Page 34: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/34.jpg)
Events & Events & RoutesRoutes
Most nodes contain events. If a field in a node is exposed, the node has two
defined events for it:– Set_fieldNameSet_fieldName – used to set the value of the field.– fieldName_changedfieldName_changed – generated when the value was
changed.
The ‘set’‘set’ and ‘changed’‘changed’ can be left out. Not all fields are exposed.
![Page 35: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/35.jpg)
EventsEvents & Routes & Routes A ROUTE wires two events together.
TouchTouch
NodeNode SoundSound
NodeNode
Touch timeTouch time
Start timeStart time
DEF SENSOR TouchSensor {
}
DEF SOUND Sound {
}
ROUTE SENSOR.touchTime TO ROUTE SENSOR.touchTime TO SOUND.startTimeSOUND.startTime
DEF SENSOR TouchSensor {
}
DEF SOUND Sound {
}
ROUTE SENSOR.touchTime TO ROUTE SENSOR.touchTime TO SOUND.startTimeSOUND.startTime
RouteRoute
![Page 36: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/36.jpg)
SensorsSensorsThere are several types of sensors in VRML:
– Time Sensors– Visibility sensors– Collision Sensors– Proximity Sensors– Touch Sensors– Sphere Sensors– Cylinder Sensors– Plane Sensors
![Page 37: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/37.jpg)
Sensor Code ExampleSensor Code Example
![Page 38: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/38.jpg)
InterpolatorsInterpolators
Used to interpolate between key valuesSeveral kinds of interpolators:
– Color – Orientation– Coordinate– Normal– Position– Scalar
![Page 39: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/39.jpg)
Bounded NodesBounded Nodes
We can bind some nodes to values in other– Background – Fog– NavigationInfo – Viewpoint
![Page 40: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/40.jpg)
Programming!?Programming!?
Real animation must include some sort of programming.
VRML accepts two kinds of programs:– JAVA.– JavaScript.
The script node can receive end send events very easily.
![Page 41: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/41.jpg)
Script DemoScript Demo
![Page 42: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/42.jpg)
JAVAJAVA
In order to use Java Java instead of JavsScript all we need to do is to write the appropriate class and include it in the script node:
Script { Script {
url "NewScript.class" url "NewScript.class"
}}
![Page 43: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/43.jpg)
ExamplesExamples
![Page 44: VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d7a5503460f94a5dd1f/html5/thumbnails/44.jpg)
BibliographyBibliography
Floppy's VRML Guide - VRML97 TutorialWEB3D CONSORTIUM –
– http://www.vrml.orghttp://www.vrml.org/VRML97 Specification, ISO-IEC 14772-
11997– http://www.vrml.org/technicalinfo/http://www.vrml.org/technicalinfo/
specifications/vrml97/index.htmspecifications/vrml97/index.htmBiota.org - Creatures Gallery –
– http://www.biota.org/gallery/index.htmlhttp://www.biota.org/gallery/index.html