Robert-N7 / abmatt

ANoob's Brres Material Tool for Mario Kart Wii
GNU General Public License v3.0
14 stars 3 forks source link

Models crashing on console, but not Dolphin #55

Closed Heath123 closed 3 years ago

Heath123 commented 3 years ago

I can upload a video if needed, I see a black screen and hear the intro music but then nothing else files.zip I've confirmed that this is caused by the model as using one from a normal track works

Heath123 commented 3 years ago

On http://wiki.tockdom.com/wiki/Common_Crash_Causes under BRRES it says:

Before replacing a material with BrawlBox, you should remove all its texture references (unnecessary if you are playing on Dolphin, but required on a real Wii).

I'm not really sure what that means in this context (I guess there shouldn't be materials that aren't being used?) but could that be why, as it's something that's only needed on the real Wii?

Robert-N7 commented 3 years ago

I'll have to look into the file, if it's because of a missing reference then a warning would show up when saving.

Heath123 commented 3 years ago
Converting /tmp/course.dae... 
    ... finished in 0.78 secs
Cube UV Channel 0 is not used by material.
Shader Material-material: Stage 0 no such layer
(FIXED): Remove stage
Shader Material-material: has no stages!
(FIXED): Set solid color (0, 0, 0, 0)
TEX0 smk 1024x1093 (CMPR) not a power of 2
Replaced tex0 smk
(FIXED): Resize to 1024x1024
  - create octree: rshift=16, n_bcube=32, cube_size=512..1048576, blow=400, max_tri=30, max_depth=10, fast=0
CREATE /home/heath/mk-plugin/test-track/ -> YAZ0.U8:/home/heath/mk-plugin/disc/DATA/files/Race/Course/beginner_course.szs

So it might be the "no stages" thing? I'll test without that material

Robert-N7 commented 3 years ago

It could be, but it uses a default color instead for the material (black) so I'm surprised if that causes the crash

Heath123 commented 3 years ago

It appears white for me in Dolphin for some reason

Heath123 commented 3 years ago

No, that wasn't it

Heath123 commented 3 years ago

Anything else I can do to help debug it?

Robert-N7 commented 3 years ago

Based on some tests, I found that black screens occurs when converting models, not only with the v0.9.3 but all previous versions as well. Curiously, the black screen doesn't happen when abmatt simply loads and saves a brres file. When looking through the model, nothing immediately appears to be out of order, still digging...

Robert-N7 commented 3 years ago

I believe I have found the issue, for some reason the data length of polygons must include the extra alignment padding on the Wii. I'll create a pull request once I've verified the fix.

Heath123 commented 3 years ago

Yay, thank you! Hopefully I can test this soon

Heath123 commented 3 years ago

IMG_20210428_170918810 It works now, thank you!