Users browsing this thread: 1 Guest(s)
NDS model + animation => COLLADA converter
#31
What model?
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#32
Hello. I've been trying to export some models and animations from Mario Hoops 3-on-3. When I view the NDS file in Console Tool I get this:

[Image: axutgLR.png]

So I can see some compressed bmd and bca files which I assumed were the models and skeletal animations. And note that the "c00" folder goes up to "c21" which makes sense as there are 21 playable characters in the game. But anyway as a result I tried to extract them using Apicula but I ended up with this (ignore the red)...

[Image: VJGluCA.png]

To make sure I was doing things correctly I tried another game and it worked perfectly fine. And after reading this page it says that Apicula can decompress LZ77 files. Are they different from the above LZ7?

Hopefully someone can help, ty!
Reply
Thanked by:
#33
Is there anyway you could change this to export with z axis up? or add the ability to choose? also perhaps a convert to smd option as there are smd importers for 3dsmax and blender and those can support texture animations. thank you so much for this tool.
Reply
Thanked by:
#34
It'd be easier to change coordinate conventions as a separate step outside of apicula I think.

How do materials work in .smd? The Blender addon only imports/exports material names, not any textures or stuff.
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#35
I got rejected on the Kawashima model I sent to you, along with the rest of the models of that game
--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:
#36
(05-20-2017, 10:32 PM)Inferry Wrote: So the FBX does indeed break the armature, and sadly due to the way blender handles animations I couldn't find a way to pass them to the armature of the *.dae (the nice one) without screwing the animation itself.

So I ended writing and learning a phyton script that separates each *.dae file into several ones, each containing one of the animations in the original file, I only have to import each file individually and merge the animations into one single library, some require editing due to the extra frame they come with but that's not my fault, that's how they were, to begin with.

Anyway, here's the code for anyone interested, copy and paste it into a text file and change the extension to ".py", you'll need python2.7 for it to work

Code:
import sys
import xml.etree.ElementTree as ET
import copy

ET.register_namespace('', "http://www.collada.org/2005/11/COLLADASchema")

my_file = sys.argv[1]

tree = ET.parse(my_file)
root = tree.getroot()

ns = {'d': 'http://www.collada.org/2005/11/COLLADASchema'}

library_animation_clips = root.find('d:library_animation_clips', ns)
library_animation_clips_copy = copy.deepcopy(library_animation_clips)
library_animations = root.find('d:library_animations', ns)
library_animations_copy = copy.deepcopy(library_animations)

def libraryClear():
    for child in library_animation_clips.findall('d:animation_clip', ns):
        for child in library_animation_clips.findall('d:animation_clip', ns):
            library_animation_clips.remove(child)
        for child in library_animations.findall('d:animation', ns):
            library_animations.remove(child)
    return

libraryClear()

i = 0

for child in library_animation_clips_copy:
    
    library_animation_clips.append(child)
    
    att_id    = child.get('id')
    att_name  = child.get('name')
    file_name = att_name + ".dae"
    
    for joint in child:
        library_animations.append(library_animations_copy[i])
        i = i + 1
    
    tree.write(file_name, encoding="utf-8", xml_declaration=True)# <?xml version="1.0" encoding="utf-8"?>
    libraryClear()

I only tested it with three files, is not optimized and there is probably a better way to do this, but the thing works and is enough for me (although if you think it can be improved let me now to change what's needed).

Use the command line and pass the file as an argument

daesplitter.py <file>

or make a bat with this ("c:\Python27\python.exe" daesplitter.py %1), and drag and drop the file onto the bat.

And I was unable to make a test on Maya or 3Dmax due to the fact that 64 exclusive nowadays.
Hi! I've got my dae file and made my script but I can't seem to get it working. Could you maybe provide a step by step tutorial? I'd appricate it very much!
Reply
Thanked by:
#37
By the way, I haven't been working on apicula lately, but I did make a different way to rip DS models: MelonRipper. This works more like Ninja Ripper or Lemmy's N64 Plugin, where you play in an emulator (melonDS) until the model is on screen, then press a key to dump the whole scene drawn that frame to a file. There's an accompanying Blender addon that imports the dump file.

This has a different set of tradeoffs than converting .nsbmds. You only get a static scene this way, but it works for anything you can find in-game, even stuff that doesn't use .nsbmd or is hard to convert.

Example with Rayman 2:

[Image: S8DxxUA.png]

The instructions are all in the Github link. You have to compile a patched melonDS but after that it's pretty easy to use. Wink
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by: Raccoon Sam, Zeldaboy14
#38
(03-19-2021, 04:28 AM)scurest Wrote: By the way, I haven't been working on apicula lately, but I did make a different way to rip DS models: MelonRipper. This works more like Ninja Ripper or Lemmy's N64 Plugin, where you play in an emulator (melonDS) until the model is on screen, then press a key to dump the whole scene drawn that frame to a file. There's an accompanying Blender addon that imports the dump file.

This has a different set of tradeoffs than converting .nsbmds. You only get a static scene this way, but it works for anything you can find in-game, even stuff that doesn't use .nsbmd or is hard to convert.

Example with Rayman 2:

[Image: S8DxxUA.png]

The instructions are all in the Github link. You have to compile a patched melonDS but after that it's pretty easy to use. Wink
Say, this tool errors out if you do a dump of spirit tracks. Like, blender says "python int too large to conver to C int"
[Image: cORuhSS.png]
Reply
Thanked by:
#39
Can you give me the full backtrace?
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#40
[Image: eHqZzh5.png]
This is the error.
[Image: cORuhSS.png]
Reply
Thanked by: scurest
#41
Thanks for finding that! I pushed a fix. If you reinstall the addon it should work now.
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by: Zeldaboy14
#42
(04-11-2021, 09:39 PM)scurest Wrote: Thanks for finding that! I pushed a fix. If you reinstall the addon it should work now.
 That works! But a few issues:
[Image: HyeLMon.png]
The Spirit train in the intro is shaded wrongly. IIRC, this was an issue that plauged older emulators, so your tool seems to reflect old issues.
It should be like this (Ignore zelda and link)
[Image: NoJCF29.png]
[Image: cORuhSS.png]
Reply
Thanked by: scurest
#43
Okay, the train is using toon mode. I'll have to dump some more data from melonDS but I don't think it should be too hard to do...
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#44
Toon shading is working! Pokemon

[Image: 806rhmw.jpg]

You'll need to update both the melonDS branch and the Blender addon this time. This scene also had a texture bug that got fixed.
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#45
(04-12-2021, 02:42 AM)scurest Wrote: Toon shading is working! Pokemon

[Image: 806rhmw.jpg]

You'll need to update both the melonDS branch and the Blender addon this time. This scene also had a texture bug that got fixed.

Nice! Thanks for the quick fixing!

(04-12-2021, 04:34 AM)Zeldaboy14 Wrote:
(04-12-2021, 02:42 AM)scurest Wrote: Toon shading is working! Pokemon

[Image: 806rhmw.jpg]

You'll need to update both the melonDS branch and the Blender addon this time. This scene also had a texture bug that got fixed.

Nice! Thanks for the quick fixing!
Update: The option for dumping is not there in the new build
[Image: cORuhSS.png]
Reply
Thanked by:


Forum Jump: