Skip to content

Material_Z

widberg edited this page Aug 14, 2022 · 46 revisions

Chum World MATERIAL

https://docs.microsoft.com/en-us/windows/win32/api/d3d9helper/nf-d3d9helper-idirect3ddevice9-setvertexshaderconstantf

struct Material_Z : ResourceObject_Z // 172
{
    Vec4f color;
        // rgba
    Vec3f emission;
    std::int32_t unknown0;
    Vec2f tMatrixTopLeft;
    std::uint32_t flags0;
    std::uint32_t flags1;
    Vec2f tMatrixBottomRight;
    std::uint8_t enabledBitmaps;
        // Bit flags representing which bitmap fields are enabled
        // Least significant bit represents the first field
        // Most significant bit represents the last field
    std::uint8_t unknown1;
        // 0 when only diffuse bitmap
        // 1 otherwise?
    std::uint8_t zero0;
    std::uint8_t zero1;
    std::uint32_t RdrFlag;
    Vec2f tMatrixOffset;
    float tMatrixScale;
    float tAngle;
    float param0;
    float param1;
    float param2;
    float param3;
    float param4;
    float param5;
    float param6;
    float param7;
    float param8;
    float param9;
    float param10;
    float param11;
    float param12;
    float param13;
    std::uint32_t diffuseBitmapCRC32;
    std::uint32_t unknownBitmapCRC320;
    std::uint32_t specularBitmapCRC32;
    std::uint32_t unknownBitmapCRC321;
    std::uint32_t occlusionBitmapCRC32;
    std::uint32_t normalBitmapCRC32;
    std::uint32_t dirtBitmapCRC32;
    std::uint32_t differentNormalBitmapCRC32;
        // When this is set the other normal bitmap is 0
        // Could be sNormalLocal or sAddNormalLocal from the shader source
    std::uint32_t unknown2;
        // Since enabledBitmaps only has 8 bits it is unlikely this is a bitmap
};
//------------------------------------------------
//--- 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