Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Juiced *.d8g / *.d8m / *.boh

Featured Replies

Solved by mrmaller1905

  • 1 month later...
  • 7 months later...
  • Author
  • Localization
'''
Parsing Method:
     - Read 12 bytes (unk001, unk002, mesh_count) from the top-level fmtD8G.
     - For each mesh (mesh_count times):
         - Read unk003 (4 bytes).
         - Read position (16 bytes).
         - Read bound_sphere, unk004, unk005 (each 4 bytes).
         - Attempt to read unk006[1]. If it’s > 0, backtrack 4 bytes; otherwise read the remaining 12 bytes for unk006[2..4].
         - Read vertices via fmtD8G_Vertex:
             - Read definition_count.
             - If > 0, read exactly that many fmtD8G_Vertex_FVF.
             - Else read until flag == 0xFF.
             - Read stride and count.
             - For each vertex in count, read data from positions indicated by each FVF definition.
         - Read face_count (4 bytes).
            - If face_count > 0, read that many uint16_t face indices.
         - Read node_count (4 bytes).
            - If node_count > 0, read that many fmtD8G_Transform blocks (64 bytes each).
     - End of file once all meshes have been processed.
'''

==========================================================================================
 D8G MAIN HEADER
==========================================================================================
    +---------------+----------------------+----------------+--------------+--------------------------------------------+
    | Relative      | Variable Name        | Data Type      | Size (bytes) | Comments                                   |
    | Address (Hex) |                      |                |              |                                            |
    +---------------+----------------------+----------------+--------------+--------------------------------------------+
    | 0x00          | vert_type            | uint32_t       | 4            | 1 = vertices sprites, 2 = normal           |
    | 0x04          | face_type            | uint32_t       | 4            | 1 = triangle list 2 = triangle strips      |
    | 0x08          | mesh_count           | uint32_t       | 4            | Number of mesh entries to follow           |
    | 0x0C          | meshes[mesh_count]   | fmtD8G_Mesh[]  | variable     | Each mesh is read in sequence              |
    +---------------+----------------------+----------------+--------------+--------------------------------------------+
     * After reading mesh_count, you then iterate mesh_count times, reading a fmtD8G_Mesh each time (see next section).


==========================================================================================
 MESH STRUCTURE (fmtD8G_Mesh)
==========================================================================================
    +---------------+-------------------+----------------+--------------+---------------------------------------------+
    | Relative      | Variable Name     | Data Type      | Size (bytes) | Comments                                    |
    | Address (Hex) |                   |                |              |                                             |
    +---------------+-------------------+----------------+--------------+---------------------------------------------+
    | 0x00          | unk003            | uint32_t       | 4            | Possibly texture index?                     |
    | 0x04          | position          | float[4]       | 16           | X, Y, Z, W?                                 |
    | 0x14          | bound_sphere      | float          | 4            | Bounding sphere radius?                     |
    | 0x18          | unk004            | float          | 4            | Possibly min LOD distance?                  |
    | 0x1C          | unk005            | float          | 4            | Possibly max LOD distance?                  |
    +---------------+-------------------+----------------+--------------+---------------------------------------------+

     * Immediately after reading unk005, check for 16 bytes that may or may not be present (stored in unk006).
       The logic is:
        - Read 4 bytes
        - If > 0, seek backward 4 bytes and do not read the rest of the 12 bytes.
        - Otherwise, reads the next three uint32_t (total of 16 bytes).
     * After this conditional block, the next pieces are:

    +---------------+----------------------+---------------------+--------------+--------------------------------------------------+
    | Relative      | Variable Name        | Data Type           | Size (bytes) | Comments                                         |
    | Address (Hex) |                      |                     |              |                                                  |
    +---------------+----------------------+---------------------+--------------+--------------------------------------------------+
    | ...           | vertices             | fmtD8G_Vertex       | variable     | See "fmtD8G_Vertex" structure below              |
    | ...           | face_count           | uint32_t            | 4            | Number of faces (triangles)                      |
    | ...           | faces[face_count]    | uint16_t[face_count]| face_count*2 | Each face index is 2 bytes                       |
    | ...           | node_count           | uint32_t            | 4            | Number of transform nodes                        |
    | ...           | nodes[node_count]    | fmtD8G_Transform[]  | node_count*64| 64 bytes per transform matrix                    |
    +---------------+----------------------+---------------------+--------------+--------------------------------------------------+


==========================================================================================
 VERTEX BLOCK (fmtD8G_Vertex)
==========================================================================================
    +---------------+----------------------+---------------------+--------------+----------------------------------------------------+
    | Relative      | Variable Name        | Data Type           | Size (bytes) | Comments                                           |
    | Address (Hex) |                      |                     |              |                                                    |
    +---------------+----------------------+---------------------+--------------+----------------------------------------------------+
    | 0x00          | definition_count     | uint32_t            | 4            | If > 0, read exactly 'definition_count' FVF items  |
    |               |                      |                     |              | If == 0, read FVF items until flag==0xFF           |
    | ...           | definitions[]        | fmtD8G_Vertex_FVF[] | variable     | Each entry is 8 bytes (see 'fmtD8G_Vertex_FVF')    |
    | ...           | stride               | uint32_t            | 4            | Bytes between vertices                             |
    | ...           | count                | uint32_t            | 4            | Number of vertices                                 |
    +---------------+----------------------+---------------------+--------------+----------------------------------------------------+

     * For each fmtD8G_Vertex_FVF in definitions, jump to (start_of_vertex + pos) within that stride, 
       read the data accordingly (based on data field).


==========================================================================================
 FVF DEFINITION (fmtD8G_Vertex_FVF) - 8 bytes
==========================================================================================
    +---------------+--------------+-----------+--------------+---------------------------------------------------+
    | Relative      | Variable     | Data Type | Size (bytes) | Comments                                          |
    | Address (Hex) | Name         |           |              |                                                   |
    +---------------+--------------+-----------+--------------+---------------------------------------------------+
    | 0x00          | flag         | uint16_t  | 2            | Often 0; 0xFF signals end of definitions if found |
    | 0x02          | pos          | uint16_t  | 2            | Offset within the vertex stride block             |
    | 0x04          | data         | uint16_t  | 2            | 1=Float2, 2=Float3, 4=byte[3..4]? (color?), etc.  |
    | 0x06          | type         | uint8_t   | 1            | 0x00=Pos,0x03=Normal,0x05=TexCoord,0x0A=Color,... |
    | 0x07          | map          | uint8_t   | 1            | For UV channel index (0 or 1, etc.)               |
    +---------------+--------------+-----------+--------------+---------------------------------------------------+

==========================================================================================
 TRANSFORM (fmtD8G_Transform) - 64 bytes
==========================================================================================
    +---------------+--------------------+-----------+--------------+-----------------------------------------------+
    | Relative      | Variable Name      | Data Type | Size (bytes) | Comments                                      |
    | Address (Hex) |                    |           |              |                                               |
    +---------------+--------------------+-----------+--------------+-----------------------------------------------+
    | 0x00          | matrix4x4          | float[4x4]| 16*4 = 64    | 4 rows × 4 columns, read in row-major format  |
    +---------------+--------------------+-----------+--------------+-----------------------------------------------+

Recently someone has wrote a file format specification for *.d8g. Could anyone take a look?

  • 2 months later...
  • 2 weeks later...
  • Supporter
On 5/17/2025 at 6:29 PM, mrmaller1905 said:

I found a 3ds max script named juice_utility.ms. Does this script import *.d8m?

Very likely since it contains

struct fmtD8M_Vertex_FVF

struct fmtD8M_Vertex

struct fmtD8M_Mesh

struct fmtD8M_File

integra_chass-d8m.png

Edited by shak-otay

  • 10 months later...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.