3DXML User Guide
3DXML User Guide
July 2006
3D XML USER’S GUIDE
II
3D XML USER’S GUIDE
Table of Contents
III
3D XML USER’S GUIDE
Colors...................................................................................................... 20
Graphic Attributes ............................................................................. 20
Surface Attributes..................................................................................... 20
Line Attributes.......................................................................................... 20
Point Attributes......................................................................................... 21
General Attributes..................................................................................... 21
Materials .......................................................................................... 21
Basic Materials ......................................................................................... 21
LIGHTS ........................................................................................29
Light Colors ...................................................................................... 29
Point Light Source ............................................................................. 29
Directional Light Source ..................................................................... 30
Spot Light Source .............................................................................. 30
How to Specify a Light Object ............................................................. 31
FONTS .........................................................................................33
Terminology ..................................................................................... 33
Typeface anatomy ............................................................................. 33
Serifs....................................................................................................... 33
Proportionality .......................................................................................... 34
Measurements.......................................................................................... 34
Types of font...................................................................................... 34
Serif fonts ................................................................................................ 34
Sans-serif fonts ........................................................................................ 34
Script fonts .............................................................................................. 34
Blackletter fonts ....................................................................................... 34
Novelty fonts............................................................................................ 34
Pi fonts .................................................................................................... 35
Symbol fonts............................................................................................ 35
Fonts in 3DXML ................................................................................. 35
How to specify a Font object ............................................................... 36
Fonts in 3DXML ........................................................................................ 36
Attributes description ................................................................................ 36
IMAGES........................................................................................38
Bitmap Images ................................................................................. 39
Raster Image Format......................................................................... 41
VIEWPOINTS.................................................................................44
2D Viewpoints................................................................................... 44
3D Viewpoints................................................................................... 44
Projection Viewpoint.................................................................................. 44
Perspective Viewpoint ............................................................................... 45
Parallel Viewpoint ..................................................................................... 46
Customized 3D Viewpoint .......................................................................... 47
MESH ..........................................................................................49
IV
3D XML USER’S GUIDE
Concepts .......................................................................................... 49
Vertex Buffer .................................................................................... 50
Polygonal Representation ................................................................... 50
Graphic Attributes in a Polygonal Representation ......................................... 51
Primitive Sets ........................................................................................... 51
3D XML Graphic Primitives.................................................................. 52
The Face Primitive .................................................................................... 52
How to Describe Face Primitives in a Polygonal Representation ..................... 52
The Polyline Primitive ................................................................................ 53
How to Describe a Polyline primitive in a Polygonal Representation................ 53
Level of Detail (LOD).......................................................................... 54
LOD Mechanism........................................................................................ 54
LOD Accuracy........................................................................................... 54
How to Specify a LOD ............................................................................... 54
Example of a Polygonal Representation with a Texture........................... 55
Example of a Polygonal Representation with LOD .................................. 60
USING A MULTI-FILE ARCHITECTURE .................................................63
Architecture Description ..................................................................... 63
Specifying Links ................................................................................ 65
How to Declare Local Links ........................................................................ 65
How to Declare External Links.................................................................... 65
Packaging......................................................................................... 67
TASK INDEX..................................................................................69
APPENDIX ....................................................................................71
Complete Reference/Instance Graph of the Quad Sample....................... 71
GLOSSARY ....................................................................................73
V
3D XML USER’S GUIDE
Preface
This guide provides you with the essential information for understanding and
using the 3D XML language. 3D XML is designed especially for 3D data. It
allows developers to create their own documents by using a language based on
XML (eXtensible Mark-up Language), a specification developed by the World
Wide Web Consortium (W3C). The purpose of this guide is to help you write
an entire document or insert your writing into an existing document.
Related Documentation
The Reference Documentation gives a comprehensive list of all the 3D
XML tags together with their attributes and associated documentation.
This documentation assumes that you are familiar with the basics of 3D
XML.
If you just start with 3D XML and have no preliminary knowledge of
any similar language, you may be overwhelmed by the sheer mass of
information provided in the Reference Documentation. Read the 3D
XML User’s Guide first.
VII
3D XML USER’S GUIDE
3D XML Overview
The 3D XML format is used in the Dassault Systemes' entire line of products –
CATIA, DELMIA, ENOVIA, SMARTEAM, SolidWorks and Spatial. 3D XML is part
of the 3D For All package which encompasses the 3D XML Player and the
toolkit to manipulate 3D XML documents.
Why 3D XML?
3D XML is a universal lightweight XML-based format for quick and easy sharing
of 3D data. With 3D XML, 3D information can be easily incorporated into
technical documentation, maintenance manuals, marketing brochures,
websites, email communications and many other everyday uses. This re-use of
3D information broadens the base of 3D users.
Easy Adoption
3D XML is self-describing. 3D XML data can be read or written using standard
tools and can be easily interpreted by applications. The broad adoption of 3D
XML reduces the cost of re-using 3D data everywhere.
Extensibility
The set of tags is open. A basic set of tags is provided along with the generic
applications to handle it. Industry-specific applications handling additional tags
can be plugged in.
1
3D XML USER’S GUIDE
3D XML Concepts
3D XML relies on the principles presented below and detailed in the various
sections of this guide.
Multi-Representation Concept
A reference does not contain any geometric data. The way a reference appears
is defined by one or more
representations.
Reference
Representations can be made up Representation 1
of 3D data or text data. They are Representation
XML entities containing links to format 1
geometry containers. Several
representations can be associated
with a reference and these Representation 2
representations can be of various Representation
types. This capability can be used format …
to model the applicative
representation of a reference. Using Multi-Representations
For example, you can represent a
wheel according to its temperature characteristics or according to the pressure
levels around the wheel. Another example: suppose your field is hydraulics,
you can use one representation to describe the circuit diagram with its
symbols, and another representation to describe mechanically the hydropumps
and the pipes. Different representations can use different formats, if needed.
A reference is not necessarily associated with a representation. References that
aggregate instances do not need representations. They use the
representations of their aggregated instances.
2
3D XML USER’S GUIDE
Product Structure
QUAD
The Product Structure is the Reference
entity which aggregates the
instances, the references and
their representations. A Rear Assembly Front Assembly
Instance Instance
Directed Acyclic Graph (DAG)
or reference/instance graph
Aspect
describes the arrangement of
entities within the Product
Structure. Assembly Graphic
Reference Properties
Aspect Mechanism
There is a 3D XML mechanism Left Wheel
Instance
whereby you can create a new Axle
Instance
object type by adding new Right Wheel
attributes or sub-elements to a Instance
given object. This is the
extension mechanism. You can Axle
use this mechanism to attach Wheel Reference
Reference
any kind of data to references
or instances. In the above Example of a reference/instance graph
example, the Graphic
Properties Aspect is attached to “Assembly Reference” in order to add
additional graphic properties to the reference. The 3D XML Aspect uses this
extension mechanism to add properties to the objects of the
reference/instance graph.
Unfolded Tree
The Directed Acyclic Graph does not show explicitly all the objects making up
an assembly. The reference/instance mechanism is a good way to describe a
Product Structure without duplicating data, but it does not provide you with a
complete tree structure.
A Means to Access Each Object in a Model
Every re-used reference appears only once in the instance/reference graph. In
the above example, a wheel is used four times, but only appears once. In
order to arrive at all the four uses of the wheel references, one has to traverse
the above graph from the root to the Wheel through the different available
paths. The output of such a traversal is an unfolded tree. A node in the
unfolded tree is called an occurrence.
Analogous to how an Aspect is used to assign additional attributes to specific
3
3D XML USER’S GUIDE
QUAD
1
Rear
Front Assembly
2 6
Assembly
Front Rear
Axle Axle
Rear Left
Front Left 5
Front Right Wheel Rear Right 9
Wheel
3 Wheel Wheel
7
4
8
4
3D XML USER’S GUIDE
instance.
Occurrence Properties
An occurrence property is a 3D XML element which can point to any occurrence
of the unfolded tree by using an occurrence index. Occurrence properties can
include graphic properties, transformation matrices and representations.
Default View
The default view, defines the default display of the model by extending the
product structure and aspect properties. This information is used by the
3DXML Player for initial display of the model.
Containers
In a 3D XML document, related data are grouped into containers. The model
(<Model_3dxml>) is the entity which federates all the containers in the 3D XML
document. Here are some containers:
The <Header> container holds all information related to the schema
version, to the author, date and title. The version number is required
by 3D XML applications to check installation levels and determine what
types of data can be read.
The <ProductStructure> container is a mandatory element essential for the
adequate description of a physical assembly. A Product Structure
contains:
the 3D references or standardized objects to be reused in one
or more products by instantiation
the 3D instances or instantiated objects to be used in a
specific product
the links to representations which are physical manifestations
of the references.
The <GeometricRepresentationSet> container is intended to store the
geometry data.
The <SpecificExtensionSet> container provides the ability to hold industry
specific data along with the 3DXML content described above. The
industry specific data can be seen as analogous to plug-ins where one
can add application or domain specific information as needed.
There are other containers. Most of them are described in the specific sections
of this guide. For a comprehensive list of containers, see the Reference
Documentation.
5
3D XML USER’S GUIDE
Getting Started
This section is intended to get you started with 3D XML by using a simple
document. This document illustrates the principles you need to understand
before going any further in a 3D XML application. The comprehensive list of 3D
XML tags is given in the Reference Documentation. In this section, you will
learn how to create the objects making up a Product Structure and how to
modify some graphic properties. Recommendations for creating a document
from scratch are also given. To work with this document, you must download
the Toy.3dxml sample and the schema which are delivered with the 3D XML
product.
Model Description
To make things clearer and help
you understand the 3D XML
basics, this vehicle is just made up
of the two wheel axles, a chassis,
a body and a steering system. Chassis
7
3D XML USER’S GUIDE
3D XML Containers
Now, if you take a look at the global structure of the document, you find the
<Header>, the <DefaultSessionProperties>, the <ProductStructure> and the
<GeometricRepresentationSet> tags. These tags define 3D XML containers.
<Model_3dxml xmlns="http://www.3ds.com/xsd/3DXML"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.3ds.com/xsd/3DXML E:\users\...\3DXML.xsd">
<Header>
<DefaultSessionProperties>
<ProductStructure root="1">
<GeometricRepresentationSet>
</Model_3dxml>
The sub-elements of a <Model_3dxml> element depend on the kind of data you
want to store in your document. In a model, data is grouped into containers. A
container is a high-level 3D XML element intended to wrap related data. The
data contained in a container can refer to data contained in other containers
and be pointed to by other containers. Any entity intended to be pointed to by
another is assigned an identifier which must be unique within a given
container.
Not all containers are present in the toy.3dxml sample. 3D XML defines several
types of containers but not all are mandatory. For some containers, the
content is self-explanatory while for others, further explanation is required.
From a 3D XML syntax point of view, there are two mandatory containers: the
<Header> and the <ProductStructure>.
8
3D XML USER’S GUIDE
Document Header
The data which falls within the opening and closing tags of the <Header>
container looks something like this:
<Header>
<SchemaVersion>1.0</SchemaVersion>
<Title> 3DXML File</Title>
<Author>llr</Author>
<Date>2005-03-29</Date>
</Header>
The <Header> element describes the various properties of the document,
including its title, schema version or author. The <SchemaVersion> is the only
mandatory sub-element. However, it is recommended to include other sub-
elements as it helps readability and document maintenance. The date as an
“xs:date” data type is written in the following form "YYYY-MM-DD".
Session Properties
The <DefaultSessionProperties> container includes the data related to the
background color and rendering style.
<DefaultSessionProperties>
<BackgroundColor alpha="0." blue="0.4" green="0.2" red="0.2" graduated="true"/>
<RenderingStyle>SHADING</Rendering Style>
</DefaultSessionProperties>
The color specified for the session background is an RGBA color.
Note the alpha attribute to set the transparency and the graduated attribute for a
graduated background (from dark at the top of the screen to clear at the
bottom). For more information, turn to “Colors” on page 20.
The possible values for the rendering style are:
SHADING
SHADING_WITH_EDGES
EDGES
WIREFRAME
HLR
9
3D XML USER’S GUIDE
10
3D XML USER’S GUIDE
Representing Objects
References are 3D XML elements which are defined by just two attributes, the
id and the name. You may wonder where the geometry of these objects is
stored and how this geometry and the references are linked.
In 3D XML, the geometry is defined using representations. A representation
contains a pointer to data located either within the current document or in an
external document. The <ReferenceRep> element allows you to specify the
reference owning the representation (the value of the owner attribute), and the
pointer to the geometric data (the value of the associatedFile attribute). The
geometric data is encoded within the <GeometricRepresentationSet> container. A
<Representation> has an id which is referred to by the value of the associatedFile
attribute.
<ReferenceRep xsi:type="ReferenceRepType" id="11" name="Wheel_RepReference"
format="EXACT" associatedFile="urn:3DXML:Representation:loc:13"/>
…
<GeometricRepresentationSet>
<Representation id="13" format="EXACT" version="1.0">
<AssociatedData>
<!—here your geometry data —>
</AssociatedData>
</Representation>
</GeometricRepresentationSet>
The <ReferenceRep> element points to geometric data located within the current
document.
3D XML supports exact and tessellated formats for representations. For more
information, go to “Representations” on page 16.
11
3D XML USER’S GUIDE
12
3D XML USER’S GUIDE
13
3D XML USER’S GUIDE
Product Structure
A 3D model consists of a hierarchy of objects. These objects are gathered into
a container referred to as the Product Structure. To describe the Product
Structure, 3D XML defines
a lightweight Directed
Acyclic Graph (DAG) that QUAD
makes intensive use of Reference
references and instances.
The part of the graph
representing the axles of a Rear Assembly Front Assembly
QUAD looks like the graph Instance Instance
shown opposite.
References and
Instances Assembly
Reference
A reference is a
standardized object Left Wheel
intended to be reused in Instance Axle
several different products Instance
Right Wheel
or within one given
Instance
product. A reference is only
specified once, but can be
Axle
instantiated several times. Wheel Reference
Using references is a way Reference
to minimize data
An example of a
duplication and reduce the reference/instance graph
size of generated
documents.
The reference concept is used to specify any objects located in the Product
Structure. Assuming that the left and right wheels have the same geometry,
there is no need to duplicate the wheel geometry. The wheel geometry is
defined in the reference. The right and left wheels are created by instantiating
the reference and assigning a specific position to the created objects within the
Product Structure.
An instance is an instantiation of a reference to be used
somewhere in a specific product. From a single reference, you
can create several 3D instances. Each created instance is to be
aggregated to a single 3D reference. The right and left wheels
15
3D XML USER’S GUIDE
are two instances created from the Front Wheel reference. They are
both aggregated to the Front Axle Assembly reference. They cannot be
aggregated to another reference.
How to Create References and Instances
You must use the <Reference3D> and <Instance3D> tags respectively. Both tags
have a mandatory id attribute and an optional name attribute. <Instance3D>
objects have children or sub-elements. These children are described in the
Reference Documentation.
An <Instance3D> object can point to a <Reference3D> object defined in an external
resource. In the example below, the instance and the reference are located in
the same resource (file).
<Reference3D xsi:type="Reference3DType" id="2" name="Chassis"/>
<Instance3D xsi:type="Instance3DType" id="3" name="Chassis.1">
<IsAggregatedBy>1</IsAggregatedBy>
<IsInstanceOf>urn:3DXML:Reference:loc:2</IsInstanceOf>
<RelativeMatrix>1 0 0 0 1 0 0 0 1 -35.3964 202.211 0</RelativeMatrix>
</Instance3D>
In the example below, the instance and the reference are located in different
resources (files).
<Instance3D xsi:type="Instance3DType" id="3" name="Chassis.1">
<IsAggregatedBy>1</IsAggregatedBy>
<IsInstanceOf>urn:3DXML:Reference:ext:Chassis.3dxml#1</IsInstanceOf>
<RelativeMatrix>1 0 0 0 1 0 0 0 1 -35.3964 202.211 0</RelativeMatrix>
</Instance3D>
The URN value in the <IsInstanceOf> tag defines the external resource
(Chassis.3dxml) along with a pointer (#1) which is located in this resource. In
Chassis.3dxml, you must write the reference declaration like this:
<Reference3D xsi:type="Reference3DType" id="1" name="Chassis"/>
16
3D XML USER’S GUIDE
between the <Reference3D> and the representation. The <ReferenceRep> tag refers
to the geometry (associatedFile) The value of the associatedFile attribute is an
URN (Universal Resource Name) which is a predefined syntax with identifiers.
<Reference3D xsi:type="Reference3DType" id="9" name="Wheel"/>
<Instance3D xsi:type="Instance3DType" id="10" name="Wheel.1">
…
<ReferenceRep xsi:type="ReferenceRepType" id="11" name="Wheel_RepReference"
format="EXACT" associatedFile="urn:3DXML:Representation:loc:13"/>
<InstanceRep xsi:type="InstanceRepType" id="12" name="Wheel_RepInstance">
<IsAggregatedBy>9</IsAggregatedBy>
<IsInstanceOf>urn:3DXML:Reference:loc:11</IsInstanceOf>
</InstanceRep>
…
<GeometricRepresentationSet>
<Representation id="13" format="EXACT" version="1.0">
<AssociatedData>
…
You can attach several <ReferenceRep>/<InstanceRep> objects to the same
reference. In the example above, you can declare other <ReferenceRep>/
<InstanceRep> pairs and aggregate them all to Reference3D.
3D XML supports two kinds of formats: the TESSELLATED (two versions) and
the EXACT formats.
FORMAT EXACT Format TESSELLATED TESSELLATED Format
Version 1.0 Format Version 2.0
Version 1.0
Description Exact geometry XML triangular mesh Triangular mesh with file
size optimization
Purpose High Fidelity - Compact XML format - can be Quick loading - Compact
format used for simple documents
geometry exchange
17
3D XML USER’S GUIDE
18
3D XML USER’S GUIDE
Graphic Properties
Graphic properties can be applied to highlight the different objects of a model,
make more comprehensive the design of a Product Structure or provide a
more attractive display of the model. With graphic properties, you can modify
colors, materials, textures and make
one or more objects invisible.
Overview
Graphic properties are used in
<DefaultView> objects. 3D XML
provides you with the graphic
attributes usually encountered in
graphic applications for lines or
points.
19
3D XML USER’S GUIDE
Colors
Colors are used by all <GraphicProperties> objects. 3D XML supports RGBAColorType
colors.
Apart from using color in graphic properties, you can specify a background
color in the <DefaultSessionProperties> definition. The <BackgroundColor> color is an
extension of the RGBAColorType type.
How to Specify RGBA Colors
Use the <Color> element as indicated below.
<Color xsi:type="RGBAColorType" red="1" green="1" blue="1" alpha="1"/>
For a fully opaque color, the alpha channel attribute should be set to 1. For a
fully transparent color, you should specify 0.
Graphic Attributes
Graphic attributes are divided into four categories: surface attributes, line
attributes, general attributes and point attributes.
Surface Attributes
Surface attributes are colors and materials.
Line Attributes
Line attributes control the color, thickness and styles of edges, wires and
curves. 3D XML supports thicknesses from 0.1300mm to 2.600mm as well as
the usual line types.
20
3D XML USER’S GUIDE
Point Attributes
Points can have different shapes and colors.
How to Specify Point Attributes
Use the <PointAttributes> tag as indicated below.
<SurfaceAttributes>
…
<PointAttributes symbolType="STAR">
<Color xsi:type="RGBAColorType" red="0" green="0" blue="0"/>
</PointAttributes>
General Attributes
With general attributes, you can control the way objects react upon selection
and specify whether they are to be shown or not.
How to Specify General Attributes
Use the <GeneralAttributes> tag along with the visible and selectable attributes.
<GraphicProperties xsi:type="GraphicPropertiesType">
<GeneralAttributes xsi:type="GeneralAttributesType" visible="false" selectable="true"/>
</GraphicProperties>
Materials
3D XML supports basic and textured materials. Basic materials are those you
can assign to an object so that it looks uniformly colored like plastic or rubber.
You can modify the rendering of a basic material by specifying parameters
such as the ambient/diffuse/specular lights or the reflectivity. Textured
materials are irregular patterns that simulate a texture surface like marble or
wood. Like colors, materials are used by graphic properties (only surface
attributes).
Basic Materials
Basic materials are <GraphicMaterial>
objects with BasicMaterialType type.
They carry information about the
rendering parameters.
21
3D XML USER’S GUIDE
22
3D XML USER’S GUIDE
Textured Materials
Textured materials are extensions of basic materials. Many of the concepts
described in this section can be interpreted by graphic adapters. Please refer
to OpenGL and Direct3D specifications for more information about these
concepts. They are TextureMaterialType objects with the following attributes:
• texture which allows you to specify the bitmap image of the texture
• textureDimension which is an optional dimension: 1D for lines of pixels
and 2D for a rectangular pixel image. The default value is 2D.
• textureFunction which defines the way the texture pixels are combined
with the surface color (see “Texture Function” on page 23). The
default value is DECAL. This attribute is optional.
• wrappingModeS and wrappingModeT which define the way (s, t) texture
coordinates are interpreted by the graphic adapter (see “Wrapping
Modes” on page 24). The wrapping mode can be set to CLAMP or
REPEAT (default value).
• filtering which defines the texel (fundamental unit of texture space)
interpolation method. The default value is LINEAR.
• alphaTest which defines whether the alpha channel of the texture is
to be used. The default value is FALSE.
Texture Function
You can choose any of the following four texture modes when specifying a
23
3D XML USER’S GUIDE
texture:
1. DECAL
The texture color is used as the final color. It is painted on its support
like a decal would be applied.
2. MODULATE
This technique combines the effects of lighting with texturing.
3. BLEND
A constant color is blended with that of the texture.
4. REPLACE
The color values of the object to be textured are replaced with the
texture color data.
Wrapping Modes
The wrapping mode defines the way (s, t) texture coordinates are interpreted by the
graphic adapter. The CLAMP mode causes the texture coordinate to be clamped to
the range [0, 1]. The REPEAT mode causes the integer part of the coordinate to be
ignored. Only the fractional part of the coordinate is then used. This results in the
creation of a repeating pattern.
CLAMP REPEAT
Filtering modes
The texture image is a discrete array of texels, but the texture coordinates vary
continuously. This creates a sampling problem which can be corrected or minimized
using filtering methods.
3D XML supports the following filtering methods:
1. NONE
No filtering is done, the nearest texel is copied.
2. LINEAR
Bilinear interpolation filtering is done. A weighted average of a 2×2 area of
texels surrounding the desired pixel is used.
3. TRILINEAR
Trilinear filtering method linearly interpolates pixel color, using the texels of
the two nearest mipmap textures. The mipmap textures are automatically
24
3D XML USER’S GUIDE
generated.
4. ANISOTROPIC
The difference between the texture aspect ratio and the projected surface
aspect ratio often results in more blur than needed. Anisotropic filtering
method minimizes excessive blurring by correcting the ratio of the texture
image.
Alpha test
If the alpha test parameter is valuated to TRUE, the alpha channel is used.
Otherwise it is ignored.
Mapping Types
The mapping type defines the way a texture is applied onto a surface. 3D XML
supports three mapping types:
1. ENVIRONMENT_MAPPING
The way the texture is applied to surfaces is automatically computed to
simulate reflection. The texture coordinates of the mesh are ignored
and no mapping operator should be specified. This mapping type is
mainly used to simulate reflection on shiny surfaces.
2. IMPLICIT_MAPPING
This mapping type supposes texture coordinates are already defined in
the mesh vertex buffer. The mapping operator if any is ignored.
3. MAPPING_OPERATOR
The mapping operator must be provided. This operator defines the way
texture coordinates are computed on the mesh. If texture coordinates
are declared in the vertex buffer, they are redefined by the new ones.
25
3D XML USER’S GUIDE
Mapping Operators
Mapping operators are optional. They define how the bitmap is projected onto
the surface. The mapping operator is only required when the mapping type is
set to MAPPING_OPERATOR. If you don’t specify any mapping operator (the
mapping type being set to MAPPING_OPERATOR), a default planar mapping is
applied. This mapping operator is a MappingOperatorType type object which carries
information about:
the way (s, t) texture coordinates are computed before they are sent to
the graphic adapter. The possible values of the operatorType attribute are
PLANAR_MAPPING, CUBICAL_MAPPING, CYLINDRICAL_MAPPING and
SPHERICAL_MAPPING
texture transformations which describe how the bitmap is transformed
prior to being applied to objects. By default, no transformation is
applied on textures
the optional textureFlipS & textureFlipT attributes specify whether
the bitmap is inverted along the S and T coordinates. Default
values are true
the optional textureScaleS & textureScaleT attributes allow you to
apply a scale factor to the original bitmap in order to increase
or decrease the size of the texture sample. Default values are
1
the texturePositionS & texturePositionTare attributes describe the
bitmap translation length along the S and T axes. Default
values are 0
the angle of rotation in degrees to be applied to the bitmap
around its center is defined by the textureRotation attribute.
Default value is 0.
an optional axis system for the 3D positioning of the texture. This data
is specified by using AxisSystem element. By default the axis system is set
to identity.
26
3D XML USER’S GUIDE
PLANAR_MAPPING CUBICAL_MAPPING
CYLINDRICAL_MAPPING SPHERICAL_MAPPING
27
3D XML USER’S GUIDE
28
3D XML USER’S GUIDE
Lights
Light objects are used to simulate the interaction between the lighting and the
material. They make your model look better and more realistic.
Light Colors
Light colors can be broken down into three categories:
Ambient
All surfaces are lit in all directions regardless of their shape. This
isotropic lighting results in a flat shading of objects.
Diffuse
The result depends on both the light direction and the surface normal.
Diffuse lighting therefore varies on each vertex of the object and gives
the object its 3D volumetric aspect.
Specular
This lighting color describes the highlights around the surface area
where the light hits the object and reflects back to the observer’s eye.
Specular lighting is intense and decreases rapidly across the object
surface. It enables you to emphasize details of the object.
Each category has an intensity parameter.
29
3D XML USER’S GUIDE
I0
I=
kc + kl d + k q d 2
Where:
k c is the constant attenuation factor
k l is the linear attenuation factor
k q is the quadratic attenuation factor.
30
3D XML USER’S GUIDE
Between these two solid angles, the lighting intensity decreases linearly as
shown in the following illustration.
31
3D XML USER’S GUIDE
32
3D XML USER’S GUIDE
Fonts
Terminology
A Typeface is a set of characters designs. A typeface is usually comprised of
an alphabet of letters, numerals and punctuation marks. Courier, Helvetica are
exemples of typefaces.
The Font (origine from metal type), denoted a complete typeface in a
particular size (usually measured in points), one weight (e.g. light, book, bold,
black), and one orientation or angle (e.g. roman, italic, oblique). Regards to a
digital type, the font is the computer file that stores the vector paths.
A Font Family is a group of related fonts which vary only in weight,
orientation, width, etc.
For examples, Times is a Font Family, whereas Times Roman, Times Italic
and Times Bold are each fonts. Most font families contain a handful of fonts,
though some (e.g. Zapf Dingbats) may contain only one, and others (e.g.
Helvetica) may contain dozens of fonts.
Typeface anatomy
Serifs
Serifs comprise the small features at the end of strokes within letters.
Typefaces with serifs are
often considered easier to
read in long passages than
Sans-serif
those without.
font
Newspapers and books
almost always use serif
fonts. On Computer, sans-
serif fonts are easier to read Serif font
due to their lower resolution.
Modern sans-serif fonts such
as Verdana are commonly Serif font
used. (serifs
highlighted
in red)
33
3D XML USER’S GUIDE
Proportionality
A proportional font displays glyphs using varying
widths.
A non-proportional or fixed-width or
monospace font uses fixed glyph-widths.
Measurements
Scripts share the notion of a baseline.
The descent spans the
distance between the
baseline and the
lowest descending
glyph in a typeface.
The ascent spans
the distance between the
baseline and the top of the glyph that reaches farthest from the baseline.
Types of font
Serif fonts
Serif or "roman", typefaces like Times Roman and Garamond are common
examples of serif typefaces. Serif fonts are probably the most used
classification in printed materials, including most books, newspapers and
magazines.
Sans-serif fonts
The text on web pages offers an exception: it appears mostly in sans-serif font
because serifs make small letters less readable on a computer monitor.
Script fonts
Script fonts simulate handwriting: Zapfino is an example.
Blackletter fonts
Many people refer to them as gothic fonts.
Novelty fonts
Novelty fonts have very unusual character shapes, and may even incorporate
pictures of objects, animals, etc. into the character designs. They are not
suitable for body text.
34
3D XML USER’S GUIDE
Pi fonts
Pi fonts mostly consist of pictograms, such as bullets, clock faces, CD-index…
Examples include Zapf dingbats, Webdings and Wingdings.
Symbol fonts
Symbol fonts consist of symbols rather than normal text characters. Examples
include Zapf Dingbats and Sonata (music font).
Fonts in 3DXML
3DXML utilizes an XML version of the WebFonts facility defined in the
"Cascading Style Sheets (CSS) level 2" specification [CSS2] to reference fonts.
Described fonts may be in a variety of different formats. By describing key
details of the font such as its family name, weight, whether it is italic and so
on, text can continue to use the font properties without having to explicitly
indicate the font that is to be used for each span of text.
In 3DXML as for HTML or XHTML, a font face or font family is a typeface, or
generic type family. Font family is usually one of the five generic families
defined in HTML and CSS:
Serif: The quick brown fox jumps over the lazy dog.
Sans-serif: The quick brown fox jumps over the lazy dog.
Cursive: The quick brown fox jumps over the lazy dog.
Fantasy: The quick brown fox jumps over the lazy dog.
Monospace: The quick brown fox jumps over the lazy dog.
Under Windows API, they are identified as Roman, Swiss, Script, Decorative,
and Modern, respectively.
35
3D XML USER’S GUIDE
Fonts in 3DXML
<Model_3dxml>…
<! – Font declaration -- >
<FontSet>
<Font xsi:type="FontType" id="1">
<FontFace fontFamily="Aharoni" fontWeight="bold" fontStyle="italic">
<FontFaceSrc>
<FontFaceName>Aharoni</FontFaceName>
</FontFaceSrc>
</FontFace>
</Font>
<Font xsi:type="FontType" id="2">
<FontFace fontFamily="Berlin Sans FB" fontWeight="normal" fontStyle="normal">
<FontFaceSrc>
<FontFaceName>Berlin Sans FB</FontFaceName>
</FontFaceSrc>
</FontFace>
</Font>
<Font xsi:type="FontType" id="3">
<FontFace fontFamily="Stencil" fontWeight="normal" fontStyle=" italic">
<FontFaceSrc>
<FontFaceName>Stencil</FontFaceName>
</FontFaceSrc>
</FontFace>
</Font>
</FontSet>
</Model_3dxml>
Attributes description
• fontStyle (optional)
normal (default)
oblique
italic
• fontWeight (optional)
normal (default)
bold 500
bolder 600
lighter 700
100 800
200 900
300
400
36
3D XML USER’S GUIDE
37
3D XML USER’S GUIDE
Images
Image element allows you to render the contents of structured pixels objects
into the 3DXML document.
Images in 3DXML are controlled through the container XML tag <ImageSet>.
38
3D XML USER’S GUIDE
Bitmap Images
Bitmap (or Pixmap) is an array of pixels with color information inside.
Pixmap is supported within 3DXML with PixelImageType type of ImageSet
container.
PixelImageType (Pixmap) should be used as an attribute. Future 3DXML XSD
definition version will be adapted to set and use PixelImageType as attribute as
a “Brush like” element or by enhancement of Graphical Properties structure.
Common usage of PixelImageType in 3DXML file is the pixel structure of a
textured materials object.
39
3D XML USER’S GUIDE
<Model_3dxml>
<! – Image -- >
<ImageSet>
<Pixel id=”1” format="RGB" height="100" width="100" name="TestPixel">
<! – pixels block is one of the color encoding format encoded in base64 -- >
<pixels>UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</pixels>
</Pixel>
</ImageSet>
</Model_3dxml>
• http://oss.sgi.com/projects/ogl-
sample/registry/EXT/texture_compression_s3tc.txt
• http://www.hardwarecentral.com/hardwarecentral/reports/140/1/
• http://www.digit-life.com/articles/reviews3tcfxt1/
Please note that all of these web sites are copyrighted to their own proprietary.
40
3D XML USER’S GUIDE
41
3D XML USER’S GUIDE
42
3D XML USER’S GUIDE
Image attributes:
id: 3DXML identifier (c.f. 3DXML documentation or related XSD)
name: A string identifier of the Image.
width: Width in pixels to be rendered of the given Image (if height is
not set, aspect ratio will be kept based on width value)
height: Height in pixels to be rendered of the given Image (if Width is
not set, aspect ratio will be kept based on Height value)
href: Specifies the embedded structure or an external link of the
given Image (only JPEG, BMP, PNG and TIFF Image are supported).
<Model_3dxml>
<ImageSet>
</ImageSet>
</Model_3dxml>
43
3D XML USER’S GUIDE
Viewpoints
Viewpoints, also referred to as cameras, define the way virtual objects are
displayed on the two dimensional screen. 3D XML supports a number of 2D
and 3D viewpoints which are described in this section.
2D Viewpoints
A 2D viewpoint defines the way 2D objects located in a 2D planar space are
projected onto a virtual screen. The attributes which control a 2D viewpoint
are:
the eye position
the roll angle that is the angle between the x-axis of the 2D virtual
scene and the x-axis of the virtual screen
the height of the 2D area to be displayed on the virtual screen.
The width of the visualized area depends on the graphic characteristics of the
device onto which the projection is made (numbers of pixels and pixel
dimensions).
3D Viewpoints
A 3D viewpoint describes how the 3D virtual space is projected onto the 2D
space of the screen.
Projection Viewpoint
A projection viewpoint is defined by the following attributes:
the eye position which is the point where the observer’s eye is located
the sight axis which is the direction in which the eye is looking
the right and up axes which complete the orthonormalized trihedron
(right axis, sight axis, up axis)
the target distance which is the point at which the observer is looking.
The target point is along the sight axis at a distance from the eye
position equal to the target distance
the near and far planes which are used to define the objects to be
seen. Only the objects belonging to the zone between these two planes
are displayed. The 3D objects between the eye and the near plane are
not seen. The 3D objects beyond the far plane are not seen. The
44
3D XML USER’S GUIDE
Perspective Viewpoint
A perspective viewpoint is a projection viewpoint with an additional attribute
referred to as the “field of view” that defines the seen solid angle.
X
Up
Sight
Field of view
Position Right
Target
45
3D XML USER’S GUIDE
Parallel Viewpoint
A parallel viewpoint is a parallel projection along the sight axis. The additional
attribute, the visualized height, defines the zone of the 3D virtual world to be
projected onto the virtual screen. The width of the visualized area depends on
the graphic characteristics of the device onto which the projection is made
(numbers of pixels and pixel dimensions).
Up
XX
Sight
Right
Target
Position
46
3D XML USER’S GUIDE
Customized 3D Viewpoint
A customized 3D viewpoint describes a projection viewpoint by two 4x4 matrices.
The view matrix defines the position of the viewpoint in the 3D space. The projection
matrix describes the 3D transformation from the camera axis system to the virtual
screen axis system. Each matrix is a list of 16 double values stored column by
column.
47
3D XML USER’S GUIDE
Mesh
In a 3D XML Product Structure, geometric representations are associated with
references. One of the formats authorized for representations is an XML-based
facetted representation, made up of faces and edges. This section exposes the
polygonal representation used to describe the facetted representation of a
model, the graphic primitives making up its faces and edges and its
geometrical organization through the Vertex Buffer object.
Concepts
A facetted representation is made up of vertices connected in triangles and
which are themselves gathered into fans or strips to reduce the size of the
polygonal mesh.
Triangle fan
A triangle fan is a series of triangles that
share a common central vertex. It is
represented by a list of indices referencing
vertices in the vertex buffer.
49
3D XML USER’S GUIDE
Vertex Buffer
The purpose of the vertex buffer is to store and optimize the definition of vertices
used in faces.
A vertex buffer contains for each vertex:
• the coordinates x, y and z
• an optional normal (nx, ny, nz)
• one or more sets of texture coordinates.
• two optional sets of colors (diffuse and specular). Colors per vertex
enable to obtain specific visual effects, or to render more rapidly some
standard effects such as lighting, shadows, ambient occlusion, etc....
<VertexBuffer>
<Positions>-50 -50 -50,-50 50 -50,50 -50 -50,50 50 -50,-50 50 -50,-50 50 50,50 50 -50,50 50 50,-
50 50 50,-50 -50 50,50 50 50,50 -50 50,-50 -50 50,-50 -50 -50,50 -50 50,50 -50 -50,-50 50 -50,-50 -
50 -50,-50 50 50,-50 -50 50,50 -50 -50,50 50 -50,50 -50 50,50 50 50 </Positions>
<Normals>0 0 -1,0 0 -1,0 0 -1,0 0 -1,0 1 0,0 1 0,0 1 0,0 1 0,0 0 1,0 0 1,0 0 1,0 0 1,0 -1 0,0 -1 0,0 -
1 0,0 -1 0,-1 0 0,-1 0 0,-1 0 0,-1 0 0,1 0 0,1 0 0,1 0 0,1 0 0</Normals>
<TextureCoordinates dimension="2D" channel="0" >1 0,1 1,0 0,0 1,1 0,1 1,0 0,0 1,0 1,0 0,1 1,1
0,0 1,0 0,1 1,1 0,0 0,1 0,0 1,1 1,0 0,1 0,0 1,1 1</ TextureCoordinates >
</VertexBuffer>
The dimension attribute of the TextureCoordinates element defines whether this set of
texture coordinates applies to a mono-dimensional or a bi-dimensional image.
The channel attribute is used by textured materials to define which set of
texture coordinates of a mesh they are using.
Polygonal Representation
A polygonal representation is a PolygonalRepType object aggregating the following
objects:
- graphic attributes
- optional level of details
- primitive sets which are collections of graphic primitives (faces and
polylines).
- A VertexBuffer object to store and optimize the definition of vertices
used in faces and level of details
The global 3D XML writing of a polygonal representation is something like this:
50
3D XML USER’S GUIDE
Primitive Sets
Primitives are organized into sets so that they can share graphic attributes or
material definitions.
Graphic attributes can be optionally defined on primitive sets. If they are, these
attributes are then inherited by aggregated primitives unless they are already
assigned graphic attributes. Surface attributes can be set on a FaceSet object. Line
attributes can be set on PolylineSet objects.
The polygonal representation can aggregate one or more sets of each type.
Both categories are optional elements of the <PolygonalRepType> object.
51
3D XML USER’S GUIDE
52
3D XML USER’S GUIDE
53
3D XML USER’S GUIDE
LOD Mechanism
When an object is so far away that it only occupies one pixel,
there is very little use in modeling the object in great detail.
Conversely, objects that are so close as to occupy the entire
(or perhaps more) field of view need to be modeled with
significant detail in the areas occupying the current field of
view. A high level of detail is not necessary for the entire
model because some portions may be obscured by a visible
piece of the model or be far enough away to make the detail
meaningless. The purpose of the LOD mechanism is to adjust
the polygonal representation of an object to the viewer
distance. For information, if a mesh in LOD 2 can reveal details
of 70m, a mesh in LOD 3 will reveal details of 35m. When
increasing the value of the LOD by 1, the level of definition is
multiplied by two (but the size of the file increases fourfold). Top : the rabbit is near the observer, it occupies
a large amount of pixels on the screen, a precise
LOD Accuracy LOD is needed in order to have a nice rendering.
Bottom : the rabbit is far from the eye, only a few
LOD accuracy is the maximum distance between the set of pixels are used on the screen, a rough LOD is
triangles defined for the LOD and the initial geometry. enough to render the rabbit.
54
3D XML USER’S GUIDE
../..
55
3D XML USER’S GUIDE
56
3D XML USER’S GUIDE
../..
57
3D XML USER’S GUIDE
<GeometricRepresentationSet>
<Representation format="TESSELLATED" version="1.1" id="1">
<AssociatedXML id="2" xsi:type="BagRepType">
<Rep id="3" xsi:type="PolygonalRepType">
<SurfaceAttributes>
<MaterialApplication mappingType="IMPLICIT_MAPPING"
blendType="ALPHA_TRANSPARENCY" xsi:type="TextureMaterialApplicationType">
<MaterialId>8</MaterialId>
</MaterialApplication>
<MaterialApplication mappingType="IMPLICIT_MAPPING"
blendType="ALPHA_TRANSPARENCY" xsi:type="TextureMaterialApplicationType">
<MaterialId>10</MaterialId>
</MaterialApplication>
</SurfaceAttributes>
<Faces>
<Face id="4" triangles="0 1 2 1 3 2 4 5 6 5 7 6 8 9 10 9 11 10 12 13 14 13 15
14 16 17 18 17 19 18 20 21 22 21 23 22"/>
</Faces>
<VertexBuffer>
<Positions>-0.3 -0.3 0.3,-0.3 -0.3 -0.3,0.3 -0.3 0.3,0.3 -0.3 -0.3,-0.3 -0.3 -0.3,-
0.3 0.3 -0.3,0.3 -0.3 -0.3,0.3 0.3 -0.3,-0.3 0.3 -0.3,-0.3 0.3 0.3,0.3 0.3 -0.3,0.3 0.3 0.3,-0.3 0.3 0.3,-0.3
-0.3 0.3,0.3 0.3 0.3,0.3 -0.3 0.3,-0.3 0.3 -0.3,-0.3 -0.3 -0.3,-0.3 0.3 0.3,-0.3 -0.3 0.3,0.3 -0.3 -0.3,0.3
0.3 -0.3,0.3 -0.3 0.3,0.3 0.3 0.3</Positions>
<Normals>0. -1. 0.,0. -1. 0.,0. -1. 0.,0. -1. 0.,0. 0. -1.,0. 0. -1.,0. 0. -1.,0. 0. -
1.,0. 1. 0.,0. 1. 0.,0. 1. 0.,0. 1. 0.,0. 0. 1.,0. 0. 1.,0. 0. 1.,0. 0. 1.,-1. 0. 0.,-1. 0. 0.,-1. 0. 0.,-1. 0. 0.,1. 0.
0.,1. 0. 0.,1. 0. 0.,1. 0. 0.</Normals>
<TextureCoordinates channel="0" dimension="2D">0.009 0.991,0.009
0.009,0.991 0.991,0.991 0.009,0.991 0.009,0.991 0.991,0.009 0.009,0.009 0.991,0.991 0.009,0.991
0.991,0.009 0.009,0.009 0.991,0.009 0.991,0.009 0.009,0.991 0.991,0.991 0.009,0.009 0.009,0.991
0.009,0.009 0.991,0.991 0.991,0.009 0.009,0.991 0.009,0.009 0.991,0.991
0.991</TextureCoordinates>
<TextureCoordinates channel="1" dimension="2D">0.009 0.991,0.009
0.009,0.991 0.991,0.991 0.009,0.991 0.009,0.991 0.991,0.009 0.009,0.009 0.991,0.991 0.009,0.991
0.991,0.009 0.009,0.009 0.991,0.009 0.991,0.009 0.009,0.991 0.991,0.991 0.009,0.009 0.009,0.991
0.009,0.009 0.991,0.991 0.991,0.009 0.009,0.991 0.009,0.009 0.991,0.991
0.991</TextureCoordinates>
<DiffuseColors format="RGBA">0. 0. 0. 0.,0. 0. 0. 0.,0. 0. 0. 0.,0. 0. 0. 0.,0. 1.
0. 0.,0. 1. 0. 0.,0. 1. 0. 0.,0. 1. 0. 0.,0. 0. 1. 0.,0. 0. 1. 0.,0. 0. 1. 0.,0. 0. 1. 0.,1. 0. 0. 0.,1. 0. 0. 0.,1. 0.
0. 0.,1. 0. 0. 0.,1. 1. 0. 0.,1. 1. 0. 0.,1. 1. 0. 0.,1. 1. 0. 0.,0. 1. 1. 0.,0. 1. 1. 0.,0. 1. 1. 0.,0. 1. 1.
0.</DiffuseColors>
</VertexBuffer>
</Rep>
</AssociatedXML>
</Representation>
</GeometricRepresentationSet>
</Model_3dxml>
58
3D XML USER’S GUIDE
59
3D XML USER’S GUIDE
<Model_3dxml xmlns="http://www.3ds.com/xsd/3DXML"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.3ds.com/xsd/3DXML E:\Docs\3DXML\3DXML.xsd">
<Header>
<SchemaVersion>1.0</SchemaVersion>
<Title>Wheel 3DXML File</Title>
<Source>CATIA V5</Source>
<Author>llr</Author>
</Header>
<ProductStructure root="1">
<Reference3D xsi:type="Reference3DType" id="1" name="Cylinder"/>
<ReferenceRep xsi:type="ReferenceRepType" id="2" name="Cylinder_RepReference"
format="TESSELLATED" associatedFile="urn:3DXML:Representation:loc:4"/>
<InstanceRep xsi:type="InstanceRepType" id="3" name="Cylinder_RepInstance">
<IsAggregatedBy>1</IsAggregatedBy>
<IsInstanceOf>urn:3DXML:Reference:loc:2</IsInstanceOf>
</InstanceRep>
</ProductStructure>
<GeometricRepresentationSet>
<Representation id="4" format="TESSELLATED" version="1.1">
<AssociatedXML xsi:type="BagRepType">
<!--the polygonal rep containing the cylinder definition-->
<Rep xsi:type="PolygonalRepType" accuracy="0.2">
<!--graphic attributes of the polygonal rep-->
<SurfaceAttributes>
<Color xsi:type="RGBAColorType" red="0.6" green="0.6" blue="0.7"/>
</SurfaceAttributes>
<LineAttributes thickness="0.35" lineType="DASHED">
<Color xsi:type="RGBAColorType" red="0" green="0" blue="0"/>
</LineAttributes>
<!--a level of detail with few triangles. The LOD is made of one face only -->
<PolygonalLOD accuracy="0.5">
<Faces>
<Face fans="17 25 31 23, 16 24 30 22" strips="0 1 8 9 14 15 6 7 0 1"/>
</Faces>
</PolygonalLOD>
<! --go to next page -->
../..
60
3D XML USER’S GUIDE
</VertexBuffer>
</Rep>
</AssociatedXML>
</Representation>
</GeometricRepresentationSet>
</Model_3dxml>
The LOD described in this example is made of one face with a restricted
number of vertices compared to the original mesh.
61
3D XML USER’S GUIDE
62
3D XML USER’S GUIDE
Architecture Description
Here is a description of the monolithic architecture based on the “QUAD”
sample:
Quad
Quad.3dxml Reference Monolithic architecture
Steering Axle
Steering Axle
Reference
Axle
Reference
With this type of architecture, the declaration of instances and references uses
a pointer to a local identifier.
63
3D XML USER’S GUIDE
Quad.3dxml
Quad
Reference Multi-file architecture
Steering Axle
Steering Axle
Reference
Axle
Reference
Steering
Wheel Left Wheel Right Wheel Axis Chassis
Instance
Steering Wheel
Wheel Axis Chassis
Reference
Reference Reference Reference
Steering.3dxml Wheel.3dxml Axis.3dxml Chassis.3dxml
<ProductStructure root="1">
…
<IsInstanceOf>urn:3DXML:Reference:loc:2</IsInstanceOf>
<RelativeMatrix>1 0 0 0 1 0 0 0 1 -35.3964 202.211 0</RelativeMatrix>
</Instance3D>
Here is a description of a multi-file architecture.
The references which are located at the extremities of the reference/instance
graph have their representations defined in external files.
<ProductStructure root="1">
<Reference3D xsi:type="Reference3DType" id="1" name="Quad"/>
<Instance3D xsi:type="Instance3DType" id="3" name="Chassis.1">
<IsAggregatedBy>1</IsAggregatedBy>
<IsInstanceOf>urn:3DXML:Reference:ext:Chassis.3dxml#1</IsInstanceOf>
<RelativeMatrix>1 0 0 0 1 0 0 0 1 -35.3964 202.211 0</RelativeMatrix>
</Instance3D>
The Chassis.3dxml file should contain a <Reference3D> tag with an id (id="1") to
be pointed to by the main document (urn:3DXML:Reference:ext:Chassis.3dxml#1).
64
3D XML USER’S GUIDE
Specifying Links
Following 3 types of links are possible:
1. a representation to point to the geometry data. The link is specified in the
associatedFile attribute of the <ReferenceRep> tag. In the <ReferenceRep>
declaration, the links are always local. The geometry data should be in the
same file as the <ReferenceRep> declaration.
2. an instance to point to its reference. The link is then specified by the
<IsInstanceOf> tag. Links to references can be local or external depending on
the document architecture (monolithic or not).
3. An <ImageLinkType>to link to an image.
3D XML Image link mechanism is described below:
Identifier to refer to a
location within a
current document
65
Path to the resource which
contains the data to be
pointed to
urn:3DXML:Reference:ext:Chassis.3dxml#3
Identifier to refer to a
location external to the Identifier of the data
current document to be pointed to.
For more information, refer to the LinkType definition in the 3D XML schema.
66
3D XML USER’S GUIDE
Packaging
When multi-file architecture is used for 3D XML, there might be a need to
package the various components for ease of communication. Such a possibility
is provided using ZIP compression, which not only provides the necessary
bundling of the 3D XML components, but can also provide much needed
compression for transmission of this data over network.
The application dealing with the 3D XML components can save various
elements of the 3D XML model in two or more XML files which can then be
packaged together using ZIP compression to create a single 3DXML file. One
important aspect of this packaging is to provide information for the receiving
application to be able to determine where to start in this collection of XML files.
This is done through the use of a Manifest which is added to the archive. This
Manifest identifies the root or starting XML file.
Applications needing to access and/or create 3dxml ZIP archives can use freely
available ZIP toolkits.
3DXML
3DXML
3DXML
Manifest
ZIP 3DXML
67
3D XML USER’S GUIDE
Task Index
How to Create References and Instances .................................................... 16
How to Specify a Representation ................................................................ 16
How to Specify a GraphicPropertiesAspectType Object ................................. 18
How to Apply Graphic Properties ................................................................ 19
How to Specify RGBA Colors ...................................................................... 20
How to Specify Line Attributes ................................................................... 21
How to Specify Point Attributes .................................................................. 21
How to Specify General Attributes .............................................................. 21
How to Apply a Basic Material onto a Surface .............................................. 22
How to Apply a Textured Material onto a Surface......................................... 27
How to Specify a Projection Viewpoint ........................................................ 45
How to Specify a Perspective Viewpoint ...................................................... 45
How to Specify a Parallel Viewpoint ............................................................ 46
How to Specify a Customized 3D Viewpoint................................................. 47
How to Describe the Indexed Primitives in a Polygonal Representation .......... 52
How to Describe the Non-Indexed Primitives in a Polygonal Representation ... 53
How to Specify a LOD ............................................................................... 54
How to Declare Local Links ........................................................................ 65
How to Declare External Links.................................................................... 65
69
3D XML USER’S GUIDE
Appendix
Complete Reference/Instance Graph of the Quad Sample
“QUAD”
1
“Steering “Chassis”
Axle”
20 2
“Wheel.1” Instance
10 “Wheel.2” Instance
14
“Wheel
Reference”
9
71
3D XML USER’S GUIDE
Glossary
A
alpha channel
A portion of each pixel’s data that is reserved for transparency information. 32-
bit graphics systems contain four channels: three 8-bit channels for red, green,
and blue (RGB) and one 8-bit alpha channel.
An alpha value of zero represents full transparency, and a value of 1
represents a fully opaque pixel. Intermediate values indicate partially
transparent pixels.
ambient light
Light that has been scattered so much by the environment that its direction is
impossible to determine.
container
A 3D XML element intended to gather data of similar types or data to be used
together.
diffuse light
Light that comes from one direction. The diffuse light is bright if it comes
squarely down on a surface while it is darker if it barely glances off the surface.
indexed primitive
A method of describing a group of 3D primitives. The vertices of the primitives
are stored in a vertex list, and each primitive (a triangle or line segment) is
described as a set of index values that point to particular vertices in the vertex
list.
73
instance
In the 3D XML context, an object which is defined as an instantiation of a
reference and is only meaningful when positioned within a Product Structure.
Level of Detail
A mechanism for achieving a high level of performance in a 3D virtual world. It
balances the quantity of an object with its quality (detail). As some measure of
the distance between the viewer and the object changes, a related change is
made in the quantity and quality of the rendering of an object.
reference
In the 3D XML context, a standardized object intended to be reused.
RGBA color
A color which is defined by its four components: red, green, blue, and alpha.
The RGBA color model is an additive color model in which Red, Green, and
Blue light are combined in various ways to create other colors. The alpha
channel is used to manage the transparency.
specular light
A light that comes from a particular direction and tends to bounce off the
surface in a preferred direction.
specular exponent
A property of the specular light which defines the size of the highlight spot.
Typical values for this property range from 1 to 500, with normal objects
having values in the range 5 to 20.
vertex buffer
An object intended to store in high performance memory all vertices of a group
of faces and adjacent edges and points. All vertices in a vertex buffer have the
same description (coordinates, normal, texture).
74