|
RN8 files are 3d geometry files, there seems to be a few "formats" of rn8 |
|
Note: avatar models do not seem to follow any of these formats |
|
Note: Stuff related to what kind of truck to use, wheels, etc are hardcoded and are determined based on the name of the file. I may add a lookup table at some point |
|
|
|
format 1 (-969696): |
|
int32 - unknown int (looks like its used to determine the "format") |
|
int32 - number of objects |
|
string - object name |
|
string - parent object name |
|
float - position X offset |
|
float - position Y offset |
|
float - position Z offset |
|
float - unknown vector X |
|
float - unknown vector Y |
|
float - unknown vector Z |
|
float - rotation matrix yaw (degrees) |
|
float - rotation matrix pitch (degrees) |
|
float - rotation matrix roll (degrees) |
|
float - scale matrix x (unused) |
|
float - scale matrix y (unused) |
|
float - scale matrix z (unused) |
|
float - rotation matrix yaw (degrees) (unused) |
|
float - rotation matrix pitch (degrees) (unused) |
|
float - rotation matrix roll (degrees) (unused) |
|
float - rotation matrix yaw (degrees) (unused) |
|
float - rotation matrix pitch (degrees) (unused) |
|
float - rotation matrix roll (degrees) (unused) |
|
float - translation vector X |
|
float - translation vector Y |
|
float - translation vector Z |
|
float - rotation matrix yaw (degrees) |
|
float - rotation matrix pitch (degrees) |
|
float - rotation matrix roll (degrees) |
|
float - scale matrix x (unused) |
|
float - scale matrix y (unused) |
|
float - scale matrix z (unused) |
|
int32 - number of matrices |
|
float - matrix 1 |
|
float - matrix 2 |
|
float - matrix 3 |
|
float - matrix 4 |
|
float - matrix 5 |
|
float - matrix 6 |
|
float - matrix 7 |
|
float - matrix 8 |
|
float - matrix 9 |
|
float - matrix 10 |
|
float - matrix 11 |
|
float - matrix 12 |
|
float - matrix 13 |
|
float - matrix 14 |
|
float - matrix 15 |
|
float - matrix 16 |
|
int32 - number of matrices |
|
float - matrix 1 |
|
float - matrix 2 |
|
float - matrix 3 |
|
float - matrix 4 |
|
float - matrix 5 |
|
float - matrix 6 |
|
float - matrix 7 |
|
float - matrix 8 |
|
float - matrix 9 |
|
float - matrix 10 |
|
float - matrix 11 |
|
float - matrix 12 |
|
float - matrix 13 |
|
float - matrix 14 |
|
float - matrix 15 |
|
float - matrix 16 |
|
int32 - number of vertices (divide by 7) |
|
|
|
vertice: |
|
float - unknown float (unused) |
|
float - position X (* 63.7f - positionOffset.X) |
|
float - normal Y ( / -1.732f) |
|
float - position Z (/ 16f - positionOffset.Z) |
|
float - texture coordinate X (/ 4.8f) |
|
float - normal X (/ 10.962f) |
|
float - unknown float (unused) |
|
float - normal Z (/ 11.432f) |
|
float - texture coordinate Y (/ 9.6f) |
|
float - position Y (* 6f - positionOffset.Y) |
|
|
|
int32 - number of textures |
|
texture: |
|
string - texture name |
|
|
|
bool - true if index buffer is ushort, false if int32 |
|
int32 - number of indecies |
|
indecie: |
|
int32 - indecie (convert to ushort if needed) |
|
|
|
int32 - unknown int (- 9) (seems to be number of textures again) |
|
unknown: |
|
float - unknown float (unused) |
|
int32 - texture name index |
|
int32 - index count |
|
int32 - index start location |
|
int32 - base vertex location |
|
|
|
format 2 (-969697): |
|
int32 - unknown int (looks like its used to determine the "format") |
|
int32 - number of objects |
|
float - unknown vector X |
|
float - unknown vector Y |
|
float - unknown vector Z |
|
string - object name |
|
string - parent object name |
|
float - position X offset |
|
float - position Y offset |
|
float - position Z offset |
|
float - unknown vector X |
|
float - unknown vector Y |
|
float - unknown vector Z |
|
float - rotation matrix yaw (degrees) |
|
float - rotation matrix pitch (degrees) |
|
float - rotation matrix roll (degrees) |
|
float - scale matrix x (unused) |
|
float - scale matrix y (unused) |
|
float - scale matrix z (unused) |
|
float - rotation matrix yaw (degrees) (unused) |
|
float - rotation matrix pitch (degrees) (unused) |
|
float - rotation matrix roll (degrees) (unused) |
|
float - rotation matrix yaw (degrees) (unused) |
|
float - rotation matrix pitch (degrees) (unused) |
|
float - rotation matrix roll (degrees) (unused) |
|
float - translation vector X |
|
float - translation vector Y |
|
float - translation vector Z |
|
float - rotation matrix yaw (degrees) |
|
float - rotation matrix pitch (degrees) |
|
float - rotation matrix roll (degrees) |
|
float - scale matrix x (unused) |
|
float - scale matrix y (unused) |
|
float - scale matrix z (unused) |
|
int32 - number of matrices |
|
float - matrix 1 |
|
float - matrix 2 |
|
float - matrix 3 |
|
float - matrix 4 |
|
float - matrix 5 |
|
float - matrix 6 |
|
float - matrix 7 |
|
float - matrix 8 |
|
float - matrix 9 |
|
float - matrix 10 |
|
float - matrix 11 |
|
float - matrix 12 |
|
float - matrix 13 |
|
float - matrix 14 |
|
float - matrix 15 |
|
float - matrix 16 |
|
int32 - number of matrices |
|
float - matrix 1 |
|
float - matrix 2 |
|
float - matrix 3 |
|
float - matrix 4 |
|
float - matrix 5 |
|
float - matrix 6 |
|
float - matrix 7 |
|
float - matrix 8 |
|
float - matrix 9 |
|
float - matrix 10 |
|
float - matrix 11 |
|
float - matrix 12 |
|
float - matrix 13 |
|
float - matrix 14 |
|
float - matrix 15 |
|
float - matrix 16 |
|
int32 - number of vertices (divide by 7) |
|
|
|
vertice: |
|
float - unknown float (unused) |
|
float - position X (* 63.7f - positionOffset.X) |
|
float - normal Y ( / -1.732f) |
|
float - position Z (/ 16f - positionOffset.Z) |
|
float - texture coordinate X (/ 4.8f) |
|
float - normal X (/ 10.962f) |
|
float - unknown float (unused) |
|
float - normal Z (/ 11.432f) |
|
float - texture coordinate Y (/ 9.6f) |
|
float - position Y (* 6f - positionOffset.Y) |
|
|
|
int32 - number of textures |
|
texture: |
|
string - texture name |
|
|
|
bool - true if index buffer is ushort, false if int32 |
|
int32 - number of indecies |
|
indecie: |
|
int32 - indecie (convert to ushort if needed) |
|
|
|
int32 - unknown int (- 9) (seems to be number of textures again) |
|
unknown: |
|
float - unknown float (unused) |
|
int32 - texture name index |
|
int32 - index count |
|
int32 - index start location |
|
int32 - base vertex location |
|
|
|
format 3: |
|
int32 - unknown int (looks like its used to determine the "format") |
|
int32 - number of vertices (divide by 7) |
|
|
|
vertice: |
|
float - unknown float (unused) |
|
float - position X (* 63.7f - positionOffset.X) |
|
float - normal Y ( / -1.732f) |
|
float - position Z (/ 16f - positionOffset.Z) |
|
float - texture coordinate X (/ 4.8f) |
|
float - normal X (/ 10.962f) |
|
float - unknown float (unused) |
|
float - normal Z (/ 11.432f) |
|
float - texture coordinate Y (/ 9.6f) |
|
float - position Y (* 6f - positionOffset.Y) |
|
|
|
int32 - number of textures |
|
texture: |
|
string - texture name |
|
|
|
bool - true if index buffer is ushort, false if int32 |
|
int32 - number of indecies |
|
indecie: |
|
int32 - indecie (convert to ushort if needed) |
|
|
|
int32 - unknown int (- 9) (seems to be number of textures again) |
|
unknown: |
|
float - unknown float (unused) |
|
int32 - texture name index |
|
int32 - index count |
|
int32 - index start location |
|
int32 - base vertex location |