Project Gotham Racing 4 models (.pak_hrd)

Post questions about game models here, or help out others!
Post Reply
User avatar
Tosyk
double-veteran
double-veteran
Posts: 953
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 227 times
Been thanked: 123 times
Contact:

Project Gotham Racing 4 models (.pak_hrd)

Post by Tosyk » Thu Jul 22, 2010 12:21 am

Help me convert models from Project Gotham Racing 4 :keke:

Here the sample
Thank you for all you do here
my blog | my forum

User avatar
chrrox
Moderator
Posts: 2601
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1358 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by chrrox » Thu Jul 22, 2010 1:35 am

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.

User avatar
Tosyk
double-veteran
double-veteran
Posts: 953
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 227 times
Been thanked: 123 times
Contact:

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by Tosyk » Thu Jul 22, 2010 1:42 am

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
Thank you for all you do here
my blog | my forum

User avatar
chrrox
Moderator
Posts: 2601
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1358 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by chrrox » Thu Jul 22, 2010 3:16 am

could be but forza was not compressed.

ALYX
advanced
Posts: 41
Joined: Wed Apr 07, 2010 7:33 pm
Has thanked: 12 times
Been thanked: 1 time

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by ALYX » Mon Aug 02, 2010 10:59 pm

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.

AMG
advanced
Posts: 61
Joined: Sun Aug 10, 2014 3:55 pm
Has thanked: 307 times
Been thanked: 13 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by AMG » Sat Jun 04, 2016 4:37 pm

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.

Mondraconus
n00b
Posts: 11
Joined: Sun Feb 21, 2016 6:29 am
Has thanked: 2 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by Mondraconus » Wed Dec 21, 2016 6:52 pm

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

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3461
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 955 times
Been thanked: 1876 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by shakotay2 » Sun Sep 03, 2017 1:29 pm

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
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
Tosyk
double-veteran
double-veteran
Posts: 953
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 227 times
Been thanked: 123 times
Contact:

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by Tosyk » Wed Sep 06, 2017 7:47 pm

wow, this's the progress, man! :mrgreen:
Thank you for all you do here
my blog | my forum

User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 154 times
Been thanked: 36 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by zaykho » Wed Sep 13, 2017 6:31 am

Tagging because it's important ! = D

Pingu
veteran
Posts: 116
Joined: Sat Apr 16, 2016 3:15 am
Has thanked: 5 times
Been thanked: 24 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by Pingu » Thu Sep 14, 2017 1:00 am

Can one of you re-upload the original files?

User avatar
Machinedramon
advanced
Posts: 54
Joined: Mon Apr 08, 2019 6:13 pm
Has thanked: 11 times
Been thanked: 32 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by Machinedramon » Sat Mar 06, 2021 12:59 pm

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?)
:)

watty256
ultra-n00b
Posts: 7
Joined: Wed Apr 12, 2017 9:29 am
Has thanked: 2 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by watty256 » Sat Mar 06, 2021 4:02 pm

Sorry if this seem a noob question. So can these tools be made available?

User avatar
Machinedramon
advanced
Posts: 54
Joined: Mon Apr 08, 2019 6:13 pm
Has thanked: 11 times
Been thanked: 32 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by Machinedramon » Sun Mar 07, 2021 1:26 pm

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)

Post Reply