Help me convert models from Project Gotham Racing 4
Here the sample
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Project Gotham Racing 4 models (.pak_hrd)
-
- 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)
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.
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.
- Tosyk
- 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)
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/objchrrox 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.
Maybe it will be interesting to Ernegien from his topic
-
- 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)
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.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.
-
- 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)
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.
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.
-
- n00b
- Posts: 11
- Joined: Sun Feb 21, 2016 6:29 am
- Has thanked: 2 times
Re: Project Gotham Racing 4 models (.pak_hrd)
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
Visit the thread at : viewtopic.php?f=18&t=15625
Thank you
- shakotay2
- MEGAVETERAN
- Posts: 4285
- 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)
well, then, seems this thread was the beginning of "all", so let's continue here.
wheel model from "offzipped" .dat: (end of FI's block is a little bit hard to track; uvs are looking weird)
going to become tedious:
wheel model from "offzipped" .dat: (end of FI's block is a little bit hard to track; uvs are looking weird)
going to become tedious:
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?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
- Tosyk
- double-veteran
- Posts: 1027
- Joined: Thu Oct 22, 2009 10:24 am
- Location: Russia, Siberia
- Has thanked: 269 times
- Been thanked: 154 times
- Contact:
- 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)
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?)
.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)
Sorry if this seem a noob question. So can these tools be made available?
- 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)
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)
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.