Skip to content
New issue

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

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

Already on GitHub? # to your account

Wrong texture applied in the viewer or when converted #39

Open
SameplayerDE opened this issue Nov 23, 2021 · 5 comments
Open

Wrong texture applied in the viewer or when converted #39

SameplayerDE opened this issue Nov 23, 2021 · 5 comments

Comments

@SameplayerDE
Copy link

I dont know if this is by design or me not doing it correctly but it seems like palettes are not used when viewing the model in the viewer or when converted

@scurest
Copy link
Owner

scurest commented Nov 23, 2021

I don't know what you mean. Please attach the file you're trying.

@SameplayerDE
Copy link
Author

Im am trying a nsbmd extracted with apicula from pokemon platinum.
In the txt file you can see the info output of all nsbxx files.
The nsbmd I tried is called map01_08c.

There is a material that uses a texture, called ngrass.
This material has a palette but in the viewer the palette is not applied to the texture.
I am not sure if apicula applies palettes or not to the textures that use palettes.

log_all.txt

@scurest
Copy link
Owner

scurest commented Nov 26, 2021

I mean the .nsbmd, and also the relevant .nsbtx.

@SameplayerDE
Copy link
Author

Output.zip

@scurest
Copy link
Owner

scurest commented Nov 26, 2021

It's using the wrong texture. Here's what happens.

The map01_08c.nsbmd file has a material with a texture named ngrass and a palette named grass. Since the .nsbmd file does not contain any textures, it looks for them in a separate .nsbtx file.

Both a9_criff.nsbtx and allpeak.001.nsbtx have textures named ngrass.

ngrass

apicula just picks the first one in its internal list, which happens to be the one from a9_criff.nsbtx (that's what it means when info says it "matched texture, but tentatively"; there were other candidates it could have used). But the correct texture looks like the one from allpeak.001.nsbtx.

So you can make it work by passing just the .nsbmd and the .nsbtx it should use (and nothing else).

apicula v map01_08c.nsbmd allpeak.001.nsbtx

I think apicula could figure out it should use allpeak.001.nsbtx on its own in this case though, since allpeak.001.nsbtx can supply textures for all materials in the .nsbmd, but a9_criff.nsbtx can't. I'll leave this issue open for a future enhancement.

@scurest scurest changed the title palettes are not applied in the viewer or when converted Wrong texture applied in the viewer or when converted Nov 27, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants