Jump to content

Uta no Prince-sama♪ LIVE EMOTION - .prefab files


Andree

Recommended Posts

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

Character model file progress. I've discovered that there is a header for the data containing vertices named "Positions".

Screenshot2024-06-12153158.thumb.png.6c88d926816ddd83602c6d2f917a3d66.png
 

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

6 hours ago, Durik256 said:

just hack fmt_prefab.py

Без имени-1.png

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

Screenshot2024-06-12214807.thumb.png.335318e40049fa94fac089c84ad79240.png
Screenshot2024-06-12214915.thumb.png.add96fbd46e249ca8ec6d4142f98045a.png

Sample file: face.zip

Link to comment
Share on other sites

  • Engineer
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)

  • Like 1
Link to comment
Share on other sites

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

Screenshot2024-06-17210528.png.d3d3504c90035595ce3f79cfecd4c0ee.png
Screenshot2024-06-17210123.png.a83e8072eaafd17991aed1ad2cc6e25b.png

Edited by Andree
Corrected the images
Link to comment
Share on other sites

Posted (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:

Screenshot2024-06-16061906.thumb.png.fdc8baa2c95975a27e599abba03d620f.png

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 by Andree
Link to comment
Share on other sites

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