Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Post regarding the models of Project Gotham Racing 2 (.pak_hrd and derivatives ".pak_cth", ".pak_opn", ".pak.sft")

Featured Replies

  • Localization

Hello.

First of all, I am new to this website, I still gotta get used to some of the stuff here and all that. Second of all, this is a post with a question regarding the types of files for PGR 2, because I've been trying to deal with these models for many time now.

I tried many things, from ripping on CXBX Reloaded with Ninjaripper 1.7.1 (with pretty acceptable results, but it's not the full model of the vehicle)

imagen.thumb.png.c1abb1aadec1ca5edd0b7149dca3128e.png

To even using a program known as Renderdoc.

imagen.thumb.png.ee5e9cc2f2d44ddffc0127eb5832c08c.png

I also did tons of research on how to extract the models, and trying different softwares like Hex2Obj, Milkshape 3D and 3D Model Researcher, which in my end lead to completely dead ends, and no answers.

Is there a way I can extract the models of this game (and possibly export/convert them in a easily readable format like FBX or OBJ)? Thanks in advance for the answers

Edited by splatmod

  • Supporter

First of all you'll need a proper unpacking from pak_hdr - zlib compressed, I guess.

(offzip results don't convince me)

  • Author
  • Localization
1 hour ago, shak-otay said:

First of all you'll need a proper unpacking from pak_hdr - zlib compressed, I guess.

(offzip results don't convince me)

If you mean unpacking the files, I did unpacked the files of the Renault Spider with something called QuickBMS, it gave me a lot of folders containing .dat files, I don't know if that info seems useful though

  • Supporter

Great! Now you need to get the mesh from the .dat in the MESH folder (still getting weird point clouds only - seems it's all face indices in there?)

btw, there's some cool analysing on xboxdevwiki.net, Project Gotham Racing 2

Edited by shak-otay

  • Author
  • Localization
9 minutes ago, shak-otay said:

Great! Now you need to get the mesh from the .dat in the MESH folder (still getting weird point clouds only - seems it's all face indices in there?)

 

btw, there's some cool analysing on xboxdevwiki.net, Project Gotham Racing 2, but I'm not sure whether the .dat file is from PC version, if any?

That's what I was trying, getting the mesh from the .dat file in the MESH folder of the car.

And no, there's no PC version of PGR 2 whatsoever, it was an Xbox exclusive. Still, how do I get the mesh from the .dat file??? I tried looking on the Xbox Dev Wiki website but couldn't find anything related to that

  • Supporter

Maybe the .dat in the GPUD folder contains more than texture data...?

Yep. Found some vertices. Now the race can start...

Edited by shak-otay

  • Author
  • Localization
2 minutes ago, shak-otay said:

Maybe the .dat in the GPUD folder contains more than texture data...?

The GPUD and MESH .dat files are heavier in size (between 200 to 600 kilobytes) so they must contain stuff about the mesh or something.

Still, I don't know what that has to do with getting the mesh, is there any program I can use to open those .dat files and see its contents as a mesh? (Idk if I explained myself correctly)

  • Supporter

Porsche911, WIP (used auto created faces for now, thus it looks a little bit weird)

Well, you need some basic understanding in analysing 3D formats for such. What is a short, what is FVFsize etc

Edited by shak-otay

  • Author
  • Localization
1 minute ago, shak-otay said:

First of all, that isn't really an Audi TT, it's actually a Porsche (sorry for the correcting lol, I am sometimes a little too annoying with correcting stuff)

Second of all, as I can see here you used Hex2Obj. I did tried to look into that program but I keep getting this error:

imagen.png.9610dd760ec1a58763d18278901c04d3.png

  • Supporter

Set FVFsize to 14 (for Porsche911 from GPUD). If you leave me some hours I might give some results.

For the face indices this code from xboxdevwiki might help:

for mesh in meshs:
      c = -1
      b = -1
      a = -1
      for i in mesh['indices']:
        c = b
        b = a
        a = i + 1
        if c >= 0:
          e.write('f %d/%d %d/%d %d/%d\n' % (c,c,b,b,a,a))

(I wouldn't start with -1, though negative FIs are allowed in wavefront obj format.)

Edited by shak-otay

  • Author
  • Localization
8 minutes ago, shak-otay said:

Set FVFsize to 14 (for Audi from GPUD). If you leave me some hours I might give some results.

For the face indices this code from xboxdevwiki might help:

for mesh in meshs:
      c = -1
      b = -1
      a = -1
      for i in mesh['indices']:
        c = b
        b = a
        a = i + 1
        if c >= 0:
          e.write('f %d/%d %d/%d %d/%d\n' % (c,c,b,b,a,a))

(I wouldn't start with -1, though negative FIs are allowed in wavefront obj format.)

Interesting... Does this code have to be used on Hex2Obj?

  • Supporter
2 minutes ago, splatmod said:

Interesting... Does this code have to be used on Hex2Obj?

No. It's too unique to be implemented. I'll make an extra project for this instead.

  • Author
  • Localization
1 minute ago, shak-otay said:

No. It's too unique to be implemented. I'll make an extra project for this instead.

Oh alright then.

  • Supporter

Seems I'm on the right track:

Porsche911Turbo partially

first submesh, some weird faces

H2O file to be used with dat in GPUD folder (after having extracted from 911 Turbo.pak_hrd with quickbms)

Switch button to PtCld (point cloud)!

How to get the faces I'll show later (from .dat in MESH folder).

Edited by shak-otay

  • Author
  • Localization
33 minutes ago, shak-otay said:

Seems I'm on the right track:

Porsche911Turbo partially

first submesh, some weird faces

H2O file to be used with dat in GPUD folder (after having extracted from 911 Turbo.pak_hrd with quickbms)

Switch button to PtCld (point cloud)!

How to get the faces I'll show later (from .dat in MESH folder).

imagen.png.0571757b6b434b8b62a4355e61d20300.png

So far I have used this configuration in Hex2Obj, but I got these results:

imagen.thumb.png.40572559fc79da424a746f696361d893.png

  • Supporter

Getting FIs from .dat, updated readme

Porsche911, chassis uvs

Rearcluster_L

wheel

There's more than 90 sub meshes which need to be checked plus adding the position.

(The uvs have to be scaled up by 100 in your 3D app.)

edit: for getting the chassis use hex2obj and the H2O parameters from my previous post

edit: Barchetta, Bonnet looks a bit strange

H2O file for hex2obj, toggle notPtC button to PtCld to get a point cloud.

0x0 500
Vb1
14 10
0x80380 13908
020400
0x0 255

(To get uvs you'll need todo File\SaveAs mesh in hex2obj before.

Then insert FIs created with abovelinked tool into .obj file.)

 

Since I've heard there's already a working solution I'll stop my investigations here.

Edited by shak-otay

  • 7 months later...
  • Supporter
15 hours ago, BeLieVeDxKiLLeR said:

What is the working solution?

I have no idea - splatmod wrote:

Quote

found already another solution to get PGR 2 models, and even PGR 1

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.