lrre-foss / masher

Roblox mesh loader
MIT License
3 stars 0 forks source link

v2-v5 support #1

Open rjindael opened 6 months ago

rjindael commented 6 months ago

For V2, keep note of sizeof_Vertex in MeshHeader. If it is 40, set RGBA data to true (and always try to read RobloxMeshVertexRGBAs.) To calculate mesh tangetVector:

uint8_t tx, ty, tz, ts;
// load
int sign = ts == -127 ? -1 : 1;
float x = (x/127);
float y = (x/127);
float z = (x/127);
tangent = new TanVec3(x,y,z, signValue)

I have to figure out bones, envelopes, name tables for v4 and then FACS data for v5 (seems like simple structs; POD!). will write more documentation here