Jump to content

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


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

Sir, according to the script you provided, it mentions moving to the 1,761,231 byte position in the file to read vertex data. However, the sample file you provided does not reach this length. Therefore, I am unable to assist you. But based on your C# script, since there's no additional information, the script will by default use little-endian byte order. I've read your sample using a little-endian approach with some rough estimation. Some vertex coordinates start appearing in the middle part of the file, but I can't determine if they are contiguous or disjoint. (Further attempts are needed to know the exact type.) Here's roughly what it looks like:

x5.png

Link to comment
Share on other sites

  • Engineer

one of the submesh

ofs: dec: 380070

vnum: 5111

type: float

stride: 12

face: auto TStrip

21.png

  

8 hours ago, UndercoverBoy833 said:

I know Durik made a noesis plugin back in 2022

This is not a plugin. This was an example of automatic triangle creation.

Edited by Durik256
  • Like 1
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...