Join also our Discord channel! Click here.

.SkeletalMesh

Post questions about game models here, or help out others!
Post Reply
andy97
beginner
Posts: 26
Joined: Sun Apr 28, 2019 1:15 pm
Has thanked: 5 times
Been thanked: 17 times

.SkeletalMesh

Post by andy97 » Mon Oct 28, 2019 12:52 pm

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

User avatar
Pepsee
veteran
Posts: 147
Joined: Fri Mar 04, 2016 9:26 pm
Has thanked: 20 times
Been thanked: 4 times

Re: .SkeletalMesh UE3

Post by Pepsee » Tue Oct 29, 2019 10:17 pm

What game is it from?

User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 670
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 24 times
Been thanked: 592 times

Re: .SkeletalMesh UE3

Post by Bigchillghost » Wed Oct 30, 2019 7:53 am

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
Image
You do not have the required permissions to view the files attached to this post.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

andy97
beginner
Posts: 26
Joined: Sun Apr 28, 2019 1:15 pm
Has thanked: 5 times
Been thanked: 17 times

Re: .SkeletalMesh UE3

Post by andy97 » Wed Oct 30, 2019 2:52 pm

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

Sample: Here

User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 670
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 24 times
Been thanked: 592 times

Re: .SkeletalMesh UE3

Post by Bigchillghost » Wed Oct 30, 2019 5:06 pm

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.

Structure of your sample:

Code: Select all

... 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.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

andy97
beginner
Posts: 26
Joined: Sun Apr 28, 2019 1:15 pm
Has thanked: 5 times
Been thanked: 17 times

Re: .SkeletalMesh UE3

Post by andy97 » Wed Oct 30, 2019 8:41 pm

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

andy97
beginner
Posts: 26
Joined: Sun Apr 28, 2019 1:15 pm
Has thanked: 5 times
Been thanked: 17 times

Re: .SkeletalMesh UE3

Post by andy97 » Sat Dec 07, 2019 6:57 am

Edited...

Post Reply