SGI Inventor File Format Summary

Also Known As: IRIS, 3D Interchange File Format


Type 3D scene description
Colors Unlimited
Compression Uncompressed
Maximum Image Size Unlimited
Multiple Images Per File Yes
Numerical Format NA
Originator Silicon Graphics
Platform UNIX
Supporting Applications Many
See Also SGO

Usage
Known primarily through SGI's IRIS Inventor system.

Comments
SGI Inventor was designed for the exchange of 3D modeling information between software applications.

Vendor specifications are available for this format.

Code fragments are available for this format.


The SGI Inventor file format was first released in July 1992 by Silicon Graphics, and was specifically designed for the exchange of 3D modeling information between software applications. It has been used by CAD, chemistry, financial data, scientific visualization, art history, earth sciences, creative, presentation, architecture, animation, and other applications.

Contents:
File Organization
File Details
For Further Information

The SGI Inventor file format was created as part of the IRIS Inventor 3D Toolkit. The toolkit is an object-oriented 3D class library for the C and C++ languages that enables programmers to write interactive 3D graphics programs. IRIS Inventor's file format is used by a large assortment of 3D applications, such as SGI's Showcase, SGI's Explorer Scientific Visualization System, Industrial Light and Magic's animation system, SDRC, Parametric Technology, and many more.

The toolkit is based on an object-oriented database (OODB) to represent a 3D hierarchical scene. The scene database contains many types of objects, such as groups, transformations, labels, materials, drawing styles, cameras, lights, 18 different geometry types, and so on. And because SGI Inventor is object-oriented, the file format can be extended to support custom objects. The SGI Inventor file format therefore is an ASCII version of a scene database.

File Organization

The SGI Inventor file format may write either binary or ASCII data, depending on how the file is to be used. The data in both file types are machine-independent. The internal format of the Inventor binary format is proprietary and cannot be discussed in depth in this article.

SGI Inventor ASCII files contain only 7-bit, ASCII information and are parsed just as any other text file would be when read. Each line of information in an Inventor ASCII file is terminated by a linefeed (ASCII 0Ah) character. Lines beginning with the # are comments and are generally ignored.

Inventor ASCII files contain the following header signature:

#Inventor V1.0 ascii

while Inventor binary files contain the following header signature:

#Inventor V1.0 binary

Although these signatures may vary in design in future versions of the Inventor file formats, they will never be longer than 80 characters and will always begin with the # comment character.

File Details

Following the header signature is a series of data nodes that contain the actual rendering information. All information in an Inventor file is conceptualized as objects called nodes. Nodes may contain other nodes (called child nodes) and may also be grouped into collections of nodes called graphs. The syntax for a node is as shown below:

nodename {
	fieldname1 value1 value2
	fieldname2 value1 value2 value3
	fieldname3
	fieldnameN value
}

A node contains a node name followed by a series of data field names and data field values. The fields may appear in any order within a node and are not written out if their values are the default values for the field. The fields of a node are always enclosed in braces.

Nodes may also contain other nodes called child nodes:

nodename {
	fieldname1 value
	fieldname2 value
	fieldnameN value
	childnode1 {
		fieldname1 value
		fieldname2 value
		fieldnameN value
	}
	childnode2 {
		fieldname1 value
		fieldname2 value
		fieldnameN value
	}
}

The values in each field are defined for each node. A field may contain one or more values. Each value is separated by a white space character. A field containing multiple groups of values surrounds the entire grouping with brackets, and commas separate each group; for example:

nodename {
	fieldname1 value1 value2 value3
	fieldname2 [ value1a value1b value1c, value2a value2b value2c ]
}

The format used to write field values depends upon their data type, as shown below:

100 Integers
100.0 Floating-point
1.0e2 Floating-point
"name" Strings
mnemonic Enumerations and bit fields
~ Ignore this field

A field name which contains a tilde (~) for a value is ignored by the SGI Inventor file reader. The following is a fragment of an SGI Inventor ASCII file:

Separator {
	Normal {
		vector  0 1 0
	}
	Material {
		ambientColor   0.2 0.2 0.2 ~
		diffuseColor   0.720949 0.714641 0.492981
		specularColor  0.2 0.2 0.2 ~
		emissiveColor  0 0 0 ~
		shininess      0 ~
		transparency   0 ~
	}
	Coordinate3 {
		point [  0.0   0.0  0.0,   # 0
				 1.0   0.0  0.0,   # 1
				 1.0   1.0  0.0,   # 2
				 2.0   0.0  0.0,   # 3
				 2.0   1.0  0.0,   # 4
				 2.0   1.0  0.0,   # 5
				 3.0   0.0  0.0,   # 6 ]
	}
	IndexedTriangleMesh {
		coordIndex    [ 0, 1, 2, 3, 4, 5, -1 ]
	}
}

Each node stored in an Inventor file represents a 3D shape, property, or grouping. All SGI Inventor nodes are divided into five classes:

  • Shape

  • Property

  • Group

  • Light

  • Camera

Shapes include geometric objects. Properties are the qualitative aspects of the objects. Group indicates the type of organization applied to one or more nodes. Light and Camera information affect the appearance of the rendered image.

The following list contains the Inventor nodes grouped by class:

Shape:

Cone IndexedNurbsCurve PointSet
Cube IndexedNurbsSurface QuadMesh
Cylinder IndexedTriangleMesh Sphere
FaceSet LineSet Text2
IndexedFaceSet NurbsCurve Text3
IndexedLineSet NurbsSurface TriangleStripSet

Property:

BaseColor MatrixTransform Texture2
Complexity Normal Texture2Transform
Coordinate3 NormalBinding TextureCoordinate2
Coordinate4 NurbsProfile TextureCoordinateBinding
DrawStyle PackedColor TextureCoordinateCube
Environment PickStyle TextureCoordinateCylinder
Font ProfileCoordinate2 TextureCoordinateEnvironment
Info ProfileCoordinate3 TextureCoordinateFunction
Label ResetTransform TextureCoordinatePlane
LightModel Rotation TextureCoordinateSphere
LinearProfile RotationXYZ Transform
Material Scale Translation
MaterialBinding ShapeHints Units

Group:

Array LayerGroup Separator
CustomNode MultipleCopy Switch
File PathSwitch
Group Selection

Light:

DirectionalLight PointLight SpotLight

Camera:

OrthographicCamera PerspectiveCamera

For Further Information

For further information about the SGI Inventor format, see the following documents included on the CD-ROM.

Silicon Graphics, Inc., How to Write an IRIS Inventor File Translator, Release 1.0.

Silicon Graphics, Inc., How to Write an Open Inventor File Translator, Release 2.0.

Silicon Graphics, Inc., IRIS Inventor Nodes Quick Reference Guide, Release 1.0.

Silicon Graphics, Inc., IRIS Inventor Nodes Quick Reference Guide, Release 2.0.

Information on the SGI Inventor file format may also be found in the following document, available directly from Silicon Graphics:

SGI Inventor Programming Guide, Volume I: Using the Toolkit.

The following book contains a chapter describing the SGI Inventor file format for Release 2.0:

Wernecke, Josie, The Inventor Mentor, Addision-Wesley, Reading, MA, 1994.

For additional information, contact:

Silicon Graphics Inc
Attn: Visual Magic Marketing
2011 North Shoreline Blvd.
Mountain View, CA 94039-7311
Voice: 800-800-4SGI
FTP: ftp://sgi.com/sgi/inventor/
WWW: http://www.sgi.com/Technology/Inventor/textonly.html

You can also contact:

Gavin Bell
Silicon Graphics Inc.
FAX: 415-390-6056
Email: [email protected]


This page is taken from the Encyclopedia of Graphics File Formats and is licensed by O'Reilly under the Creative Common/Attribution license.

More Resources