Help, do anyone know this *.geo use what known Model format

Skeletons, animations, shaders, texturing, converting, fixing and anything else related to read game models
game2005
Posts: 3
Joined: Thu Jul 07, 2022 4:03 pm

Help, do anyone know this *.geo use what known Model format

Post by game2005 »

From a Dumped game, I had success dump the texture part with swizzle.
But I have few knowledge about the model file.
# Texture part
success dump and rebuild
As the texture or picture file in this game, It separate to header part(with info of width, height, pixel format and datasize, ) and data part(need swizzle)
#
Then the next. there may be 8 *.geo to 39 tsr (texture file)
In the Geo1.png(which is a extension of .geo), from the name, it should be a geography or mesh file of 3D model
The header(description) parts contains some description/Keyword


'GEOX' as 0x0
0x8 content offset(e.g 0x50 here)
0xC ?
0x14-0x30 ? may be sha1, but i do not test
0x50 name
0x50 GADR: what is this?,
0x6C GADR VALUE? (e.g 0x1740 )
0x70 MAT0 frequnet 0x0000...
0x80 VTX0 with value at 0xA8: 0xBA, vertex???
0x90 STRP with value at 0x98: 0x202, strip???

==>sometimes the extra part with "IDOL" keyword, it had no influence on data size
the success dumped texture, look like hair and face;
Image
tsr1.png

The geo header/descriptor
Image
geo1.png


And the geo Data part, gadr and then STRP
GADR data size 0x1740 from 0x5A70
Image
GADR_data.png


STRP data size 0x202*2 from 0xF344
Image
STRP_data.png

for test several geo file many. time, I conclude the data size of GEO would be [ GADR VALUE + STRP value * 2] (bytes)

Q1. Do any expert know if this binary of model format would be a known 3D model format or custom format
Q2. If not as a known format, what would the keyword represent?

Thanks
3IMiner
Posts: 14
Joined: Wed Jul 06, 2022 9:39 am

Re: Help, do anyone know this *.geo use what known Model format

Post by 3IMiner »

The following tutorials are recommended>>>
viewtopic.php?f=4&t=23
game2005
Posts: 3
Joined: Thu Jul 07, 2022 4:03 pm

Re: Help, do anyone know this *.geo use what known Model format

Post by game2005 »

Thank you, 3IMiner, I have already tried QuickBMS though it is a decompressed content, that's in vain, no readable dump found
The header and data I showed are the already decompressed data(by XOR, bit shift, key, 0x100 keyblock, zlib inflate level 9 of original binary).
I dont think it still a compressed or encrypted content but unknown geometric data with separate header and data, I think from the keywords(VTX,GEO,..), and the texture(.dds), I believed it is a kind of mesh file with vertex and geometric descriptions but I have few knowledge on 3D format, especially from binary format.
I attached the file below (only for academic, or educational use)
CHARA_SADO_Head.geo (only for academic, or educational use)
CHARA_SADO_Head.dat
grandshot
Posts: 42
Joined: Mon Jun 07, 2021 8:20 pm

Re: Help, do anyone know this *.geo use what known Model format

Post by grandshot »

Provided sample is actual geom data, where 186 vertex buffers (size of block 0x1740) and 514 tristripped faces (size of block 0x404). Total faces count is 171 (513 / 3).

Vertex buffers have next struct:

Code: Select all

float x, y, z - Vector3 position
uint32 unknown - Possibly RGBA vertex color, or packed normals\tangents
uint32 unknown - Seems like some offset
half float u, v - Texture coordinates
uint32 unknown - Perhaps second channel texcoords, or packed normals\tangents
uint32 unknown - Material ID or again some offset


After vertex buffers coming tristripped faces. Quote from Xentax Wiki:
Triangles can also be represented as what is called a “tristrip”, or triangle strip. In a triangle strip, the first three vertices form a triangle, then every new vertex creates a new triangle by connecting with the previous two.


Sample of code for read this type of faces:

Code: Select all

void parse_tristrips( uint32 num_faces, uint is_longint, uint print_faces )
{

    local uint direct, i, v1, v2, v3;
    local string faces;

    if( num_faces )
    {
        direct = true;
       
        if( !is_longint ) uint16 a, b;
        else uint32 a, b;

        v1 = a + 1; v2 = b + 1;

        for( i; i < num_faces; i++ )
        {
            if( !is_longint ) uint16 c;
            else uint32 c;

            v3 = c + 1;
           
            if( v1 != v2 && v2 != v3 && v3 != v1 )
                if( direct ) faces = Str("%d/%d %d/%d %d/%d", v1, v1, v2, v2, v3, v3);
                else faces = Str("%d/%d %d/%d %d/%d", v1, v1, v3, v3, v2, v2);
           
            v1 = v2;
            v2 = v3;

            direct = !direct;

            if( print_faces ) Printf("f %s\n", faces);
        }
    }

   
};
game2005
Posts: 3
Joined: Thu Jul 07, 2022 4:03 pm

Re: Help, do anyone know this *.geo use what known Model format

Post by game2005 »

Great Thanks, grandshot
It works. You solved my problem. thought I still dont known how to render the texture on it, but it's great HELP!!! thanks
grandshot
Posts: 42
Joined: Mon Jun 07, 2021 8:20 pm

Re: Help, do anyone know this *.geo use what known Model format

Post by grandshot »

game2005 wrote:thought I still dont known how to render the texture on it


Open output.obj file in your favorite 3d modelling package, create new material with your texture and assign to the model. It include texture coords, so what would be easy?
Check the preview.png where uv unwrap is demonstrated btw.

Well, your proveded sample is only part of whole model. If you want import whole model, you need to write your own importer script, which will parse geo headers and load geometry data from the chunks.