Jump to content

Helldivers 1 .unit Models Help Wanted (Bitsquid/Stingray)


Recommended Posts

Posted

Helldivers 1 (much like the second game) is on the Bitsquid/Stingray engine, and (I believe) uses similar formats, however, another game, Vermintide 2, uses an older, and more similar version of the engine compared to the first Helldivers. The model format has a Blender plug-in made for it, but the Helldivers model format is too old, and is not supported by the tool. If it would be possible for anyone to edit the plug-in (https://gitlab.com/qasikfwn/bitsquid-blender-tools), or just make a new one based off the code, I would be very grateful. I have attached a few sample models, I am unsure what materials and textures go with them, as all files are hashes. I do not care to modify the models/reimport them, I just wish to be able to have them without using Ninja Ripper or some other method. Skeletons would be nice, and I have included a file that seems to semi-correspond to it, but I will not complain if only meshes are supported. The files attached are extracted from the game's archives, I have not provided said archives as they are too big, but if someone thinks it'd be more useful to have them, I can send them.

HD1MeshSample.rar

Posted

Here's some more, I included some that didn't have bone files as well, figured they might be static meshes or something, but I can find even more if needed, it's just with the naming structure it's a bit of a pain. Some of them did have matching material names, I don't know if that's much help. Thank you so much either way.

MoreSamples.rar

  • Engineers
Posted

Hope you are familiar with 010 Hex Editor. Unfortunately I can't get it work in Noesis. I have problem with Indices.

//------------------------------------------------
//--- 010 Editor v14.0 Binary Template
//
//      File: 
//   Authors: 
//   Version: 
//   Purpose: 
//  Category: 
// File Type: *.unit
//  ID Bytes: 
//   History: 
//------------------------------------------------
LittleEndian();OutputPaneClear();
local string FileName=GetFileName(),FilePath=FileNameGetPath(FileName,true),BaseName=FileNameGetBase(FileName,false),MeshNum;
local uint32 i,j,k,l;

uint32 Sign;
uint32 MeshCount;

for (i=0; i < MeshCount; i++)
{
    struct
    {
        uint32 ElementBufferSize;
        byte ElementBuffer[ElementBufferSize];
        uint32 Null[2];
        uint32 VertexCount;
        uint32 Stride;
        uint32 ElementCount;
        struct
        {
            uint32 ElementId;
            uint32 ElementSize;
            uint32 Unknown_0;
            uint32 Unknown_1;
            byte EndMarker;
        }ElementInfo[ElementCount]<optimize=false>;
        
        byte Dummy[12];
        uint32 TotalIndexCount;
        uint32 IndexBufferSize;
        uint16 IndexBuffer[TotalIndexCount];
        uint32 ShapeCount;
        struct
        {
            uint32 ShapeIndex;
            uint32 IndexOffset;
            uint32 IndexCount;
            uint32 Unknown_0;
        }ShapeIndexInfo[ShapeCount]<optimize=false>;
        
        float Unknown_4[7];
        uint32 ShapeNames;
        struct
        {
            uint32 StrLen;
            char ShapeName[StrLen];
        }ShapeNameInfo[ShapeNames]<optimize=false>;
    }MeshInfo;
}

for (i=0; i < MeshCount; i++)
{
    FSeek(startof(MeshInfo[i].ElementBuffer));
    SPrintf(MeshNum,"_mesh_%u",i);
    struct
    {
        struct
        {
            for (j=0; j < MeshInfo[i].ElementCount; j++)
            {
                if (MeshInfo[i].ElementInfo[j].ElementId == 0)
                {
                    struct
                    {
                        float VPosX,VPosY,VPosZ;
                    }Vertices;
                }
                else if (MeshInfo[i].ElementInfo[j].ElementId == 1)
                {
                    struct
                    {
                        float VNPosX,VNPosY,VNPosZ;
                    }Normals;
                }
                else if (MeshInfo[i].ElementInfo[j].ElementId == 2)
                {
                    struct
                    {
                        float PosX,PosY,PosZ;
                    }Unknown_2;
                }
                else if (MeshInfo[i].ElementInfo[j].ElementId == 3)
                {
                    struct
                    {
                        float PosX,PosY,PosZ;
                    }Unknown_3;
                }
                else if (MeshInfo[i].ElementInfo[j].ElementId == 4)
                {
                    struct
                    {
                        float UVPosX,UVPosY;
                    }UnitVector;
                }
                else if (MeshInfo[i].ElementInfo[j].ElementId == 5)
                {
                    struct
                    {
                        float PosX,PosY,PosZ,PosW;
                    }Unknown_5;
                }
                else if (MeshInfo[i].ElementInfo[j].ElementId == 6)
                {
                    struct
                    {
                        if (MeshInfo[i].ElementInfo[j].ElementSize == 0)
                            float PosX;
                        else if (MeshInfo[i].ElementInfo[j].ElementSize == 1)
                            float PosX,PosY;
                        else if (MeshInfo[i].ElementInfo[j].ElementSize == 2)
                            float PosX,PosY,PosZ;
                        else if (MeshInfo[i].ElementInfo[j].ElementSize == 3)
                            float PosX,PosY,PosZ,PosW;
                    }Unknown_6;
                }
                else if (MeshInfo[i].ElementInfo[j].ElementId == 7)
                {
                    struct
                    {
                        if (MeshInfo[i].ElementInfo[j].ElementSize == 0)
                            float PosX;
                        else if (MeshInfo[i].ElementInfo[j].ElementSize == 1)
                            float PosX,PosY;
                        else if (MeshInfo[i].ElementInfo[j].ElementSize == 2)
                            float PosX,PosY,PosZ;
                        else if (MeshInfo[i].ElementInfo[j].ElementSize == 3)
                            float PosX,PosY,PosZ,PosW;
                    }Unknown_7;
                }
            }
            Printf("v %f %f %f\n",Vertices[0].VPosX,Vertices[0].VPosY,Vertices[0].VPosZ);
            Printf("vt %f %f\n",UnitVector[0].UVPosX,UnitVector[0].UVPosY);
            Printf("vn %f %f %f\n",Normals[0].VNPosX,Normals[0].VNPosY,Normals[0].VNPosZ);
        }ElementBuffer[MeshInfo[i].VertexCount]<optimize=false>;
        Printf("\n");
        
        for (k=0; k < MeshInfo[i].ShapeCount; k++)
        {
            Printf("g mesh_%04u_%s\n",i,Mesh[i].ShapeNameInfo[k].ShapeName);
            FSeek(startof(MeshInfo[i].IndexBuffer) + MeshInfo[i].ShapeIndexInfo[k].IndexOffset * 6);
            struct
            {
                uint16 F1,F2,F3;
                Printf("f %u/%u/%u %u/%u/%u %u/%u/%u\n",F1+1,F1+1,F1+1,F2+1,F2+1,F2+1,F3+1,F3+1,F3+1);
            }ShapeIndex0[MeshInfo[i].ShapeIndexInfo[k].IndexCount]<optimize=false>;
            Printf("\n");
        }
    }MeshObject;
    OutputPaneSave(FilePath + BaseName + MeshNum + ".obj");
    OutputPaneClear();
}

 

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...