Mesh

From Chrono Compendium
Revision as of 04:04, 24 August 2016 by Utunnels (Talk | contribs)

Jump to: navigation, search

General Information

Chrono Cross

Similar to weapon models.

They all have a header that starts with '01 00 00 80', a group of faces and a vertex buffer. There're no bones/transforms, so they are just generic mesh type (a weapon model is mesh itself).

They are pretty easy to find, just search for 01 00 00 80, if found, check offset 0x10 from there, there should be a 14 00 00 00 followed by a xx 00 00 00.

The types of faces, however, are much more complex than I expected.

  • 0x34 Triangle, has vetex colors of all 3 vertices, a uv map and a list of 3 vertex indices.
  • 0x3c Quad, has vetex colors of all 4 vertices, a uv map and a list of 4 vertex indices.
  • 0x24 Triangle, has only 1 vertex color value for all 3 vertices, a uv map and a list of 3 vertex indices.
  • 0x2c Quad, has only 1 vertex color value for all 4vertices, a uv map and a list of 4 vertex indices.
  • 0x20 Triangle, has only 1 vertex color value (perhaps always zero and unused) , a list of 3 vertex indices, and a '00 00' at the end which makes me wonder whether it is another vertex, but it could be just a trick to make the total length a multiple of 4.
  • 0x28 Quad, has only 1 vertex color value (perhaps always zero and unused) and a list of 4 vertex indices.
  • 0x30 Triangle, similar to 0x20, but has 3 vertex colors.
  • 0x38 Quad, similar to 0x28, but has 3 vertex colors.


texture uv format:

  • triangle: UVCCUVTTUV (10 bytes)
  • quad: UVCCUVTTUVUV (12 bytes)
  • UV: U and V value, in pixels
  • CC:CLUT info
  • TT:Texture info
  • CLUT info:used to find clut (palette) offset in vram
            clutx = (clut&0x3f)<<4
            cluty = (clut>>6)
  • Texture info:texture page, texture mode, transparency
            mode = ((tpage)>>7)&0x003
            abr = ((tpage)>>5)&0x003
            tpx = ((tpage)<<6)&0x7c0 % 1024
            tpy = ((((tpage)<<4)&0x100)+(((tpage)>>2)&0x200))

mode: color mode. 0: 4bit, 1: 8bit, other: not used in game
abr: transparent mode
tpx: texture page x
tpy: texture page y
For more informations, check here: http://psx.rules.org/gpu.txt


Breaking the byte down into bits:

7 6 5 4 3 2 1 0 4: vertex color type 3: face type (triangle or quad) 2: texture type (textured or textureless)

From: Modification