GMesh File Format

Discussion in 'TemplePlus' started by DarkStorm, Sep 12, 2009.

Remove all ads!
  1. DarkStorm

    DarkStorm Established Member

    Joined:
    Oct 2, 2003
    Messages:
    514
    Likes Received:
    3
    Hi,

    I didn't see another post about this on the forum, so I'll quickly make my own.

    The GMesh format seems to be for placing static objects without all the overhead for normal mobiles.

    It's basically the same format as the clipping mesh files.

    The GMF file again lists 3d models, but now including their animation files:
    Code:
    struct Header {
        int fileCount;
    } header;
    
    struct File {
        char SKAFilename[260];
        char SKMFilename[260];
    } file[header.fileCount];
    
    The GMI file instantiates those models in the same format as CIF:
    Code:
    struct Header {
        int objectCount;
    } header;
    
    struct MeshInstance {
        int fileIndex; // Index in GMF file
        float pos[3];
        float scale[3];
        float rotation;
    } entries[header.objectCount];
    
    Hope this helps anyone. I am going to load these files in my engine soon and see what exactly they are responsible for... Current guess: Signposts and the water.

    Cu,
    Storm
     
Our Host!