Page 1 of 1

Need help to find pointers to textures.

Posted: Sat Dec 24, 2016 9:36 am
by eri619
Hi, i have managed to successfully export the mesh and also managed to inject edits back to this format. Could someone help me to find the offsets of different mesh which points to their corresponding textures? For example both the arm mesh point to the same texture,so if i want a tattoo texture on one arm and if i add a tattoo texture on the arm texture,the tattoo texture appears on both the arms. So i want to change the offset of one of the arm mesh so that it points to a different separate texture.

I'm attaching the model file below.
https://www.sendspace.com/file/rb6ca0


Image

Image

Image

Re: Need help to find pointers to textures.

Posted: Sat Dec 24, 2016 5:24 pm
by shakotay2
eri619 wrote:Could you please help me to find the offsets of different mesh which points to their corresponding textures?
Is using offsets the way how it works for this game?
Iirc multiple textures are assigned using vertex groups for example.

Re: Need help to find pointers to textures.

Posted: Tue Dec 27, 2016 3:49 am
by eri619
i think it uses offsets because different body parts have separate mesh for example arm,body and legs are all separate objects unlike in svr for example i think it uses vertex groups because vertices of different body parts are mixed together to form an object.

Re: Need help to find pointers to textures.

Posted: Tue Dec 27, 2016 2:16 pm
by eatrawmeat391
Here is the FML file structure:
- Offset 0x0E: Number of bones (2 bytes)
* Bone data starts from 0x14 with a 16 bytes string per bone name
- Offset 0x0A: Number of materials (2 bytes)
* Material data starts after the bone data,which is 0x14+number_of_bones*0x10.
Material data block size is not constant,you can tell where the next material comes when their name appears
- Offset 0x0C: Number of textures (2 bytes)
* Texture data starts after the material data,from the first valid string
Each texture names is 16 bytes long
* After the texture data there is an unknown section which seems to have some of the bones name at the beginning
Their block size is 0x44,but their total count is not known
* After that here comes the mesh data
* Each mesh's structure:
- Unknown bytes at the beginning (can be absent)
Some mesh has them,but some doesn't
- Unknown value 1 (1 byte)
- Unknown value 2 (2 bytes)
- Number of Vertex Block (2 bytes)
** Vertex Block has variable sizes depending on the mesh,the known sizes are 43, 49, 55,so far they are the working size
** Vertex Block Structure:
- Offset 0x00: Vertex X, Vertex Y, Vertex Z (3*4 bytes)
- Offset 0x1C: UV X, UV Y (2*4 bytes)
** After that there is the face data,its structure is:
- Face Count (2 bytes)
- Face Data, 2 bytes per face value
- 01 00 (2 bytes)
- Face Count (2 bytes)

Attached below is my 2.7 python scripts to deal with this kind of file if anyone is interested.You run this one from a commandline,not as a Blender script.

Re: Need help to find pointers to textures.

Posted: Wed Dec 28, 2016 6:06 am
by eri619
could someone help us find the value of the mesh which points to the corresponding texture?