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

Native Animation Decompression + NSBVA/NSBMA Support? #31

Open
Schollidazed opened this issue Dec 11, 2020 · 9 comments
Open

Native Animation Decompression + NSBVA/NSBMA Support? #31

Schollidazed opened this issue Dec 11, 2020 · 9 comments

Comments

@Schollidazed
Copy link

Schollidazed commented Dec 11, 2020

In Sonic Rush, some of the different animations are compressed into one NSBCA file. I use a daesplitter python script found in this VGResource thread. Will there be native support for separating these animations?

On almost the same topic, will it be possible to export NSBVA and NSBMA files sometime in the future? Sonic rush uses a ton of it, and for some cutscenes, they're compressed like joint animations. I'm pretty sure that MKDSCM has support for these file formats that you can look into.

@Schollidazed Schollidazed changed the title Animation Decompression + NSBVA Support? Native Animation Decompression + NSBVA Support? Dec 11, 2020
@Schollidazed Schollidazed changed the title Native Animation Decompression + NSBVA Support? Native Animation Decompression + NSBVA/NSBMA Support? Dec 12, 2020
@scurest
Copy link
Owner

scurest commented Dec 12, 2020

Yeah, the .dae splitter is mentioned on the wiki too. I'm not planning to have apicula do that .dae splitting itself if that's what you mean.

I don't know anything about NSBVA/NSBMA. If you have docs about them that would be helpful. Whether it's possible to export them depends on what they are and if .dae/.gltf supports whatever they are.

@Schollidazed
Copy link
Author

Schollidazed commented Dec 12, 2020

Yeah, dae and gltf might not support NSBVA or NSBMA natively, and I've looked everywhere, and there's no documentation on them like NSBMD has been.

I'm not that experienced with reverse engineering yet, I'm still learning. The best I can give is some ideas on how they might work from what I know from ripping models, and some ways that apicula could support it.

NSBVA:
It's linked to the model file, and it changes the visibility of the mesh, hence Nitro Visual Animation. It operates on a binary sort of style, no half visibility as far as I know. There are 2 types of mesh that it could affect, either vertices or faces, I'm not sure, but it's most likely verticies.
Psuedocode-ish:
Each keyframe, Lists each vertex(or face), gives it a value of either 0/1
if vertex == 0, Not Visible
if vertex == 1, Visible
How Apicula could support it:
Maybe it could detect changes with the keyframes, and export separate models for each of the keyframes on which they change, and list them as well.

NSBMA:
It's linked to the material file, and changes the color value of the material. It most likely operates on RGB Values, and acts similar to adding a color value to a material in blender (EDIT: There might be an alpha value that also controls visibility. I'll have to look into that). From what I know, some models that require it are appear blank in MKDSCM until it's applied. So... maybe the material is set as the NSBMA File ?
Psuedocode-ish:
Each keyframe holds a RGB Value (we'll call it VariableRGB).
NewMaterial = ImageTexture + VariableRGB
How Apicula could support it:
Much like the last one, maybe exporting the pngs with the keyframes needed could do the trick, along with printing the keyframes at which they change. If this doesn't work, then maybe printing the RGB Values that change, and when they change could work.

So yeah, I hope I could help out with this. If you need anything else for me to figure out/research, just let me know.

@red031000
Copy link

+1
pokemon diamond/pearl/platinum has both NSBVA and NSBMA files, and it'd be useful to have one tool that can open all the types rather than having to rely on a mixture of MKDSCM and apicula, since MKDSCM can't play NSBTA files at all, but can play both NSBVA and NSBMA, so as of right now I am not aware of any tool on the internet that can play a full DS animation (given that it uses all possible files) apart from an emulator

@scurest
Copy link
Owner

scurest commented Mar 22, 2021

Does someone have a .nsbmd and .nsbva they know go together?

@Schollidazed
Copy link
Author

Yes! Sonic Rush/Rush Adventure has a ton of those.
Here's a set for the player character(s) in Sonic Rush
(There are separate animations compacted into the NSBVA, similar to a NSBCA.)
Player.zip

@SuperGameCube
Copy link

SuperGameCube commented Mar 26, 2021

Yeah, the .dae splitter is mentioned on the wiki too. I'm not planning to have apicula do that .dae splitting itself if that's what you mean.

I don't know anything about NSBVA/NSBMA. If you have docs about them that would be helpful. Whether it's possible to export them depends on what they are and if .dae/.gltf supports whatever they are.

NSBVA is Nitro System Binary Visibility Animation, and NSBMA is Nitro System Binary Material Animation for the record.
NSBMA is used to change the color of the Goomboss character model in the Mission Mode of MKDS when he gets angrier, as an example of it's use. Personally haven't seen Visbility Animation in use anywhere yet, though.

@scurest
Copy link
Owner

scurest commented Mar 26, 2021

Yeah, NSBMA also changes the color of that core thing in the robot in the gif in the Readme. It's setup like the NSBTA animations, where it looks like there are five things it can animate, but I'm not sure what they are yet. I'd probably have to find one playing in an emulator and see what commands it sends when it binds the material.

@SuperGameCube
Copy link

NSBMA animates various material settings, as it's name implies.
I use it to animate the lightning strikes in GCN Bowser Castle for my MKDS ROM Hack.
it can animate diffuse, alpha, ect.

@scurest
Copy link
Owner

scurest commented Mar 27, 2021

If you can make NSBMAs, can you make me one that animates alpha 0 to 1, another that animates diffuse red to blue, etc?

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

4 participants