Page 1 of 1

Nvidia "A New Dawn" tech demo .NPK

Posted: Fri Apr 19, 2013 12:00 pm
by Axsis
Last summer Nvidia released remake of the old Dawn demo - "A New Dawn"
Resources in .NPK archives, so I wrote bms script to unpack them:

Code: Select all

# Nvidia NPK unpacking script v0.1 by Axsis
IDString "\xBE\xEF\xCA\xFE"
Get FILES long
For I = 0 < FILES
 Get FNAMELEN long
 GetDString FNAME FNAMELEN
 Get UNKNOWN longlong # UNIX/C date+time ?
 Get FOFFSET longlong # file offset
 Get FCSIZE longlong # file compressed size
 Get FUSIZE longlong # file uncompressed size
 FileXOR "\x62\x6F\x67\x6F\x6D\x6F\x6A\x6F" FOFFSET # "bogomojo"
 #Log FNAME FOFFSET FCSIZE
 CLog FNAME FOFFSET FCSIZE FUSIZE
 FileXOR ""
Next I
Unfortunately, I have an ATI video card and can't run the demo to tell if it runs with resources unpacked.

Models are still in NMB files (there are several topics on them on this forum), but format is different - all 3d data (verts, idx, normals, uv, etc) is divided to several files. These files are in models\geo_main.npk and there are also several NMB and NMA files in demo.npk, which, I believe, the main ones, that referred to the first.

My first experience in writing Noesis script (and second ever in reversing 3d model format :D)
It imports vertex coordinates, normals and indices, no textures or even uv coords yet.
If someone can make a complete importer that would be great ;)

Re: Nvidia "A New Dawn" tech demo .NPK

Posted: Sat May 04, 2013 2:56 am
by cra0
Axsis wrote:Last summer Nvidia released remake of the old Dawn demo - "A New Dawn"
Resources in .NPK archives, so I wrote bms script to unpack them:

Code: Select all

# Nvidia NPK unpacking script v0.1 by Axsis
IDString "\xBE\xEF\xCA\xFE"
Get FILES long
For I = 0 < FILES
 Get FNAMELEN long
 GetDString FNAME FNAMELEN
 Get UNKNOWN longlong # UNIX/C date+time ?
 Get FOFFSET longlong # file offset
 Get FCSIZE longlong # file compressed size
 Get FUSIZE longlong # file uncompressed size
 FileXOR "\x62\x6F\x67\x6F\x6D\x6F\x6A\x6F" FOFFSET # "bogomojo"
 #Log FNAME FOFFSET FCSIZE
 CLog FNAME FOFFSET FCSIZE FUSIZE
 FileXOR ""
Next I
Unfortunately, I have an ATI video card and can't run the demo to tell if it runs with resources unpacked.

Models are still in NMB files (there are several topics on them on this forum), but format is different - all 3d data (verts, idx, normals, uv, etc) is divided to several files. These files are in models\geo_main.npk and there are also several NMB and NMA files in demo.npk, which, I believe, the main ones, that referred to the first.

My first experience in writing Noesis script (and second ever in reversing 3d model format :D)
It imports vertex coordinates, normals and indices, no textures or even uv coords yet.
If someone can make a complete importer that would be great ;)
Nice work man