Kuribo64
Views: 10,953,888 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
07-10-20 03:24 AM
Guest:

0 users reading Looking into SM64DS fixing collision | 1 bot

Main - General SM64DS hacking - Looking into SM64DS fixing collision Thread closed

Pages: 1 2 3 4 5
blank
Posted on 12-13-12 01:28 PM (rev. 2 of 12-13-12 02:15 PM) Link | #1739
In that case the main differences is that the scale factors for the fixed point values are different. The header is also slightly different: SM64DS headers are 4 bytes shorter and the value of an unknown is different.

EDIT: This is the kcl from Tick Tock Clock exported to a wavefront obj and the converted back to a kcl (using an adapted version of the code I use for SMG). I need someone to test this in-game to see if it works.

Skelux
Posted on 12-13-12 08:11 PM (rev. 2 of 12-13-12 09:32 PM) Link | #1740
All of your imported KCLs have a collision grid size of 0x0D000000 while the MKDS importer uses 0x11000000. The imported MKDS KCL is also significantly larger, I notice.

edit: blank, I tried replacing it and TTC just froze. I may be importing it incorrectly, I am using the 'replace' option in MKDS Editor.

blank
Posted on 12-14-12 01:40 AM Link | #1741
Ok, I might know the problem. Try this instead. But if that doen't work, there's some significant difference between SM64DS kcl files and all other types of kcl files I've seen.

Skelux
Posted on 12-14-12 04:10 AM Link | #1742
Didn't freeze, but mario fell strait through.

blank
Posted on 12-14-12 06:24 AM Link | #1743
Last try and then I'm done.

Skelux
Posted on 12-14-12 09:24 PM (rev. 3 of 12-14-12 10:16 PM) Link | #1753
I think I can confirm that MKDS editor is corrupting the rom when I replace any file, it ruined some graphics on the main menu and froze castle grounds. I'll find another method then try again.

edit: nothing seems to be able to rebuild the rom without corrupting it, even ndstool. Any ideas?

edit2: it's possible that your collision is working after all, I tried manually replacing the collision of an imported level with yours using a hex editor and I was able to run into a few invisible walls. Could you try converting this obj? It would make things a lot easier to test. https://www.dropbox.com/s/8idq01ycizzujqp/island.zip

blank
Posted on 12-15-12 03:16 AM Link | #1756
Is that model in the right scale? Compared to the TTC collision it's very small. If it is in the right scale it would mean that models and collision are scaled differently and we would have to find the correct scale.

Arisotura
Posted on 12-15-12 09:29 AM Link | #1761
Posted by Skelux
I think I can confirm that MKDS editor is corrupting the rom when I replace any file, it ruined some graphics on the main menu and froze castle grounds. I'll find another method then try again.

You can try Nitro Explorer, or NSMBe's ROM explorer. Those are known to not change file IDs when importing files.

Changing file IDs is problematic in NSMB, but in SM64DS it shouldn't be an issue as the game refers to the files by filenames rather than IDs.

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

Dirbaio
Posted on 12-15-12 10:16 AM (rev. 2 of 12-15-12 10:17 AM) Link | #1763
Posted by Mega-Mario
You can try Nitro Explorer, or NSMBe's ROM explorer.
NitroExplorer doesn't take some stuff into account while NSMBe does, I wouldn't recommend NitroExplorer for replacing files ;)
For example the used ROM size in the header, or the RSA signature, or file alignment.

____________________
Cool Stuff: Dirbaio.net (my boring site) - The NSMB Hacking Domain - Kuribo64 - ABXD DevBoard

Arisotura
Posted on 12-15-12 12:21 PM Link | #1769
The RSA signature only really matters if you care about DLP, and if you move it, since you have to update the header, you break DLP no matter what. So actually caring about the signature is more trouble than it's worth.

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

Skelux
Posted on 12-15-12 08:26 PM Link | #1791
The scale for that level is 0.4 (when imported with sm64e).

Gericom
Posted on 12-16-12 04:36 AM Link | #1804
Posted by blank
Is that model in the right scale? Compared to the TTC collision it's very small. If it is in the right scale it would mean that models and collision are scaled differently and we would have to find the correct scale.

In mkds, the models have also another scale than the collision and object placements. It is 0.062 for the model. And most of the time, you need to freeze the transformations and do a 1.008 scale to fit it perfectly.

blank
Posted on 12-17-12 10:43 AM Link | #1859
Then there's definitely a scale difference between model and collision, and it doesn't seem to be the same as for MKDS. Figuring out the correct scale factor would require a bit of trial and error, and as I don't actually have the game to test, that would be a bit bothersome.

Skelux, could you make a custom level using the original TTC model and the kcl I provided?

Fiachra
Posted on 12-17-12 12:06 PM Link | #1865
The latest version of SM64DSe in the repo has the ability to export level models almost exactly (http://postimage.org/image/ruuu6hmw7/). You can then reimport them (but make sure to reove the textures first - seems to cause problems) and compare the collision files generated by Nintendo and those made by the editor. For example here's the Main Castle before and after collision files:
http://www.sendspace.com/file/5ckyiv
The original is about 5kB bigger.

blank
Posted on 12-17-12 02:06 PM Link | #1867
Ok, that makes things a lot easier. Based on that collision are 1000 times larger than the models.

Skelux, this is a kcl of the obj you gave me, in (hopefully) the right scale.

Skelux
Posted on 12-18-12 09:11 PM Link | #1928
Posted by blank
Ok, that makes things a lot easier. Based on that collision are 1000 times larger than the models.

Skelux, this is a kcl of the obj you gave me, in (hopefully) the right scale.


Well, I'm surprised, the collision is flawless!

blank
Posted on 12-19-12 06:26 AM Link | #1932
Sweet. After I've fixed a few things I'm going to release a python script. Then somebody can port it into SM64DSe if they want to.

ray
Posted on 12-21-12 02:45 PM Link | #1959
WTF blank you are awesome. That means we can finally create bugfree collision? :nyan:

____________________
Check out my Patreon Page if you want to support me :)



Arisotura
Posted on 12-21-12 02:47 PM Link | #1960
I hope so. This would be a rebirth for SM64DS hacking. And perhaps people would actually care.

I'll try out once I have the time.

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

ray
Posted on 12-21-12 02:56 PM Link | #1961
I just tested the obj from Skelux and the kcl from blank:

The collision is PERFECT. Even if the textures sometimes make the wrong sound, it's a BIG improvement and there aren't any bugs!
I can't wait for the collision generator being in SM64DSe :)

____________________
Check out my Patreon Page if you want to support me :)


Pages: 1 2 3 4 5

Main - General SM64DS hacking - Looking into SM64DS fixing collision Thread closed

Page rendered in 0.045 seconds. (2048KB of memory used)
MySQL - queries: 29, rows: 235/235, time: 0.033 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.