Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

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

Featured Replies

  • Author
  • Localization

JJ314, posted Tue Dec 22, 2020 3:37 pm (61238)


I checked a hex and saw a header for BRRES and BRTEX, but didn't open with Brawlbox or any other Wii model tools, so I assume its a custom format with a wii header. Now I'm stuck.
  • Author
  • Localization

KL3W, posted Sat Jan 22, 2022 5:14 pm (69283)


Hey!

Other game (LEGO STAR WARS CASTAWAYS) but I also have BRRES files header (contained in BDAE files). How can I succeed in opening these files? Any script to help?

Thx
  • Author
  • Localization

DJ Normality, posted Sat Jan 22, 2022 6:02 pm (69285)


not sure about uv's here what i found
Image
  • Author
  • Localization

KL3W, posted Sat Jan 22, 2022 6:05 pm (69286)


DJ Normality wrote:
not sure about uv's here what i found
Image


Definitely this!!!!! Awesome!!! FINALLY A RESULT!!! What's wrong with the UV?? I have the textures for this model btw

How did you do this btw?
  • Author
  • Localization

KL3W, posted Thu Feb 03, 2022 5:29 pm (69599)


DJ Normality wrote:
not sure about uv's here what i found
Image


So after some research I found a better file for the helmet I want to extract
And I managed to get vertices and faces (see the screenshot shared), but I don't understand where to find UV
Can you help me? The template I made with all data for the files are in the zip file

Thx a lot, I think I am reaching my goals, just a little step...
  • Author
  • Localization

coredevel, posted Thu Feb 03, 2022 6:49 pm (69601)


You can sometimes figure out UVs by looking at other files, so the more files you can share, the better chances you'll have to figure it out.
Even if the file is boring and uninteresting to you, it may contain interesting data in the way that its stored.
  • Author
  • Localization

KL3W, posted Fri Feb 04, 2022 9:15 am (69614)


coredevel wrote:
You can sometimes figure out UVs by looking at other files, so the more files you can share, the better chances you'll have to figure it out.
Even if the file is boring and uninteresting to you, it may contain interesting data in the way that its stored.


I added two other models from the game, maybe it can help you!!

Thx
  • Author
  • Localization

coredevel, posted Fri Feb 04, 2022 9:07 pm (69643)


Does the game have any simple objects, that are box-shaped or plane-shaped? Boxes, crates, signs, plates, floors, walls? What you're looking for is an object that uses UVs of 1 or -1, which usually map over the entire texture. Looking for UVs of 1 or -1 makes things a lot easier, even when they're compressed as shorts.
  • Author
  • Localization

coredevel, posted Sat Feb 05, 2022 1:10 am (69647)


Helmets_StormTrooper_A:
For what I can tell, vertex positions are stored as HALF-FLOATs, and UVs seem to be stored as regular FLOATs.

vertex_count: 1559
vertex_offset: 4152

But, there are other components for this vertex, so it's hard to tell where the UVs start and end.

Here are some starting offsets of the other components, which are all floats:

[0] 4152 (vertices, half-floats) (not interleaved)
[1] 16624 (??) (interleaved)
[2] 16660 (??) (interleaved)
[3] 16636 (??) (interleaved)
[4] 16648 (??) (interleaved)

These other components are inter-leaved (including the UVs), so I think that's making it difficult to follow.
They can be vertex normals, tangents, binormals, extra uvsets, or something else.

This entire data section needs to be dumped and examined, float-by-float, so if you can find the smallest files,
it would make everything easier, as there would be less data to examine.
  • Author
  • Localization

KL3W, posted Sat Feb 05, 2022 10:57 am (69651)


coredevel wrote:
Helmets_StormTrooper_A:
For what I can tell, vertex positions are stored as HALF-FLOATs, and UVs seem to be stored as regular FLOATs.

vertex_count: 1559
vertex_offset: 4152

But, there are other components for this vertex, so it's hard to tell where the UVs start and end.

Here are some starting offsets of the other components, which are all floats:

[0] 4152 (vertices, half-floats) (not interleaved)
[1] 16624 (??) (interleaved)
[2] 16660 (??) (interleaved)
[3] 16636 (??) (interleaved)
[4] 16648 (??) (interleaved)

These other components are inter-leaved (including the UVs), so I think that's making it difficult to follow.
They can be vertex normals, tangents, binormals, extra uvsets, or something else.

This entire data section needs to be dumped and examined, float-by-float, so if you can find the smallest files,
it would make everything easier, as there would be less data to examine.


Sorry I didn't understand all you said, maybe you could send the TMR file so I can see what you mean in Model Researcher in your settings? Did you manage to get UV for Stromtrooper then??

Well I will send here two more files, very basic elements: 2x2 and 2x4 lego bricks. You will find the TMR file with Vertices and Faces in the zip file for each brick. Hope it helps! THX SO MUCH FOR HELPING ME
  • Author
  • Localization

coredevel, posted Sat Feb 05, 2022 10:18 pm (69683)


These bricks files use a different vertex format than the helmets. .bdae files can have vertex formats with a varying number of components. Both these files have only two components, position and normals. No UVs. All components are XYZ floats.

Brick_2x2:
vertex_offset: 3672
normal_offset: 14928

Brick_2x4:
vertex_offset: 3672
normal_offset: 26760

No UVs, which means they probably don't have any texture maps.

KL3W wrote:
Did you manage to get UV for Stromtrooper then??


Yes and no. The helmet files have 5 components in their vertex format, so they are much more complex than these bricks.
I didn't dump the section, but it needs to be examined further.
  • Author
  • Localization

KL3W, posted Sat Feb 05, 2022 10:31 pm (69684)


coredevel wrote:

No UVs, which means they probably don't have any texture maps.

KL3W wrote:
Did you manage to get UV for Stromtrooper then??


Yes and no. The helmet files have 5 components in their vertex format, so they are much more complex than these bricks.
I didn't dump the section, but it needs to be examined further.


I opened a specific topic for this (viewtopic.php?f=9&t=16278) and someone may have found a way. He sent this:
v 0x0e80 1219 0 0 Float XYZ
f 0xa700 1282 0 0 Short Triangles
vt 0x47b0 1219 12 0 Float UV
vn 0x47a4 1219 8 0 Float XYZ


It works for the stromtrooper file. Is there a technique for the others files I sent?

coredevel wrote:
These bricks files use a different vertex format than the helmets. .bdae files can have vertex formats with a varying number of components. Both these files have only two components, position and normals. No UVs. All components are XYZ floats.

Sorry about that, my bad. I forgot things were different with basic bricks. But helmets are shaped the same way, I guess - no basic square.
  • Author
  • Localization

coredevel, posted Sun Feb 06, 2022 1:17 am (69687)


Ok, I gave it another shot, and I think I got it this time:

Helmets_StormTrooper_A:

vertex_count: 1559

vertex_offset: 4152 (XYZ HALF-FLOAT)
normal_offset: 16624 (XYZ FLOAT)
tangent_offset: 16636 (XYZ FLOAT)
binormal_offset: 16648 (XYZ FLOAT)
uv_offset: 16660 (UV HALF-FLOAT)

UVs are stored as HALF-FLOATs, but they're not listed sequentially. There is an offset of 40 bytes between each UV pair.
Start at 16660, and advance 40 bytes to the next UV, etc...
  • Author
  • Localization

KL3W, posted Sun Feb 06, 2022 9:45 am (69688)


coredevel wrote:

Helmets_StormTrooper_A:

vertex_count: 1559
vertex_offset: 4152 (XYZ HALF-FLOAT)
uv_offset: 16660 (UV HALF-FLOAT)

UVs are stored as HALF-FLOATs, but they're not listed sequentially. There is an offset of 40 bytes between each UV pair.
Start at 16660, and advance 40 bytes to the next UV, etc...


Thanks again for your time on this. Btw I'm not really interested in this model anymore since there is a more clean version I sent earlier (Helmets_StormTrooper_CLEAN.zip). But for the file you've worked on ('Helmets_StormTrooper_A') could share the screenshot of what the parameters of UV look like? Or could you send the TMR file so I can see for myself in Model Researcher?
  • Author
  • Localization

coredevel, posted Sun Feb 06, 2022 12:50 pm (69691)


Well, I used a hex editor. Model Reasearcher has two fields, Padding and Pad Inter. Put 40 in Padding field. If that doesn't work, remove it, and put 40 in Pad Inter.
UV offset: 16660 (0x4114)
  • Author
  • Localization

KL3W, posted Sun Feb 06, 2022 3:13 pm (69694)


coredevel wrote:
Well, I used a hex editor. Model Reasearcher has two fields, Padding and Pad Inter. Put 40 in Padding field. If that doesn't work, remove it, and put 40 in Pad Inter.
UV offset: 16660 (0x4114)


Sorry I tried what you said but I end up with something that makes no sense (for Padding & Pad Inter). Do you come up with something working with the texture I sent???
  • Author
  • Localization

coredevel, posted Sun Feb 06, 2022 9:18 pm (69703)


Well, I tried out Model Researcher for first time, but I couldn't even get the mesh to show. I think maybe the free version is buggy. Anyway, this is what I got:

vertex_count: 1559
trig_count: 1282

vertex_offset: 4152 (XYZ HALF-FLOAT)
uv_offset: 16660 (UV HALF-FLOAT)

  • Author
  • Localization

KL3W, posted Sun Feb 06, 2022 9:30 pm (69704)


coredevel wrote:
Well, I tried out Model Researcher for first time, but I couldn't even get the mesh to show. I think maybe the free version is buggy. Anyway, this is what I got:

vertex_count: 1559
trig_count: 1282

vertex_offset: 4152 (XYZ HALF-FLOAT)
uv_offset: 16660 (UV HALF-FLOAT)

uvmap.png


Thanks again for your help! How can I get the UV map without Model Researcher like you did?
Btw as I mentioned earlier, someone in another topic I opened (https://zenhax.com/viewtopic.php?p=69680#p69680) succeeded to get a UV map on another model, do you think you could check that out to understand how he did and try to find the uv maps for the multiple files I sent?

Thank you so much
  • Author
  • Localization

coredevel, posted Mon Feb 07, 2022 1:37 am (69706)


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.

  • Author
  • Localization

KL3W, posted Mon Feb 07, 2022 4:32 am (69710)


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?
  • Author
  • Localization

coredevel, posted Mon Feb 07, 2022 9:03 pm (69735)


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.
  • Author
  • Localization

KL3W, posted Mon Feb 07, 2022 9:09 pm (69736)


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?
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.