Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.
Zero Tolerance for Disrespect

Bob the Builder: Festival of Fun [PS2]

Featured Replies

  • Localization

I am attempting to write a Blender add-on for models from the PS2 release of Bob the Builder: Festival of Fun. However, I cannot figure out how primitives are generated from the vertices. It seems to store multiple positions for each vertex for some reason. I tried generating triangle strips from one of the position fields, but I think there is more to it than that. I've attached the Blender add-on, a Python script I wrote a while ago for unpacking DATA2.BIN, and a couple of sample files. Also, here is a partial ImHex pattern for the models:

struct Vec2f {
    float x;
    float y;
} [[single_color]];

struct Vec3f {
    float x;
    float y;
    float z;
} [[single_color]];

struct Matrix {
    float row_0[4];
    float row_1[4];
    float row_2[4];
    float row_3[4];
} [[single_color]];

struct Vertex {
    Vec3f;
    float;
    Vec3f;
    float;
    Vec3f;
    float;
    Vec3f;
    u8 indices_0[4];
    Vec3f normal;
    u8 indices_1[4];
    Vec2f uv;
    u8 color[4];
    u8 indices_2[4];
} [[single_color]];

struct Mesh {
    u32 vert_count;
    u32;
    u32;
    u32;
    u32;
    u32;
    u32;
    u32;
    Vertex vertices[vert_count];
};

struct MeshInfo {
    u32 offset;
    u32;
    u32;
    u32;
    Mesh mesh @ offset;
};

struct MeshTable<T, auto MeshCount> {
    MeshInfo mesh_info_entries[MeshCount];
};

struct ModelInfo {
    u16 mesh_count;
    u16 bone_count;
    u32 mesh_table_off;
    u32 unk_off;
    u32 name_off;
    MeshTable<u32, mesh_count> mesh_table @ mesh_table_off;
};

struct Header {
    u32;
    u16 model_count;
    u16 bone_count;
    u32 models_off;
    u32 pids_off;
    u32 transforms_off;
    
    ModelInfo models[model_count] @ models_off;
    s16 pids[bone_count] @ pids_off;
    Matrix bone_transforms[bone_count] @ transforms_off;
};

Header header_at_0x00 @ 0x00;

btb_ps2_importer.zip btb_ps2_unpacker.py BTB PS2 Samples.zip

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.