Page 1 of 4

Project Gotham Racing 4 models (.pak_hrd)

Posted: Thu Jul 22, 2010 12:21 am
by Tosyk
Help me convert models from Project Gotham Racing 4 :keke:

Here the sample

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Thu Jul 22, 2010 1:35 am
by chrrox
this format looks annoying
the file is zlib compressed sections and appears to store information about the extracted files in the original file table.
like the model structure and dds headers.
a custom program would be needed to read these as i do not know how to read zlib easily in max.

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Thu Jul 22, 2010 1:42 am
by Tosyk
chrrox wrote:this format looks annoying
the file is zlib compressed sections and appears to store information about the extracted files in the original file table.
like the model structure and dds headers.
a custom program would be needed to read these as i do not know how to read zlib easily in max.
Thanks for the info chrrox. So we need someone who can create that custom program, or maybe converter/extractor from pgr4 archives to tga/dds/dae/smd/obj :oops:

Maybe it will be interesting to Ernegien from his topic

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Thu Jul 22, 2010 3:16 am
by chrrox
could be but forza was not compressed.

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Mon Aug 02, 2010 10:59 pm
by ALYX
Most of the data for the car is in the Peugeot_Flux.pak_hrd file. This file contains mostly compressed data chunks with uncompressed data in between. I use the program "offzip" to decompress the data. The decompressed data contains no headers as the header information was already uncompressed.
The compressed data starting at offset 000947ad is almostly certainly the main model's vertex data, however it does not use standard floating point. The compressed data starting at offset 000cf16d is the face array index, which are tristrips that are reset by the bytes "FF FF". This file references a model containing around 17,000 vertexes. The compressed data starting at 0002b07d contains a dds texture. The smallest compressed chunks contain a model that has 31 vertexes.
Over all there are 118 compressed chunks.
Here FurryFan info about compresing. Some tools ofzip can uncompress and then we need a smart guy/girl who can easy make a convertor importer or something.

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Sat Jun 04, 2016 4:37 pm
by AMG
Instead of creating a new topic I'll just bump this one.
Found this, have a nice read!
http://www.bit-tech.net/news/gaming/200 ... ount_lie/1
Very interesting, I've expected a much lower polycount to be honest.
It's definitely pretty impressive for a 2005 game.

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Wed Dec 21, 2016 6:52 pm
by Mondraconus
Guys, I have been opened new thread to discuss about .STREAM2, .PAK and .BPR inside game "Area" folder... I want to rip textures inside .STREAM2 file, since it's very big size, I just want to rip the textures inside it... Maybe anyone can help me please ?

Visit the thread at : viewtopic.php?f=18&t=15625

Thank you

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Sun Sep 03, 2017 1:29 pm
by shakotay2
well, then, seems this thread was the beginning of "all", so let's continue here.

wheel model from "offzipped" .dat:
wheel.JPG
(end of FI's block is a little bit hard to track; uvs are looking weird)

going to become tedious:
Image

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Wed Sep 06, 2017 7:47 pm
by Tosyk
wow, this's the progress, man! :mrgreen:

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Wed Sep 13, 2017 6:31 am
by zaykho
Tagging because it's important ! = D

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Thu Sep 14, 2017 1:00 am
by Pingu
Can one of you re-upload the original files?

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Sat Mar 06, 2021 12:59 pm
by Machinedramon
Hello there, sorry to bump this thread that is more than 10 years old, although it might not be much help now, it would be interesting for people to know if they want to handle some tips:

.hdr models use zlib comp (78 DA); there are uncompressed headers before each compressed file(for textures it contains all the information regarding the DXT data(it's important to bear in mind that these textures are swizzled, they need an xbox360 script to be converted into normal DDS); for vertexes and faces it contains the count and size of section); strides might change in pgr4, while pgr3 does have a bit more standardized strides; furthermore, vertexes are short_signed(in mrp); normals int10; uvs shorts; with the faces the problem is that you need to understand the header of the whole file to use a list of faces/submaterials(almost every mesh I have seen for cars use multimesh))
.stream2 files(tracks) these change from pgr3 to pgr4; pgr3 still uses zlib(a script like the one for .hrd will work) while pgr4 use deflate(more complex to decomp; especially locating the compressed data, but the headers are much clearer to read) track files have vertexes file + another set of vertex-like + faces(i think it will also share the same problem for multimats but haven't tested as much)

I have decomped the files using python; it's kind of easy to do so by using the "import zlib"; you just need to buffer the data in an array and then you can unpack by "zlib.decompress(bytearray(comped_data))"
keeping the headers for the decompressed data is key to create an autonomous script to make 3d files on the fly, textures work fine enough if you modify the tex_dds script for 360 swizzle for noesis(prolly it was chrrox that coded it?)
:)

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Sat Mar 06, 2021 4:02 pm
by watty256
Sorry if this seem a noob question. So can these tools be made available?

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Sun Mar 07, 2021 1:26 pm
by Machinedramon
there are no tools, its not a tool, just a script for a program called "model researcher pro"; and no i don't have any intention of publicly releasing it, not right now, even if i released the code to unpack, its buggy and the meshes are in binary(the faces/materials problem i have not solved)

Re: Project Gotham Racing 4 models (.pak_hrd)

Posted: Sat Jul 02, 2022 3:49 am
by YEAs
im sorry for this bump but has anyone made any progress with this stuff? these models seem pretty good and theres some cars in the game that dont exist anywhere else.