Users browsing this thread: 17 Guest(s)
NDS model + animation => COLLADA converter
#16
Nice job Inferry, thanks! This is great; it worked for all the models I tested it on Thumbs Up
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#17
Hi there,

I've been trying to convert a set of nsbmd from the game "To Love-Ru", but I keep getting this error upon converting any of the models:



Code:
thread 'main' panicked at 'no entry found for key', src\libcore\option.rs:794
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Not sure what I'm doing wrong? I can send a PM with a sample file if needed. It loads fine in the viewer so not right sure what might be going wrong.

Regards,
Tomix
Reply
Thanked by:
#18
No, that's definitely a bug on my end. I looked it over and I think this is probably because I forgot to handle the case where textures aren't found when I redid some texture stuff recently. I pushed a change to fix that. Download the new version and see it that works. If it doesn't,  could you paste the backtrace here for me? (On Windows, you just need to run set RUST_BACKTRACE=1 before you call apicula to get it.)
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#19
Looks like that fixed it. Thank you!
Reply
Thanked by:
#20
So i've been interested in ripping NDS models for a while, but i've never extracted them with bones before so this is really interesting to me! I extracted a model from The Legend of Zelda: Spirit Tracks, and the textures look messed up on the model. This issue does not appear when I use MKDS Course Modifier but the textures are mirrored, (to see what i mean look at the zip file). How do I fix this?

Apicula and MKDS Course Modifier Models: 
https://mega.nz/#!YYJ1HSAS!luX6yiA9KfWfw...MlO3kTm-vg 
Apicula Model: 
https://streamable.com/jz4p9
MKDS Course Modifier Model/How the model is supposed to look: 
https://i.imgur.com/b9tMdHz.png

EDIT: I just realized that it previews fine in the model viewer but I don't know how to make it look like that from blender
Reply
Thanked by:
#21
This is another issue with importing into Blender. Blender doesn't respect the wrap mode for textures in a COLLADA file. For example, the UVs for the eye on your model look like this (selected):

[Image: ZdbU51y.png]

The texture is supposed to be sampled in MIRROR mode, ie. the texture repeats in both directions and it's mirrored each time it repeats so that the eye is symmetric. But Blender ignores this setting. You can turn it on manually (it's under Images > Image Mapping in the Properties panel; toggle check boxes for Mirror X and Mirror Y) but also note that AFAICT this only affects the viewport in "Rendered" mode, not "Material" mode.

The reason MKDS works is that it "hard wraps" the image (see karada.png for what it looks like when mirrored in both directions) and then adjusts the texture coordinates to match. IIRC ConsoleTool does that too.
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#22
This tool is quite interesting, I kinda wish I could convert the .nsbca into something more akin to .smd.
The downside that I see in this is that there are various nsbmd files that do not use a texture, but ''Materials'', thus they get extracted as white, which can be seen in Brain Training, and 3D Twist & Match. I hope this issue can be looked upon later.
--SOME PROJECTS IN DEVELOPMENT--
  • Red Crown Archives: Dedicated to preserve Cing's legacy (Hotel Dusk, Another Code, Last Window, etc)

-I WON'T BE AROUND TOO MUCH ON FORUMS, SO PM ME IF NECESSARY-
.. / .... --- .--. . / - --- / ... . . / -.-- --- ..- .-. / -.. .-. . .- -- ... .-.-.- .-.-.- .-.-.- / .- -. -.. / -.-- --- ..- .-. / .-- .. ... .... . ... .-.-.- .-.-.- .-.-.- / .-- .... . -. / .-- . / ... .... .- .-.. .-.. / -- . . - / .- --. .- .. -.
Reply
Thanked by:
#23
Hi Adrot (: If you can post an nsbmd like that I can look at it. There are diffuse/specular fields in the nsbmd file that I don't currently use for anything

.smd can only have one animation and it doesn't support scalings so it doesn't look like a very good target. .iqe would probably be possible. What is it that makes .smd better for you?
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#24
Here are some models: https://drive.google.com/open?id=1Uf6qZk...Si2D_MP0l6
One from each game I gave as example. I tried switching the materials between the DAE and an OBJ made from MKDS Course Modifier, yet it doesn't save the Materials, in addition to the lighting/colours from the OBJ looking not that close to the console's.
[Image: YP0H7SP.png]
As for SMD, I suggested it because there are some tools that use it, in addition to it being useful for other Valve-related sotfware, like SFM/Garry's Mod.
--SOME PROJECTS IN DEVELOPMENT--
  • Red Crown Archives: Dedicated to preserve Cing's legacy (Hotel Dusk, Another Code, Last Window, etc)

-I WON'T BE AROUND TOO MUCH ON FORUMS, SO PM ME IF NECESSARY-
.. / .... --- .--. . / - --- / ... . . / -.-- --- ..- .-. / -.. .-. . .- -- ... .-.-.- .-.-.- .-.-.- / .- -. -.. / -.-- --- ..- .-. / .-- .. ... .... . ... .-.-.- .-.-.- .-.-.- / .-- .... . -. / .-- . / ... .... .- .-.. .-.. / -- . . - / .- --. .- .. -.
Reply
Thanked by:
#25
Thanks, I got something working. Here's how they will look in the viewer now

[Image: KtNgdVl.png]

In Blender it will be about the same as your image. How it looks depends a lot on the lighting though. The colors from your left image definitely are highly influenced by the warm light. I don't think lighting information is in the BMD (but I guess it could be, there are still unknown fields)

[Image: 69i17T4.jpg]
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by: Adrot
#26
Nice, it looks pretty good for now. And yeah, Blender does seem to have a quirk with the DAE, it's kinda confusing.
[Image: Vg2d5X6.png]
(DAE-left, OBJ-right)
I also tried to extract multiple .nsbmd from a folder, since somehow, apicula can't detect the files from another folder inside the DSiWare .nds, but it gave me an os error 5, regardless of location of folder.
Should also add that creating a folder for every nsbmd conversion is kinda too time consuming on a personal note, I kinda prefer having them in an already made folder instead of writing another / and some words, look at the folder, and them put them all together, since I already have to convert them one by one.
--SOME PROJECTS IN DEVELOPMENT--
  • Red Crown Archives: Dedicated to preserve Cing's legacy (Hotel Dusk, Another Code, Last Window, etc)

-I WON'T BE AROUND TOO MUCH ON FORUMS, SO PM ME IF NECESSARY-
.. / .... --- .--. . / - --- / ... . . / -.-- --- ..- .-. / -.. .-. . .- -- ... .-.-.- .-.-.- .-.-.- / .- -. -.. / -.-- --- ..- .-. / .-- .. ... .... . ... .-.-.- .-.-.- .-.-.- / .-- .... . -. / .-- . / ... .... .- .-.. .-.. / -- . . - / .- --. .- .. -.
Reply
Thanked by:
#27
I added a light to the viewer (specular reflections are ignored)

[Image: XCrMJT5.png]

Quote:I also tried to extract multiple .nsbmd from a folder, since somehow, apicula can't detect the files from another folder inside the DSiWare .nds, but it gave me an os error 5, regardless of location of folder.

Sorry, I couldn't understand what you meant here. What command did you run?

Quote:Should also add that creating a folder for every nsbmd conversion is kinda too time consuming on a personal note, I kinda prefer having them in an already made folder instead of writing another / and some words, look at the folder, and them put them all together, since I already have to convert them one by one.

See, umm, this issue. It's easy to write a script that will do whatever you want with the output files.
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#28
The extract command at first got confusing to me because it says that you can extract from either a ROM or archive. As such, I used the command on a folder that had a bunch of .nsbmd files, thinking it would extract them all into DAEs. Nevertheless, it failed.
https://prntscr.com/mqqa9y
The model looks nice, seeing it being close enough to the original. What viewer is this, if I may ask?
On another note, seeing that it's going pretty good so far, I'll also add this tool to my small DSiWare ripping tutorial.
--SOME PROJECTS IN DEVELOPMENT--
  • Red Crown Archives: Dedicated to preserve Cing's legacy (Hotel Dusk, Another Code, Last Window, etc)

-I WON'T BE AROUND TOO MUCH ON FORUMS, SO PM ME IF NECESSARY-
.. / .... --- .--. . / - --- / ... . . / -.-- --- ..- .-. / -.. .-. . .- -- ... .-.-.- .-.-.- .-.-.- / .- -. -.. / -.-- --- ..- .-. / .-- .. ... .... . ... .-.-.- .-.-.- .-.-.- / .-- .... . -. / .-- . / ... .... .- .-.. .-.. / -- . . - / .- --. .- .. -.
Reply
Thanked by:
#29
Just the viewer for the view subcommand, apicula view ....

Yeah, I guess you figured this out, but the extract subcommand is for going ROM -> Nitro files and then convert is for Nitro files -> COLLADA files. If you already have a folder of .nsbmds you should be able to mass convert them with

Code:
apicula convert path/to/folder/with/nsbmds -o your_output_dir

This works pretty well... as long as they aren't animated  Tongue
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#30
So, I submitted the models as-is. I got rejected due to a good number of reasons I sis not see coming. I am not sure how to solve most of them since I am not knowledgeable of 3D programs much, but thought I should share regardless.

  • The model's bones do not work properly. The bones do not move the proper model vertices when manipulated, if at all. This is usually caused by faulty exporting. You may have to find another method to export the model if trying again does not work. Be sure to always test your exports before submitting them.

  • The model does not load or properly display the textures. Either the model is looking in the wrong place for the textures, or a problem with the UV coordinates is preventing the textures from being displayed correctly. In order for models to properly load textures on anybody's computer, materials must be set up using relative file paths. Some programs export models using absolute file paths, which look fine on your computer but break for everyone else. Both .DAE and .OBJ formats can easily be edited using any text editor, so texture paths can quickly be changed this way. (.OBJ models have their texture paths stored in .MTL files, so edit these instead.) If the problem with the model itself, this is usually caused by models having more than one UV map on the same mesh. Common model formats do not support multiple UV maps like this. For models like these, use the map that matches with the most important texture. While for some models, the alternate UV maps are useless, some models depend heavily on them. In cases like these, it is best to create duplicates of the mesh in question and give each copy a different UV map. This way, none of the UV data is lost in the export.

  • The model uses material colors instead of textures, which not everybody can use, so simple textures should be created for them. More importantly, the materials aren't assigned to the model.
--SOME PROJECTS IN DEVELOPMENT--
  • Red Crown Archives: Dedicated to preserve Cing's legacy (Hotel Dusk, Another Code, Last Window, etc)

-I WON'T BE AROUND TOO MUCH ON FORUMS, SO PM ME IF NECESSARY-
.. / .... --- .--. . / - --- / ... . . / -.-- --- ..- .-. / -.. .-. . .- -- ... .-.-.- .-.-.- .-.-.- / .- -. -.. / -.-- --- ..- .-. / .-- .. ... .... . ... .-.-.- .-.-.- .-.-.- / .-- .... . -. / .-- . / ... .... .- .-.. .-.. / -- . . - / .- --. .- .. -.
Reply
Thanked by:


Forum Jump: