Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Project Gotham Racing 4 models (.pak_hrd)

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

Project Gotham Racing 4 models (.pak_hrd)

Post by Tosyk »

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

Here the sample
Thank you for all you do here
my blog | my forum
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post 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.
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: Project Gotham Racing 4 models (.pak_hrd)

Post 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
Thank you for all you do here
my blog | my forum
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by chrrox »

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 »

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: 324 times
Been thanked: 13 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post 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.
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 »

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: 4286
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post 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
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by Tosyk »

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: 158 times
Been thanked: 52 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post by zaykho »

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 »

Can one of you re-upload the original files?
User avatar
Machinedramon
advanced
Posts: 77
Joined: Mon Apr 08, 2019 6:13 pm
Has thanked: 13 times
Been thanked: 42 times

Re: Project Gotham Racing 4 models (.pak_hrd)

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

Sorry if this seem a noob question. So can these tools be made available?
User avatar
Machinedramon
advanced
Posts: 77
Joined: Mon Apr 08, 2019 6:13 pm
Has thanked: 13 times
Been thanked: 42 times

Re: Project Gotham Racing 4 models (.pak_hrd)

Post 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)
YEAs
ultra-n00b
Posts: 3
Joined: Sat Jul 02, 2022 3:46 am
Been thanked: 1 time

Re: Project Gotham Racing 4 models (.pak_hrd)

Post 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.
Post Reply