-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
MInfo_ModelInfo.fbs
112 lines (100 loc) · 1.71 KB
/
MInfo_ModelInfo.fbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// all FlatSharp FBS attributes start with the 'fs_' prefix.
attribute "fs_serializer";
namespace GBFRDataTools.Entities;
// asset::impl::ModelInfoImpl
table ModelInfo (fs_serializer) {
magic:uint; // 20230729, 20240213 (1.1.1)
lods:[StreamLOD];
shadow_lods:[StreamLOD];
a4:[float];
sub_meshes:[SubMeshInfo];
materials:[Material];
bones_to_weight_indices:[ushort];
deform_bone_boundary_box:[BoundaryBox];
vec4_9:Vec4;
a10:ModelInfo_A10; // Used very rarely in bgXXXX files
vec3_11:Vec3;
f12:float;
f13:float;
f14:float;
f15:float;
f16:float;
f17:float;
f18:float;
f19:float;
f20:float;
byte21:byte;
byte22:byte;
bool23:bool;
bool24:bool;
bool25:bool;
bool26:bool;
bool27:bool;
bool28:bool;
bool29:bool;
bool30:bool;
bool31:bool; // Unused?
bool32:bool;
// 1.1.1
bool33:bool;
float34:float;
}
table StreamLOD
{
mesh_buffers:[MeshBufferLocator];
chunks:[LODChunk];
vertex_count:int;
poly_count_x3:int;
buffer_types:byte;
a6:byte;
}
table SubMeshInfo
{
name:string;
bbox:BoundaryBox;
}
table Material
{
unique_name_hash:uint;
unk_flags:byte;
}
table ModelInfo_A10
{
unk_id:uint; // Not always present
a2:float;
a3:byte;
a4:byte;
}
/////////////////
// Util structs
/////////////////
struct MeshBufferLocator
{
offset:ulong;
size:ulong;
}
struct LODChunk
{
offset:int;
count:int;
sub_mesh_id:byte;
material_id:byte;
a5:byte;
a6:byte;
}
struct Vec3 {
x:float;
y:float;
z:float;
}
struct Vec4 {
x:float;
y:float;
z:float;
r:float;
}
struct BoundaryBox {
min:Vec3;
max:Vec3;
}
root_type ModelInfo;