Jump to content

Wangan Midnight Maximum Tune 3, 3DX arcade 3d model (.igb)


UndercoverBoy833

Recommended Posts

I know I keep opening new topics like that, sorry for that. But anyways, I know there's a Japanese and US version of Wangan Midnight Maximum Tune 3 arcade game so I'm curious about the 3d model formats of this game. Is there anyone to look into these .igb sample model files? I can handle the texture as it can be opened in a readable tga form with paint.net

gem_997_AVA.7z

Link to comment
Share on other sites

I know Durik made a noesis plugin back in 2022 but sadly it was lost in xentax being shutdown so I had found what I had to find so far for ripping Wangan Midnight Maxi Tune 3 car models. The forum I found so far is this: https://web.archive.org/web/20230513195504fw_/https://forum.xentax.com/viewtopic.php?t=25810

I think that's Durik's python script for igb model for noesis, but kinda unfinished.

import sys
import struct

input = sys.argv[1]

with open(input, 'rb') as rb, open(input.replace('.igb', '.obj'), 'w') as wb:
    rb.seek(1761231)
    vert = struct.unpack('%if'%(35100*3), rb.read(35100*12))
    
    for x in range(0, len(vert), 3):
        wb.write('v %f %f %f \n'%vert[x:x+3])
        
    for x in range(1, 35100, 3):
        wb.write('f %i %i %i \n'%(x, x + 1, x + 2))

c++ code

#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>

int main(int argc, char* argv[])
{
    if (argc > 1) 
    {
        FILE* rb = fopen(argv[1], "rb");
        FILE* obj = fopen("wheel.obj", "w");
        
        float* vert = new float[35100 * 12];

        fseek(rb, 1761231, 0);
        fread(vert, 4, 35100 * 3, rb);

        for(int i = 0; i < 35100 * 3; i+=3)
            fprintf(obj, "v %f %f %f \n", vert[i], vert[i+1], vert[i+2]);

        for (int i = 1; i < 35100; i += 3)
            fprintf(obj, "f %i %i %i \n", i, i + 1, i + 2);
    
    fclose(rb );
    fclose(obj);
    }
    std::cout << "Done!\n";
}

or c#

using System.IO;

namespace example
{
    internal class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                float[] vert = new float[35100 * 12];

                using (var InStream = File.Open(args[0], FileMode.Open))
                {
                    using (var reader = new BinaryReader(InStream))
                    {
                        InStream.Seek(1761231, SeekOrigin.Begin);
                        for (int i = 0; i < 35100 * 12; i++)
                            vert[i] = reader.ReadSingle();
                    }
                }

                using (var OutStream = new StreamWriter(args[0].Replace(".igb", ".obj")))
                {
                    for (int i = 0; i < 35100 * 3; i += 3)
                        OutStream.WriteLine($"v {vert[i]} {vert[i + 1]} {vert[i + 2]}".Replace(',', '.'));

                    for (int i = 1; i < 35100; i += 3)
                        OutStream.WriteLine($"f {i} {i + 1} {i + 2}");
                }
            }
        }
    }
}

I'm not sure if this would also work for Maxi Tune 3DX, 3DX+ 3d assets, but yeah I would appreciate for any luck for testing out these code for the sample file I posted early on.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...