Users browsing this thread: 2 Guest(s)
Renderware Delta Morph Mesh ripping and repacking
#2
Hi, I'm also working on this issue (but only on another game Silent Hil Origins for ps2, I don't know the version of the engine). Here's what I was able to dig myself
The structure delta morph plg (0x122) is as follows (at least in my version of the engine, it seems like yours, even the constants are the same):
Code:
struct Base{
    uint32_t count;
    Record recs[count];
};
struct Record {
    uint32_t nameLength;
    char name[nameLength]; //name of delta
    uint32_t unknown; //constant 18
    uint32_t unknown; //constant 6, may be number components in data1
    uint32_t size;
    uint32_t count;
    char data0[size]; //may be contain data distribution to mesh, usually large and small numbers alternate
    float data1[count * 6]; //main data, may be vec3 normals deltas of count and after vec3 vertex deltas of count
    float data2[4]; //may be bounding sphere xyzr
};
In my game for example, i have mesh with 587 points (with 1310 indices for triangle strip). All delta morph data contains this
Code:
unknown unknown size    count   name
18      6       54      107     Travis_Eyes_Open
18      6       102     320     Travis_Oat
18      6       84      270     Travis_Cage
18      6       91      293     Travis_Wet
18      6       92      200     Travis_Bump
18      6       88      248     Travis_Size
18      6       104     235     Travis_Frown
18      6       140     239     Travis_Smile
18      6       68      131     Travis_Blink
18      6       38      78      Travis_RaiseRightEye
18      6       94      253     Travis_Fave
18      6       46      68      Travis_RaiseLeftEye
Example data0
Code:
Travis_Eyes_Open
7F 0A 93 01 82 01 84 04 81 18 86 24 83 11 84 01 87 06 81 17 83 02 81 08 82 43 81 03 93 01 82 01 83 02 81 04 81 0F 86 23 82 10 84 01 87 04 81 10 83 01 82 07 82 2F
Travis_RaiseRightEye
7F 04 81 05 9C 03 81 01 81 01 83 11 87 24 83 11 84 01 8F 09 82 0B 83 01 83 02 81 04 82 43 81 1C 81 55 81 01 81 59
Travis_RaiseLeftEye
7F 04 81 1E 83 5D 81 01 81 17 82 0F 81 4E 81 03 82 01 8C 02 81 02 86 02 81 01 81 01 83 0F 85 23 82 10 84 01 8D 0F 83 01 82 02 81 04 82 2F
First number always large (not always 7F)

data2 very close (in values) to mesh bounding sphere

It remains to decrypt data0 and well done
Reply
Thanked by:


Messages In This Thread
RE: Renderware Delta Morph Mesh ripping and repacking - by loginmen - 12-12-2021, 04:12 AM

Forum Jump: