Cave Story 3D (*.n3ddta, *.n3dhdr)

Skeletons, animations, shaders, texturing, converting, fixing and anything else related to read game models
Doctor Loboto
Posts: 376
Joined: Sun May 31, 2015 2:23 am

Cave Story 3D (*.n3ddta, *.n3dhdr)

Post by Doctor Loboto »

Well, it's been a while since I've looked into this game, and unfortunately still nothing has turned up anywhere else, so I figured I'd ask here. These files I assume are compressed somehow, and contain models and textures. All I need is OBJ's with UV's, and use-able texture formats to apply to them. I'm not sure what the specifics are for these either.

https://www.dropbox.com/s/u8uvvajyjmzpihe/CS3d.zip?dl=0
TRDaz
Posts: 42
Joined: Fri Nov 06, 2015 1:54 pm

Re: Cave Story 3D (*.n3ddta, *.n3dhdr)

Post by TRDaz »

From a quick check you can get obj and UVs with hex2obj (doesn't seem like the files are compressed, I think the header is separate as .n3dhdr)
There doesn't seem to be another mesh in the file, model looks incomplete though. Can't help with textures unfortunately.
Tested 263_docred.n3ddta:
Image
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Cave Story 3D (*.n3ddta, *.n3dhdr)

Post by id-daemon »

TRDaz i have no idea why you only decided to render a half of the mesh. Here the correct numbers:

0x47B0 3012
0x5F40 724
TRDaz
Posts: 42
Joined: Fri Nov 06, 2015 1:54 pm

Re: Cave Story 3D (*.n3ddta, *.n3dhdr)

Post by TRDaz »

Sorry, it was late at night here when I posted that lol, wasn't thinking clearly.
Doctor Loboto
Posts: 376
Joined: Sun May 31, 2015 2:23 am

Re: Cave Story 3D (*.n3ddta, *.n3dhdr)

Post by Doctor Loboto »

As I've said before though, I can't really operate hex2obj properly, and I need just obj's with UV's and textures to properly apply.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Cave Story 3D (*.n3ddta, *.n3dhdr)

Post by id-daemon »

The format is very simple, i'm not usually making such tools, so i made it as easy as possible.

1. Drop .n3dhdr on the tool - it will unpack all resources (some of them are meshes and textures)

2. Drop mesh resource on the same tool - it will make OBJ files.

Image
Acewell
Posts: 706
Joined: Fri Aug 08, 2014 1:06 am

Re: Cave Story 3D (*.n3ddta, *.n3dhdr)

Post by Acewell »

here is a bms script to extract and 'headerfy' the textures from your samples for kicks :D

Code: Select all

findloc tga binary "\x04\x00\x00\x00\x00\x00\x00\x00\x38\x00\x00\x00"
do
    goto tga
    xmath go2width "tga - 0x8"
    goto go2width
    get WIDTH long
    get HEIGHT long
    xmath start "tga - 0x2c"
    goto start
    get NAME string
    goto tga
    getdstring SKIP 12
    savepos OFFSET
    xmath SIZE "(((WIDTH * HEIGHT) * 16) / 8)"
    set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\xF8\x00\x00\xE0\x07\x00\x00\x1F\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
    putVarChr MEMORY_FILE 0x10 WIDTH long
    putVarChr MEMORY_FILE 0xC HEIGHT long
    string NAME - ".tga"
    string NAME + ".dds"
    log NAME 0 0x80 MEMORY_FILE
    append
    log NAME OFFSET SIZE
    append
    findloc tga binary "\x04\x00\x00\x00\x00\x00\x00\x00\x38\x00\x00\x00" 0 ""
while tga != ""
luRaichu
Posts: 1
Joined: Fri Jul 09, 2021 3:54 pm

Re: Cave Story 3D (*.n3ddta, *.n3dhdr)

Post by luRaichu »

When I run Cs3d.exe on my PC, it crashes with an System.IndexOutOfRangeException error.