MeltyTool icon indicating copy to clipboard operation
MeltyTool copied to clipboard

[Bug] SM64DS, SSBM need texture transforms baked when exporting to FBX

Open Pizzaboy7361 opened this issue 8 months ago • 1 comments

Describe the bug I'm wanting to use the Bowser model from Super Mario 64 DS in a project of mine, so I exported the models using the appropriate batch script and imported 'Bowser.fbx' into Blender (my version is 4.4.1). However, doing this seems to mess up the textures for some reason, and since I'm new to Blender I'm not entirely sure how to fix it. (I'm unsure if this is an issue with FinModelUtility specifically or just something I haven't done in Blender) Notably, I also tested the '.fbx' for King Boo just to make sure it was an issue with Bowser specifically, but the same result happens to both models.

To Reproduce Steps to reproduce the behavior:

  1. Click on 'rip_super_mario_64_ds.bat'.
  2. Go to the extracted model. (In my case this was 'out/super_mario_64_ds/data/data/enemy/koopa/koopa_model'.)
  3. Import 'koopa_model.fbx' into Blender 4.4.1.
  4. See messed up textures.

Screenshots Here is a screenshot of what Bowser and King Boo look like with these messed up textures.

Image

Additional context I did test the '.glb' versions of both the Bowser model and King Boo, which don't seem to have their textures messed up. This should work for the project I'm planning to use these models for, but if you could get the models to work as an '.fbx', that'd be great. Though probably not necessary, here are what the '.glb' models in comparison to the '.fbx'.

Image

Pizzaboy7361 avatar Apr 25 '25 02:04 Pizzaboy7361

Thanks for reporting this issue!

This is due to a quirk in SM64DS in the UVs--they're stored in a weird coordinate space by default, you have to divide by the size of the texture. I implemented this in my tool via texture transforms, which works for GLTF, but it turns out that FBX doesn't support texture transforms for some reason. I can get things mostly working for FBX by just dividing the UVs themselves by this size, but some models will definitely still look messed up in FBX because it doesn't support texture transforms.

There are other games that are also impacted by this issue, such as Super Smash Bros Melee which uses texture transforms like crazy. Ideally my tool would bake the transforms into the UVs when possible, I'll add this at some point soon hopefully.

In the meantime, hopefully GLTF works for your use-case!

MeltyPlayer avatar Apr 26 '25 21:04 MeltyPlayer