1.1 - What is X3D?
X3D (eXtensive 3D) is the successor to VRML. Development of Standards and Content is administered by the Web3D Consortium: www.web3d.org
Improvements of X3D over VRML:
Many new nodes, such as geometry and scripting nodes
Improved graphical appearance and implementation of material shaders
New "Profile" field allows for classification of file content
Open system allows for better third party modelling integration, eg CAD, MPEG4
Consolidated (ECMA) scripting and a formal API provides improvements and better internet browser integration
XML syntax provides interchange possibilities between other XML datafiles and XML data resources
X3D Syntax comes in two programmable flavours:
An XML syntax, and a new file extension .x3d
A VRML-like syntax, and a new file extension .x3dv
NB: There is also a binary file format with file extension .x3db
1.2 - A Brief Introduction to XML syntax: XHTML and X3D
XML:
XML provides a systematic and stable technology for the storage, preservation and interchange of data
All XML documents store information in a series of nested tags, readable by humans and compters alike
Well formed XML documents refer to an external master doctype file to provide grammatical rules and structure
XHTML and X3D are different examples of well formed XML syntaxes and have their own doctype
X3D example:
... insert modelling nodes here
XHTML example:
Title
... insert html/image/text nodes here
1.3 - Differences between X3DV & X3D Syntax
Rewriting the VRML example found on slide 18
X3D Syntax:
X3DV Syntax:
#X3D V3.0 utf8
PROFILE Immersive
# A Cylinder
Shape {
appearance Appearance {
material Material { }
}
geometry Cylinder {
height 2.0
radius 1.5
}
}
1.4 - Current VRML and X3D Browser Plug-ins
Cortona:
Stable free VRML browser and has been the leading VRML plugin to date.
Using proprietory nodes, Cortona emulates many X3D features, but does not support X3D code yet.
Platforms: PC & Macintosh and most web browsers.
Available from www.parallelgraphics.com and is intalled on many PC's at RMIT.
Octaga:
Rapidly developing to be the leading X3D/VRML plug in.
Both the free version and the paid version supports VRML and X3D.
Platforms: PC, Macintosh and Linux and most web browsers.
Available from www.octaga.com
FreeWRL:
Free VRML and X3D open-source browser, still in development.
Platforms: Macintosh and Linux and most web browsers.
Available from http://freewrl.sourceforge.net
Xj3D:
Free VRML, X3D and Java3D open source browser, written completely in Java, still in development.
Platforms: Intended to be available across all platforms and all web browsers.
Available from www.xj3d.org
Week 1 - Activities
Reading
Lecture Slides 1 - 27
"Introduction to VRML97", section 1, pp. 1-27
Complete Lab 1 Exercises
"Introduction" from http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification
Web Resources X3D:
http://www.web3d.org/x3d/faq
http://www.xml.com/pub/a/2003/08/06/x3d.html
http://www.web3d.org/x3d/content/X3dTooltips.html
http://www.web3d.org/x3d/specifications/ISO-IEC-19776-2-Amendment1-X3DEncodings-XML/Part01/EncodingOfNodes.html
http://www.web3d.org/x3d/wiki/index.php/Node_Reference
2.1 - New 2D Geometry
There are many new standard 2D geometry types, some examples include:
Arc2D ArcClose2D (CHORD) ArcClose2D (PIE) Circle2D Disc2D (CD/DVD) Rectangle2D
Arc2D {
radius 1.0
startAngle 0.0
endAngle 1.5
}
ArcClose2D {
radius 1.0
startAngle 0.0
endAngle 1.5
closureType "CHORD"
}
ArcClose2D {
radius 1.0
startAngle 0.0
endAngle 1.5
closureType "PIE"
}
Circle2D {
radius 1.0
startAngle 0.0
endAngle 1.5
}
Disc2D {
innerRadius 0.2
outerRadius 1.0
}
Rectangle2D {
size 2.0 1.0
}
2.2 - Colour, Transparency and New colorRGBA Field
X3D & VRML transparency and diffuseColor fields:
Shape {
geometry Sphere {}
appearance Appearance {
material Material {
diffuseColor 0.5 0.7 0.2
transparency 0.8
}
}
}
New colorRGBA field:
The transparency and diffuseColor fields remain unchanged, however in advanced geometry nodes (see later in lectures 5 & 6), different colours can be assigned to individual
portions or facets of the geometry. In VRML, the transparency of the entire shape was uniform and was set by the transparency field in the material node.
In X3D, transparency and colour are being combined into a new 4 float field colorRGBA to allow variable colour and transparency for individual portions and facets of the geometry.
R = Red; G = Green; B = Blue; A = Alpha (ie transparency)
using same values as above in new field:
colorRGBA 0.5 0.7 0.2 0.8
2.3 - Transforms
The X3D syntax of the Transform node are as follows:
The X3DV syntax remains the same:
Transform {
translation ...
center ...
rotation ...
scale ...
children [
# nodes needing transformation go here
]
}
2.4 - Rotations: Spinning and Orbiting
Click Image to View VRML 2.0 Example
A rotation can be classified as:
spinning: where the object rotates about its centre or
orbiting: where the object rotates about a different point, often located outside the object
The centre point is determined by the center field and its default position is (0, 0, 0). By adjusting this value, we can
change the type of rotation to an orbiting rotation.
Transform nodes move, rotate and scale objects in a set order (ie translation first, then center, then rotation and finally
scale). Consequently the object and its center position will be translated by the same amount. In order to keep the centre
point fixed at the origin, you must set the centre field to the opposite value of the translation (see example).
Transform {
translation 2.0 0.0 0.0 # shifts cone and centre 2 units to the right
center -2.0 0.0 0.0 # shifts centre 2 units to the left, ie back to the origin
rotation 0.0 0.0 1.0 0.6
children [
Shape {
geometry Cone {}
}
]
}
Week 2 - Activities
Reading
Lecture Slides 28 - 115
"Introduction to VRML97", section 1, pp. 28-110
Complete Lab 2 Exercises
Read "Shape Component", "Geometry Component", and "Rendering Component" from
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification
Web Resources X3D:
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification/Part01/components/geometry2D.html
http://libx3d.sourceforge.net/screenshots.html
http://www.web3d.org/x3d/wiki/index.php/ColorRGBA
3.1 - New Rules and Conventions for X3D Fields
Initialise only Variables
Variables such as a shape's size are set at runtime, are not exposed and can not be altered once a scene has been loaded. These variables referred to in the VRML specifications as just
fields are now referred to as initialiseOnly fields.
In C and Java, variables of these types are classified as static.
Input Variables
Variables formerly referred to as eventIn fields are now refered to as inputOnly fields. These variables should be named with a prefix "set_".
Output Variables
Variables formerly referred to as eventOut fields are now refered to as outputOnly fields. These variables should be named with a suffix "_changed".
Input/Output Variables
Variables formerly referred to as exposed fields and can be used as input and output are now referred to as inputOutput fields. There seems to be no official naming convention for
these types of vaiables.
3.2 - New DEF, USE and Inline Syntax
Naming Nodes
DEF MY_TIMER TimeSensor {
cycleInterval 5
}
Reusing Nodes
DEF MY_MODULE Inline { url "myfile.x3dv" }
Transform {
translation 2 0 0
children [ USE MY_MODULE ]
}
3.3 - Interpolators and X3D Routing Syntax
X3D Interpolator Syntax
Note that key and keyValue are parameters and not nested tags
New Interpolators
VRML had a limited set of interpolators, for example, whilst there is a 3D coordinate interpolator, there is no 2D coordinate interpolator to do texture transforms. New interpolators
have been added, expanding the range of animation possibilities.
X3D Routing Syntax
X3DV Routing Syntax
ROUTE MY_TIMER.fraction_changed TO MY_INTERPOLATOR.set_fraction
Note that the X3D (XML) syntax has 4 parameters and the "TO" statement is not present
3.4 - IMPORT and EXPORT
In VRML, nodes inside Inlined modules lose scope and cannot be referenced in the main file. This is being changed with two new commands IMPORT and EXPORT.
An exposed (named) node is created in the module file using the EXPORT statement and that node can be referenced in the main file using the IMPORT statement.
NB: Use a robust naming convention to avoid duplication and confusion of node references.
X3D Syntax
Module File (my-module.x3d):
Main File:
X3DV Syntax
Module File (my-module.x3dv):
DEF MY_TIMER TimeSensor { ... }
EXPORT MY_TIMER AS MY_TIMER
Main File:
DEF MY_MODULE Inline { url "my-module.x3dv" }
IMPORT MY_MODULE.MY_TIMER AS MY_MODULE.MY_TIMER
Week 3 - Activities
Reading
Lecture Slides 116 - 160
"Introduction to VRML97", section 1, pp. 116-160
Complete Lab 3 Exercises
"Interpolation Component", "Time Component" from the following site:
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification
4.1 - Sensors
Sphere Sensor Cylinder Sensor Plane Sensor
SphereSensor {
autoOffset TRUE
offset 0 1 0 1.57
}
CylinderSensor {
minAngle 0 1 0 0
maxAngle 0 1 0 1.57
}
PlaneSensor {
minPosition 0 0 0
maxPosition 5 5 5
}
Keyboard Input Sensors
A welcome addition to X3D is the KeyboardSensor which senses alpha numeric (utf8) keystrokes and keystrokes from action keys such as the function keys, shift, alt, ctrl etc.
Separate routines exist for key-down and key-up events, so programming for keystrokes in game-like scenes can be made sufficiently responsive.
A StringSensor is another new keyboard sensor which reads an entire string and generates a finalText event when the enter key is pressed.
4.2 - Sensors - Tips
Plane Sensor
The PlaneSensor outputs SFVec3D data but is constrained to the XY plane. To change the plane orientation, nest the PlaneSensor inside a Transform. The following example rotates
the plane sensor onto the XZ plane, ie a table top
X3D Syntax
...
X3DV Syntax
Transform {
rotation 1 0 0 1.572
children [
DEF MY-PLANE PlaneSensor {}
Transform MOVE-ME Transform {
children [
...
]
}
]
]
4.3 - TimeSensor Improvements
Previously animation could only be started, stopped and reset using simple node routing. Pausing and resuming animation was only achieved through more complex scripting and
was difficult to implement correctly.
TimeSensor nodes now have set_pauseTime and set_resumeTime fields to assist with animation control. It is now possible to pause and resume animation when routing output from
TouchSensor nodes or other nodes into these fields.
Week 4 - Activities
Reading
Lecture Slides 161 - 174
"Introduction to VRML97", section 2, pp. 161-175
Complete Lab 4 Exercises
"Event Utilities" from the following site:
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification
Complete Self assessment exercises on materials and sensors
5.1 - Triangle Based Surface Nodes
IndexedFaceSet
Once the points in an IndexedFaceSet have been specified, they can be joined up in the coordIndex field in any way. This freedom does create some issues:
The process of creating each surface in the coordIndex node can be time consuming
Surfaces render correctly only when vertices are co-planar and so this node is not "foolproof"
Concave surfaces need a different (2 pass) rendering algorithm to render correctly
Triangle Based Geometry
TriangleSet, TriangleStripSet and TriangleFanSet nodes can be used instead of IndexedFaceSets. The advantage with these nodes are:
Vertices are joined up in a set way, removing the need for a coordinateIndex field
The triangle is a unitary surface in computer graphics for which rendering algorithms have been optimised
A triangle is always coplanar and always convex, so only one single pass rendering algorithm is required
The only new requirement is that the user must currently specify how many vertices there are in the fan-set and strip-set nodes.
Click here for an X3D example of all three triangle geometry nodes.
Indexed-Triangle Based Geometry
IndexedTriangleSet, IndexedTriangleStripSet and an IndexedTriangleFanSet nodes retain a coordinateIndex field (renamed index).
5.2 - TriangleSet
Click image to view a VRML2.0 simulation of a TriangleStripSet
...
...
TriangleSet {
coord Coordinate {
point [
0 0, 1 1 1, 2 0 0, 3 1 -1, 4 0 0,
5 1 1, 6 0 0, 7 1 -1, 8 0 0
]
}
...
...
}
NB There is also a TriangleSet2D, which takes 2D coordinates instead. Triangles are constrained to the X/Z plane.
5.3 - TriangleStripSet
Click image to view a VRML2.0 simulation of a TriangleStripSet
...
...
TriangleStripSet {
colorPerVertex FALSE
stripCount 9
coord Coordinate {
point [
0 0 0, 1 1 1, 2 0 0, 3 1 -1, 4 0 0,
5 1 1, 6 0 0, 7 1 -1, 8 0 0
]
}
...
...
}
5.4 - TriangleFanSet
Click image to view a VRML2.0 simulation of a
TriangleFanSet
TriangleFanSet {
colorPerVertex FALSE
fanCount 9
coord Coordinate {
point [
0.000 0.000 0.000, 1.000 0.000 0.000,
0.771 0.771 1.000, 0.000 1.188 -1.000,
-0.916 0.916 1.000, -1.412 0.000 -1.000,
-1.088 -1.088 1.000, 0.000 -1.677 -1.000,
1.293 -1.293 0.000 ]
}
...
...
}
...
...
Week 5 - Activities
Reading
Lecture Slides 175 - 198
"Introduction to VRML97", section 2, pp. 176-198 & pp. 221-237
Complete Lab 5 Exercises
"Geometry3D Component" from the following site:
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification
Complete Self assessment exercises on elevation grids and extruded surfaces
6.1 - Elevation Grid
X3D Syntax Example:
Note that height is a parameter of ElevationGrid and not a nested node like Normal, Color or TextureCoordinate.
6.2 - Extrusion
X3D Syntax:
Note that all attributes are parameters and that there are no nested nodes in an Extrusion.
6.3 - Introduction to NURBS
NurbsCurve
NurbsPatchSurface
NurbsTruimmedSurface
NURBS (Non-Uniform Rational B-Splines), Splines and Bezier Curves come from the same family of mathematics, first developed in the
1950's as an efficient and systematic way of generating smooth curves and surfaces. NURBS are commonly used in industrial design,
architecture and the automotive industry.
NURBS are created with control-point coordinates (shown left with grey points & dotted lines) which are used as guides to generate
smooth curves or surface geometry. The size of this array is determined by dimension in 1D or uDimension and vDimension in 2D and
can be open or closed by setting the closed, uClosed or vClosed boolean fields.
The complexity or order of interpolation can be of any order greater than 1 (1 being linear) and can be different in each dimension for 2D
NURBS (uOrder and vOrder). The default value is 3 and values greater than 4 are usually unnecessary.
The knot vector field (uKnot and vKnot in 2D) modify the gradient continuity of the geometry. There should be exactly n+k+1 knot
values, where n=order of NURBS and k=number of control points in each dimension. In X3D, the knot values must ascend.
By adjusting weight field elements, you apply more weight to each control point. Values must be greater than 0 and larger values
tighten-up the curve near a control point. This array must be the same size as the controlPoint array and the default value for each point is
1.
The tesselation field determines the smoothness of the geometry. A larger value results in smaller segments/facets but a longer rendering
time.
NB: "Middle of the road" default values are pre-generated for the order, knot, weight and tesselation fields. You only need to
provide data for these fields if you are not happy with the default shape.
Finally, combining NurbsCurves2D nodes with NurbsTimmedSurface nodes, holes can be cut into NURBS surface geometry.
Week 6 - Activities
Reading
Lecture Slides 199 - 258
"Introduction to VRML97", section 2, pp. 176-220
Complete Lab 6 Exercises
"Geometry3D Component" and "Nurbs" from the following site:
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification
Complete Self assessment exercises on coordinate-based geometries
Web Resources VRML:
Extrusions tutorial: http://www.lighthouse3d.com/vrml/tutorial/index.shtml?extru
Parallel Graphics' GUI Extrusion Editor. Note that the trial version has a time limit
Web Resources X3D:
A brief history of Nurbs and Splines: http://www.en.wikipedia.org/wiki/Nurbs
An animated construction of a spline curve: http://www.en.wikipedia.org/wiki/Image:Spline01.gif
A good interactive splines tutorial: http://www.ibiblio.org/e-notes/Splines/Intro.htm
7.1 - 3D Textures
In X3D there is now support for placing 3D images into geometry rather than pasting 2D images onto surfaces. By specifying or adjusting geometry, 3D pixels (voxels or texels) are
exposed in the same way as carving or sculpting exposes texture in blocks of marble or woodgrain.
3D Image Nodes
3D Images come in two main flavours:
ImageTexture3D: True 3D image data with voxels or texels instead of pixels
ComposedTexture3D: A series of layered 2D textures that are given artificial depth
3D TextureTransforms (s,t & r space)
There are two different 3D Texture tranform nodes:
TextureTransform3D: has center, translation, scale and rotation fields
TextureMatrixTransform: has a single 4x4 matrix field instead
3D Texture Coordinates
We can crop an image in 3 Dimensions using the TextureCoordinate3D node before applying it to a geometry node.
7.2 - Lighting and Multi-Texture
Lighting
In X3D, there are no new lighting nodes, but it is now possible to control which shapes are affected by lighting nodes by setting the global field to either true or false.
global TRUE: All geometry nodes in the scene are illuminated.
global FALSE: Only geometry nodes within the same transformation hierarchy are illuminated
Multi-texturing
The new MultiTexture node is a more sophisticated Texture node and allows for a complex combination of different textures. The way in which each texture interacts and combines
with another is controlled by the mode field, which contains a list of combination intructions for each texture. Different strategies include:
Simple layering: combining textures with varying alpha values to recreate flesh and skin tones
Bump or Gloss Mapping: where pixel values represent information on geometry (depth) or "varnish" thickness
Colour Replacement: where textures replace or modulate color fields such as diffuseColor, specularColor etc.
Week 7 - Activities
Reading
Lecture Slides 259 - 351
"Introduction to VRML97", section 3, pp. 259-289
Complete Lab 7 Exercises
"Texture Component", "Rendering Component" and "Lighting Component" from the following site:
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification
Complete Self assessment exercises on texturing and lighting
Web Resources X3D:
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification/Part01/components/texturing.html#MultiTexture
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification_+_Amendment1_to_Part1/Part01/components/texture3D.html
8.1 - Fog and Background
No improvements or changes have been made to Background node, other than internal improvements to shading and rendering.
A new FogCoordinate node called depth has been added to generate non-spherical fog patches. Each coordinate represents a point at which visibility drops to zero. If present, the
depth field overrides the single visibilityRange value found in the Fog node. .
X3D Syntax
New Local Fog Node
A new non-bindable node LocalFog whose effects are no longer global or centred on the viewpoint. The LocalFog node can be moved and scaled by nesting it within a Transform
Node. The effects from the closest LocalFog to the active viewpoint node will override any other fog effect (ie effects from overlapping fog-nodes are non-cumulative).
NB: The LocalFog node is yet to be fully implemented in all X3D browsers
8.2 - Viewpoints and Navigation-Info
No improvements or changes have been made to the Viewpoint node, but there have been a few additions to the NavigationInfo node:
The "LOOKAT" type option
The transitionType field (and associated timing fields), allows all viewpoint transitions to be animated, linear or teleport.
You will find many of these features in many older VRML browsers, but they are now official implementations within the x3d standard.
X3D Syntax
Bindable Nodes - Tips
Viewpoints, NavigationInfos, Fogs, Backgrounds are all bindable nodes which means that a scene may have many nodes of each type, but only one node can be active at any one
time.
Unless instructed otherwise, the first node of each bindable type encountered by the browser is activated or bound and all others nodes of that type will be inactive. This can be
changed by setting the setBind field of a bindable node to TRUE or FALSE. In this way, a scene may have multiple avatars, changing backgrounds, rolling fog etc.
Week 8 - Activities
Reading
Lecture Slides 299 - 365
"Introduction to VRML97", section 4, pp. 352-381
Complete Lab 8 Exercises
Read "Background", "Fog", "Viewpoints" and "Navigation Component" from the following site:
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification/
Complete Self assessment exercises on viewpoints, navigation, background and fog
9.1 - New Shaders
Background
VRML2.0 has a limited shading model, implementing just two inbuilt shaders (Phong and Faceted shaders)
One shader program can only simulate a limited range of materials and finishes
Today's graphics cards are bigger and more powerful and usually a modern GPU will outclass the CPU in terms of processing power.
X3D provides support for programmable shaders, allowing for a potentially unlimited range of materials and finishes
Shaders can be photo-realistic or designed for non-realistic effects such as toon (cartoon) shading
Vertex Shading
Achieves a less sophisticated finish but is less GPU intensive and faster
Lighting is calculated at each vertex of a graphics triangle and three colours are generated
Colour is linearly interpolated over the graphics triangle surface
Also referred to as flat, Phong or faceted shading
Fragment Shading
Achieves a better finish, but is more GPU intensive and slower
Normal values are calculated at each vertex and interpolated for smaller fragments (usually a single pixel).
Lighting is calculated for each fragment and colour is generated for each fragment.
Also referred to as smooth, Garoud or pixel shading
9.2 - Shading Implementation
X3D Shader Nodes
PackagedShader: References one complete self-contained shading package (ie one file)
ProgramShader: Contains two ShaderProgram nodes, one vertex and one fragment shader
ComposedShader: Contains many ShaderPart nodes whose effects can be combined to create one vertex and one fragment shader
Shading is implemented as part of a shape's Appearance node in a field called shaders
X3D Syntax
...
...
X3DV Syntax
PackagedShader {
language "..."
url "..."
}
ProgramShader {
language="..."
programs [
ShaderProgram {
url "..."
type="VERTEX"
}
...
]
}
ComposedShader {
language="..."
parts [
ShaderPart {
url "..."
type="FRAGMENT"
}
...
]
}
Week 9 - Activities
Reading
Complete Lab 9 Exercises
Read "Rendering Component" from the following site:
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification
10.1 - Collision
No improvements or changes have been made to the Collision node. Collision is only detected between the viewer and the Collision node shapes.
The X3D syntax has no proxy node, but rather a shape node may be given "proxy status"
X3D Syntax
...
...
NB: A Collision node can only have one proxy shape that will not be rendered.
10.2 - Proximity Visibility & LOD
No improvements or changes have been made to the environmental ProximitySensor and VisibilitySensor nodes.
NB: There is usually some confusion over the meaning of proxy and proximity. Despite sounding similar, they are two very different things:
Proxy: A stand in or substitute shape found in the Collision Node
Proximity: A physical area that surrounds an object, defined as part of the ProximitySensor Node
Level Of Detail (LOD):
The LOD remains largely unchanged, except the level node has been renamed children in x3dv syntax for consistency and the forceTransitions field controls any wanted/unwanted
browser specific optimisation of this node.
X3D Syntax
Week 10 - Activities
Reading
Lecture Slides 366 - 385
"Introduction to VRML97", section 4, pp. 361 - 408
Complete Lab 10 Exercises
Read " Environmental sensor component" from the following site:
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification/
Complete Self assessment exercises on visibility, proximity and collision
11.1 - ECMA Scripting
Whilst ECMA Script is the same language as Javascript, the ecmascript description is preferred. Previous languages such as vrmlscript and javascript are still supported but are being
depreciated.
X3D Syntax:
Two main changes to be aware of:
Script can still be written in the url field, but it is preferable to place scripting inside a nested CDATA node
A new script initialise() sets the starting (or default) values of script fields
Script {
inputOnly SFFloat set_me # set default value
outputOnly SFFloat me_changed # set default value
url "
function me_changed (val,time) {
...
...
}
"
}
Debugging Tips: When debugging, you can use the print() command to send output to the console window. You can also route output from a script to a Text node so that the output
occurs in your scene and not in the console window. This is also useful to debug event timing issues as well as code.
11.2 - New Boolean Nodes
There are new boolean nodes that replace the need to generate custom script nodes for some common applications. Some examples include:
BooleanToggle: generates inverted or toggled logic event in conjunction with a time event
BooleanTrigger: generates a logic event in conjunction with a time event
BooleanFilter: generates different events when input is true, false or "toggled"
BooleanSequencer: generates a preset sequence of true/false outputs, useful for traffic light simulations etc
TimeTrigger: generates time events when triggered by a (true) boolean input
11.3 - Prototype Syntax X3D
In the X3D format, a new term DefineProto replaces the old syntax Proto. Furthermore, the Proto declaration is split into ProtoDeclare and ProtoBody nodes and all passed prototype
fields in each node are gathered together into new IS nodes:
X3D Syntax
11.4 - Prototype Syntax X3DV
Compare the code on the previous slide with the equivalent X3DV code:
X3DV Syntax
Proto Protoname {
inputOutput SFColor diffuseColor 0 0 0
inputOutput SFVec3f translation 0 0 0
} [
Group {
Transform {
rotation 0 1 0 0
translation IS translation
children [
Shape {
Appearance {
Material {
diffuseColor IS diffuseColor
}
}
geometry Cone {}
}
]
}
}
}
Week 11 - Activities
Reading
Lecture Slides 387 - 434, 471 - 506
"Introduction to VRML97", section 4, 399-458, pp. 471-490
Complete Lab 11 Exercises
Read "Scripting" and "Prototypes" from the following site:
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification/
Complete Self assessment exercises on scripting and prototypes
12.1 - Humanoid Animation
Standardisation of Humanoid Modeling
Building and animating humanoid models is a common task in many 3D modeling projects. These models are created in a wide range of programming and software packages and
subsequently data is stored in a variety of different formats.
The family of humanoid modeling nodes has been created primarily for data interchangeability and to provide support for the more common tools and techniques found in most
humanoid modeling software packages. Be assured that the development of these nodes is driven by the practicality of useful commercial software packages.
Modeling nodes
Container node for entire humanoid model
Container node for a joint, such as a hip, elbow, wrist etc
Container node for a segment such as a torso, upper-arm, fore-arm etc
Container node for "sites" on a segment. Can be used to
position further Modeling components (eg jewelry) or viewpoints
obtain tracking information (eg motion capture)
...
...
...
Advanced Animation Node
As you should be aware, animating puppets, machines and robotic limbs involves little more than the simple rotation and translation of rigid limb-segments. However, to attain realistic
animation of humanoid models, it is necessary to morph joint and limb-segment geometry to achieve effects such as the bulging and flexing of muscles, folding and wrinkling of skin
etc.
Morphing an entire geometry mesh as a whole can be cumbersome and impractical for one animator. Grouping subsets of geometry coordinates into segments allows the isolation of
specific portions of the geometry. Subtle effects, such as smiling, frowning etc can then be managed by one animator and more complex work, such as running, jumping etc, can be
delegated to many teams to make animation work manageable.
These segments are stored in nodes.
12.2 - Second Life
In 2003 Linden Labs released the online virtual reality world Second Life. It used a proprietory rendering engine based on OpenGL and a limited Havoc 1 physics engine. In
January 2007, Linden Labs migrated to an open source platform.
Unlike MMORPG's (Massive Multiplayer Online Role Playing Game) where believability and consistency is a secondary concern to the player experience, Second Life aims to
provide a virtual world that emulates many physical aspects and social constructs found in the real world (ie First Life). The bulk of the content found in Second Life is created not by
game designers, but rather by it's residents.
Projects in Second Life are quite diverse and include:
Educational: Where residents may attend online campuses or visit specific areas
where real world phenonema have been modelled for demonstration.
Business and Commerce: Where residents can buy and sell virtual services and
products. Many multinational agencies have set up virtual offices within Second Life,
particularly creative and digital advertising media agencies.
Arts and Culture: Where residents may showcase their artistic endeavours for the
enjoyment of other residents
Social and Community: Areas dedicated meeting points for like minded people and
of course ...
Gaming: Areas where residents can play.
Residents pay a nominal registration fee for access to Second Life, however Land
Ownership is only possible with a regular monthy subscription. To build permanent
artifacts such as buildings, furniture or to provide goods and services, you need to own
land, or have access to community owned land.
Items can be imbued with scripts, such as ringing doorbells, playable pianos. Residents
may also interact with pure script objects that animate their avatar geometry, such as
dancing (nightclubs), sitting and reclining (furniture).
12.3 - Google Earth
In 2004, Google purchased Earthviewer, a 3D technology from Keyhole Inc that mapped world data onto the surface of a sphere (ie the Earth). This product has since been
rebranded Google Earth and is now freely available over the internet.
The application language KML (Keyhole Markup Language) allows the encapulation of
information within Placemark nodes. Such information includes:
Point (position): longitude, lattitude and altitude
Lookat (viewpoint): as above, plus tilt and heading (deviation from North)
Image data: map-image to map onto a surface segment
Polygon data: a list of shapes/geometry to build onto a surface segment
Simple Placemark Example
Fabio's Desk
Location: 14.11.02 at RMIT City campus
-144.963147,-37.807497,20
-144.963903
37.807992
317
162
31
12.4 - MPEG4
MPEG-4 is an ISO/IEC standard developed by the non profit organisation MPEG (Moving Picture Experts Group).
In VRML and X3D there has been support for rendering MPEG files and other visual media as Movie Textures onto surface geometry.
The MPEG organisation have now incorporated support for 3D modelling into the MPEG4 standard, so it is now possible for X3D content to be contained in files with the mpeg file
extension. Such X3D content must have the MPEG4 Profile selected.
There are limitations to the X3D content compatibility, but these are largely restricted to practical limits such as maximum polygon count, types of non-x3d imported content etc.
Week 12 - Activities
Reading
Read “H-Anim Component” & “MPEG-4 interactive profile” from the following site:
http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification/
Web Resources:
http://secondlife.com/badgeo/wakka.php?wakka=HomePage
http://earth.google.com/kml/kml_tut.html
http://www.chiariglione.org/mpeg/standards/mpeg-4/mpeg-4.htm