Skip to content

Commit

Permalink
g_chunk description (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
sevonj authored Feb 25, 2024
1 parent 450b768 commit 70f1f86
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
17 changes: 17 additions & 0 deletions docs/SR2/formats/chunks/g_chunk_pc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# g_chunk_pc

The GPU chunk file only contains vertex and index buffers. The file consists of two major parts:

## Shared buffers section
Massive shared vertex and index buffers for static world geometry.

Contents:

- 0..n vertex buffers for each type of vertex. Type means the number of UV's and such in a vertex.
- A single index buffer for the above vertex buffers.

## Individual models section

- The CPU chunk header contains a pointer to this section.
- The contents is obviously a bunch of models, but where exactly are the headers is not fully figured out.
- The shared buffer seems to return garbage for all "loose" and destroyable objects, so it's probably safe to assume this section is the one holding them instead.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Chunkfiles
# Chunks
!!! note "File extensions"
`.chunk_pc`
`.g_chunk_pc`
Expand Down Expand Up @@ -105,5 +105,3 @@ char texture_names[num_textures];//
<alignment padding 16> //

```

## .g_chunk_pc layout
2 changes: 1 addition & 1 deletion docs/SR2/formats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
| ------------- | --------------------------------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------- |
| Animation | `.anim_pc` `.rig_pc` | | |
| Audio | `.xsb` `.xwb` `xgs` | XACT Sound Bank, Wave Bank, Settings | |
| Chunkfile | `.chunk_pc` `.g_chunk_pc` | World data | [`SR2_Chonker`](../../tools/sr2_chonker) [`SR2_ChunksTextureTool`](../../tools/sr2chunkstexturetool) |
| Chunks | `.chunk_pc` `.g_chunk_pc` | World data | [`SR2_Chonker`](../../tools/sr2_chonker) [`SR2_ChunksTextureTool`](../../tools/sr2chunkstexturetool) |
| Cityfile | `.city_pc` | Chunk directory | |
| Cloth sim | `.sim_pc` | Cloth simulation file | |
| Coordinate | `.cts` | | [`SR2_CTS_Mapper`](../../tools/sr2ctsmapper) |
Expand Down

0 comments on commit 70f1f86

Please sign in to comment.