Skip to content

Material_Z

widberg edited this page Oct 12, 2023 · 46 revisions

Chum World MATERIAL
ImZouna Material_Z

struct Material_Z : ResourceObject_Z { // 172
    Vec4f color;
        // rgba
    Vec3f emission;
    std::int32_t unknown0;
    Vec2f tMatrixTopLeft;
        // Over written by the following when updated
        // (tRotation.z * cos(tAngle), tRotation.z * sin(tAngle))
    std::int32_t someNumber;
        // Can be -1
    std::uint32_t flags1;
    Vec2f tMatrixBottomRight;
        // Over written by the following when updated
        // (-tRotation.w * sin(tAngle), tRotation.w * cos(tAngle))
    std::uint32_t enabledBitmaps;
        // Bit flags representing which bitmap fields are enabled
        // Least significant bit (0x1) represents the first field
        // If somethingBitmapRelated.x + somethingBitmapRelated.y != 0 then 0x100 is set
        // Although the last bitmap is still 0 even when 0x100 is set
    std::uint32_t RdrFlag;
        // 0x20 is set if color.w < 1
    Vec2f tMatrixOffset;
        // Over written by the following when updated
        // (tRotation.x - (tMatrixTopLeft.x + tMatrixTopLeft.y) * 0.5 + 0.5,
        //  tRotation.y - (tMatrixBottomRight.x + tMatrixBottomRight.y) * 0.5 + 0.5)
    float tMatrixScale;
    float tAngle;
    Vec3f someVec;
        // All 3 components are equal?
    float param0;
    float param1;
    float param2;
    float param3;
    float param4;
    Quat tRotation;
    Vec2f somethingBitmapRelated;
    crc32_t sDiffuseBitmapCRC32;
    crc32_t unknownBitmapCRC320;
        // Always 0?
    crc32_t sSpecularBitmapCRC32;
    crc32_t sAddNormalLocalBitmapCRC321;
        // Rarely set
        // Very green
        // When this is set the other normal bitmap is 0
    crc32_t sOcclusionBitmapCRC32;
    crc32_t sNormalBitmapCRC32;
    crc32_t sDirtBitmapCRC32;
    crc32_t sNormalLocalBitmapCRC32;
        // Rarely set
        // When this is set the other normal bitmap is 0
    crc32_t unknownBitmapCRC321;
        // Always 0?
};
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//------------------------------------------------

struct Material_Z
{
    float constants0;
    float constants1;
    float constants2;
    float constants3;
    float constants4;
    float constants5;
    float constants6;
    int32 unknown0;
    float tMatrix0X;
    float tMatrix0Y;
    int32 flags0;
    int32 flags1;
    float tMatrix1X;
    float tMatrix1Y;
    int32 enabledBitmaps;
    int32 RdrFlag;
    float tMatrix2X;
    float tMatrix2Y;
    float tMatrixScale;
    float someAngle;
    float unknownvecX;
    float unknownvecY;
    float unknownvecZ;
    float constants7;
    float constants8;
    float constants9;
    float constants10;
    float constants11;
    float tRotationX;
    float tRotationY;
    float tRotationZ;
    float tRotationW;
    int32 moreFlags;
    int32 moreMoreFlags;
    uint32 diffuseBitmapCRC32;
    uint32 unknownBitmapCRC320;
    uint32 metalBitmapCRC32;
    uint32 unknownBitmapCRC321;
    uint32 greyBitmapCRC32;
    uint32 normalBitmapCRC32;
    uint32 dirtBitmapCRC32;
    uint32 unknownBitmapCRC322;
    uint32 unknownBitmapCRC323;
} material;
struct Material_Z : ResourceObject_Z // 177
{
    Vec4f color;
        // rgba
    Vec3f emission;
    std::int32_t unknown0;
    float vertexShaderConstantFs[31];
        // Theres some uint32s in here so I'll need to see which data goes to which calls
    std::uint8_t opt;
    if (opt != 0)
    {
        crc32_t unknownCRC32s[2];
    }
    std::uint32_t bitmapCRC32s[6];
};
struct Material_Z : ResourceObject_Z // 181
{
    Vec4f color;
        // rgba
    Vec3f emission;
    std::int32_t unknown0;
    float vertexShaderConstantFs[34];
        // Theres some uint32s in here so I'll need to see which data goes to which calls
    std::uint8_t opt;
    if (opt != 0)
    {
        crc32_t unknownCRC32s[2];
    }
    std::uint32_t bitmapCRC32s[6];
};

Home
FAQ

For FMTK Users and Mod Developers

Read the Docs

For FMTK Developers

Asobo BigFile Format Specification
Asobo Classes
      Animation_Z
      Binary_Z
      Bitmap_Z
      Camera_Z
      CollisionVol_Z
      Fonts_Z
      GameObj_Z
      GenWorld_Z
      GwRoad_Z
      Keyframer*_Z
      Light_Z
      LightData_Z
      Lod_Z
      LodData_Z
      Material_Z
      MaterialAnim_Z
      MaterialObj_Z
      Mesh_Z
      MeshData_Z
      Node_Z
      Omni_Z
      Particles_Z
      ParticlesData_Z
      RotShape_Z
      RotShapeData_Z
      Rtc_Z
      Skel_Z
      Skin_Z
      Sound_Z
      Spline_Z
      SplineGraph_Z
      Surface_Z
      SurfaceDatas_Z
      UserDefine_Z
      Warp_Z
      World_Z
      WorldRef_Z
Asobo File Format Idioms
Asobo CRC32
Asobo LZ Compression
Asobo Arithmetic Coding Compression
Asobo Save Game File Format Specification
Asobo Audio Formats
TotemTech/ToonTech/Zouna/ACE/BSSTech/Opal Timeline
Zouna Modding Resources
Miscellaneous

Clone this wiki locally