Home

Print

image

Contents

1. www altova com X3D editors Another possibility to create X3D scenes 1s to use a special X3D editor e g Flux Studio or X3D Edit Some of them allow creating scenes within a WYSIWYG environment There are also tools available that convert 3D formats e g Sketchup or 3D Studio Max in X3D or some 3D modelling packages may offer X3D export functionality X3D file viewing To view the X3D text file in a 3D window you need a special viewer Most viewer function as plugins for browsers The following link allows you to check what plugins already are installed for your browser Click the following link to check plugin installations http cic nist gov vrml vbdetect html If you do not already have a X3D viewer installed on your computer you can install one of the following free viewers to view the X3D files we are going to create during this lesson e Flux viewer recommended http www mediamachines com e Octaga viewer http www octaga com After installing an X3D viewer you should be able to see the simple X3D virtual environment showing a red box below Only pictures can be viewed in the PDF version For Flash etc see online version Only screenshots of animations will be displayed link Click redbox x3d to view and navigate the above X3D scene in a separate window Use the help right click into the 3D scene select Help User Guide or http www mediamachines com userguide php to get accustomed to the navigation
2. 2 gt sAppearance lt Material diffusetColor 0 38 0 12 0 407 gt Appearance Hhape ITransform lt SCene IKJD gt We have combined the code for the head and for the hat of W rml in one X3D file The code for the hat is included in a Transform node If the Transform node would include several nodes then all of them would be affected by the transformation For placing the hat on W rmls head we have defined a translation with the values 0 1 8 0 This moves the hat from the coordinate origin at 0 0 0 to 1 8 along the y axis towards the top of the scene http www e cartouche ch Version from 21 9 2007 19 Introduction to X3D eXtensible 3D Task Wormls eyes Add two black eyes to W rmls head with hat Hints Create one eye first then copy and translate it The eye colour is diffuseColor 24 24 24 specularColor 3 25 3 ambientIntensity 06 shininess 05 Solution Hint The solution uses DEF to name the geometric object of the first eye Eye Thus the second eye can re use the geometric object and needs to translate it to the correct position only This principle will be explained again in the following units http www e cartouche ch Version from 21 9 2007 20 Introduction to X3D eXtensible 3D 1 3 X3D advanced geometries In the previous unit you have learned about the basic structure of X3D files simple 3D objects and their Only pictures can be viewed in the PDF appeara
3. for the actual information can be defined to describe the file or the virtual environment created Scene graph The scene graph or the element lt Scene gt in the X3D file contains the definition of the virtual environment with all 1ts geometries characteristics animations background and so on You will learn about possible content in the following units For the moment it is sufficient to know that hierarchical structure of the nodes in a X3D file is called the scene graph Within a scene graph every node has one or several ancestors nodes that are higher up in the hierarchy e g parent node and possible one or several descendants nodes that are further down in the scene graph hierarchy e g child nodes X3D specification Scene graph http www e cartouche ch Version from 21 9 2007 8 Introduction to X3D eXtensible 3D l lt 7xml version 1 0 encoding UTF 6 gt lt IDOCTYPE ASD SYSTEM schema x3d 3 0 dtd gt 3 XK OL 4 lt l General information about the file and itsas content gt 5 lt head gt lt meta name filename content exanmpleBox Cone xad gt T lt meta name author content 4bt VGI Fachhochschule beider Basel gt o neta name created content 29 June obs gt J lt meta name description content Sinple 45D example gt 10 lt head gt 11 ZACcene gt le se Lone gt 15 lt Transform translation 0 07 14 lt hape gt 15 Cone bottomRadius L he
4. 1 1 0 5 scale 0 5 0 5 0 25 gt lt Shape gt Box size 112 Appearance Material diffuseColor 1 0 0 gt Appearance Shape STransform SCcene lt X3D gt http www e cartouche ch Version from 21 9 2007 18 Introduction to X3D eXtensible 3D Sa X3D specification Transform node Wornmls head and hat Only pictures can be viewed in the PDF version For Flash etc see online version Only screenshots of animations will be displayed link lt 7xml version 1 0 encoding UTF o gt X30 profile Full version 3 0 xmilns xsi http Awww w3 org 2001MLSche xscnoMNamespaceschemaLocation Aspect lt Scene gt l W rmls head gt lt 5hape lt Sphere radius 1 gt sAppearance Image exture url testjpgl Appearance Shape lt l Wormls hat Transform translation 00312 0 0 shape gt Hi below you learn how to place my hat on top of my head For this we use the Transform node All the elements we have constructed so far hat and head are positioned at the centre of the 3D world coordinates 0 0 0 We need to translate the hat so that 1s placed on top of my head afterwards Have a good look at this example The Transform node 1s often used and important Only pictures can be viewed in the PDF version For Flash etc see online version Only screenshots of animations will be displayed link Cone botomRadius 0 f height
5. Ny Coordinate point 1 2 3 system with associated colours at 93 4 gt P PointSet node each point The Coordinate node gt 1 E ar Polntset contains the coordinate definitions IndexedLineSet The IndexedLineSet node IndexedLineSet E represents a 3D geometry formed esordindex 0 1 1 1 2 1 Na by constructing polylines from 3D lt Coordinate point 1 2 3 IndexedLineSet vertices specified in the Coordinate 933 1126 IndexedLineSet node node IndexedLineSet uses the indices in its coordIndex field to specify the polylines by connecting vertices from the Coordinate node An index of 1 indicates that the current polyline has ended and the next one begins http www e cartouche ch Version from 21 9 2007 22 Introduction to X3D eXtensible 3D IndexedFaceSet The IndexedFaceSet node IndexedFaceSet represents a 3D shape formed by coordindex 0 1 2 1 gt constructing faces polygons from lt Coordinate point 1 2 3 IndexedFaceSet vertices listed in the Coordinate i EEE node node IndexedFaceSet uses the 47 or fo IndexedFa cebet indices in its coordIndex field to specify the polygonal faces by indexing into the coordinates in the Coordinate node An index of 1 indicates that the current face has ended and the next one begins Wormls body Hi don t be surprised I ve extended my surroundings a Only pictures can be viewed in the PD
6. possibilities in the Flux Player Use the respective user manual if you are using a X3D viewer different from the Flux player http www e cartouche ch Version from 21 9 2007 5 Introduction to X3D eXtensible 3D 1 2 X3D basics Only pictures can be viewed in the PDF version For Flash etc see online version Only screenshots of animations will be displayed link The links marked with the book icon Hi my name is W rml This name comes from the pronounciation of VRML the preceding 3D standard It is my plan to guide you through this introduction to X3D and to teach you some of the basic concepts of this v irtual r eality m odeling I anguage X3D that s where VRML was abbreviated from Hope you have fun and enjoy learning X3D Remark You might find the first couple of pages not too interesting But read through them they as lay the base and it is soon going to be more interesting the nodes discussed in each section and also about the nodes and concepts not discussed in this introductory lesson to X3D http www e cartouche ch Version from 21 9 2007 6 Introduction to X3D eXtensible 3D 1 2 1 Structure X3D header As already mentioned in the previous unit X3D is an XML based language for the description of Virtual Reality environments The X3D XML file contains the root node lt X3D gt Its child nodes are lt head gt optional and lt Scene gt The latter contains all the definitions and d
7. viewer supports it http www e cartouche ch Version from 21 9 2007 40 Introduction to X3D eXtensible 3D However so far only geodetic GD latitude longitude elevation geocentric GC X Y Z or Universal Transverse Mercator UTM northing easting elevation are supported as spatial reference frames e High precision coordinates Most computer graphics systems including X3D use single precision floating point values to model and render all geometry However single precision is insufficient to model data over the range of the earth at accurate ground resolutions For visualizing the earth georeferenced data it is not possible to achieve resolutions better than around 0 8 metres using single precision floating point numbers This geo referencing problem is one avoided by establishing a geo referenced local coordinate system LCS An absolute geo referenced location is defined as the origin of the LCS the GeoOrigin node This becomes the reference point that correlates to the X3D world s 0 0 0 origin e Navigation Browsing large geographic areas needs different navigation concepts The elevation scaled velocity makes the velocity at which users can navigate around a world dependent upon their height above the terrain This behavior is addressed by the GeoViewpoint node e Streaming The GeoLOD node provides a terrain specialized form of the LOD node It is a grouping node that specifies two different levels of detail for a
8. we have discussed the IndexedFaceSet node With this structure we can build any object we want to We could also build terrain surfaces However for this X3D offers a special geometry node the ElevationGrid node The ElevationGrid node specifies a uniform rectangular grid of varying height in the Y 0 plane of the local coordinate system The geometry 1s described by a scalar array of height values that specify the height of a surface above each point of the grid The xDimension and zDimension attributes indicate the number of elements of the grid height array in the X and Z directions The vertex locations for the rectangles are defined by the height attribute and the xSpacing and zSpacing attributes e The height attribute is an xDimension by zDimension array of scalar values representing the height above the grid for each vertex e The xSpacing and zSpacing attributes indicate the distance between vertices in the X and Z directions respectively xDimension 5 normal 4 Has LAA Pt dG Sd height 19 Zapacng 9 P o E lb z 17 xs pacing 15 Structure of the ElevationGrid geometry http www e cartouche ch Version from 21 9 2007 26 Introduction to X3D eXtensible 3D ElevationGrid xDimension 3 zDimension 4 xSpacing 2 z5pacing 2 height 1 0 0 PP EE 00 2 0 1 1 5 0 0 0 gt ElevationGrid Code example of the ElevationGrid node Sa X3D specification ElevationGrid node Texture o
9. 2007 17 Introduction to X3D eXtensible 3D 1 2 5 Transformation Transform node The Transform node enables positioning of objects at different locations in the X3D scene It is possible to move translation rotate rotation or scale scale objects Basically the Transform node is a grouping node that defines a coordinate system for its children that is relative to the coordinate systems of its ancestors The most used fields of the Transform node are described in the table below Transformation parameters Distances along the three axes x translation 1 2 1 y Z rotation Axis of rotation and angle of rotation 0 13105 rotation scale Scale factor along one or several of erale 0 505025 the three axes x y Z Transform node example The following example shows the same except the colour box twice The blue original box is at position 0 0 0 in the coordinate system The red box is the same box as the blue one but translated rotated and scaled lt xml version 1 0 encoding UTF 8 gt hirse p join _ m ar oe Only pictures can be viewed in the PDF xmins xsi hitp Aww w3 org 20017 XMLSCNE version For Flash etc see online version xsinoNamespaceSchemaLocation 18pecl Only screenshots of animations will be S LENE displayed link lt 5hape Box size 1 1 21 sAppearance Material diffuseColor 0 3 0 4 0 87 Appearance Shape Transform translation 1 2 1 rotation 0
10. 7 37 Introduction to X3D eXtensible 3D 1 5 1 Level of Detail LOD LOD node The LOD node specifies various levels of detail or complexity for a given object and provides hints allowing browsers to automatically choose the appropriate version of the object based on the distance from the user 79 19 Example of different level of detail LOD for a building model The subnodes of the LOD node are a number of nodes that represent the same object or objects at varying levels of detail ordered from highest level of detail to the lowest level of detail The range attribute specifies the ideal distances at which to switch between the levels The center attribute is a translation offset in the local coordinate system that specifies the centre of the LOD node for distance calculations The number of subnodes in the LOD node needs to exceed the number of values in the range field by one ID center 0 0 0 range 10 20 gt In this example the box is replace twice at a distance Shape of 10 and 20 from the coordinate origin by a slightly Box size 1 1 2 gt lt Appearance lt Material difuseColor 0 3 0 4 0 8 7 Appearance Mhape Shape Box size 1 5 1 5 34 sAppearance Material diffusetolor 0 3 0 4 0 871 lt Appearance Mhape Shape Box size 2 2 41 sAppearance Material difuseColor 0 3 0 4 0 8 7 Appearance Mhape OD gt bigger box LOD node code example Hint The LOD node can also be used to hide objec
11. 80608 08 08 a 0 version For Flash etc see online version 08 08080808 083080809080 Ouly Screens of animations will be 0 8 0 6 0 8 0 9 0 8 0 6 0 8 0 8 0 5 i a 0 6 0 7 0 6 0 6 0 8 0 7 0 8 0 8 0 8 0 8 0 8 0 6 0 8 0 8 0 8 0 7 0 8 0 8 0 8 0 Remark To be able to see the terrain you need to DH 0 7 0 7 0 7 0 7 0 7 0 6 0 7 0 7 0 7 U change the viewpoint a little 0 3 0 7 0 5 0 7 0 7 0 6 0 5 0 6 0 6 0 5 0 6 0 6 0 5 0 6 0 6 0 6 0 6 0 5 0 5 0 6 0 6 06 gt i i IShape gt lt Transtorm Task Wormls terrain Play a little with the ElevationGrid node You can for example build hills or depressions into the underground of Worml http www e cartouche ch Version from 21 9 2007 28 Introduction to X3D eXtensible 3D 1 4 X3D scenes Only pictures can be viewed in the PDF version For Flash etc see online version Only screenshots of animations will be displayed link Up to now we have mainly discussed geometries and their appearances This unit concentrates on the non geometrical aspects of a 3D scene Same as in the real world we can t see a thing in the virtual environment if there is no lighting defined So far we were able to look at the objects we defined because wearing a virtual headlight is a standard setting in X3D scenes In this unit you will learn how to define different light sources Additionally we can design a background different from black inf
12. F little version For Flash etc see online version Below you learn how to construct my body This looks Only screenshots of animations will be quite difficult but it isn t displayed link http www e cartouche ch Version from 21 9 2007 23 Introduction to X3D eXtensible 3D lt xml version 1 0 encoding UTF 8 7 Firstly we combine W rmls head eyes and hut within X3D profile Full version 3 0 a Transform node and translate all these objects 1 0 w3 org 2004 KMLSch dewards sane the scene Then we can build the dy of Ormi b below the head We define 5 Material node with diffuseColor red 1 0 0 We use DEF to name the box Box Naming a geometric object allows reusing this object later on The Coordinate node contains all the indexed spatial mins xsi http Aww ksi noNamespaceschemaLocation ASPECK lt Scene Transform translation 0 10 gt ip Nomis head Wormls hat gt coordinates in the attribute point In the attribute I Worms eyes gt coordIndex of the IndexedFaceSet node all the faces Transform of the box are defined Each face consists of four spatial coordinates and the first coordinate is listed at ll W rmls body gt the end again We end a face definition with 1 lt ll Red box For the orange box we reuse and translate the red Shape gt box We can use the definition of the red box by Appearance gt calling it USE Box and assign the colour orange Mate
13. Introduction to X3D eXtensible 3D Introduction to X3D eXtensible 3D Content li Introductionito XD extensible Di in 2 LEDD EEE MD vvs 3 RETTENE ee 4 KEZ CCG oror A DE PE ER NR E TES 5 LEN 6 LT Se AAA E e Ee Eae E E a A E 7 ENN 10 Ls DAN NR 11 e e A e o e A 14 125 PramSLOMmmatiOny sva 18 MD De OD ACY ANC ECO COME UCS ee 21 LS JEMEN FEN NG 22 ESA DANN 26 TAA DOC IES ara ares n ciate dl ls So 29 TLF roren 30 BIN 32 LAS NN ere 34 VPS 35 LATE XD PN eee 37 SLET DEN LOD ae 38 152 The Geospatial component Ol 2650 lirio 40 16 MOST sara 42 http www e cartouche ch Version from 21 9 2007 1 Introduction to X3D eXtensible 3D 1 Introduction to X3D eXtensible 3D This lesson is a practical step by step introduction to X3D extensible 3D theMighty Atom 2007 TurricaN 2007 Learning Objectives e You are able to explain the definitions of existing X3D files and to view and navigate these files e Youareable to create X3D virtual environments representing simple real world objects using geometric primitives coordinate based geometries elevation grids transformations and appearance definitions e You are able to improve X3D files by defining scene settings such as simple lighting background navigation and viewpoints e You are able to explain the levels of detail LOD and geo concepts of X3D e You are to apply the LOD concept to simple objects in a X3D virtual environment http www e cartouch
14. Standard units ISO IEC 19775 2004 The units of a X3D scene are defined implicitly Thus 1f you want to use milimetres instead of metres you can do so Just look at the entered values as milimetres instead of as metres You do not need to define anything http www e cartouche ch Version from 21 9 2007 10 Introduction to X3D eXtensible 3D 1 2 3 Simple 3D objects Shape node The basic building blocks of a virtual world are objects or solids which have a shape or form and consist of a specific material Quite similarly to the real world The characteristics of the material of the object such as colour or texture are defined as surface characteristics The X3D Shape nodes combines the geometry of an object with its material characteristics It has two subnodes a geometry node see below and the Appearance node lt Shape gt Box size 2 2 2 gt lt Appearance gt lt Material diffuseColor 1 0 0 Appearance lt 5Shape gt Example of the Shape node NE nn X3D specification Shape node Geometry nodes The term geometry node stands for a selection of nodes describing the geometry of simple boxes to complex spatial objects X3D offers a number of predefined geometries so called geometric primitives such as box cone cylinder or sphere but also objects with irregular surfaces and elevation models The following sections describe the geometric primitives Box node lt Shape Box size 1 1 2 gt lt A
15. e ch Version from 21 9 2007 2 Introduction to X3D eXtensible 3D 1 1 X3D extensible 3D What is X3D X3D short for extensible 3D Graphics is an open xml based standard for Web enabled interactive 3D content The X3D standard is developed by the Web3D Consortium X3D supports http www e cartouche ch Version from 21 9 2007 3D graphics Polygonal geometry parametric geometry hierarchical transformations lighting materials and multipass multi stage texture mapping 2D graphics Text 2D vector and planar shapes displayed within the 3D transformation hierarchy Animation Timers and interpolators to drive continous animations humanoid animation and morphing Spatialized audio and video Audiovisual sources mapped onto geometry in the scene User interaction Mouse based picking and dragging keyboard input Navigation Cameras user movement within the 3D scene collision proximity and visibility detection Networking Ability to compose a single X3D scene out of assets located on a network hyperlinking of objects to other scenes or assets located on the World Wide Web User defined objects Ability to extend built in browser functionality by creating user defined data types PROTOs Scripting Ability to dynamically change the scene via programming and scripting languages Physical simulation Humanoid animation geospatial datasets integration with Distributed Interactive Simulation DIS protocols Introd
16. escriptions of the scene content as we will see below and in the further units of this lesson lt X3D xmilns xsi htitp vw w3 org 2001 XMLschema lnstance xstnoNamespaceschemaLocation specix3d 3 0 xsd profile Full version 3 0 gt lt head gt lt meta content Susanne Bleisch name Author gt lt meta content 10 september 2007 name GreationDate lt head gt lt SCene Example X3D file header Sa X3D specification AbstractX3DStructure explanations Root node attributes The root node has two attributes that allow specifying the profile and version of X3D used for this file http www e cartouche ch Version from 21 9 2007 7 Introduction to X3D eXtensible 3D profile Core X3D specification Core profile Interchange X3D specification Interchange Interactive profile MPEG4 Interactive X3D specification Interactive profile ise X3D specification MPEG 4 interactive profile 11 z Fu QS X3D specification Immersive Immersive profile X3D specification Full profile The different profiles define subsets of the X3D elements to be used for specific applications The full profile includes all X3D elements version 3 0 The current version of X3D is 3 0 Meta information The element lt head gt may contain meta information about the file Several as many as needed lt meta gt elements with the attributes name for the description of the information and content
17. ewpoints Viewpoint node The Viewpoint node defines a specific location in the local coordinate system from which the user may view the scene The different viewpoints within a scene can be named and most often accessed in the viewer This way 1t 1s possible to define sort of a sightseeing tour through the virtual world or at least serve the user with different pre defined views of the scene The position and orientation attributes of the Viewpoint node specify relative locations in the local coordinate system Position is relative to the coordinate system s origin 0 0 0 while orientation specifies a rotation relative to the default orientation In the default position and orientation the viewer is on the z axis looking down the z axis toward the origin with x to the right and y straight up Viewpoint description From Top position 0 10 0 fleldOfView 0 78 orlentation 1 0 0 1 577 Example of the Viewpoint node X3D specification Viewpoint node There are free tools available for the easy definition of viewpoints calculation of the orientation parameters Most of them were programmed for VRML but the values can also be used for X3D Example VRML Viewer Download View Worml Hi below you ll learn how you can define one or several Only pictures can be viewed in the PDF viewpoints to have a better look at me version For Flash etc see online version Only screenshots of animations will be displayed link ht
18. hat is allowed e g FLY WALK or EXAMINE or the speed of navigation The attribute headlight allows switching on and of the headlight As soon as there are light sources defined in the virtual environment the headlight might be switched off set to false In most viewers it is also possible to switch on or off the headlight via the menu Navigationinto headlight false speed 1 type amp quot EXAMINE amp quot Example of the NavigationInfo node X3D specification NavigationInfo node W rml Different scene parameters Hi in previous unit we have defined some sunlight for Only pictures can be viewed in the PDF version For Flash etc see online version my environment Thus we can now switch off the headlight Additionally we set navigation mode to Only screenshots of animations will be EXAMINE displayed link Hint You can change the navigation mode via the menu e g right click into the 3D scene in most X3D viewers too lt l Navigation and scene information gt Naviqationinfo headlight false Only pictures can be viewed in the PDF type amp quotEXAMINE amp quot version For Flash etc see online version Only screenshots of animations will be displayed link Task Navigation You may want to play a little with different navigation and scene settings for the W rml scene http www e cartouche ch Version from 21 9 2007 34 Introduction to X3D eXtensible 3D 1 4 4 Vi
19. he local coordinate system A point light source emits light equally in all directions that is it is omnidirectional Example light bulb The SpotLight node defines a light source that emits light from a specific point along a specific direction vector and constrained within a solid angle Spotlights may illuminate geometry nodes that respond to light sources and intersect the solid angle defined by the SpotLight Example torch light lt DirectionalLight ambientintensity 0 color 1 1 1 direction 0 1 0 intensity 1 PointLight ambientintensity 0 color 1 1 1 intensity T location 4 4 4 radius 20 5potLight beam Width 1 5708 direction 0 1 0 ambientintensity 0 color 1 1 1 intensity 1 location 4 4 4 radius 20 f gt A light source in the virtual world does not cast shadows The calculation of light reflections on the surfaces of objects is to expensive to do it in real time If you want to have shadows in your virtual world you ll need to program them by yourself http www e cartouche ch Version from 21 9 2007 30 Introduction to X3D eXtensible 3D Lighting for Worml Only pictures can be viewed in the PDF version For Flash etc see online version Only screenshots of animations will be displayed link E Lights gt Hi when my surroundings will be lighted with sunlight as described below we might shut off the headlight You will learn how to do t
20. his in the next unit DirectionalLight direction 0 3 0 3 0 3 ambientintensity 0 2 color 1 1 1 gt We use a DirectionalLight node for the lighting of the 3D scene This is about the same lighting as the sunlight in the real world Task Lighting Only pictures can be viewed in the PDF version For Flash etc see online version Only screenshots of animations will be displayed link Play a little with different light sources You might want to place a spotlight to light up the hat of Worml http www e cartouche ch Version from 21 9 2007 31 Introduction to X3D eXtensible 3D 1 4 2 Background Background node Defining a background in a virtual environment can make the scene look more realistic With the Background node we can either define the background as series of continuous colours or as a textured background cube For the first you need to define different colours and the angles where they are used For the latter you need texture files for each side of the cube A simple white or coloured background can be defined using the attribute skyColor set to the selected colour e g 1 1 1 for white Background lay skyColor 0 0 10 8 00 51 111 skyAngle 0 785 1 571 ener groundColor 0 0 0 0 30 30 3 0 50 50 5 one groundAngle 0 765 151 7 gt Weiss Horizont H ellgr au round rau Soc Fu arz In this example are the colours for the sky above the horizon blue light blue white and black g
21. hp modelname Earth amp username TurricaN amp uid 472 amp version 2 Accessed 20 September 2007 http www e cartouche ch Version from 21 9 2007 42
22. ight 3 gt 16 lt Appearance gt 1 Material emissivelolor 0 0 3 UO YS 15 Z Appearancel gt 13 lt Shapes aU lt r Trans iori al les Bog gt A2 lt Transform translation l 0 0 gt 23 hap a gt al Box sizge 2 gt 25 lt Appearance gt 26 lt Material diffusetolor 0 3 0 4 0 8772 al lt Appeearance gt 25 Shape an lt r Trans fori 30 lt y ocene al lt P gt Example of a simple X3D file Only pictures can be viewed in the PDF version For Flash etc see online version Only screenshots of animations will be displayed link http www e cartouche ch Version from 21 9 2007 9 Introduction to X3D eXtensible 3D 1 2 2 Units Coordinate system X3D uses a right handed Cartesian coordinate system see figure below The system consists of three spatial axes x y and z Definitions of coordinates or sizes are made in this order Expressed as dimensions x means width y means height and z means depth When creating a X3D scene the coordinate origin is 0 0 O x y z and lies in the centre of the scene Every element is placed at the coordinate origin if it is not translated Y CV X FA Z X3D coordinate system Note that the positive x axis points to the front of the scene Units The basic unit of measure used in X3D scenes is meters The following list shows the other standard units employed in X3D scenes Colour space RGB 0 1 0 1 0 1
23. luence the navigation and add different viewpoints to a virtual environment Enjoy http www e cartouche ch Version from 21 9 2007 29 Introduction to X3D eXtensible 3D 1 4 1 Lighting The surface properties of a 3D object are dependent on the material definition Material node and the lighting of the scene To have minimal lighting in the 3D scene the X3D viewer adds a default light source to the scene the headlight The headlight is comparable to a far away light source that emits its light in parallel rays This light source moves together with the viewer or rather the objects are always lit from the user s viewpoint The headlight can be turned off if other light sources are defined within a 3D scene Within a 3D scene we can place as many light sources as needed Using different light sources in a 3D envrionment allows simulating different real world situations and conditions such as lamp light twilight fog or sun rise Types of light sources DirectionalLight DirectionalLight node PointLight PointLight node SpotLight SpotLight node The DirectionalLight node defines a directional light source that illuminates along rays parallel to a given 3 dimensional vector The direction attribute specifies the direction vector of the illumination emanating from the light source in the local coordinate system Example sunlight The PointLight node specifies a point light source at a 3D location in t
24. n ElevationGrid nodes The texture for a ElevationGrid node e g contained within an ImageTexture node is laid onto the surface as described in the materials section The size of the original texture is kept and the origin of the texture coordinate system coincides with the origin of the elevation grid The s texture coordinate axis lies along the positive X axes and t texture coordinate axis along the positive z axis of the elevation grid This results in a mirrored texture along the x axis of the elevation grid To avoid this the texture needs to be mirrored previously Extrusion node The Extrusion node specifies geometric shapes based on a two dimensional cross section extruded along a three dimensional spine in the local coordinate system The cross section can be scaled and rotated at each spine point to produce a wide variety of shapes An Extrusion node is defined by e a2DcrossSection piecewise linear curve described as a series of connected vertices e a3D spine piecewise linear curve also described as a series of connected vertices e alist of 2D scale parameters e alist of 3D orientation parameters sExtrusion DEF Hull crease ngle 3 14 crossSection 0 1 0 38 0 92 0 710 71 0 92 0 38 10 0 92 0 38 0 71 0 71 038 092 0 1 orientation 1000 1000 1000 0100 001 0 5 scale 34 44 44 44 5 1 solid false spine 2000 1700 000 1000 22 1 0 Example code of the Extrusion node Only pictures can be viewed in the PDF ve
25. n X3D The colour is missing yet We will learn about material definitions including colours in the next section Only pictures can be viewed in the PDF version For Flash etc see online version Only screenshots of animations will be displayed link Create an X3D file representing W rmls head without any colour Hint W rmls head has the size 2 diameter Solution http www e cartouche ch Version from 21 9 2007 13 Introduction to X3D eXtensible 3D 1 2 4 Surface of objects Appearance node The Appearance node is a child node of Shape The subnodes of Appearance are Material and a number of different texture nodes For the construction of the hat and head of W rml we have not used the Appearance node Thus the objects are displayed in the default appearance with colour white But normally the Appearance node is used to define the display of the objects their colour or texture Appearance gt Material diffuseColor 0 6 0 0 8 specularColor 0 0 0 transparency 0 3 gt lt Material gt lt Appearance gt Example of the Appearance node Sa X3D specification Appearance node Material node The Material node is used to specify the surface material properties or mainly the colour of an object The fields in the Material node determine how light reflects of an object to create colour There are six fields which can contain single values between 0 and 1 or arrays of values between 0 and I ambientI
26. n object using a tree structure where 0 to 4 children can be specified and also efficiently manages the loading and unloading of these levels of detail Thus not the whole scene needs to be loaded from the beginning e Metadaten The GeoMetadata node supports the specification of metadata describing any number of geospatial nodes This is similar to a WorldInfo node but specifically for describing geospatial information There are a number of standards and representations for geospatial metadata Rather than adopt any particular standard the purpose of the GeoMetadata node is to provide links to any of these complete metadata descriptions with the option to also supply a short human readable summary http www e cartouche ch Version from 21 9 2007 41 Introduction to X3D eXtensible 3D 1 6 Bibliography e ISO IEC 19775 2004 Information technology Computer graphics and image processing Extensible 3D X3D online Available from http www web3d org x3d specifications ISO IEC 19775 X3DAbstractSpecification Accessed 22 August 2007 Download spec ISO IEC 19775 X3DAbstractSpecification X3D html e theMightyAtom 2007 Scene Details Reflections online Available from http www mediamachines com show php modelname Reflections amp username theMighty Atom amp uid 233 amp versio Accessed 20 September 2007 e TurricaN 2007 Scene Details Earth online Available from http www mediamachines com show p
27. nce In this unit we will go a step further version For Flash etc see online version and look at some additional geometry types needed Only screenshots of animations will be displayed link for rebuilding more complex real world objects in the virtual environment Typical examples are objects built from faces or terrain displays Have fun http www e cartouche ch Version from 21 9 2007 21 Introduction to X3D eXtensible 3D 1 3 1 Coordinate based geometries Coordinate node The base for modelling user defined objects e g point clouds wire frame models or objects built from polygons are spatial coordinates The Coordinate node allows to define spatial coordinates in the field point It cannot be used standalone but serves as coordinate repository of the geometry nodes introduced below oordinate point 1 0 0 1 1 0 i 10 01 10 1 0 0 1 1 0 1 0 0 1 1 0 1 0 0 1 1 0 1 0 0 1 1 0 1 0 0 1 1 0 1 0 0 1 1 0 Example of the Coordinate node Each point for which the spatial coordinates are stored in the Coordinate node is indexed Thus the first point 3 coordinate values has index 0 the second has index 1 and so on Sa X3D specification Coordinate node Geometries The following geometries are all based on the definition and linking of points or rather spatial coordinate triples PointSet The PointSet node specifies a set of PointSet gt 3D points in the local coordinate ee ar mpna
28. ntensity The ambientIntensity field lambientintens ity 0 2 specifies how much ambient light from light sources this surface shall reflect diffuseColor The diffuseColor field reflects all I aiffjjseColor 0 320408 X3D light sources depending on the angle of the surface with respect to the light source The more directly the surface faces the light the more diffuse light reflects emissiveColor The emissiveColor field models emissivecolor 0 40803 glowing objects specularColor and shininess The specularColor and shininess chininess 0 2 specularColor 0 0 0 fields determine the specular highlights e g the shiny spots on an apple Lower shininess values produce soft glows while higher values result in sharper smaller highlights http www e cartouche ch Version from 21 9 2007 14 Introduction to X3D eXtensible 3D transparency The transparency field specifies trans parency 0 5 how clear an object is with 1 0 being completely transparent and 0 0 completely opaque Most simply you define a diffuseColor of an object X3D uses scaled RGB colours Meaning that you define the three components of RGB but in value ranges from 0 to 1 The value 114 is then 0 447 or 1 255 114 For example red is defined as diffuseColor 1 0 0 or yellow as diffuseColor 1 1 0 X3D specification Material node Texture nodes Beside defining colours X3D allows using different textures to model the ap
29. pearance of objects You have the choice between using static image and dynamic movie textures ImageTexture The ImageTexture node defines a ma g elTextu re url textu re jpa texture map by specifying an image file and general parameters for ImageTexture mapping to geometry The texture node is read from the URL specified by the url field MovieTexture The MovieTexture node defines lt HMovieTexture url movie avi gt a time dependent texture map NE contained in a movie file and MovieTexture parameters for controlling the node movie and the texture mapping A MovieTexture node can also be used as the source of sound data for a Sound node In this special case the MovieTexture node is not used for rendering MultiTexture MultiTexture enables the lt MultiTexture mode ADD application of several individual mageTexture url texturet jpg pr textures to a 3D object to achieve a ImageTexture url texture jpg lt MultiTexture MultiTexture more complex visual effect node Additionally you can use PixelTexture PixelTexture node or extend this set of texture nodes by creating new nodes derived from the abstract X3DTextureNode base class http www e cartouche ch Version from 21 9 2007 15 Introduction to X3D eXtensible 3D Texture coordinates Texture maps are defined in a 2D coordinate system s t that ranges from 0 0 1 0 in both directions The bottom edge of the image corres
30. ponds to the S axis of the texture map and left edge of the image corresponds to the T axis of the texture map The lower left pixel of the image corresponds to s 0 t 0 and the top right pixel of the image corresponds to s 1 t 1 A N Ler EE EE ME ee mm Fr 5 Texture map coordinate system Wormls coloured hat Only pictures can be viewed in the PDF version For Flash etc see online version Only screenshots of animations will be displayed link Hi below you learn how my hat gets its colour For that I use the already existing X3D file with the geometry definition of my hat Then I just need to add the material node with the colour definition http www e cartouche ch Version from 21 9 2007 16 Introduction to X3D eXtensible 3D lt imiversion 1 0 encoding UTF 8 lt X3D profile Full version 3 0 xmlns xsi hilp Mew w3org DO TXMLSche xsinoNamespaceSchemaLocation Aspect Only screenshots of animations will be SCene displayed link lt 5hape Cone bottomRadius 0 7 hei ght 2 gt Appearance Material diffuseColor 0 38 0 12 0 40 gt IAppearance gt lt Shape lt SCcene X3D Only pictures can be viewed in the PDF version For Flash etc see online version Task W rmis coloured head Create an X3D file applying a texture to W rmls head Hint The texture file is test jpg Solution http www e cartouche ch Version from 21 9
31. ppearance gt Material diffuseColor 03 040 lt A PPesrance lt Shape X3D specification Box node Cone node http www e cartouche ch Version from 21 9 2007 11 Introduction to X3D eXtensible 3D lt Shape gt lt Cone bottomRadius 1 height 3 lt Anpearance gt Material emizsiveColor 0 0 5 0 lt A PPeSrance Shapes height a bottomRadius Sa X3D specification Cone node Cylinder node Y tm lt Shape gt lt Cvlinder height 3 radius 1 5 gt lt Appearance gt Material emissivetolor 0 0 15 lt APppearance gt lt Shape sd height X3D specification Cylinder node Sphere node lt Shape gt Sphere radius 2 75 lt Appearance gt lt Material emis ivetlolor 0 5 0 1 lt APppearance gt Shape gt X3D specification Sphere node http www e cartouche ch Version from 21 9 2007 12 Introduction to X3D eXtensible 3D Wo rmls hat Only pictures can be viewed in the PDF version For Flash etc see online version Only screenshots of animations will be displayed link lt xml version 1 0 encoding UTF 5 gt lt X aD profile Full version 3 0 xmilns xsi http 4 xsi noNamespaceSchemaLocation D eLML 9 lt 5CEeNe gt lt s5hape gt lt Cone bottomRadius 0 7 height 2 gt lt Co lt S hape gt lt SCene gt lt X3D gt Task Wormls head Hi below you learn how my hat is constructed i
32. rey light grey for the ground below the horizon X3D specification Background node Background for Worml Hi not much to explain to this example Nice that I don t Only pictures can be viewed in the PDF eed to stand in a dark cave any longer version For Flash etc see online version Only screenshots of animations will be displayed link lt Background gt Background skyColor 0 0 0 1 0 8 0 0 0 5 1 0 1 0 1 0 LO Only screenshots of animations will be We define the background for the sky area above the displayed link horizon only The colours used are blue light blue Only pictures can be viewed in the PDF version For Flash etc see online version and white The blue colour comes a bit closer to the horizon This is defined in the attribute skyAngle http www e cartouche ch Version from 21 9 2007 32 Introduction to X3D eXtensible 3D Task Background You may want to play a little with different background settings for the W rml scene http www e cartouche ch Version from 21 9 2007 33 Introduction to X3D eXtensible 3D 1 4 3 Navigation NavigationInfo node The NavigationInfo node contains information describing the physical characteristics of the viewer s avatar and viewing model The parameters that are defined in this node are used by the X3D viewer to configure the environment In the NavigationInfo node it is possible to specify the type of movement t
33. rial difuseColor 1 0 0 0 o py Material node diffuseColour 1 0 5 0 We then move lt l Red colour gt this orange box 0 3 towards the bottom of the scene Appearance gt using a Transform node AA DEF Box coordinds n A 1 11 1 5 6 2 1 1 Only pictures can be viewed in the PDF 2 6 f 4 24 1 version For Flash etc see online version 3 7 40 3 1 Only screenshots of animations will be 4 7 6 5 4 1 displayed link 01230 lt Coordinate point 1 0 0 1 1 0 Pb 1100 01 10 1 0 0 1 10 1 0 0 1 10 1 0 0 1 1 0 1 0 0 1 1 0 1 0 0 1 1 0 Po 10 01 10 7 IndexedFaceset gt Shape gt lt l Orange box gt fra nstorm translation 0 0 0 3 0 0 gt lt 5hape lt Appearance gt Material diffuseColor 1 0 0 5 0 0 gt Appearance IndexedFaceset USE Box gt MShape gt Transform I lt Scene gt 24 X a D gt Introduction to X3D eXtensible 3D Task Wormls body Add the other coloured boxes to W rmls body Hints The colours of W rmls body are as following yellow diffuseColor 1 1 0 light green diffuseColor 0 5 1 0 green diffuseColor 0 1 0 light cyan diffuseColor 0 1 0 5 cyan diffuseColor 0 1 1 dark cyan diffusecolor 0 0 5 1 blue diffuseColor 0 0 1 Solution http www e cartouche ch Version from 21 9 2007 25 Introduction to X3D eXtensible 3D 1 3 2 Further 3D objects ElevationGrid node In the previous section
34. rsion For Flash etc see online version Only screenshots of animations will be displayed link Ss http www e cartouche ch Version from 21 9 2007 27 Introduction to X3D eXtensible 3D X3D specification Extrusion node Worms terrain Only pictures can be viewed in the PDF version For Flash etc see online version Hi we ll construct the terrain below my feet now The ElevationGrid node is a great thing With a few lines of code we can build quite complex landscapes Only screenshots of animations will be displayed link lt Warmls terrain gt We add the ElevationGrid node to the existing X3D lt Transtorm iranslation 22 0 3 5 22 f le To place the terrain beneath W rml we surround r s ppearance the node by a Transform node The terrain is moved 22 to the left 3 5 towards the bottom of the scene Material diffuseColor 0 0 1 0 04 7 the back lt JAp pearance gt Then we define the green colour of the terrain The ElevationGrid node defines the number of grid ElevationGrid xDimension 11 xSpacing 4 0 zDimension 11 vertices in x and z direction and also the space between the vertices zspacing 4 0 The attribute height defines for each grid vertices a height 0 5 0 5 0 6 0 6 0 6 0 6 O fbight above 0 FF 0 6 0 6 0 6 0 6 0 6 0 6 0 6 0 6 0 6 0 6 0 6 0 6 0 0 O7 O07 07 07 09 07 09 08 0 Only pictures can be viewed in the PDF 07 07 03 060
35. to associate real world locations to elements in the X3D world as well as specifying nodes particularly tuned for geospatial applications With the Geospatial component it is for example possible to embed geospatial coordinates in certain X3D nodes to support high precision geospatial modeling and to handle large multi resolution terrain databases Nine nodes comprise the Geospatial component e GeoCoordinate X3D specification GeoCoordinate node e GeoElevationGrid NE X3D specification GeoElevationGrid node e GeoLocation X3D specification GeoLocation node e GeoLOD e GeoMetadata e GeoOrigin X3D specification GeoOrigin node e GeoPositionInterpolator a X3D specification GeoPositionInterpolator e GeoTouchSensor node e GeoViewpoint X3D specification GeoTouchSensor node Nr X3D specification GeoViewpoint node Some of these node names should sound familiar as we already know the corresponding normal X3D nodes Notes on Geo X3D Some interesting aspects of the Geospatial component of X3D are e Coordinate systems It is possible to specify a geodetic or projective spatial reference frame and thus to deviate from the implicit Cartesian right handed three dimensional coordinate system defined by X3D see also X3D coordinate system in this lesson Scenes defined in different coordinate systems e g different UTM zones can geometrically correct be combined within a X3D viewer if the
36. tp www e cartouche ch Version from 21 9 2007 35 Introduction to X3D eXtensible 3D Vi En p O j nts mn e EE e DefaultView Only pictures can be viewed in the PDF p osition 5625 A version For Flash etc see online version orientation 0 5069 0 6594 0 05039 0 2294 Only screenshots of animations will be feldOView 0 8 gt displayed link Viewpoint description TopView position 0 300 orientation 1 0 0 1 5708 feldOView 0 8 gt Using the Flux X3D viewer you can right click into the 3D scene and change between the different viewpoints in the menu Views Task Viewpoints Add one or two more viewpoints to the W rml scene http www e cartouche ch Version from 21 9 2007 36 Introduction to X3D eXtensible 3D 1 5 Advanced X3D concepts Only pictures can be viewed in the PDF version For Flash etc see online version Only screenshots of animations will be displayed link Bye bye Hope you ve enjoyed me leading you through the previous units From now on you have to find your way by yourself But you are prepared Wish you good luck for your X3D future This unit introduces some further concepts of X3D the levels of detail LOD and real world geo aspects The LOD concept is introduced briefly here There exists a whole lesson about levels of details If you are interested ask your tutor if you can get access to that lesson http www e cartouche ch Version from 21 9 200
37. ts completely when the viewer is a specific distance away X3D specification LOD node http www e cartouche ch Version from 21 9 2007 38 Introduction to X3D eXtensible 3D LOD example Church The example of the church on the left hand side uses the LOD principle to show three different detailed Only pictures can be viewed in the PDF models of the church dependent on the distance of er i version For Flash etc see online version the viewer from the church The most detailed model Only screenshots of animations will be displayed link is shown at a distance lt 20 then the church model without texture 1s displayed and after a distance of 30 the generalised church model without roof shapes 1s shown Navigate backwards away from the church to see the three different models of the church Download the code of this example right mouse click save file as Task LOD for Wormls body Use the LOD node to implement three different models of W rmls body Hint You might want to model W rmls body as IndexedLineSet then as simple Box perhaps with a colour gradient and as detailed body with differently coloured boxes Possible solution http www e cartouche ch Version from 21 9 2007 39 Introduction to X3D eXtensible 3D 1 5 2 The Geospatial component of X3D So far we have always constructed virtual environments with local coordinate systems The Geospatial component of X3D describes how
38. uction to X3D eXtensible 3D 1 1 1 Related technologies X3D is the successor of VRML the virtual reality modelling language VRML in Wikipedia There exist related or similar technologies used for displaying 3D virtual environments Some of them are listed below e Collada http www collada org e U3D Universal 3D http www ecma international org e 3DML http www flatland com http www e cartouche ch Version from 21 9 2007 4 Introduction to X3D eXtensible 3D 1 1 2 Creation of X3D X3D file creation X3D is XML based XML Extensible Markup Language find more Information on http www w3 org XML and thus a X3D file is a text file structured by the XML elements that are defined in the X3D XMLSchema To create an X3D file you can use any text editor But it is more comfortable to use and XML editor see the list below or at least a text editor with syntax highlighting Using a specific XML editor allows attaching the X3D XMLSchema and checking the X3D file for well formedness and validity against the XMLSchema Download the X3D XMLSchemas to create your own X3D files Unzip them at a convenient location and reference the file x3d 3 0 xsd in the X3D files you are going to create The file suffix of X3D files is x3d Some XML editors e Cooktop free http www xmlcooktop com e Oxygen free trial 50 for the academic version http www oxygenxml com e XMLSpy free trial rather expensive http

Download Pdf Manuals

image

Related Search

Print printer printer queue printify printers and scanners print screen printables printers and devices printable calendar print jobs in queue print spooler printerlogic printable calendar 2025 printers \u0026 scanners printer settings print management printful login printify login print on demand printables 3d

Related Contents

Samsung Cheff Samsung Espejado Grande Con Dorador con Cerámica de Enamel 40 L Manual de Usuario  La gamme Recommandations d`utilisation Stérilisation et  Asante Technologies Voyager II Security Camera User Manual  User Manual - Weighing Scales  Vermessungs - Attenberger  SALAV GS45-DJ SILVER Use and Care Manual  

Copyright © All rights reserved.
Failed to retrieve file