Andree Posted June 12 Share Posted June 12 Info This mobile game uses a new engine that is made with C++ and it uses its own version of the .prefab bundle file format that contains function commands that load the data into the game, this thread is focused specifically on the files used for the character models and animations in the game. Inside the character prefab files when viewed with a hex viewing program has text related to names of the objects for the model (ex: CharRoot) and followed up by text like these: genki::engine::*FunctionName* These are functions that are used for loading the data of the prefab file. Sample files: sample files.zip Function Names Character model (.prefab): ITransformr - Bone? IRenderer - Model and textures? Character Animation (.animation): These functions end with the label X/Y/Z (axis) and then Linker. ITransformEuler - Bone Rotation ITransformPosition - Bone Position. Link to comment Share on other sites More sharing options...
Andree Posted June 12 Author Share Posted June 12 Character model file progress. I've discovered that there is a header for the data containing vertices named "Positions". There's also header data in the Character model file for these: Normals - Normals? Triangles - Faces? SkinIndices - Skin Index? SkinWeights - Skin weights? Link to comment Share on other sites More sharing options...
Engineer shak-otay Posted June 12 Engineer Share Posted June 12 (edited) MDL_C0001_0007_body_prefab faces edit: seems the counts are 20685 (face indices) and 5676 vertices. Edited June 12 by shak-otay 1 Link to comment Share on other sites More sharing options...
Engineer Durik256 Posted June 13 Engineer Share Posted June 13 just hack fmt_prefab.py 1 Link to comment Share on other sites More sharing options...
Andree Posted June 13 Author Share Posted June 13 6 hours ago, Durik256 said: just hack fmt_prefab.py You got the uvs, but you're missing its ability to load multiple meshes in this prefab file with the images shown below here and the plugin looks to be WIP (no textures from Base_Tex, no SkinIndices, no SkinWeights, and no skeleton). Sample file: face.zip Link to comment Share on other sites More sharing options...
Engineer Durik256 Posted June 13 Engineer Share Posted June 13 2 hours ago, Andree said: You got the uvs, but you're missing its ability to load multiple meshes in this prefab file with the images shown below here and the plugin looks to be WIP (no textures from Base_Tex, no SkinIndices, no SkinWeights, and no skeleton). label "just hack" doesn't tell you anything? *it was not possible to guess that a file could contain several models, having only one file **you can research the format and make a full-fledged plugin with bones and weights, etc. i update, now load all mesh. (last update for this) 1 Link to comment Share on other sites More sharing options...
Andree Posted June 15 Author Share Posted June 15 (edited) On 6/13/2024 at 10:38 AM, Durik256 said: **you can research the format and make a full-fledged plugin with bones and weights, etc. I'm trying to figure out how to make bone loading code that does this. 1. Find this hex value header: 0x010101010000001900000067656E6B693A3A656E67696E653A3A495472616E73666F726D72098F782909487005000400 2. When this header is found then get the name of the bone from behind the header. 3. Go one step forward from the header and read one hex value as the bone's number. 4. Then move one step forward from the hex value of the bone's number to read the position, scale, and rotation of the bone. I really don't know how to reverse engineer skin weights and skin indices so... ...Here are the images of the skin weights and skin indices data from MDL_C0001_0007_body.prefab file viewed in a hex editor just for anyone else (except maybe you, durik256) who are familiar with skin weights and skin indices to take a work on that. Edited June 18 by Andree Corrected the images Link to comment Share on other sites More sharing options...
Andree Posted June 16 Author Share Posted June 16 (edited) With the texture format figured out by piken, most of the textures within the .prefab files uses a either a variant of ETC2 compression or just be uncompressed and they also have a different data offset location compared to files like ATL0001_2048x1291.texture. Image taken from a texture extracted from offset 5D459-15D4E8 in MDL_C0001_0007_body.prefab with PVRtex tool wrap raw data tool used: The texture from offset 71BF-17288 in MDL_C0001_0007_face.prefab is also similar to above but with a image size of 256x256 and the texture in offset 1F61E3-6FFD0F in MDL_C0001_0007_face.prefab is also similar to above but without the compression. And so I realized that hex value; 5E08B45E alongside with base_tex are commonly used together as the header for the textures used within the game. Edited June 16 by Andree Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now