Home | Table Of Content | Previous | Next |

File Format

A file that can be read into MSV using the Restore option in the File Menu starts with a specific header followed by an arbitrary number of nodes.

Parameter nodes such as CAMERA or LIGHT_MODEL are used to store MSV's settings while the MSV's objects Nodes are used to store the geometry.

Every node has its own set of parameters appearing between parenthesis. It is legal to provide only a subset of these prameters.

Text between # symbols and the end of the line is treated as a comment.

The following nodes are recognized:

MSV's parameters nodes:

MSV's object nodes:

Header

This is the header of a MSV session file:

#gv_session_file v0.1

Camera Node

This node stores the parameters which can be set using the camera panel.

CAMERA {

COLOR 0.0 0.0 0.0 1.0
PROJECTION 1 # 1=PERSPECTIVE 2=ORTHOGONAL
FOV 40.0 # see camera panel.
NEAR 1.0 # see camera panel.
FAR 40.0 # see camera panel.
LEFT 7.01 # see camera panel.
RIGHT 7.01 # see camera panel.
TOP 5.61 # see camera panel.
BOTTOM 5.61 # see camera panel.
AntiAliasing 0 # 0=off 1=on
NbAAAccum 8 # number images to accumulate to anti-aliasing
depthOfField 0 # 0=off 1=on
nbDOFAccum 8 # number images to accumulated for DOF
Focus 10.0 # distance to focus plane
DOFcst 0.33 # amount of out-of-focus
} # end of CAMERA

Fog Node

This node stores the parameters which can be set using the
fog panel.

FOG {

On/Off 0
Nice 0 # 0=off 1=on
Color 0.0 0.0 0.0 0.0 # RGBA ranging from 0.0 to 1.0
Linear 1 # 0=off 1=on
Start 0.0 #
End 40.0 #
Exp 0 # 0=off 1=on
Exp2 0 # 0=off 1=on
Density 40.0 #
} # end of FOG

Mouse Node

This node stores the parameters which can be set using the
mouse panel.

Mouse button binding. The mouse button combinations (0-7) are bound to functions (see Mouse Editor Panel for list of functions.

MOUSE {

0 NO_FUNC
1 ROTATION
2 TRANSLATE_XY
3 SCALE
4 PICK
5 TRANSLATE_Z
6 FAR_PLANE
7 NEAR_PLANE
} # end of MOUSE

Button Combination Code
None 0
Left 1
Middle 2
Right 3
Left & Middle 4
Left & Right 5
Middle & Right 6
Left & Middle & Right 7

Light model Node

This node stores the parameters which can be set using the light model panel.

LIGHT_MODEL {

ambient 0.20 0.20 0.20 1.0 #
localViewer 1 # 0=off 1=on
twoSide 1 # 0=off 1=on
enabled 1 # 0=off 1=on
} # end of LIGHT_MODEL

Light Source Node

This node stores the parameters which can be set using the
light editor panel. The LIGHT keyword is followed by the light source number (0-7).

LIGHT Light_number {

ambient 0.0 0.0 0.0 1.0 #
diffuse 1.0 1.0 1.0 1.0 #
specular 1.0 1.0 1.0 1.0 #
direction 0.0 0.0 10.0 0.0 #
position 0.0 0.0 0.0 1.0 #
spotDirection 0.0 0.0 -1.0 #
spotExponent 0.0 #
spotCutoff 180.0 #
constantAttenuation 1.0 #
linearAttenuation 0.0 #
quadraticAttenuation 0.0 #
POSITIONAL 0 #
ENABLED 1 #
VISIBLE 0 #
Scale 1.0 #
posRotation 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 #
posTranslation 0.0 0.0 10.0 #
posPivot 0.0 0.0 0.0 #
dirRotation 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 #
Object NONE #
} # end of LIGHT Light_number

Clip Node

This node stores the parameters which can be set using the
Clipping plane panel. The CLIP_PLANE keyword is followed by the clipping plane number (0-5).

CLIP_PLANE ClipPlane_number {

color 1.0 0.0 0.0 1.0 #
Visible 0 #
Scale 1.0 #
Rotation 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 #
eqn 1.0 0.0 0.0 0.0 #
n 1.0 #
name planeName #
} # end of CLIP PLANE ClipPlane_number

Root Object Node

This node is used to store the root object properties.

ROOT_OBJECT root {

Visible 1
IsScalable 1
Lighting 1
ShadeModel 7425
Antialised 0
BoundingBox 0
FrontPolyMode 1
BackPolyMode 1
Stipple 1
Culling 1
ClipPlanes 0
ClipInOut 1 1 1 1 1 1
PositionalLights 0 0 0 0 0 0 0 0
Matrix 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0
Rotation 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0
Pivot 0.0 0.0 0.0
Translation 0.0 0.0 0.0
Scale 1.0 1.0 1.0
} # end of ROOT_OBJECT root

Internal Geometry Object Node

This node is used to store geometry. The geometry can be an internal object which was created using the
Geometric primitives Editor or an MSMS surface read from a file.

The keyword OBJECT is followed by the object's name and the object's parent name. For internal geometries num is 0 and there is no other argument. If the geometry came from a file num is 1 followed by the filename and file type.

OBJECT objectName parentObjectName num {

FileName filename
FileType fileType # see File Type Codes
Type objType # see File Type Codes
Visible 1
IsScalable 1
Lighting 1
ShadeModel 7425
Antialised 0
BoundingBox 0
FrontPolyMode 1
BackPolyMode 1
Stipple 1
Culling 1
ClipPlanes 0
ClipInOut 1 1 1 1 1 1
PositionalLights 0 0 0 0 0 0 0 0
Matrix 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0
Rotation 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0
Pivot 0.0 0.0 0.0
Translation 0.0 0.0 0.0
Scale 1.0 1.0 1.0

ShapeData {

v 3.00 0.0 0.0
parts 0

frontMaterial {

ambientColor numberOfColors numberOfComponents {
R G B A
} # end of ambientColor
diffuseColor 1 4 {
0.60 0.60 0.60 1.0
} # end of diffuseColor
specularColor 1 4 {
0.60 0.60 0.60 1.0
} # end of specularColor
emissiveColor 1 4 {
0.0 0.0 0.0 1.0
} # end of emissiveColor
Shininess 1 1 {
50.0
} # end of Shininess
Transparency 1 1 {
0.0
} # end of Transparency
} # end of frontMaterial

backMaterial {

ambientColor 1 4 {
0.50 0.50 0.50 1.0
} # end of ambientColor
diffuseColor 1 4 {
0.60 0.60 0.60 1.0
} # end of diffuseColor
specularColor 1 4 {
0.60 0.60 0.60 1.0
} # end of specularColor
emissiveColor 1 4 {
0.0 0.0 0.0 1.0
} # end of emissiveColor
Shininess 1 1 {
50.0
} # end of Shininess
Transparency 1 1 {
0.0
} # end of Transparency
} # end of backMaterial
} # end of ShapeData
} # end of OBJECT Sphere

VRML File Node

This node is basicaly an
OBJECT Node except that it doesn't have the material sub-nodes because this information is stored in the file and will be restored from the file.

OBJECT objectName parentObjectName 1 fileName 1 {

FileName fileName
FileType 1
Type 12
Visible 1
IsScalable 1
Lighting 1
ShadeModel 7425
Antialised 0
BoundingBox 0
FrontPolyMode 1
BackPolyMode 1
Stipple 1
Culling 1
ClipPlanes 0
ClipInOut 1 1 1 1 1 1
PositionalLights 0 0 0 0 0 0 0 0
Matrix 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0
Rotation 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0
Pivot 0.0 0.0 0.0
Translation 0.0 0.0 0.0
Scale 1.0 1.0 1.0
} # end of OBJECT bottom

MSV's object Types

Object types as they specified for the type parameter in the
OBJECT Node.

Internal Objects Type Other Type
MSV_SPHERE 1 MSV_VRML_FILE 12
MSV_CUBE 2 MSV_POINT_SET 13
MSV_BOX 3 MSV_INDEXED_LINE_SET 14
MSV_TORUS 4 MSV_INDEXED_POLY_LINE_SET 15
MSV_CYLINDER 5 MSV_INDEXED_LINE_LOOP_SET 16
MSV_ICOSAEDRON 6 MSV_INDEXED_TRIANGLE_SET 17
MSV_OCTAEDRON 7 MSV_TRIANGLE_STRIP_SET 18
MSV_TETRAEDRON 8 MSV_TRIANGLE_FAN_SET 19
MSV_DODECAEDRON 9 MSV_INDEXED_QUAD_SET 20
MSV_CONE 10 MSV_QUAD_STRIP_SET 21
MSV_TEA_POT 11 MSV_INDEXED_POLYGON_SET 22

MSV's file Types

File type codes for the fileType parameter in the
OBJECT Node.

File Type Code
MSV_unknownFile 0
MSV_vrmlFile 1
MSV_msmsFile 2


Home | Table Of Content | Previous | Next |

Michel Sanner
March 31 12:00 PDT 1997
sanner@scripps.edu