Users browsing this thread: 5 Guest(s)
Star Fox SNES Object Decoder
#1
Hello!
This is something I've been working on.
AllenSword had posted a something relating to it before here:
http://www.spriters-resource.com/communi...?tid=22231

And here it is! you can watch it in 720p by the way! Tongue


Anyways, a lot of features have been added. Here is what the description:
Quote:My intention was to read the 3D Model information directly from the SNES Star Fox ROM.
Using VL-Tone's documentation and with a lot of help from Stef, we managed to do it.
Now it includes light sourced, solid and animated colors as well as drawing line elements correctly.
Some models do not load correctly and not every tag and element has been programmed into de decoder but it does work. Things like textures have not been added.
I also added a wireframe view as well a vertex one.

[Image: Untitled_1.png]

Here is the thread:
http://www.romhacking.net/forum/index.ph...298.0.html

I'm sure they can be extracted onto files to be worked on other software.
Thanked by: Phaze, Pik
#2
since this exporter appears to work -- can you make it so it exports with the rigging in .DAE format? or is only .OBJ possible?
[Image: sweet-capn-cakes-deltarune.gif]
Thanked by:
#3
(02-20-2013, 12:56 PM)Mighty Jetters Wrote: since this exporter appears to work -- can you make it so it exports with the rigging in .DAE format? or is only .OBJ possible?

Maybe but I'm not an expert programmer and I initially just wanted to make it work.
The methods and everything to read the ROM is in the thread on the other forum, the objects part of the ROM is not encrypted or anything.
I'm sure a better programmer/rom hacker can make an DAE or OBJ exporter for any SuperFX game includding Star Fox 2, but I really lack the knowledge, I struggled with hex to get the decoder to work. Tongue

edit->
Do you mean dae as in the following?
http://en.wikipedia.org/wiki/COLLADA
Thanked by:
#4
I suppose so, it is .DAE COLLADA and it supports bones and rigging. pretty much every modeler's best friend. Tongue
I was only curious anyway since it'd be useful for that reason.
[Image: sweet-capn-cakes-deltarune.gif]
Thanked by:
#5
@ Mighty Jetters
I was curious about the 3D export but I got nowhere with code. I ended up following some instructions about ripping models from this forum and got the following, ripped using 3DVIA Printscreen 2.3
Colors are "incorrect" due to the absence of light but I'm sure that is what you wanted. The ships colors are correct of course, Star Fox has little use of texture but I wasn't able to rip them, single lines don't appear. I'm 100% sure you can rip most if not all models now. Tongue

[Image: Untitled_1.png]
[Image: Untitled_3.png]
Thanked by:
#6
I very much like this.

Hmmm... can't something be done about the wireframes, though? Some models just aren't complete without them.

Maybe a way to sort-of-cheat by drawing super skinny prisms in their place?
Thanked by:
#7
(02-23-2013, 11:38 PM)Peardian Wrote: I very much like this.

Hmmm... can't something be done about the wireframes, though? Some models just aren't complete without them.

Maybe a way to sort-of-cheat by drawing super skinny prisms in their place?

Glad you like it. Big Grin
About the lines thing...sure! it's similar to what I did for the wireframe models like the powerups. In this case I was just trying this to rip the models to prove it can be done.
On the other hand if you wish to do this by hand, the Object Decoder can give you all the vertices and faces with color if you want to draw it yourself. This includes face normals, stage light normal, variable palettes, animation palettes. Everything to render the model with correct lighting and shadow is already there. Tongue

There is one thing missing, we are trying to figure out the frame animations from the ROM, everything else including textures is mostly finished. I would like to release the source code and binaries with animations included so there are not many version going around the internets.

-edit->
I changed two lines of code and here it is, the only problem is that since they are planes they cannot be seen from all sides but I can make them have volume and with the coordenates you guys can do better than I can. Anyways this is what you wanted.
Of course they don't have color change here, in our application they glow exactly like in the game. But I'm sure you guys can make it glow because the animation frames for this model are 4 colors that cycle over and over again. Tongue
[Image: Untitled_1.png]
[Image: Untitled_1.png]
Thanked by:
#8
That works well enough, I suppose. Do you know how the endpoints for the planes are determined? If I were to guess, it looks like the second set of points is simply placed a set small distance upwards from the actual points.
Thanked by:
#9
(02-24-2013, 10:59 AM)Peardian Wrote: That works well enough, I suppose. Do you know how the endpoints for the planes are determined? If I were to guess, it looks like the second set of points is simply placed a set small distance upwards from the actual points.

Sure! I programmed it. It would be the equivalent of 3 pixels but I can set it to 1 or anything. In my app the lines are there but the "3DVIA Printscreen 2.3" doesn't grab them or the 3dXML viewer doesn't draw them.
I also used a scalling factor for each model. They are all on either 8 or 16 integer coord. values so even using scaling the values are not corrupted by quantization and of course you can set scaling to 1 and get the exact model vert. information.

I'm just trying to prove it can be done like this in the version of the decoder that I am using, but if I ever were to learn about DAE sure I would make a decent export tool but that won't happen soon. Tongue
I will release the source code when we get the animations working, that way someone else will be able to add functionality and maybe read the stage information. Tongue

Whats more, the method usted for storing information and reading is almost exactly like the one used for Star Fox 2 as well as any other SuperFX vertex based game. I've also read that it is the basis for how Super Mario 64 was programmed and why it was so efficient. This meaning that in the future you could extract those models too.
Thanked by:
#10
As far as I know, DAE is all XML-based, so it shouldn't be all that hard to learn. That said, I've had the schema/documentation for it sitting on my desktop since October and haven't bothered to look at it yet. Shy
Thanked by: Ton, Garamonde
#11
(02-24-2013, 07:36 PM)Peardian Wrote: As far as I know, DAE is all XML-based, so it shouldn't be all that hard to learn. That said, I've had the schema/documentation for it sitting on my desktop since October and haven't bothered to look at it yet. Shy

I'm confused, I went to the collada website and found nothing.
Would you mind pointing me to the documentation you mention? maybe I can do something quickly. I've actually spent too much time doing this and I do have to go to work sometime in the future. Tongue

Also, I got the animations working with the help of user Stef from the other forum. Tongue
Release of the source is closer than I thought! Big Grin
Thanked by:
#12
This should have everything you need.

Not only does it have documentation for it, it also has the schema file you can use to verify that your XML document is correctly formed.
Thanked by: Friedslick6
#13
And here it is! Big Grin

Remember you can download the original video which is 60 fps Tongue

I added the frame interpolation but of course it can be disabled with the keyboard.
I will cleanup the code a bit and release it later in the day.

I will also see if I can add collada. I like the idea but I don't have time anymore and would prefer someone in the future to make the code better. Big Grin
Thanked by:
#14
Here are the download links
http://bitshare.com/files/umwcr17c/SNES_...1.zip.html
http://rapidgator.net/file/81179016/SNES...1.zip.html
http://www.4shared.com/zip/41CS6-a8/SNES...der_v.html (requires registration)

The idea of the source being available is so othes can continue the work.
There is a lot to be done so adding collada is not a priority for me right now since we are trying to decode stage information.
Thanked by:


Forum Jump: