MOUTH SHAPE 3D DEFINITION FILE FORMAT
File Format Name: Mouth Shape 3D Definition
File Type: Ascii Text (*.txt)
Code: SLMS3D
Version: V1
Last Update: Feb. 17, 2006
This file format defines the mouth shapes displayed in the Spectralipz software. This is used in the menu option FILE -> IMPORT -> MOUTH SHAPE DEFINITION. There are two types of mouth shapes that can be defined, 2D which consists of a list of images and 3D which consists of a mesh and morphshapes. This file describes the 3D type.
A 3D mouth shape definition is composed of a camera, mesh and morph shapes definition and optionally a texture image file. The definition file and texture image file muse be located in the same directory.
The 3D Mouth Shape Definition File
This file format is composed of lines of plain ASCII text. Each line is terminated with CR/LF (carriage return/line feed). This file can be viewed or edited by any plain text editor (e.g. Windows NotePad). The file's default extension is ".txt"
The first two lines of the file should always be the following. This merely states the file type and the version.
SLMS3D
V1
The following is the structure of the file.
camfov <camera field of view>
campos <x> <y> <z>
camtargetpos <x> <y> <z>
camUpVector <x> <y> <z>
viewDist <View Distance / Max depth of scene>
objPos <x> <y> <z>
objRot <x> <y> <z>
objScale <x> <y> <z>
objColor <r> <g> <b>
texmap <image filename>
defmesh <mesh name>
vertices <# Vertices in mesh>
<x> <y> <z>
... <list of vertices>
faces <# triangular faces>
<v0> <v1> <v2>
... <list of faces>
texcoords <# trexture coordinates>
<u> <v>
... list of <texture coordinates>
enddefmesh <mesh name>
defMorphTarget <morph shape name>
NumMPts <number of morph points in shape>
<index> <x> <y> <z>
... list of <morph points>
enddefMorphTarget <morph shape name>
... list of morph targets
Example:
The following is a sample 3d mouth shape definition.
SLMS3D V1 camfov 22.4917 campos -197.792 -1141.52 30.679 camtargetpos 79.387 501.381 -36.133 camUpVector 0 0 1 viewDist 2501.19 objPos 0.0 0.0 44.548 objRot 90.0 0.0 0.0 objScale 1.0 1.0 1.0 objColor 150.0 150.0 150.0 texmap "lipTex.tga" defmesh plainLips vertices 21 -156.363 -44.549 -0.001 -46.363 -44.549 -0.001 33.637 -44.549 -0.001 143.637 -44.549 -0.001 23.637 -44.549 -0.001 -6.363 -54.549 -0.001 -36.363 -44.549 -0.001 193.637 -44.549 -0.001 33.637 24.537 0.0 -6.363 14.537 0.0 -46.363 24.537 0.0 -206.363 -44.549 -0.001 -56.363 -114.549 -0.001 43.637 -114.549 -0.001 393.637 -44.549 -0.001 193.637 255.451 0.0 -6.363 255.451 0.0 -206.363 255.451 0.0 -406.363 -44.549 -0.001 -206.363 -344.549 -0.001 193.637 -344.549 -0.001 vnormals 21 0.0 -1.0 -0.001 0.0 -1.0 -0.001 0.0 -1.0 -0.001 -0.001 -0.708 -0.708 -0.001 -1.0 -0.001 0.0 -1.0 -0.001 0.0 -1.0 -0.001 0.0 -1.0 -0.001 0.0 -1.0 -0.001 0.0 -1.0 -0.001 -0.001 -1.0 -0.001 0.0 -1.0 -0.001 -0.001 -1.0 -0.001 -0.001 -1.0 -0.001 0.0 -1.0 -0.001 -0.001 -1.0 -0.001 -0.001 -1.0 -0.001 0.0 -1.0 -0.001 -0.001 -1.0 -0.001 -0.001 -1.0 -0.001 0.0 -1.0 -0.001 faces 28 11 12 1 1 0 11 0 6 10 10 11 0 12 13 2 2 1 12 13 7 3 3 2 13 7 8 4 4 3 7 8 9 5 5 4 8 9 10 6 6 5 9 14 15 8 8 7 14 13 20 14 14 7 13 15 16 9 9 8 15 16 17 10 10 9 16 17 18 11 11 10 17 18 19 12 12 11 18 19 20 13 13 12 19 texcoords 21 0.066 0.046 0.325 0.126 0.748 0.096 0.97 0.116 0.885 0.04 0.628 0.055 0.459 0.055 0.913 0.255 0.758 0.256 0.602 0.259 0.487 0.258 0.147 0.258 0.332 0.257 0.696 0.258 0.999 0.523 0.707 0.951 0.566 0.847 0.392 0.968 0.0 0.514 0.344 0.792 0.742 0.781 enddefmesh plainLips defMorphTarget AI NumMPts 21 0 -156.363 -112.229 -0.001 1 -46.363 -186.43 -0.001 2 33.637 -186.43 -0.001 3 143.637 -112.229 -0.001 4 23.637 -44.549 -0.001 5 -6.363 -54.549 -0.001 6 -36.363 -44.549 -0.001 7 193.637 -112.229 -0.001 8 33.637 24.537 0.0 9 -6.363 14.537 0.0 10 -46.363 24.537 0.0 11 -206.363 -112.229 -0.001 12 -56.363 -256.43 -0.001 13 45.885 -255.334 -0.001 14 393.637 -44.549 -0.001 15 193.637 255.451 0.0 16 -6.363 255.451 0.0 17 -206.363 255.451 0.0 18 -406.363 -44.549 -0.001 19 -206.363 -344.549 -0.001 20 193.637 -344.549 -0.001 enddefMorphTarget AI defMorphTarget CD NumMPts 21 0 -156.363 -75.379 -0.001 1 -46.363 -111.221 -0.001 2 33.637 -111.221 -0.001 3 143.637 -75.379 -0.001 4 23.637 -44.549 -0.001 5 -6.363 -54.549 -0.001 6 -36.363 -44.549 -0.001 7 193.637 -75.379 -0.001 8 33.637 24.537 0.0 9 -6.363 14.537 0.0 10 -46.363 24.537 0.0 11 -206.363 -75.379 -0.001 12 -56.363 -181.221 -0.001 13 43.637 -181.221 -0.001 14 393.637 -44.549 -0.001 15 193.637 255.451 0.0 16 -6.363 255.451 0.0 17 -206.363 255.451 0.0 18 -406.363 -44.549 -0.001 19 -206.363 -344.549 -0.001 20 193.637 -344.549 -0.001 enddefMorphTarget CD defMorphTarget E NumMPts 21 0 -183.497 -88.564 -0.001 1 -46.363 -166.289 -0.001 2 33.637 -166.289 -0.001 3 170.77 -88.564 -0.001 4 23.637 -44.549 -0.001 5 -6.363 -54.549 -0.001 6 -36.363 -44.549 -0.001 7 229.815 -88.564 -0.001 8 33.637 24.537 0.0 9 -6.363 14.537 0.0 10 -46.363 24.537 0.0 11 -242.542 -88.564 -0.001 12 -56.363 -221.101 -0.001 13 45.885 -220.005 -0.001 14 393.637 -44.549 -0.001 15 193.637 255.451 0.0 16 -6.363 255.451 0.0 17 -206.363 255.451 0.0 18 -406.363 -44.549 -0.001 19 -206.363 -344.549 -0.001 20 193.637 -344.549 -0.001 enddefMorphTarget E defMorphTarget FV NumMPts 21 0 -156.363 -29.335 -0.001 1 -46.363 -42.738 -0.001 2 33.637 -42.738 -0.001 3 143.637 -29.335 -0.001 4 23.637 -20.393 -0.001 5 -6.363 -30.393 -0.001 6 -36.363 -20.393 -0.001 7 193.637 -29.335 -0.001 8 33.637 37.838 0.0 9 -6.363 27.838 0.0 10 -46.363 37.838 0.0 11 -206.363 -29.335 -0.001 12 -71.938 -97.413 -0.001 13 59.212 -97.413 -0.001 14 393.637 -44.549 -0.001 15 193.637 255.451 0.0 16 -6.363 255.451 0.0 17 -206.363 255.451 0.0 18 -406.363 -44.549 -0.001 19 -206.363 -344.549 -0.001 20 193.637 -344.549 -0.001 enddefMorphTarget FV defMorphTarget L NumMPts 21 0 -156.363 -58.644 -0.001 1 -46.363 -83.333 -0.001 2 33.637 -83.333 -0.001 3 143.637 -58.644 -0.001 4 23.637 -44.549 -0.001 5 -6.363 -54.549 -0.001 6 -36.363 -44.549 -0.001 7 193.637 -58.644 -0.001 8 33.637 24.537 0.0 9 -6.363 14.537 0.0 10 -46.363 24.537 0.0 11 -206.363 -58.644 -0.001 12 -56.363 -153.333 -0.001 13 43.637 -153.333 -0.001 14 393.637 -44.549 -0.001 15 193.637 255.451 0.0 16 -6.363 255.451 0.0 17 -206.363 255.451 0.0 18 -406.363 -44.549 -0.001 19 -206.363 -344.549 -0.001 20 193.637 -344.549 -0.001 enddefMorphTarget L defMorphTarget MB NumMPts 21 0 -178.682 -32.946 -0.001 1 -46.363 -44.549 -0.001 2 33.637 -44.549 -0.001 3 165.955 -32.946 -0.001 4 23.637 -44.549 -0.001 5 -6.363 -54.549 -0.001 6 -36.363 -44.549 -0.001 7 223.395 -32.946 -0.001 8 33.637 8.97 0.0 9 -6.363 -1.03 -0.001 10 -46.363 8.97 0.0 11 -236.121 -32.946 -0.001 12 -56.363 -100.108 -0.001 13 43.637 -100.108 -0.001 14 393.637 -44.549 -0.001 15 193.637 255.451 0.0 16 -6.363 255.451 0.0 17 -206.363 255.451 0.0 18 -406.363 -44.549 -0.001 19 -206.363 -344.549 -0.001 20 193.637 -344.549 -0.001 enddefMorphTarget MB defMorphTarget O NumMPts 21 0 -122.128 -47.576 -0.001 1 -46.363 -100.483 -0.001 2 33.637 -100.483 -0.001 3 109.401 -47.576 -0.001 4 23.637 -23.307 -0.001 5 -6.363 -33.307 -0.001 6 -36.363 -23.307 -0.001 7 147.99 -47.576 -0.001 8 33.637 45.779 0.0 9 -6.363 35.779 0.0 10 -46.363 45.779 0.0 11 -160.716 -47.576 -0.001 12 -56.363 -170.483 -0.001 13 45.885 -169.387 -0.001 14 393.637 -44.549 -0.001 15 193.637 255.451 0.0 16 -6.363 255.451 0.0 17 -206.363 255.451 0.0 18 -406.363 -44.549 -0.001 19 -206.363 -344.549 -0.001 20 193.637 -344.549 -0.001 enddefMorphTarget O defMorphTarget rest NumMPts 21 0 -156.363 -44.549 -0.001 1 -46.363 -44.549 -0.001 2 33.637 -44.549 -0.001 3 143.637 -44.549 -0.001 4 23.637 -44.549 -0.001 5 -6.363 -54.549 -0.001 6 -36.363 -44.549 -0.001 7 193.637 -44.549 -0.001 8 33.637 24.537 0.0 9 -6.363 14.537 0.0 10 -46.363 24.537 0.0 11 -206.363 -44.549 -0.001 12 -56.363 -114.549 -0.001 13 43.637 -114.549 -0.001 14 393.637 -44.549 -0.001 15 193.637 255.451 0.0 16 -6.363 255.451 0.0 17 -206.363 255.451 0.0 18 -406.363 -44.549 -0.001 19 -206.363 -344.549 -0.001 20 193.637 -344.549 -0.001 enddefMorphTarget rest defMorphTarget U NumMPts 21 0 -122.128 -47.576 -0.001 1 -46.363 -105.619 -0.001 2 33.637 -105.619 -0.001 3 109.401 -47.576 -0.001 4 23.637 -18.129 -0.001 5 -6.363 -28.129 -0.001 6 -36.363 -18.129 -0.001 7 147.99 -47.576 -0.001 8 33.637 50.957 0.0 9 -6.363 40.957 0.0 10 -46.363 50.957 0.0 11 -160.716 -47.576 -0.001 12 -56.363 -175.619 -0.001 13 45.885 -174.523 -0.001 14 393.637 -44.549 -0.001 15 193.637 255.451 0.0 16 -6.363 255.451 0.0 17 -206.363 255.451 0.0 18 -406.363 -44.549 -0.001 19 -206.363 -344.549 -0.001 20 193.637 -344.549 -0.001 enddefMorphTarget U defMorphTarget WQ NumMPts 21 0 -98.715 -34.44 -0.001 1 -35.986 -55.94 -0.001 2 23.26 -55.94 -0.001 3 85.989 -34.44 -0.001 4 23.637 -14.121 -0.001 5 -6.363 -24.121 -0.001 6 -36.363 -14.121 -0.001 7 116.773 -34.44 -0.001 8 33.637 40.05 0.0 9 -6.363 30.05 0.0 10 -46.363 40.05 0.0 11 -129.5 -34.44 -0.001 12 -50.868 -123.305 -0.001 13 40.389 -122.21 -0.001 14 393.637 -44.549 -0.001 15 193.637 255.451 0.0 16 -6.363 255.451 0.0 17 -206.363 255.451 0.0 18 -406.363 -44.549 -0.001 19 -206.363 -344.549 -0.001 20 193.637 -344.549 -0.001 enddefMorphTarget WQ |