Hi
This it’s my first tutorial for export 3d models from 3dmax and Gmax to IL-2. In this tutorial will be about of the structure of the ascii .msh files.
This guide will be used for reference for my next tutorial Exporting 3D models to il2.
The mesh in il2 its formed for the main mesh, the levels of detail they are the detail of the model that you can see when the plane its near or far, Hooks this are boxes where appers the effects like fire or smoke, The Collision boxes they are used for the game engine for hit detection, and the shadows they are de meshes that form the shadows.
The code shows a example of a .mesh file.
[Common] //Header of the Mesh file
NumBones 0
FramesType Single
NumFrames 1
[LOD]
40 //distance where its visible the main (0-40 meters its visible the main mesh)
60 //distance where its visible the main (40-60 meters its visible the LOD1)
150 //distance where its visible the main (40-150 meters its visible the LOD2)
//from 150-??? its visible the LOD3
//Hooks thats are boxes that show in game the effects like smoke or fire.
[Hooks]
_Clip05 <BASE>
_Engine2Smoke <BASE>
_Engine2EF_01 <BASE>
_Engine2EF_02 <BASE>
_Engine2ES_01 <BASE>
_Engine2ES_02 <BASE>
[HookLoc]
1 0 0 0 1 0 0 0 1 0.00357032 -1.25708 -0.963102
1.1921E-07 1 0 -1 1.1921E-07 0 0 0 1 -0.310764 -1.55208 0.685807
-0.565829 0.730158 -0.383022 -0.730158 -0.659522 -0.178606 -0.383022 0.178606 0.906308 -0.754327 -0.242805 -0.256288
-0.173648 0.892539 -0.416198 -0.984808 -0.157379 0.0733869 2.98E-08 0.422618 0.906308 -0.754526 -0.231068 -0.256288
1.1921E-07 0.906308 -0.422618 -1 1.1921E-07 -2.98E-08 0 0.422618 0.906308 -0.760076 -0.208175 -0.256288
1.1921E-07 0.906308 -0.422618 -1 1.1921E-07 -2.98E-08 0 0.422618 0.906308 -0.763101 -0.266959 -0.256288
//Main mesh file this its the more detailed model
[Materials]
//This are the .mat files used for the add textures to the model in the game
Gloss1D0o
Matt1D0o
[FaceGroups]
279 260
0 0 241 0 239 0
1 241 38 239 21 0
[Vertices_Frame0]
0 -2.42542 0.120575 0 -1 0
0.799438 -1.52332 0.120575 -0.58746 0.804592 0.0867305
0.799438 -1.52332 0.120575 -0.58746 0.804592 0.0867305
….
….
….-0.620914 -0.783879
-0.35614 -0.617035 0.0751343 0 -0.620914 -0.783879
[MaterialMapping]
0.8810883 0.6244965
…
…
…
0.8304291 0.5521088
0.7961273 0.5521088
[Faces]
0 126 122
…
…
…
33 32 37
//Here ends the main msh
//Here stars the Shadow of the main mesh
[ShVertices_Frame0]
-0.4714966 -2.246796 -0.5122986
…
…
…
-0.3210144 -2.396057 0.6305695
0.227829 0.2184906 -0.5402832
[ShFaces]
7 0 6
0 1 6
…
…
…
17 18 16
//Here starts the first Level of detail
[LOD1_Materials]
Gloss1D0o
Matt1D0o
[LOD1_FaceGroups]
211 200
0 0 183 0 186 0
1 183 28 186 14 0
[LOD1_Vertices_Frame0]
-0.0003356934 -2.246796 -0.598053 0 -1 0
… … …
0.3541412 -0.6170349 0.07511902 0 -0.6209106 -0.7838745
[LOD1_MaterialMapping]
0.8810883 0.6713715
…
…
…
0.8304291 0.5521088
[LOD1_Faces]
0 103 99
0 109 106
…
…
…
0.227829 0.2184906 -0.5402832
//The shadows of the level of detail 1
[LOD1_ShFaces]
7 0 6
0 1 6
9 3 2
…
…
…
17 18 16
//Mesh of the level of material 2
[LOD2_Materials]
Gloss1D0p
Gloss2D0p
Matt1D0p
[LOD2_FaceGroups]
61 54
0 0 29 0 28 0
1 29 28 28 24 0
2 57 4 52 2 0
[LOD2_Vertices_Frame0]
0.4438324 -2.246796 -0.5122986 0 -1 0
…
…
…
-0.2435913 0.2184906 -0.5402832 0 0.008346558 -0.9999695
[LOD2_MaterialMapping]
0.9389496 0.663559
…
…
…
0.9521332 0.04795837
[LOD2_Faces]
0 7 5
…
…
…
0 1 3
//Shadow of the level of detail 2
[LOD2_ShVertices_Frame0]
-0.7380981 0.5877533 -0.5032043
0.6998444 0.5877533 -0.5032043
-0.7380981 0.5877533 0.7877045
0.6998444 0.5877533 0.7877045
-0.7380981 -2.324005 -0.5032043
0.6998444 -2.324005 -0.5032043
-0.7380981 -2.324005 0.7877045
0.6998444 -2.324005 0.7877045
[LOD2_ShFaces]
0 2 3
3 1 0
4 5 7
7 6 4
0 1 5
5 4 0
1 3 7
7 5 1
3 2 6
6 7 3
2 0 4
4 6 2
//Mesh of the level of detail 3
[LOD3_Materials]
Gloss1D0p //Name of material file Gloss1D0p.mat
[LOD3_FaceGroups]
16 10
0 0 16 0 10 0
[LOD3_Vertices_Frame0]
0.02278137 -2.383118 -0.8684387 -0.0002441406 -0.9999695 -0.006561279
…
…
…
-1.039246 -0.4089966 0.1438751 -0.9996033 -0.02639771 0.007125854
-0.07174683 1.579727 1.026474 0.005508423 0.01841736 0.9998016
[LOD3_MaterialMapping]
0.882309 0.672226
…
…
0.9687347 0.233017
[LOD3_Faces]
0 8 5
0 2 8
10 1 12
10 3 1
1 6 13
12 1 13
7 9 14
14 9 15
9 11 15
9 4 11
//Shadows of the level of detail 3
[LOD3_ShVertices_Frame0]
-0.7380981 0.5877533 -0.5032043
…
…
…
0.6998444 -2.324005 0.7877045
[LOD3_ShFaces]
0 2 3
3 1 0
4 5 7
7 6 4
0 1 5
5 4 0
1 3 7
7 5 1
3 2 6
6 7 3
2 0 4
4 6 2
// Collition Boxes
[CoCommon]
NBlocks 1
[CoCommon_b0]
NParts 1
[CoCommon_b0p0]
Type Mesh
NFrames 1
Name Engine2_D0
[CoVer0_b0p0]
-0.593048 0.589935 -0.493744
…
…
0.65918 -2.34216 0.81546
[CoNeiCnt_b0p0]
4
4
5
5
5
5
4
4
[CoNei_b0p0]
3
2
1
4
0
3
4
5
3
0
7
6
4
2
0
1
5
7
6
5
0
1
2
4
6
7
1
3
4
5
7
2
5
6
3
2
[CoFac_b0p0]
3 2 0
….
2 6 4
; eof