+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  3d models in nintendo ds roms?
Pages: [1]
Author Topic: 3d models in nintendo ds roms?  (Read 1049 times)
yawnmoth
Guest
« on: January 21, 2007, 10:13:04 pm »

this wikipedia article suggests that ndstool can be used to extract 3d models of enemies from the new super mario brothers rom.  i've tried to do this and got a few odd files with *.nsbca and *.nsbmd extensions (among the other types), but i'm not sure what can be done with these files.  is there some app with which the 3d models can be viewed?

also, that wikipedia article suggests that the textures of the 3d models can be viewed.  how might i go about doing this?
dotproduct
Guest
« Reply #1 on: July 16, 2007, 07:04:32 pm »

Hello.

The nsbmd contain model/models set datas ( geometry <will talk about this later cause i got a problem wich made me register on this site>, textures, shapes, display lists with sbc (Structured Byte Code) wich can be replaced by a user sbc, etc. and their respective dictionaries wich use a 'Patricia' nodes tree). A same nsbmd can contain multiple models and is usually generated using g3dcvtr.exe with on one or multiple intermediate file(s) (.imd) <as parameters on the command line> which contain model description in xml langage when exporting a model with 3DS Max or Maya.

The nsbca contain animations datas ( joints animations <JntAnm>, visibility animations <VisAnm> and Textures animations < for the third one i may be wrong, just look for the signature in the data block header if you want to be sure>. The nsbca as well as other formats ( 5 including those 2) are all generated using g3dcvtr.exe on a bunch of intermediate files of the same extension.

My problem is: using the g3d lib i have been able to load models and their animations, create and play anim instances, get bones transformations using the record flag (tricky, you have to allocate memory in the expanded heap of th DS and set a flag each frame that tell the engine you want to get track of JntAnm results <the flag is reseted after each NNS_G3dDraw, immediate mode with G3_xxxx instructions will be for later....> then pass the memory location to the NNS_G3dRenderObject structure). But unlike a PC, consoles often need packed datas in a specific format that is more suited to their ability to process multiple datas with a single instruction. In other words if i thought i could get the geometry in a simple form, i am f....d. We still have the possibility to export collisions meshes with an exporter of our own but nonetheless if i could get an hint on how to get those f.... fixed point values in the nsbmd it could save my week. I then should not have a problem getting this in world space coordinates even for movable objects ( didnt say animated objects...unless we get a master submission for overclocked DS's ) since i already implemanted a renderware-like hierachy using the 3x3 and 4x3 matrices passed to the matrices stack of the rendering engine.

If someone know how the hell to get these damn tris and quads, or where on this site the method is available thanks in advance....I may even kiss you on the but (if no one is watching).
mit_mis
Guest
« Reply #2 on: July 17, 2007, 07:47:20 am »

Hi, here you can find an app to view nsbmd files. It's attached in the first post on the second page. You have to be registered to download it. Please post some screenshots from your tests.
dotproduct
Guest
« Reply #3 on: July 17, 2007, 06:00:31 pm »

I do not need any more to search for geometry, in fact display lists are the geometry combined with opcode and the only way to retrieve the geometry is to parse display listes wich is not trivial. But thanks for thoses who tried to help me.

PS: I forgot to mention that we work on a nintendo DS dev kit ( and the ensata emulator for those who do not have a dev kit ) using the
NitroSystem SDK (sources, libs, viewers, exporters and tools). Since these are confidential stuff I am affraid I cant post anything related to these.
However, concerning my problem, I use exported collisions meshes in a .imd until they add something after the 3.6 (they seem to be willing to provide an alternate method to display list parsing as refered to in one of the newsgroups) and it works just fine. And finally working with fixed point 16bits values is not the pain in the ass I imagined so everything is fine.
« Last Edit: July 18, 2007, 12:40:20 pm by dotproduct »
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC