Chapter 1 - INTRODUCTION TO VRML

1,576 views

Published on

Visual Reality and VRML student.

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,576
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
72
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Chapter 1 - INTRODUCTION TO VRML

  1. 1. PREPARED BY : NURAINI MOHD GHANI 1
  2. 2. The ISO standard revision of VRML 2.0You will learn:1. VRML file structure2. Concepts and terminology3. Most shape building syntax4. Most sensor and animation syntax5. Most program scripting syntax PREPARED BY : NURAINI MOHD GHANI 2
  3. 3. VRML is:A simple text language for describing 3-D shapes and interactive environments VRML text files use a .wrl extension PREPARED BY : NURAINI MOHD GHANI 3
  4. 4. You can view VRML files using a VRML browser: *A VRML helper-application *A VRML plug-in to an HTML browser *You can view VRML files from your local hard disk, or from the Internet PREPARED BY : NURAINI MOHD GHANI 4
  5. 5. You can construct VRML files using:• A text editor• A world builder application• A 3D modeler and format translator• A shape generator (like a Perl script) PREPARED BY : NURAINI MOHD GHANI 5
  6. 6. Pro:• No new software to buy• Access to all VRML features• Detailed control of world efficiencyCons:• Hard to author complex 3D shapes• Requires knowledge of VRML syntax PREPARED BY : NURAINI MOHD GHANI 6
  7. 7. Pro: Easy 3-D drawing and animating user interface Little need to learn VRML syntaxCons: May not support all VRML features May not produce most efficient VRML PREPARED BY : NURAINI MOHD GHANI 7
  8. 8. Pro: Very powerful drawing and animating featuresCan make photo-realistic images tooCons: May not support all VRML features May not produce most efficient VRML Not designed for VRML Often a one-way path from 3D modeler into VRML Easy to make shapes that are too complex PREPARED BY : NURAINI MOHD GHANI 8
  9. 9. Pro: Easy way to generate complex shapes Fractal mountains, logos, etc. Generate VRML from CGI Perl scripts Extend science applications to generate VRMLCons: Only suitable for narrow set of shapes Best used with other software PREPARED BY : NURAINI MOHD GHANI 9
  10. 10. VRML file structureVRML files contain: The file header Comments - notes to yourself Nodes - nuggets of scene information Fields - node attributes you can change Values - attribute values PREPARED BY : NURAINI MOHD GHANI 10
  11. 11. #VRML V2.0 utf8# A CylinderShape { appearance Appearance { material Material { } } geometry Cylinder { height 2.0 radius 1.5 }} PREPARED BY : NURAINI MOHD GHANI 11
  12. 12. #VRML V2.0 utf8#VRML: File contains VRML textV2.0 : Text conforms to version 2.0 syntaxutf8 : Text uses UTF8 character setUnderstanding UTF8• utf8 is an international character set standard• utf8 stands for:• UCS (Universal Character Set) Transformation Format, 8-bit• Encodes 24,000+ characters for many languages• ASCII is a subset PREPARED BY : NURAINI MOHD GHANI 12
  13. 13. Using comments# A CylinderComments start with a number-sign (#) and extend to the end of the lineUsing nodesCylinder {}• Nodes describe shapes, lights, sounds, etc.• Every node has:• A node type (Shape, Cylinder, etc.)• A pair of curly-braces• Zero or more fields inside the curly-braces PREPARED BY : NURAINI MOHD GHANI 13
  14. 14. • Node type names are case sensitive• Each word starts with an upper-case character• The rest of the word is lower-case Some examples:1. Appearance2. Cylinder3. Material4. Shape5. ElevationGrid6. FontStyle7. ImageTexture8. IndexedFaceSet PREPARED BY : NURAINI MOHD GHANI 14
  15. 15.  Different node types have different fields Fields are optional A default value is used if a field is not given Fields can be listed in any order The order doesnt affect the node PREPARED BY : NURAINI MOHD GHANI 15
  16. 16. • The file header gives the version and encoding• Nodes describe scene content• Fields and values specify node attributes• Everything is case sensitive PREPARED BY : NURAINI MOHD GHANI 16

×