Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SuperBMD doesn't export objects that have second UV Layer. #32

Open
Lilothestitch16 opened this issue Jan 19, 2022 · 9 comments
Open

SuperBMD doesn't export objects that have second UV Layer. #32

Lilothestitch16 opened this issue Jan 19, 2022 · 9 comments

Comments

@Lilothestitch16
Copy link

When I extract models from Super Mario Sunshine, it doesn't export the 2nd UV Layer. Can this be fixed?

First UV Layer
image

No Second UV Layer
image

@SuperHackio
Copy link

Can you send us the BMD?

@Lilothestitch16
Copy link
Author

map.zip

@SuperHackio
Copy link

Thanks, We'll see what we can do.

@SuperHackio
Copy link

Okay, please take a look here:

image

I believe that the "Second UV Map" that you're looking for, is actually this separate mesh (which gets layered with the other one)

Something like this:
image

The mesh that you had posted in your original post had shown that there was only one UV Map. That is actually correct.

This water mesh here has a total of 3 meshes (Blender 2.79, but should work in newer versions)
image

Trying to switch to the other UV Maps reveals that there is no texture assigned to the second UV Maps. The correct texture assignments are as follows:
image

@Lilothestitch16
Copy link
Author

Lilothestitch16 commented Jan 20, 2022

I imported it into 3ds Max and it didn't show the second UV Layer.

@SuperHackio
Copy link

Okay, after some further investigation, I have noticed that the library that SuperBMD uses for exporting doesn't properly support this. Thankfully, SuperBMD outputs the actual UV Coordinates, so all you need to do is assign the textures to the UV map manually. (I believe they're called Map Channels in 3DS max)

@Lilothestitch16
Copy link
Author

How does SuperBMD output the UV Coordinates?

@RenolY2
Copy link
Owner

RenolY2 commented Jan 25, 2022

If you want a technical answer, I believe it adds the UV coordinates to the assimp mesh here and the remaining part of writing the uv coords to the file is up to assimp:

for (int texCoordNum = 0; texCoordNum < 8; texCoordNum++)

The textures for the additional UV layers aren't assigned in the resulting .dae because of the complexity of BMD materials (I suppose somebody could make it so that instead of assigning the first texture it finds in a material it tries to check the tevorders/texcoordgens for the layer and texture used but that's complexity and additional points of failure) so atm it just uses the first texture of a material, if I remember correctly

I can also confirm the additional UV layers are visible in Blender 2.93. I don't have 3DS Max anymore so I don't know where in 3DS Max you can see the additional UV layers.

@Lilothestitch16
Copy link
Author

I have 3ds Max 2015 and I can confirm that it doesn't import the additional layers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants