Jump to content

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


splatmod

Recommended Posts

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
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...