EvilEngine/GRSM: Difference between revisions
Content added Content deleted
m (Seil moved page GRSM to EvilEngine/GRSM) |
No edit summary |
||
Line 12: | Line 12: | ||
==Format== |
==Format== |
||
Grass Meshes are base assets, so they start with their 0x8 byte header, then are followed by: |
Grass Meshes are base assets, so they start with their 0x8 byte header, then are followed by: |
||
===zGrassMeshAsset=== |
===zGrassMeshAsset=== |
||
<source lang=cpp> |
|||
class zGrassMeshAsset : public xBaseAsset |
|||
{ |
|||
public: |
|||
signed int numVertices; |
|||
signed int numFaces; |
|||
xVec3 min; |
|||
xVec3 max; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x08 || |
| 0x08 || s32 || '''numVertices''' || Amount of [[#zGrassMeshVertex|zGrassMeshVertex]] |
||
|- |
|- |
||
| 0x0C || |
| 0x0C || s32 || '''numFaces''' || Amount of [[#zGrassMeshFace|zGrassMeshFace]] |
||
|- |
|- |
||
| 0x10 || [[Vector3]] || '''min''' || |
| 0x10 || [[Vector3]] || '''min''' || |
||
Line 27: | Line 36: | ||
===zGrassMeshVertex=== |
===zGrassMeshVertex=== |
||
<source lang=cpp> |
|||
class zGrassMeshVertex |
|||
{ |
|||
public: |
|||
xVec3 position; |
|||
float height; |
|||
xVec3 normal; |
|||
unsigned char r; |
|||
unsigned char g; |
|||
unsigned char b; |
|||
unsigned char a; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
Line 32: | Line 54: | ||
| 0x00 || [[Vector3]] || '''position''' || |
| 0x00 || [[Vector3]] || '''position''' || |
||
|- |
|- |
||
| 0x0C || |
| 0x0C || f32 || '''height''' || |
||
|- |
|- |
||
| 0x10 || [[Vector3]] || '''normal''' || |
| 0x10 || [[Vector3]] || '''normal''' || |
||
Line 40: | Line 62: | ||
===zGrassMeshFace=== |
===zGrassMeshFace=== |
||
<source lang=cpp> |
|||
class zGrassMeshFace |
|||
{ |
|||
public: |
|||
unsigned short a; |
|||
unsigned short b; |
|||
unsigned short c; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x00 || |
| 0x00 || u16 || '''a''' || |
||
|- |
|- |
||
| 0x02 || |
| 0x02 || u16 || '''b''' || |
||
|- |
|- |
||
| 0x04 || |
| 0x04 || u16 || '''c''' || |
||
|} |
|} |
||
Latest revision as of 19:38, 24 March 2024
GRSM | |
---|---|
Grass Mesh | |
Type | Base |
Base Type | 0xCD |
Games used | The Incredibles |
Format
Grass Meshes are base assets, so they start with their 0x8 byte header, then are followed by:
zGrassMeshAsset
class zGrassMeshAsset : public xBaseAsset
{
public:
signed int numVertices;
signed int numFaces;
xVec3 min;
xVec3 max;
};
Offset | Type | Variable | Description |
---|---|---|---|
0x08 | s32 | numVertices | Amount of zGrassMeshVertex |
0x0C | s32 | numFaces | Amount of zGrassMeshFace |
0x10 | Vector3 | min | |
0x1C | Vector3 | max |
zGrassMeshVertex
class zGrassMeshVertex
{
public:
xVec3 position;
float height;
xVec3 normal;
unsigned char r;
unsigned char g;
unsigned char b;
unsigned char a;
};
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | Vector3 | position | |
0x0C | f32 | height | |
0x10 | Vector3 | normal | |
0x1C | Color | rgba |
zGrassMeshFace
class zGrassMeshFace
{
public:
unsigned short a;
unsigned short b;
unsigned short c;
};
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | u16 | a | |
0x02 | u16 | b | |
0x04 | u16 | c |