splatmod Posted September 28 Share Posted September 28 (edited) 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) To even using a program known as Renderdoc. 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 September 28 by splatmod Link to comment Share on other sites More sharing options...
shak-otay Posted September 29 Share Posted September 29 First of all you'll need a proper unpacking from pak_hdr - zlib compressed, I guess. (offzip results don't convince me) Link to comment Share on other sites More sharing options...
splatmod Posted September 29 Author Share Posted September 29 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 1 Link to comment Share on other sites More sharing options...
shak-otay Posted September 29 Share Posted September 29 (edited) 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 September 29 by shak-otay Link to comment Share on other sites More sharing options...
splatmod Posted September 29 Author Share Posted September 29 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 More sharing options...
shak-otay Posted September 29 Share Posted September 29 (edited) Maybe the .dat in the GPUD folder contains more than texture data...? Yep. Found some vertices. Now the race can start... Edited September 29 by shak-otay Link to comment Share on other sites More sharing options...
splatmod Posted September 29 Author Share Posted September 29 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 More sharing options...
shak-otay Posted September 29 Share Posted September 29 (edited) 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 September 29 by shak-otay Link to comment Share on other sites More sharing options...
splatmod Posted September 29 Author Share Posted September 29 1 minute ago, shak-otay said: AudiTT, WIP 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: Link to comment Share on other sites More sharing options...
shak-otay Posted September 29 Share Posted September 29 (edited) 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 September 29 by shak-otay Link to comment Share on other sites More sharing options...
splatmod Posted September 29 Author Share Posted September 29 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 More sharing options...
shak-otay Posted September 29 Share Posted September 29 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. Link to comment Share on other sites More sharing options...
splatmod Posted September 29 Author Share Posted September 29 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. Link to comment Share on other sites More sharing options...
shak-otay Posted September 29 Share Posted September 29 (edited) 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 September 29 by shak-otay Link to comment Share on other sites More sharing options...
splatmod Posted September 29 Author Share Posted September 29 1 minute ago, shak-otay said: Seems I'm on the right track: Audi partially Interesting indeed Link to comment Share on other sites More sharing options...
splatmod Posted September 29 Author Share Posted September 29 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). So far I have used this configuration in Hex2Obj, but I got these results: Link to comment Share on other sites More sharing options...
shak-otay Posted September 29 Share Posted September 29 (edited) Sorry, missed to give the H2O file (copy 6 lines into a .txt file, rename it to Porsche911_fst.H2O, Open .dat file, then load that H2O file): 0x0 500 Vb1 14 10 0x80080 10348 021400 0x0 255 MakeObj tool for getting face indices from \MESH\xxxxxxxx.dat file Edited September 29 by shak-otay Link to comment Share on other sites More sharing options...
shak-otay Posted September 30 Share Posted September 30 (edited) 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 October 1 by shak-otay Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now