Important information: this site is currently scheduled to go offline indefinitely by December 1st 2023. If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe
Hi,
I've just finally extracted my desired upk (which is not supported by umodel due to its encryption). Now I'm working on .SkeletalMesh and .Texture2D. Is there any hints or tips on reading this format? I've checked umodel source code but I can't understand much about the process.
Sample: edited.
P/s: I saw that Bigchillghost had worked on this format before, hopefully you can give me some hints or tips on this format since I can't pm you.
Last edited by andy97 on Sat Dec 07, 2019 7:00 am, edited 3 times in total.
andy97 wrote: ↑Mon Oct 28, 2019 12:52 pm
I've just finally extracted my desired upk (which is not supported by umodel due to its encryption). Now I'm working on .SkeletalMesh and .Texture2D.
Apparently your sample is incomplete. The vertex count of the last LOD should be 0x6E6 while there're only 0x66C vertices in the file.
andy97 wrote: ↑Mon Oct 28, 2019 12:52 pm
Is there any hints or tips on reading this format? I've checked umodel source code but I can't understand much about the process.
I don't see it has any difference from the workflow of handling any other formats.
Weapon1_1.jpg
You do not have the required permissions to view the files attached to this post.
Bigchillghost wrote: ↑Wed Oct 30, 2019 7:53 am
I don't see it has any difference from the workflow of handling any other formats.
Sorry for not being clear, what I meant was the structure of this file. I haven't worked on bone + skeleton much while this format begins with bone/skeleton data (or dummy data). I'm attempting to write my own script but I'm struggling to skip those data blocks to reach the mesh blocks (verts, faces, counts, etc.). And I'm wondering if all .SkeletalMesh files have the same format.
Bigchillghost wrote: ↑Wed Oct 30, 2019 7:53 am
Apparently your sample is incomplete. The vertex count of the last LOD should be 0x6E6 while there're only 0x66C vertices in the file.
Thanks for the info, I didn't check it carefully. From this point, I assume that the strange block at the beginning of the file might be caused by misparsing.
Edited: I've checked it and fixed the error, the new sample is below
andy97 wrote: ↑Wed Oct 30, 2019 2:52 pm
I haven't worked on bone + skeleton much while this format begins with bone/skeleton data (or dummy data). I'm attempting to write my own script but I'm struggling to skip those data blocks to reach the mesh blocks (verts, faces, counts, etc.).
Nobody says you have to understand what's in these "bone/skeleton data". Just measure the distance between every FFFFFFFF marker and align them by that amount of columns then you'll have the solution figured.
... bytes ...
long boneCount
for i = 0 < boneCount
{
long BoneNameIdx // refers to the string pool
long skip[2]
float rotation[4]
float translation[3]
long skip[2]
long Marker // 0xFFFFFFFF
} // 0x34 bytes
long unknown
long LodCount
for i = 0 < LodCount
{
long meshGroupNum
long Null
for j = 0 < meshGroupNum
{
long startIdx
long faceCount
byte skip[5]
}
byte skip[5]
long totalIndexCount
word indices[totalIndexCount]
byte skip[0x36]
for j = 0 < meshGroupNum
{
word skip
long vertCount
byte skip[0xC]
}
long totalVertCount
long byteIdxCnt
byte byteIdx[byteIdxCnt]
byte skip[0x20]
float scaling[3]
float translation[3]
long vertStructSize // 0x20
long totalVertCount
for k = 0 < totalVertCount // where vertStructSize == 0x20
{
byte tangent[4]
byte normal[4]
byte boneId[4]
byte weight[4]
float position[3]
half texcoord[2]
}
byte skip[0x11]
}
andy97 wrote: ↑Wed Oct 30, 2019 2:52 pm
And I'm wondering if all .SkeletalMesh files have the same format.
As far as I can tell, this format is similar to the one I've dealt with before, particularly you can only locate to the mesh by locating to the bone entries first.
Bigchillghost wrote: ↑Wed Oct 30, 2019 5:06 pm
Nobody says you have to understand what's in these "bone/skeleton data". Just measure the distance between every FFFFFFFF marker and align them by that amount of columns then you'll have the solution figured.
I haven't thought about that. Thanks for this tip
Bigchillghost wrote: ↑Wed Oct 30, 2019 5:06 pm
Structure of your sample:
Thanks, I really appreciate your help. I should try to understand bone/skel stuff as well through this structure.