The XGL file format is designed to represent 3D information for the purpose of visualization. It attempts to capture all of the 3D information that can be rendered by SGI's OpenGL rendering library. It uses XML 1.0 syntax, so it is easy to write and can be parsed by standard, freely available code. These features make XGL the ideal format to use when data must be exchanged between two graphics systems for the purposes of visualization.
The XGL format is intended to work well with systems that use OpenGL. It should be possible to take a program that renders 3D information using OpenGL and have that program export an XGL file. Then, an XGL viewer should be able to create OpenGL objects that are exactly the same as those rendered by the exporting program.
Because the XGL format uses XML syntax, it is easy to write applications that read and write XGL. To export XGL, an application needs only write out a text file using the XML syntax. XGL supports a variety of mechanisms for arranging and referencing data within the file, so it should be easy to find a method of exporting data that is easy to implement for any graphics system. There are a number of free XML parsers available, eliminating the need to implement a complex parser when building an XGL reader.
The World Wide Web Consortium defines XML syntax. Detailed information about this syntax can be found at http://www.w3.org/TR/REC-xml. XGL uses a fairly basic subset of XML. In XGL, the order of tags within another tag is irrelevant. Any tags that are not defined are reserved for future versions of XGL except for those that begin with "EXT". Any application specific data should be enclosed with a tag that begins with "EXT".
XGL supports the sharing of data between different parts of a file. For example, a vertex that is part of several faces can be defined once and can then be referenced by the faces that include that vertex. Referencing allows an XGL reader to recognize that two objects are the same. It also leads to a more compact file format.
Referencing is implemented by allowing certain XGL tags to contain an attribute named "ID" whose value is an integer. In other parts of the file another tag of the form <tagREF> can reference that value that is defined by the "ID" attribute. The places in a file where elements can be defined are indicated in the "Available Defines" sections of this documentation. A defined element can be referenced from anywhere within its parent or any of its parent's descendents.
There are many places in XGL where vectors are used. A vector could be represented with a XML tag for each dimension of the vector, but this approach often leads to extremely large files because of the extra space used to store the tags. For this reason, XGL represents vectors as numbers delimited by commas. Specifically, XGL currently uses two, three, four and six dimensional floating-point vectors.
The <WORLD> tag represents all of the viewer independent elements of a scene. This includes 3D objects, lights, and environment information.
Exactly one element from the "Lighting Tags" section is required.
Exactly one element from the "Background Tags" section is required.
Any number of tags from the "Object Tags" section may be added here. A world with sub-objects may not have a mesh.
The <WORLD> tag may contain up to 1 tag from the "Mesh Tags" section.
The <WORLD> tag may contain up to 1 tag from the "Name Tags" section.
The <OBJECT> tag represents a 3D object at a specific location in the world. An object may have other objects within it. It may also have data associated with it. The object tag may include an attribute named "PATHID" which should be a positive integer. This attribute can be used to identify a particular object instance within the object hierarchy. The "PATHID" attribute must be unique within the children of a parent.
The <OBJECT> tag may contain up to 1 tag from the "Mesh Tags" section.
The <OBJECT> tag may contain up to 1 tag from the "Transform Tags" section. This transform is used to map the mesh into the space of the parent tag. If this tag is not included, the identity transform is used.
The <OBJECT> tag may contain any number of tags from the "Object Tags" section may be added here. Objects included here will be transformed into this object's space. An object with sub-objects may not have a mesh.
The <OBJECT> tag may contain any number of tags from the "Data Tags" section.
The <OBJECT> tag may contain up to 1 tag from the "Name Tags" section.
This tag must contain an integer that corresponds to the "ID" attribute of an <OBJECT> tag that is defined in the current scope.
This tag represents a reference to an external XGL file. The external file does not have to be present to view the parent file. The <INCLUDE> tag may include an attribute named "PATHID" which should be a positive integer. This attribute can be used to identify a particular object instance within the object hierarchy.
This tag must contain exactly one 6D Vector. This vector represents the minX, minY, minZ, maxX, maxY, maxZ of the points in world space of the external XGL file linked in.
This tag must contain exactly one path to another XGL file. The <REF> tag is not designed to explicitly state how another XGL file is found, but rather relies on the user of XGL to determine how to find the file given this context-free path. This allows for a great flexibility in where and how the data for this <INCLUDE> is obtained.
This tag contains a string key that indicates how the data in the <REF> path is interpreted. Some standard Ref Types have been defined, but any type may be defined by using the prefix "EXT" before the type name.
The <INCLUDE> tag may contain up to 1 tag from the "Transform Tags" section. This transform is used to map the included object into the space of the parent tag. If this tag is not included, the identity transform is used.
Any number of tags from the "Data Tags" section may be added here. These tags represent data that is associated with the included object.
The <INCLUDE> tag may contain up to 1 tag from the "Name Tags" section. This name represents the name of this instance of the external XGL file.
This tag also represents a reference to an external XGL file. The external file needs to be present in order to view the referencing file. The <INCLUDESTATIC> tag may include an attribute named "PATHID" which should be a positive integer. This attribute can be used to identify a particular object instance within the object hierarchy. Since we can count on the external file being there, the extents of the included file can be determined from the included file.
This tag must contain exactly 1 path to another XGL file. The <REF> tag is not designed to explicitly state how another XGL file is found, but rather relies on the user of XGL to determine how to find the file given this context-free path. This allows for a great flexibility in where and how the data for this <INCLUDESTATIC> is obtained.
This tag contains a string key that indicates how the data in the <REF> path is interpreted. Some standard Ref Types have been defined, but any type may be defined by using the prefix "EXT" before the type name.
The <INCLUDESTATIC> tag may contain up to 1 tag from the "Transform Tags" section. This transform is used to map the included object into the space of the parent tag. If this tag is not included, the identity transform is used.
Any number of tags from the "Data Tags" section may be added here. These tags represent data that is associated with the included object.
The <INCLUDESTATIC> tag may contain up to 1 tag from the "Name Tags" section. This name represents the name of this instance of the external XGL file.
The Ref Type FILE specifies a '/' delimited file path. If the ref begins with '/' it is an absolute path. If the ref does not begin with a '/' the path is relative to the location of the file that the ref is in. Files can contain any ASCII character between 0x20 and 0xFF, with the exception of '\', '/', '*', '?', '"', '<', '>', and '|'. Files are case sensitive.
Ref Types that begin with EXT are extension Ref Types and can be used for whatever purpose. This specification will never include a Ref Type beginning with EXT.
This tag is used to describe a displayable name for an object or world. This tag may contain any number of XML characters and must not contain any other XGL tags.
This tag represents a non-skewing three-dimensional transform. Positions are scaled toward the origin in their original space by the specified scaling amount.
This tag must contain exactly 1 3D vector. The positive Z-axis of transformed points will point in the direction of this vector.
This tag must contain exactly 1 3D vector. The positive Y-axis of transformed points will point as closely as possible to this vector. This vector must not be equal to or opposite of the forward vector.
This tag must contain exactly 1 3D vector. Points are translated so that the origin in the original space is moved to specified position.
This tag represents a non-skewing three-dimensional transform. Points are scaled toward the origin of their original space by the specified scaling amount. If this tag is not included, a scaling factor of 1.0 is used. The scale must be greater than zero. There can be at most one scale tag within the transform.
The <MESH> tag represents a collection of related triangles, lines and points that approximate a 3D object.
A mesh may contain any number of <F> tags.
A mesh may contain any number of <L> tags.
A mesh may contain any number of <PT> tags.
A mesh may contain any number of <PATCH> tags.
If this tag is present, faces will be visible from both sides. If this flag is absent, faces will be visible from only one side as described in the <F> tag.
This tag must contain an integer that corresponds to the "ID" attribute of a mesh that is defined in the current scope.
The <PATCH> tag represents a group of related faces, lines and points that may have data associated with them. The patch tag may include a "PATCHID" attribute, which is used to identify that patch and should be a positive integer. The 0 PATCHID is reserved and will be used for any faces, lines or points that are not in a patch.
A patch may contain any number of <F> tags.
A patch may contain any number of <L> tags.
A patch may contain any number of <PT> tags.
Any number of data tags can be included within the <PATCH> tag. This data is associated with the faces that include the patch.
The <F> tag represents a triangular face that is part of a 3D object. When looking at the front side of the face, <FV1>, <FV2> and <FV3> will be in counter-clockwise order.
A <F> tag must contain exactly one <FV1> tag. This tag should be as described in the "Face Vertex Tags" section.
A <F> tag must contain exactly one <FV2> tag. This tag should be as described in the "Face Vertex Tags" section.
A <F> tag must contain exactly one <FV3> tag. This tag should be as described in the "Face Vertex Tags" section.
A <F> tag must contain exactly one tag from the "Material Tags" section.
A <F> tag may contain up to 1 tag from the "Texture Tags" section. If a texture is used, a tag from the "Texture Coordinate Tags" section must be included in <FV1>, <FV2>, and <FV3>.
A <F> tag may contain any number of <S> tags. Each <S> tag must contain a single integer identifying a shade group to which the face belongs. Faces that belong to the same shade group will be blended together. Blending is accomplished by calculating normals for the face vertices. Note that the <S> tag will not replace the normals specified by the <N> tag if the <N> tag is included in the <FV1>, <FV2>, or <FV3> tags for the face. The algorithm used to calculate face vertex normals for shade groups is as follows.
Let f be a group faces that share a vertex v and belong to the same shade group.
Let n be the number of faces in the group f.
Let fvnx be the face vertex normal of fx at vertex v.
Let qx be the angle formed by v and the other two vertices of fx.
FVNx = Sum(0 ≤ i ≤ n)
fvni ' qi
fvnx = FVNx |FVNx|
These tags each represent an instance of a vertex on a face.
A Face Vertex must have exactly one tag from the "Position Tags" section.
A Face Vertex may have up to one tag from the "Normal Tags" section.
A Face Vertex may have up to one tag from the "Texture Coordinate Tags" Section.
The <L> tag represents a line that is part of a 3D object. The line begins at <LV1> and ends at <LV2>.
A <L> tag must contain exactly one <LV1> tag. This tag should be as described in the "Line Vertex Tags" section. If <LV1> specifies a normal, <LV2> must also specify a normal.
A <L> tag must contain exactly one <LV2> tag. This tag should be as described in the "Line Vertex Tags" section. If <LV2> specifies a normal, <LV1> must also specify a normal.
A <L> tag must contain exactly one tag from the "Material Tags" section. If normals are omitted from <LV1> and <LV2>, the diffuse, specular, and shininess material properties are ignored.
A <L> tag may contain up to one tag from the "Texture Tags" section. If a texture is used, a tag from the "Texture Coordinate Tags" section must be included in <LV1> and <LV2>.
A <L> tag may contain up to one tag from the "Line Style Tags" section.
These tags are identical to <FV1> and <FV2>. Please refer to the "Face Vertex Tags" section for a full definition.
The <LINESTYLE> tag describes the style in which a particular line should be displayed.
A line style must have exactly one <LINEWIDTH> tag. This tag must contain a floating-point number that indicates the width of the line. The default value is 1.0. This number must be greater than 0.0. This number corresponds to the width parameter of the glLineWidth OpenGL function. For more details on how the <LINEWIDTH> tag affects rasterization of the line, please refer to the glLineWidth function in the OpenGL specification.
A line style may have up to one <LINEPATTERN> tag. This tag must contain the 4 character hexadecimal representation of a single 16-bit integer. For example the number 255 is represented as 00FF. The default value is FFFF. This integer corresponds to the pattern parameter of the glLineStipple OpenGL function. For more details on how the <LINEPATTERN> tag affects rasterization of the line, please refer to the glLineStipple function in the OpenGL specification.
A line style may have up to one <LINEPATTERNFACTOR> tag. This tag must contain an integer in the range 1 to 256 inclusive. The default value is 1. This integer corresponds to the factor parameter of the glLineStipple OpenGL function. For more details on how the <LINEPATTERNFACTOR> tag affects rasterization of the line, please refer to the glLineStipple function in the OpenGL specification.
This tag must contain an integer that corresponds to the "ID" attribute of a line style that is defined in the current scope.
The <PT> tag represents a point that is part of a 3D object. The point is located at <PV1>.
A <PT> tag must contain exactly one <PV1> tag. This tag should be as described in the "Point Vertex Tags" section.
A <PT> tag must contain exactly one tag from the "Material Tags" section. If the normal is omitted from <PV1>, the diffuse, specular, and shininess material properties are ignored.
A <PT> tag may contain up to one tag from the "Texture Tags" section. If a texture is used, a tag from the "Texture Coordinate Tags" section must be included in <PV1>.
A <PT> tag may contain up to one tag from the "Point Style Tags" section.
This tag is identical to <FV1>. Please refer to the "Face Vertex Tags" section for a full definition.
The <POINTSTYLE> tag describes the style with which a particular point should be displayed.
A point style must have exactly one <POINTSIZE> tag. This tag must contain a floating-point number that indicates the size of the point. The default value is 1.0. This number must be greater than 0.0. This number corresponds to the size parameter of the glPointSize OpenGL function. For more details on how the <POINTSIZE> tag affects rasterization of the point, please refer to the glPointSize function in the OpenGL specification.
This tag must contain an integer that corresponds to the "ID" attribute of a point style that is defined in the current scope.
This tag represents a position in a 3D coordinate space. The tag should contain a 3D vector.
This tag must contain an integer that corresponds to the "ID" attribute of a position that is defined in the current scope.
This tag represents a position in a 3D coordinate space. The tag should contain a 3D vector.
This tag must contain an integer that corresponds to the "ID" attribute of a position that is defined in the current scope.
This tag represents a position on the 2D space of a texture. The tag should contain a 2D vector in the form u,v. The texture coordinate 0,0 corresponds to the upper left had corner of the texture. The coordinate 1,1 corresponds to the lower right hand corner. To represent a repeated or clamped texture, values for u and v greater than 1 or less than 0 may be used.
This tag must contain an integer that corresponds to the "ID" attribute of a <TC> that is defined in the current scope.
This tag represents a texture.
The texture must have exactly one tag from "Texture Image Tags" section.
The texture must have exactly one tag from "Texture Function Tags" section.
The texture must have exactly one tag from the "Texture Wrap Tags" section
The <TEXTURE> tag may contain up to 1 <TEXTUREBORDERCOLOR> tag. This tag must contain a 4D vector in the form R,G,B,A representing a color for a border of the texture. This tag should be used in conjunction with the <CLAMP> tag.
This tag must contain an integer that corresponds to the "ID" attribute of a <TEXTURE> that is defined in the current scope.
This tag must contain attributes named "WIDTH" and "HEIGHT". These attributes must be integers specifying the width and height of the texture RGBA data.
The data in this tag represents the color and alpha values for the pixels in a texture. All values must be represented in hexadecimal form in the rage of 00 - FF. Each pixel is represented as 8 characters in the following form:
RRGGBBAA
RR represents the red component of the pixel.
GG represents the green component of the pixel.
BB represents the blue component of the pixel.
AA represents the alpha component of the pixel.
For the red, green, and blue components, 00 represents no brightness, and FF represents full brightness. For the alpha component, 00 represents completely transparent, and FF represents completely opaque.
The data must contain width*height pixels without white space or separators of any kind.
This tag must contain attributes named "WIDTH" and "HEIGHT". These attributes must be integers specifying the width and height of the texture RGB data.
The data in this tag represents the color values for the pixels in a texture that contains no alpha components. All values must be represented in hexadecimal form in the rage of 00 - FF. Each pixel is represented as 6 characters in the following form:
RRGGBB
RR represents the red component of the pixel.
GG represents the green component of the pixel.
BB represents the blue component of the pixel.
For the all components, 00 represents no brightness, and FF represents full brightness.
The data must contain width*height pixels without white space or separators of any kind.
This tag must contain an integer that corresponds to the "ID" attribute of a <TEXTURERGBA> tag that is defined in the current scope.
This tag must contain an integer that corresponds to the "ID" attribute of a <TEXTURERGB> tag that is defined in the current scope.
These tags specify how texture pixels are combined with primitive pixels. The following notation is used for this section:
C - Color value of the combined pixel
A - Alpha value of the combined pixel
Ct - Color value (R,G,B) of the pixel in the texture
Cf - Color value (R,G,B) of the pixel in the face
At - Alpha value of the pixel in the texture
Af - Alpha value of the pixel in the face
This tag specifies the replace texture function. Texture pixels will be combined with face pixels as follows:
C = Ct
A = At
This tag specifies the modulate texture function. Texture pixels will be combined with face pixels as follows:
C = CfCt
A = AfAt
This tag specifies the decal texture function. Texture pixels will be combined with face pixels as follows:
C = Cf(1-At) + CtAt
A = Af
This tag indicates that texture coordinate values outside the rage 0-1 cause the texture to repeat on the face.
This tag indicates that texture coordinate values outside the rage 0-1 are clamped to 0 or 1. This tag should be used in conjunction with the <TEXTUREBORDERCOLOR> tag.
The <MAT> element represents the way that a surface interacts with the light that hits it.
A material must have exactly one <AMB> tag. This tag must contain a vector whose components describe the fraction of ambient red, green, and blue light that the object reflects. Each component should be between 0.0 and 1.0 inclusive.
A material must have exactly one <DIFF> tag. This tag must contain a vector whose components describe the fraction of diffuse red, green, and blue light that the object reflects. Each component should be between 0.0 and 1.0 inclusive.
A material may have up to one <SPEC> tag. This tag contains a vector whose components describe the fraction of specular red, green, and blue light that the object reflects. If this tag is not included, the material will reflect no specular light. Each component should be between 0.0 and 1.0 inclusive.
A material may have up to one <EMISS> tag. This tag contains a vector whose components describe the amount of red, green, and blue light that the object emits. If this tag is not included, the material will emit no light. Each component should be between 0.0 and 1.0 inclusive.
A material may have up to one <ALPHA> tag. This tag contains a floating-point number that indicates how opaque the material is. The default value of 1.0 indicates that the material is completely opaque. This value can range from 1.0 to 0.0.
A material may have up to one <SHINE> tag. This tag contains a floating-point number that indicates how a specular reflection from the material drops off. Value can range from 128.0, which indicates a tightly focused specular reflection down to 0.0. The default is 0.0.
This tag must contain an integer that corresponds to the "ID" attribute of a material that is defined in the current scope.
The background tag represents the background on which 3D data should be displayed.
A Background must have exactly one <BACKCOLOR> tag. This tag must contain a vector that represents the color that the object in the world should be displayed on. The three elements of the vector represent the red, green, and blue components of the background color. Each element must be in the range from 0.0 to 1.0 inclusive.
The lighting tag describes the lighting in an environment.
The lighting tag must contain at least one tag from the "Lighting Types" section.
The <AMBIENT> tag describes light that has equal intensity in all directions. It must include a vector whose elements represent the intensities of red, green, and blue light. These values must be between 0.0 and 1.0 inclusive. There can be at most one ambient tag within a lighting tag.
The directional light tag describes a light that comes from a particular direction, as if there was a light source an infinite distance away.
A directional light must include exactly one <DIRECTION> tag. This tag must contain a 3D vector that describes the direction that light is shining from.
The <DIFFUSE> tag represents the components of lighting that are reflected diffusely by materials. This tag must include a vector whose elements represent the intensities of red, green, and blue light. These values must be between 0.0 and 1.0 inclusive.
The <SPECULAR> tag represents the components of lighting that are reflected spectrally by materials. This tag must include a vector whose elements represent the intensities of red, green, and blue light. These values must be between 0.0 and 1.0 inclusive.
These tags represent application specific data that is associated with 3D data.
The <DATA> tag represents data structures defined by one particular organization. The tag must include an attribute "ORG" which is the name of the organization that defines the meaning of the data within this tag.
The <DATA> tag must include at least one tag from the Data Element Tags section.
These tags represent individual data elements that are associated with 3D data.
The <STR> tag represents string data that is associated with an object. The "NAME" attribute must be set to a value that identifies the type of data that is included in this string. This tag should enclose the string data. Any leading or trailing white space is ignored.
The <BIN> tag represents binary data that is associated with an object. The "NAME" attribute must be set to a value that identifies the type of data that is included in this tag. This tag should enclose a hexadecimal representation of the data with no internal white space. Any leading or trailing white space is ignored.
This example XGL file contains two green boxes in different positions in the world. Extensive referencing of defined items has been used to both reduce the size of the file and to make a clearer representation of the mesh.
<WORLD>
<BACKGROUND>
<BACKCOLOR>1.0,1.0,1.0</BACKCOLOR>
</BACKGROUND>
<LIGHTING>
<DIRECTIONALLIGHT>
<DIFFUSE>1.000,1.000,1.000</DIFFUSE>
<SPECULAR>0.100,0.100,0.100</SPECULAR>
<DIRECTION>0.302,-0.302,-0.905</DIRECTION>
</DIRECTIONALLIGHT>
<AMBIENT>0.000,0.000,0.000</AMBIENT>
</LIGHTING>
<MESH ID="0">
<MAT ID="0">
<AMB>0.000,1.000,0.000</AMB>
<DIFF>0.000,1.000,0.000</DIFF>
<SPEC>1.000,1.000,1.000</SPEC>
<EMISS>0.000,0.000,0.000</EMISS>
<SHINE>64.0</SHINE>
<ALPHA>1.000</ALPHA>
</MAT>
<P ID="0">-1.0,-0.5,0.0</P>
<P ID="1">-1.0,-0.5,1.0</P>
<P ID="2">-1.0,0.5,0.0</P>
<P ID="3">-1.0,0.5,1.0</P>
<P ID="4">0.0,-0.5,0.0</P>
<P ID="5">0.0,-0.5,1.0</P>
<P ID="6">0.0,0.5,0.0</P>
<P ID="7">0.0,0.5,1.0</P>
<N ID="0">-1.0,0.0,0.0</N>
<N ID="1">0.0,-1.0,0.0</N>
<N ID="2">1.0,0.0,0.0</N>
<N ID="3">0.0,1.0,0.0</N>
<N ID="4">0.0,0.0,1.0</N>
<N ID="5">0.0,0.0,-1.0</N>
<F>
<MATREF>0</MATREF>
<FV1><PREF>0</PREF><NREF>0</NREF></FV1>
<FV2><PREF>1</PREF><NREF>0</NREF></FV2>
<FV3><PREF>2</PREF><NREF>0</NREF></FV3>
</F>
<F>
<MATREF>0</MATREF>
<FV1><PREF>2</PREF><NREF>0</NREF></FV1>
<FV2><PREF>1</PREF><NREF>0</NREF></FV2>
<FV3><PREF>3</PREF><NREF>0</NREF></FV3>
</F>
<F>
<MATREF>0</MATREF>
<FV1><PREF>4</PREF><NREF>1</NREF></FV1>
<FV2><PREF>5</PREF><NREF>1</NREF></FV2>
<FV3><PREF>0</PREF><NREF>1</NREF></FV3>
</F>
<F>
<MATREF>0</MATREF>
<FV1><PREF>0</PREF><NREF>1</NREF></FV1>
<FV2><PREF>5</PREF><NREF>1</NREF></FV2>
<FV3><PREF>1</PREF><NREF>1</NREF></FV3>
</F>
<F>
<MATREF>0</MATREF>
<FV1><PREF>6</PREF><NREF>2</NREF></FV1>
<FV2><PREF>7</PREF><NREF>2</NREF></FV2>
<FV3><PREF>4</PREF><NREF>2</NREF></FV3>
</F>
<F>
<MATREF>0</MATREF>
<FV1><PREF>4</PREF><NREF>2</NREF></FV1>
<FV2><PREF>7</PREF><NREF>2</NREF></FV2>
<FV3><PREF>5</PREF><NREF>2</NREF></FV3>
</F>
<F>
<MATREF>0</MATREF>
<FV1><PREF>2</PREF><NREF>3</NREF></FV1>
<FV2><PREF>3</PREF><NREF>3</NREF></FV2>
<FV3><PREF>6</PREF><NREF>3</NREF></FV3>
</F>
<F>
<MATREF>0</MATREF>
<FV1><PREF>6</PREF><NREF>3</NREF></FV1>
<FV2><PREF>3</PREF><NREF>3</NREF></FV2>
<FV3><PREF>7</PREF><NREF>3</NREF></FV3>
</F>
<F>
<MATREF>0</MATREF>
<FV1><PREF>5</PREF><NREF>4</NREF></FV1>
<FV2><PREF>7</PREF><NREF>4</NREF></FV2>
<FV3><PREF>1</PREF><NREF>4</NREF></FV3>
</F>
<F>
<MATREF>0</MATREF>
<FV1><PREF>1</PREF><NREF>4</NREF></FV1>
<FV2><PREF>7</PREF><NREF>4</NREF></FV2>
<FV3><PREF>3</PREF><NREF>4</NREF></FV3>
</F>
<F>
<MATREF>0</MATREF>
<FV1><PREF>2</PREF><NREF>5</NREF></FV1>
<FV2><PREF>6</PREF><NREF>5</NREF></FV2>
<FV3><PREF>0</PREF><NREF>5</NREF></FV3>
</F>
<F>
<MATREF>0</MATREF>
<FV1><PREF>0</PREF><NREF>5</NREF></FV1>
<FV2><PREF>6</PREF><NREF>5</NREF></FV2>
<FV3><PREF>4</PREF><NREF>5</NREF></FV3>
</F>
</MESH>
<OBJECT>
<TRANSFORM>
<FORWARD>0.000000,0.000000,1.000000</FORWARD>
<UP>0.000000,1.000000,0.000000</UP>
<POSITION>0.000000,0.900000,-0.000000</POSITION>
<SCALE>1.000000</SCALE>
</TRANSFORM>
<MESHREF>0</MESHREF>
</OBJECT>
<OBJECT>
<TRANSFORM>
<FORWARD>0.000000,0.000000,1.000000</FORWARD>
<UP>0.000000,1.000000,0.000000</UP>
<POSITION>-0.900000,-0.000000,0.000000</POSITION>
<SCALE>1.000000</SCALE>
</TRANSFORM>
<MESHREF>0</MESHREF>
</OBJECT>
</WORLD>
Lines and Points are now available in the specification. Displayable names have been added for the world tag and all object tags.
The <INCLUDESTATIC> tag has been added for statically including XGL files.
A <MESH> tag is now allowed in the world context. Object tags are not required anymore.
The <INCLUDE> tag has been added as a way to include other XGL files. The <REF>, <REFTYPE>, and <EXTENTS> tags have been added as well. The standard Ref Type FILE has been defined.
The <OBJECT> tag may not contain both a mesh and (sub) object tags.
A <MESH> tag need not include any <F> tags.
A <PATCH> tag need not include any <F> tags.
The <SCALE> tag's value must be positive.
A <PATCH> is identified by a PATCHID not an ID. The 0 PATCHID is reserved.
The <PATCH> tag must contain at least one <F> tag and may not contain another <PATCH> tag.
A <MESH> tag must contain at least one tag from the "Face Tags" section.
The following tags have been added to support textures:
<TC>
<TCREF>
<TEXTURE>
<TEXTUREBORDERCOLOR>
<TEXTUREREF>
< TEXTURERGBA>
< TEXTURERGB>
< TEXTURERGBAREF>
< TEXTURERGBREF>
<REPLACE>
<MODULATE>
<DECAL>
<REPEAT>
<CLAMP>
A <F> tag may include up to 1 texture tag.
The <OBJECTREF> tag has been added to allow the referencing of defined <OBJECT> tags.
2D and 4D vectors are described in the "Vectors" section.
<TEXTURE>, <TEXTURERGB>, <TEXTURERGBA>, and <TC> tags may be defined in <WORLD>, <OBJECT>, <MESH>, and <PATCH> tags.
<MAT>, <P>, and <N> tags may be defined in the <PATCH> tag.
<OBJECT> tags may be defined in <WORLD> and <OBJECT> tags.
The <S> tag was added to support shade groups. The <S> tag may be included in the <F> tag.
The default value for the <SHINE> tag if it is not specified is 0.0. This matches the OpenGL default. This change doesn't require modifications to XGL files.
The <SHINE> tag in a material should be in the range from 0.0 to 128.0, to be more like OpenGL.
The <DIRECTION> tag in a directional light should indicate that the light comes from rather than the direction that the light shines in. Again, this is more like OpenGL.
The "CHILDID" attribute of the <OBJECT> tag has been renamed to "PATHID". This was done to cut down on confusion between this ID and the upcoming ID that allows referencing of object.
The <SURFACE> tag has been added to the <MESH> tag. This tag allows surfaces that are visible from both sides.