Format

Page updated :

Describes elfreina's own file interior format.

[.elp] file

Project file to be output by Elfreina. This file is not listed because parameters and the like often change depending on the version of Elfrina.

File format

Text file.

Character code

The character code of the file is UTF-8.

[.elem] file

"Elfreina Extension Model File". It can include "model data", "hierarchical structure", "render mesh list", and "animation data".

Supported ElFrena version

The format as of Elfrina Ver1.1.

File format

Text file.

Character code

The character code of the file is UTF-8.

Basic format of text

The text configuration of both ".elp" and ".elem" files is as follows.

Elfreina Extension Model File
File Version 1.00
MeshDatas {
    MeshContainerCount=1
    MeshContainer {
        Name="ルーン"
        MeshCount=12
        VertexFormat {
            "Position"
            "Normal"
            "Texture1"
        }
    }
}

Header

Elfreina Extension Model File
File Version 1.00

The first two lines are headers. The first line is as described above. The second line is a version of the file format, but it rarely changes.

Tags and scopes

MeshDatas {
    ;
    ;
}

The blue letter is called the tag name, followed by the "{ }" is called "MeshDatas scope". "Tag name" and "{" must be on the same line.

Some scopes include "multiple data (keys too)" and "multiple scopes".

Keys and data

MeshContainerCount=1
MeshContainer {
    Name="ルーン"
    MeshCount=12
    VertexFormat {
        "Position"
        "Normal"
        "Texture1"
    }
}

The green character is called the key, the red character is called the data, and the key and the data are separated by a "=". If the data is a string, it is enclosed in "" (double quote). Keys and data are basically not broken in the middle.

As an example, the data in the third line of the text above is "Rune data" of the Name key in the MeshContaier scope in the MeshDatas scope.

In addition, for single strings that are not separated by =, only "data" is available. In this case, it is often enumerated in scope.

The order of keys and data, and the order of scopes, is basically irrelevant. However, the order of enumerating data only can be related in some cases.

As a side note, the header of the very first two rows is actually data and is defined in the way of "data in global scope".

Multiple data

Ambient=0.43:0.43:0.43:0.43
3,0:1:2

In some cases, a key can contain more than one piece of data. In this case, the ":(colon) delimiter) is placed between the data.

In addition, ",(comma)" may be used as a second division method. Use to further divide the contents of the data.

If there is more than one data, either the above method or the form enumerated in the scope is used.

Format (configuration data)

Setting scope

Contains generic configuration data.

List of keys

Key data description
SoftVersion or

ElfreinaSoftVersion
0.0 to Soft version of Elfleina that saved the .elem file.
LoadType String The data type of the .elem file. Currently, it is only "View".

Format (model data)

MeshDataList Scope

The scope in which model data (mesh) is stored. As of Elfreina Ver 1.00, only one mesh is saved, but multiple meshes can be saved.

List of keys

Key data description
MeshContainerCount 0 to The number of mesh containers. It is also the number of scopes of MeshContaier.

Scope list

Scope Description
MeshContaier Contains data for the mesh.

MeshContaizer Scope

Contains the data needed to mesh.

List of keys

Key data description
Name Any name The name of the mesh.
BoneCount 0 to The number of bones used for the mesh.
MeshCount 0 to The number of meshes that are explicitly split in the mesh. It's also the number of Mesh scopes.

Scope list

Scope Description
VertexFormat A list of vertex formats required to create a mesh.
BoneNames Name list of bones.
OffsetMatrices A list of offset matrices used for coordinate transformations. Matches the index of the bone's name.
Materials Includes material color, texture, etc.
Mesh Contains vertex positions, face information, and so on of the mesh.

VertexFormat Scope

A list of vertex formats required to create a mesh. The key does not exist, and only the data that is required is enumerated.

List of data

Data description
Position Indicates that the vertex information contains location information.
Normal Indicates that the vertex information contains normal information.
Blend (album) Indicates that vertex blend data information is included in the vertex information.
Diffuse Indicates that the vertex information contains diffuse color information.
Texture Indicates that the vertex information contains UV coordinate information for the texture.

BoneNames scope

An enumerated list of names of bones used in the mesh is listed. The names now match the index of the bone's transform palette.

OffsetMatrices Scope

Offset matrix of the bones used in the mesh. The names and indexes listed in BoneNames match.

Materials Scope

Contains multiple material information.

List of keys

Key data description
MaterialCount 0 to The number of materials. It's also the number of material scopes.

Scope list

Scope Description
Material Contains individual material information.

Material scope

Contains material color and texture information.

List of keys

Key data description
Name Name of the material The name of the material.
Diffuse (All 0.0 to 1.0) a:r:g:b Diffuse (basic) color. From left: Alpha, Red, Green, and Blue.
Ambient (All 0.0 to 1.0) a:r:g:b It is a color for ambient light.
Emissive (All 0.0 to 1.0) a:r:g:b It is a light-emitting color.
Speular (All 0.0 to 1.0) a:r:g:b Reflection color.
SpectralSharpness 0.0 to Sharpness to reflected light.
TextureFilename File name (absolute or relative) The file name of the texture. If the path is relative, it is relative to the ELEM file you are working with.

Mesh scope

Saving meshes that are split in a mesh container. You will be able to switch individually, such as mesh display switching and animation, such as Elfrina.

List of keys

Key data description
Name Any name The name of the mesh. It is often the name of each part.
VertexCount 0 to The number of vertices in the mesh.
FaceCount 0 to The number of faces (polygons) of the mesh.

Scope list

Scope Description
Positions Contains vertex location data.
Normals Contains normal data for vertices.
Diffuse Contains diffuse color data for vertices.
TextureUV or

Texture1UV ~ Texture8UV
Contains textured UV coordinate data for vertices. If each vertex has only one UV coordinate, the tag name may not be numbered, such as TextureUV.
Blends Contains the blend data for vertices.
BlendIndices Contains the index of the vertex blend.
VertexIndices Contains the number of strokes of a face and the index of the vertex.
Attributes Contains the material index of the face.

Positions scope

Enumerates vertex location data.

List of data

Data description
(all double) x:y:z The position of the vertex. From left: "x", "y", "z".

Normals scope

Enumerates the normal data for the vertices.

List of data

Data description
(all double) x:y:z The normal of the vertex. From left: "x", "y", "z".

Diffuse scope

Enumerates the diffuse color data for the vertex.

List of data

Data description
(all double) a:r:g:b The diffuse color of the vertex. From left: Alpha, Red, Green, and Blue.

BlendList scope

Enumerates data about vertex blends.

Scope list

Scope Description
BlendPart Contains vertex indexes, etc. for each bone.

BlendPart scope

Contains vertex indexes, etc. for each bone.

List of keys

Key data description
BoneName Name The name of the corresponding bone.
TransformIndex 0 to Index of the coordinate transformation palette.

Scope list

Scope Description
VertexBlend The vertex data corresponding to the bone is enumerated.

VertexBlend Scope

The vertex index and weight values corresponding to the bone are listed.

List of data

Data description
index, weight The index of the vertex on the left and the weight value of the vertex relative to the bone on the right.

TextureUV scope

Enumerates texture UV coordinate data for vertices.

List of data

Data description
(all double) u:v The texture UV coordinates of the vertex. From left: "u" and "v"

VertexIndices Scope

The number of strokes and vertex index of the face are enumerated.

List of data

Data description
Number of Strokes, Vertex Index 1: Vertex Index 2:... The number of strokes on the left is the number of strokes on the face, and the index of the top of the number of strokes is lined up.

Attributes scope

The material index of the face is enumerated.

List of data

Data description
0 to The material index of the face.

Format (hierarchical data)

HierarchyList Scope

Contains hierarchical data.

Scope list

Scope Description
Node Hierarchical data. Hierarchical data has a nested structure.

Node scope

Includes offset matrix and initial attitude data. This data is hierarchical.

List of keys

Key data description
NodeName Name The name of the node.
InitPostureMatrix Matrix M11:M12:... It is a matrix for the initial posture. This parameter basically consists of "animation matrix" x "initial posture matrix" x "parent matrix".

Scope list

Scope Description
Node Hierarchical data. Hierarchical data has a nested structure.

Format (render mesh list)

RenderingMeshList Scope

Contains data from the rendered mesh list.

List of keys

Key data description
RenderingMeshCount 0 to The number of meshes to draw. It is also a number of RenderingMesh scopes.

Scope list

Scope Description
RenderingMesh Contains data related to the mesh to draw.

RenderingMesh Scope

Lists the names of the mesh to draw and the name of the hierarchical data to use.

List of keys

Key data description
RenderingMeshName Name The name of the mesh to draw. The name in the MeshContaitener scope is used.
HierarchyNamesCount 0 to The number of hierarchical data used when drawing.

Scope list

Scope Description
HierarchyNames The names of the hierarchical data are enumerated.

HierarchyNames Scope

The names of the hierarchical data are enumerated. This is primarily to determine which matrix to use in coordinate transformation palettes such as skin meshes.  If you do not use vertex blending, there is basically only one data listed here.

List of data

Data description
The name of the hierarchical data The name of the hierarchical data

Format (animation data)

AnimationList scope

Contains data related to the animation.

List of keys

Key data description
AnimationCount 0 to The number of animations. It is also the number of AnimationData scopes.

Scope list

Scope Description
AnimationData Contains individual animation data.

AnimationData scope

Contains individual animation data.

List of keys

Key data description
AnimationName Any name The name of the animation.
AnimationTime 1 to The duration of one loop of animation. Unit (ms)
FrameParSecond 1 to The number of animation frames per second.
TransitionTime 0 to The amount of time it takes to change the animation. Currently, the animation is weighted in line form during animation changes.
Priority -0x7fffff~0x7fffffff Priority of the animation. A parameter that determines which animation is calculated when playing multiple animations.
Loop True or False Flag that specifies whether to loop when the animation plays.

Scope list

Scope Description
BoneAnimation Contains data related to bone animation.
UVAnimation Contains data related to UV animation.

BoneAnimation Scope

Contains data related to bone animation.

Scope list

Scope Description
TimeKeys The time keys for the entire bone animation are enumerated.
AnimationPart Contains individual animation part (animation per bone) data.

AnimationPart Scope

Contains animation data for each bone.

List of keys

Key data description
NodeName Name The name of the corresponding bone (node).

Scope list

Scope Description
TimeKeys Time key. 1.0 is the same time as AnimationTime.
TransKeys Translation parameter. Defined as X:Y:Z.
RotateKeys Rotation parameter by quota. Defined as X:Y:Z:W.
ScaleKeys Magnifying parameter. Defined as X:Y:Z.

UVAnimation Scope

Contains data related to UV animation.

Scope list

Scope Description
TimeKeys The time keys for the entire bone animation are enumerated. In fact, the animation data of individual parts takes precedence, so this data is only a guide.
AnimationPart Contains individual animation part data.

AnimationPart Scope

Contains individual animation data.

List of keys

Key data description
MeshContaierName Name The name of the corresponding mesh container.
MaterialName Name The name of the corresponding material.

Scope list

Scope Description
TimeKeys Time key. 1.0 is the same time as AnimationTime.
TransKeys Translation parameter. It is defined as "X:Y".
RotateKeys Rotation parameter. The unit is Radian.
ScaleKeys Magnifying parameter. It is defined as "X:Y".