kion
Garbage Human
- Gender
- Male
I've been looking into xj models and comparing them with nj models to see if there is a way to export xj models into a more readable format. I'm going to write what I've found so far here to clear my mind and hopefully someone else can provide incite. My priority right now is mostly on documenting the formats and looking for parallels between the two.
NJ Filetype
So far the simplest model in the game i've found is the item box that drops on the ground. I will be using that for this description. Here's a screen cap of what the basic file type looks like:
In red at the top, NJCM chucks seem to be a tree structure of nodes starting with a first node that appears at the top of the file. The structure for Nodes is:
Blue at the bottom is the pointer from the Node to the Model structure.
The Vertex List is the part outlined in green. Not too sure about the first three entries. They look like 16 bit entries, I'm just not entirely sure what they're for. 0xFF000000 seems to mark the end of the vertex array.
As for the Mesh_List in purple, I'm guessing that's what that is. I haven't found enough information to really give an accurate guess as to what that is. I think it has a word for type, word for number of entries, TU TV and then a list of something (Color? Textures?) ending with 0xFF000000.
NJ Filetype
So far the simplest model in the game i've found is the item box that drops on the ground. I will be using that for this description. Here's a screen cap of what the basic file type looks like:
In red at the top, NJCM chucks seem to be a tree structure of nodes starting with a first node that appears at the top of the file. The structure for Nodes is:
typedef struct {
EvalFlags : DWord 0x17
Model : DWord 0x170
Position : Single[3] {0,0,0}
Angle : Sint32[3] {0,0,0}
Scale : Sint32[3] {1,1,1}
Child : DWord NULL
Sibling : DWord NULL
} NJS_NODE
Blue at the bottom is the pointer from the Node to the Model structure.
typedef struct {
Vertex_List : DWord 0xA4
Mesh_List : DWord 0x34
Center : Single[3] {0,0,0}
Radius : Single {-4.098}
} NJS_MODEL
The Vertex List is the part outlined in green. Not too sure about the first three entries. They look like 16 bit entries, I'm just not entirely sure what they're for. 0xFF000000 seems to mark the end of the vertex array.
typedef struct {
Type : Word 0x29
Unknown : Word 0x31
Start : Word 0x00
Num_Verts : 0x08
Array : [ Pos Single[3], Normal Single[3] ]
} NJS_VERTEXT_LIST
As for the Mesh_List in purple, I'm guessing that's what that is. I haven't found enough information to really give an accurate guess as to what that is. I think it has a word for type, word for number of entries, TU TV and then a list of something (Color? Textures?) ending with 0xFF000000.