11 March 2016 - Forum Rules
Started by dyson132, April 11, 2012, 01:41:57 PM
[rgb( 235, 251, 251 ), rgb( 170, 251, 251 ), rgb( 235, 251, 251 ), rgb( 105, 219, 251 ), rgb( 235, 251, 251 ), rgb( 170, 251, 251 ), rgb( 235, 251, 251 ), rgb( 97, 138, 251 )], [rgb( 235, 251, 251 ), rgb( 251, 170, 105 ), rgb( 235, 251, 251 ), rgb( 251, 211, 146 )], [rgb( 235, 251, 251 ), rgb( 195, 219, 235 ), rgb( 154, 178, 195 ), rgb( 113, 130, 154 ), rgb( 73, 97, 113 ), rgb( 24, 48, 73 ), rgb( 24, 48, 73 ), rgb( 24, 48, 73 )], "1B,40", "1F,40", [rgb( 251, 211, 146 ), rgb( 170, 8, 65 )], ["A0,40", "A1,40", "A2,40", "A3,40", "A4,40", "A4,40", "A5,40", "A5,40"], ["0C,40", "0D,40", "0E,40", "0D,40"], "AA,40", "DF,40", "DF,40", ["19,40", "1A,40", "1C,40", "19,40", "1A,40", "1C,40", "19,40", "1A,40"], ["0A,40", "0B,40", "0F,40", "0B,40"], "A9,40", ["3D,46", "3C,46", "3B,46", "3B,46", "3A,46", "3A,46", "39,46", "39,46"], ["1D,40", "1E,40", "1D,40", "1E,40", "1D,40", "1E,40", "1D,40", "1E,40"], "00,40", ["CC,40", "CD,40", "CC,40", "CE,40"], ["15,40", "16,40", "17,40", "16,40"], "D0,46", "D0,46", ["C7,40", "C9,40", "C8,40", "C9,40"], ["CB,40", "13,40"], "D4,44", "D4,45", "D5,44", "D5,45", "B4,40", ["3B,46", "3C,46"], "07,40", "02,3B", "46,3C", , rgb( 97, 138, 251 ), rgb( 97, 149, 162 ), rgb( 48, 109, 235 ), ,
mtllib cube.mtl shadow_obj cube.obj v 0.000000 2.000000 2.000000 v 0.000000 0.000000 2.000000 v 2.000000 0.000000 2.000000 v 2.000000 2.000000 2.000000 v 0.000000 2.000000 0.000000 v 0.000000 0.000000 0.000000 v 2.000000 0.000000 0.000000 v 2.000000 2.000000 0.000000 # 8 vertices g front usemtl red f 1 2 3 4 g back usemtl blue f 8 7 6 5 g right usemtl green f 4 3 7 8 g top usemtl gold f 5 1 4 8 g left usemtl orange f 5 6 2 1 g bottom usemtl purple f 2 6 7 3 # 6 elements
Quote from: dyson132 on February 15, 2013, 08:16:06 AMThat sounds awesome Stef!I've learnt more about roms just from this thread alone so thank you but I think I've reach the limit of what I can dig up. If I think of something else I'll post it but I think you've had much more progress than I ever could.
QuoteSince you know more about the use of the color palette I'll try ripping the openGL color table from SFXEdit myself since I'd want to use something like that.
QuoteIf I could leave you with some questions just so I know stuff:-What tools have you been using to the hack the rom? Any particular procedure?
Quote-What programming language are you using for the decompiling tool?
Quote-Did you already crack the color palettes method? How about the color changing ones and are they dependant on ztimer as the animations are?
Quote from: Stef on February 15, 2013, 05:05:42 PMWell i think my post is a total mess, try to use VL-Tone topic as references as i believe he explained far better than i did here.You can use my images to help
Quote from: Stef on February 15, 2013, 05:05:42 PMThe type also give the color index here (same value for each byte). The final color is obtained from color index and the light index.Light index is calculated with the cross product of face normal and light vector (which is fixed for each level).
QuoteI read his documents far too much times and even though I understood how they could work I never would have been able to integrate everything, between errors in the documents and no knowledge of hex I was going to get nowhere.
QuoteOne question though, do you happen to know the light vector for Corneria Level 1? or how to find any? I will use that and rip the original Arwing as Hex values into my c++/openGL application just to make sure I've done it correctly.
QuoteI've been trying to find someone interested in the topic for at least three years, may I ask what got you interested in this?
QuoteI didn't know I could share links with dropbox! Here is the parsed High poly model I had made with some guess work and stuff:https://www.dropbox.com/s/g0y8gaworrkvo6v/Airwing_Big_high_poly.txt
QuoteCross product between two vectors would be a vector and I think you mentioned it as an index, are you sure it is not the dot product?
QuoteDot actually worked very well by interpolating values between the two extremes of a color palette. Here is a picture of what I obtained with a lightVector(1,1,0), shadows seem to be mirrored horizontally but that is not a problem. I also used just one color palete to make it work and I'll add the other colors now.https://www.dropbox.com/sh/t24ll7lzsgbuzxh/ha_gY9hAox#f:Test%201.pngThe only doubt I have left is that if light vector is fixed per stage and normal vectors per face are also fixed then the rotation of the object has to be taken into account at some point.(I like openGL, I know a whole lot more about it than hex and rom hacking. )
QuoteAlso, the color changing triangle I think is dependant on the zTimer so I had to fake it but at least with the colors from the direct Hex values.Anyways, I know it works, I can do more in the future. Thanks for all the info!
Quotenews 2!Thought you might like to see a video which was only possible with the progress in this thread. When the shadows instantly change it is because I changes the light vector to some other position:https://vimeo.com/59810080
QuoteIt is really fascinating how they managed to design this, the game has no lighting (in the traditional 3D accelerated sense) and it is all mostly tricks that work perfectly together using the least amount of memory and processing available. This was one of the reasons I wanted to see how to do this.
Quote from: Stef on February 16, 2013, 07:09:58 PMHey thanks ! Looks like you gone a bit far when you extracted your face data but all data extracted looks correct when i compare to my object extractor. I made some progress on it, you can download it here if you want to test :https://dl.dropbox.com/u/93332624/dev/sfx/sfxObjReader.jarYou should open the rom first (the headered version one which we were using previously).Then you should open "extra" from this file (it gives object name) :https://dl.dropbox.com/u/93332624/dev/sfx/objects_extras.txt
Quote from: Stef on February 16, 2013, 07:09:58 PMIf you look at the arwing face color, you will notice that only a few of the face are actually affected by light... i guess that is to minimize light calculation on the SFX as it requires dot product for each face.
Quote from: Stef on February 16, 2013, 07:09:58 PMTrue, the BSPTree structure is really neat and pretty advanced for that period, all the code and structure were heavily optimized both for SuperFX and SNES hardware. I still do not understand how the object shadows are rendered, i guess they used smart tricks for that !
QuoteYou mentioned the animated color, do 3d animated object work in a similar way and did you manage to determine what separates those memory blocks?
QuoteAlso, I know VL-Tone's Arwing doc says that a the faces info stops at FF00 and that sometimes stops with nothing, how did you know when to stop reading for each model?
QuoteI think this has the added benefit of maybe simulating different light absorption materials. I guess wings should be very shiny and reflective more than the blue parts, as well as those parts in which parts of a model "emit" light.
QuoteThank you for the extra info, I will try to add stuff as I go, I might go slower now that I'm following you since you are the one making the real hacking progress
QuoteIn case you are curious I've also seen it used in Doom but the engine has been opensource for years and is already ported to openGL.http://doom.wikia.com/wiki/Doom_rendering_engine#Node_building
QuoteIn my particular case in which I use openGL I don't need to use the BSP tree since openGL can be set to determine the position of each triangle using glEnable(GL_DEPTH_TEST), but I would still like to replicate the palette behaviour with checkerboard pattern. It can be replicated very quickly using masks and FBOs, but I won't do this soon.
Quote¿Do you plan on continuing with the hack? Anything I can do to help?
Quote from: Stef on February 17, 2013, 07:40:04 AMYou can see the top color of arwing is fixed and now look weird as only half of the bottom is "lighted" when we expect both.
Quote from: Stef on February 17, 2013, 07:40:04 AMIn my case i want to replicate starfox with a software render engine (4 bpp bitmap based) so i can use the whole original starfox engine easily
Quote from: Stef on February 17, 2013, 07:40:04 AMYeah i plan to continue to work on it, I will keep the thread updated with my progress After object i plan to work on level data, we won't be able to use them "as it is", at least for the ASM block that won't be useful in our case :p Ii would be nice if we can have a complete description of 1 level data as corneria 1. That would be a good start to figure of the rest !
QuoteGREAT! I'd want to see that!I'm now importing the ROM directly into my c++ app to replicate part of your Obj Reader. I'll post something later in case I make progress.I've also been playing around with WebGL and using that would be very interesting.
QuoteI'll finish this app and see what more info I can dig up or guess. The Star Fox object decoder made in Shockwave flash has the complete Corneria 1 stage decoded but I don't know if it can be disassembled or decompiled.I will also be reading the thread and adding anything I can. Thanks Again!
Quote from: Stef on February 17, 2013, 03:27:39 PMBy the way,do you want the sources of the object decoder ? There is not much in it but as you use C++ you can translate java code quickly if you want...
Quote from: Stef on February 17, 2013, 03:27:39 PMDo you know how we have to handle camera view and arwing transformation ?I try to do it this way :World view is located depending arwing XY position. I also apply do Z rotation depending the arwing X movement to make world rotating a bit as the original.Then i try to get the arwing in the world at correct position but because of Z rotation the arwing goes up and down as background. I know i should apply an inverse translation before doing rotation on the arwing but i can't get that part correct and it's a bit confuse in my minds ^^
QuoteYES PLEASE! I've just about structured the file information in c++ but I have an offset for the faces data. You had posted a formula for the faces before but I don't arrive where I should.I was using VL-Tone's tutorial and your formula but intead of arriving at $8F3ED where I know the face values begin, I arrive at 8F396 with the posted formula.I'd like very much to read the source code, I guess a PM with the link or email should work.I've already made a different c++ application that read the whole rom and uses what we know, with the correct face formula I could have all the models in openGL in a short while, without colors of course.
QuoteI'm not quite sure I understand what is wrong and I don't know how much you know so I'll comment on what I've done in openGL.I've used a very normal viewport.I pushMatrix and translate to the center of the screen.I add a rotate value that will rotate that shipI draw lines or triangles on screen using the ROM coordenates with a scaled value of 10.Then I popMatrix.Also in order to calculate the correct light index for the triangles I HAVE to use the rotation values. I rotated the normals in my first demo and it looks right but I think I'm wrong.
Quote from: Stef on February 18, 2013, 04:19:10 AMWow nice, objects looks perfect ! I'm impatient to test that too
Quote from: Stef on February 18, 2013, 04:19:10 AMI sorted some as the 16 bits X flip vertex type list and bsptree empty node but still some unknown remains, i hope to fix them quickly ! Good luck with your project
QuoteI made this using openFrameworks: http://www.openframeworks.cc/Do you plan on trying it out? Try to get it to compile any demo project and I can post the project file (even if the source code is a bit messy). I have OSX too so I could port the project very quickly.
QuoteAbout that, 16 bits in this case means that I need 2 of the values that I would normally use?
QuoteQuestion 2: objects_extras.txt has some values that when I calculate the address I get negative values, does this happen to you?
Quote from: Stef on February 18, 2013, 11:44:32 AMIt looks interesting and quite simple to use but i prefer to stand on java for multi plateform project as i'm used to that =)Is OF available on all systems (osx, win, linux) ?
Quote from: Stef on February 18, 2013, 11:44:32 AMobjects_extras.txt just contains object id and name, nothing more.The object id is used to get the object header address (just by subtracting $7E00). Normally you cannot have any negative value. Take attention about the id value you may need to reverse byte order as i copied them directly from SFX exe
Quote from: dyson132 on February 18, 2013, 12:09:16 PMYes it is. I work programming interactive installations and such and it is openGL so it is has gpu acceleration. Some guys like to add scientific libs to make some graphics. Also, using shaders in openGL is great! There is also Cinder which is osx and windows only.http://libcinder.org/There is also Processig is java but with a similar purpose, Processing.js is Webgl.
QuoteI get that but for example, in your objReader the first value in the list ACA1 has address 0, vertex and face 0 too. What happens there?
QuoteI think I'm going to have to reprogram my app. I ported part of your code that does the vertex parsing and that works really great but I have a problem with my face parsing (haven't tried porting yours), the Arwing works correctly but other models say, for example, 4 vertex when I know they have 3. sometimes I get 2. That is why I think in the captures I posted I get missing triangles.This is going to take me a bit, I'll be back in a few days in case nothing happens.
Quote from: Stef on February 18, 2013, 01:53:34 PMIndeed, i just assume 0 as address means no data I also discovered there is only 249 objects and not 250, the last one was returned wrong address because of that. But all others objects are correctly parsed.But i think i miss a lot of object, if you compare to SFXEdit, you will see it contains many more objects that i can parse, i don't know where to find the others objects...
Page created in 0.074 seconds with 20 queries.