TV Show King 2 (Gameloft, Wii) .bdae .tga

Skeletons, animations, shaders, texturing, converting, fixing and anything else related to read game models
coredevel
Posts: 75
Joined: Tue May 30, 2017 1:10 am

Re: TV Show King 2 (Gameloft, Wii) .bdae .tga

Post by coredevel »

Alright, I gave Model Reasearcher another shot. This time, I copied the trig indices over into the UV indices,
since I can't assume MR is using the trig indices for UVs by default. Then I go to "Hex View" to see how MR is padding
the UVs. The correct padding should be 40, but MR is doing something weird, and is calculating the next padding from the
"end" of the UV data, and not the "start" of the UV data. So, subtract 4 bytes to get a padding of 36. And I finally got the uvmap.

Helmets_KyloRen:
v 0x1010 694 2 0 Half-Float XYZ
f 0x9258 616 0 0 Short Triangles
vt 0x25e4 694 36 0 Half-Float UV
fvt 0x9258 616 0 0 Short Triangles

So, if you want fix my last example, enter a padding of 36, and copy over the trig indices to the UV indices.

uvmap.PNG
KL3W
Posts: 41
Joined: Sun Jan 02, 2022 1:19 pm

Re: TV Show King 2 (Gameloft, Wii) .bdae .tga

Post by KL3W »

coredevel wrote:Alright, I gave Model Reasearcher another shot. This time, I copied the trig indices over into the UV indices,
since I can't assume MR is using the trig indices for UVs by default. Then I go to "Hex View" to see how MR is padding
the UVs. The correct padding should be 40, but MR is doing something weird, and is calculating the next padding from the
"end" of the UV data, and not the "start" of the UV data. So, subtract 4 bytes to get a padding of 36. And I finally got the uvmap.

Helmets_KyloRen:
v 0x1010 694 2 0 Half-Float XYZ
f 0x9258 616 0 0 Short Triangles
vt 0x25e4 694 36 0 Half-Float UV
fvt 0x9258 616 0 0 Short Triangles

So, if you want fix my last example, enter a padding of 36, and copy over the trig indices to the UV indices.

uvmap.PNG

Okay this time I could get the UV correct! Thank you for that! It also worked on the two other models I sent! Thank you so much! One question still, how do you set the UV count and the padding?? I guess the UV count depends on the vertices count, but how do I know what padding to use for UV?
coredevel
Posts: 75
Joined: Tue May 30, 2017 1:10 am

Re: TV Show King 2 (Gameloft, Wii) .bdae .tga

Post by coredevel »

UV count is always the same as vertex count.

How to figure out padding? That's a hex editor skill. You'll have to learn how to use a hex editor. Learn how to recognize floats and patterns in a hex listing. Some people use basic hex editors, or some use advanced ones like Sweetscape's 010 Editor, that can understand scripting.
KL3W
Posts: 41
Joined: Sun Jan 02, 2022 1:19 pm

Re: TV Show King 2 (Gameloft, Wii) .bdae .tga

Post by KL3W »

coredevel wrote:UV count is always the same as vertex count.

How to figure out padding? That's a hex editor skill. You'll have to learn how to use a hex editor. Learn how to recognize floats and patterns in a hex listing. Some people use basic hex editors, or some use advanced ones like Sweetscape's 010 Editor, that can understand scripting.

I still have a lot to learn... Thx again for your help!
Just for the models you worked on for me, was there something noticeable that made you choose some padding over another? Maybe some similarities between the lines?
coredevel
Posts: 75
Joined: Tue May 30, 2017 1:10 am

Re: TV Show King 2 (Gameloft, Wii) .bdae .tga

Post by coredevel »

If you're willing to use a hex editor, some have a feature to highlight blocks of bytes by color. So, you can hightlight all the vertices, normals, tangents, binormals, and what's leftover, are usually the UVs. Since they all have the same vertex count, and you know that 3 floats is 12-bytes, you can easily calculate the size of each block. Figuring out a format is just a process of elimination.
KL3W
Posts: 41
Joined: Sun Jan 02, 2022 1:19 pm

Re: TV Show King 2 (Gameloft, Wii) .bdae .tga

Post by KL3W »

coredevel wrote:If you're willing to use a hex editor, some have a feature to highlight blocks of bytes by color. So, you can hightlight all the vertices, normals, tangents, binormals, and what's leftover, are usually the UVs. Since they all have the same vertex count, and you know that 3 floats is 12-bytes, you can easily calculate the size of each block. Figuring out a format is just a process of elimination.

okay thanks for the advice!! I think btw I think there is a hex editor in Model Researcher! I will try to look at that! Thank you so much for your help.