READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

WRC 7 .P3D models

Post questions about game models here, or help out others!
huckleberrypie
mega-veteran
mega-veteran
Posts: 319
Joined: Mon Apr 26, 2010 6:51 am
Has thanked: 95 times
Been thanked: 13 times

WRC 7 .P3D models

Post by huckleberrypie » Sun Nov 11, 2018 4:12 am

I know I've already started a thread about this a while back, but that was when I attempted to use Ninja Ripper on the game in vain. Turns out that aluigi wrote a script for WRC 7's PKG file formats and that using it reveals a surprisingly good amount of content, all conveniently labelled.

That being said, the .P3D and .PTX files use RIFF as a container, but I figured there's more to it than just that. Maybe some of you 3D experts could figure out how to break this down so that we could port these cars to some other game easily.

Here are sample files I extracted using the BMS scripts mentioned above:
https://www73.zippyshare.com/v/vcUnAAjj/file.html
https://www73.zippyshare.com/v/AauPpLjC/file.html

EDIT: I opened the P3D and PTX files using Riffpad and the nodes seem neatly laid out and labelled (vertex positions, vertex normals, tangents, vertex uvs, indices...). Then again I'm not an expert with deciphering them floats and vert positions so I'll leave those to whoever can understand them:
Image

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2695
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 668 times
Been thanked: 1380 times

Re: WRC 7 .P3D models

Post by shakotay2 » Sun Nov 11, 2018 7:34 pm

P3D is not too hard:
wheel_grav-P3D.png
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2695
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 668 times
Been thanked: 1380 times

Re: WRC 7 .P3D models

Post by shakotay2 » Sun Nov 11, 2018 8:09 pm

toyota_yaris, fst submesh:
toyota_yaris-P3D.png
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

huckleberrypie
mega-veteran
mega-veteran
Posts: 319
Joined: Mon Apr 26, 2010 6:51 am
Has thanked: 95 times
Been thanked: 13 times

Re: WRC 7 .P3D models

Post by huckleberrypie » Sun Nov 11, 2018 11:43 pm

Great, now all we need is a maxscript to automate this. I am glad that Kylotonn didn't over-engineer things and relied on a familiar file structure. Heck, you could end up writing an exporter and somehow inject custom cars to the game.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2695
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 668 times
Been thanked: 1380 times

Re: WRC 7 .P3D models

Post by shakotay2 » Mon Nov 12, 2018 11:45 am

huckleberrypie wrote:Great, now all we need is a maxscript to automate this.
Doing it in 'C' is easier, imho. Maybe in the Make_obj project, but the positions of the parts must be corrected:
Toyota_Yaris-P3D-all.png
Heck, you could end up writing an exporter and somehow inject custom cars to the game.
Exporters generally require a full format analysis, which is tedious task.
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

huckleberrypie
mega-veteran
mega-veteran
Posts: 319
Joined: Mon Apr 26, 2010 6:51 am
Has thanked: 95 times
Been thanked: 13 times

Re: WRC 7 .P3D models

Post by huckleberrypie » Mon Nov 12, 2018 12:10 pm

shakotay2 wrote:
huckleberrypie wrote:Great, now all we need is a maxscript to automate this.
Doing it in 'C' is easier, imho. Maybe in the Make_obj project, but the positions of the parts must be corrected:
Toyota_Yaris-P3D-all.png
Whichever is more convenient lol. I can presume that some of the nodes do contain pivot positions and they seem to denote part and dummy/bone names as well.
Heck, you could end up writing an exporter and somehow inject custom cars to the game.
Exporters generally require a full format analysis, which is tedious task.
Yeah, I know there's certainly more to it than a stream of verts and tris in a RIFF container.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2695
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 668 times
Been thanked: 1380 times

Re: WRC 7 .P3D models

Post by shakotay2 » Mon Nov 12, 2018 2:34 pm

Can you export any infos from Riffpad, or does it create a logfile?

I'm too lazy guessing those positon offsets from the P3D file:

# 0. 2a 6a 6a , NodsNoHeX, Root
# 1. b6 69 6a , NodsNoHeZ, D_Main
# 2. cc 78 2 , NodsNoHe^, Piston_FR
0.967096 0.028186 -0.252846
-0.027130 0.999603 0.007665
0.252961 -0.000553 0.967476
-0.534624 -1.300303 0.664300

# 3. 5a 78 2 , MeLiMesh:
# 4. c 78 2 , GeLiGeom
# 5. ec 77 2 , SGLiSuGe
# 6. 9c 78 2 , NodsNoHe^, Piston_RR
# 7. 2a 78 2 , MeLiMesh:
# 8. dc 77 2 , GeLiGeom
# 9. bc 77 2 , SGLiSuGe
# 10. 40 2d , NodsNoHe^, D_Exhaust
# 11. 78 , NodsNoHed, D_Exhaust_Flash
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

huckleberrypie
mega-veteran
mega-veteran
Posts: 319
Joined: Mon Apr 26, 2010 6:51 am
Has thanked: 95 times
Been thanked: 13 times

Re: WRC 7 .P3D models

Post by huckleberrypie » Mon Nov 12, 2018 2:48 pm

shakotay2 wrote:Can you export any infos from Riffpad, or does it create a logfile?

I'm too lazy guessing those positon offsets from the P3D file:

# 0. 2a 6a 6a , NodsNoHeX, Root
# 1. b6 69 6a , NodsNoHeZ, D_Main
# 2. cc 78 2 , NodsNoHe^, Piston_FR
0.967096 0.028186 -0.252846
-0.027130 0.999603 0.007665
0.252961 -0.000553 0.967476
-0.534624 -1.300303 0.664300

# 3. 5a 78 2 , MeLiMesh:
# 4. c 78 2 , GeLiGeom
# 5. ec 77 2 , SGLiSuGe
# 6. 9c 78 2 , NodsNoHe^, Piston_RR
# 7. 2a 78 2 , MeLiMesh:
# 8. dc 77 2 , GeLiGeom
# 9. bc 77 2 , SGLiSuGe
# 10. 40 2d , NodsNoHe^, D_Exhaust
# 11. 78 , NodsNoHed, D_Exhaust_Flash
Not sure, I'll have to take a look.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2695
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 668 times
Been thanked: 1380 times

Re: WRC 7 .P3D models

Post by shakotay2 » Mon Nov 12, 2018 9:12 pm

the positioning problem seems to be solved, but my current problem is
there's 71 nodes but I've got 67 names only
movingTheDoor.png
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

huckleberrypie
mega-veteran
mega-veteran
Posts: 319
Joined: Mon Apr 26, 2010 6:51 am
Has thanked: 95 times
Been thanked: 13 times

Re: WRC 7 .P3D models

Post by huckleberrypie » Tue Nov 13, 2018 12:20 am

shakotay2 wrote:the positioning problem seems to be solved, but my current problem is
there's 71 nodes but I've got 67 names only
movingTheDoor.png
Did you take a look at similarly-sized nodes though? I bet some of them may have been named crypticly or not at all.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2695
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 668 times
Been thanked: 1380 times

Re: WRC 7 .P3D models

Post by shakotay2 » Tue Nov 13, 2018 8:13 pm

I don't know - I searched for "NodsNoHe" which is contained 67 times.

There's also MeLiMesh (43x), GeLiGeom (71), SGLiSuGe (71) but guess that's different things.

Maybe I should use PA__Head, SCENE___ENDI, PCPhHe and something else for the missing 4 nodes?

There's numbers for "NodsNoHe" but they seem to define the hierarchy.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

huckleberrypie
mega-veteran
mega-veteran
Posts: 319
Joined: Mon Apr 26, 2010 6:51 am
Has thanked: 95 times
Been thanked: 13 times

Re: WRC 7 .P3D models

Post by huckleberrypie » Wed Nov 14, 2018 12:50 am

shakotay2 wrote:I don't know - I searched for "NodsNoHe" which is contained 67 times.

There's also MeLiMesh (43x), GeLiGeom (71), SGLiSuGe (71) but guess that's different things.

Maybe I should use PA__Head, SCENE___ENDI, PCPhHe and something else for the missing 4 nodes?

There's numbers for "NodsNoHe" but they seem to define the hierarchy.
Maybe, I dunno. I do hope someone would be kind enough to do a script which can at least parse these models completely. I also do have a few other sample files e.g. skinned models for characters and so on.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2695
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 668 times
Been thanked: 1380 times

Re: WRC 7 .P3D models

Post by shakotay2 » Wed Nov 14, 2018 2:58 pm

huckleberrypie wrote:I do hope someone would be kind enough to do a script which can at least parse these models completely.
yeah, maybe.
Me, I'm finished with this: https://www63.zippyshare.com/v/Deke91Lr/file.html
Toyota_Yaris-P3D-undone.png
Too tired to solve stupid naming puzzles like this one. :roll: Keep in mind that the names DON'T match the parts.

You may try your luck moving the remaining displaced parts to their correct positions.
(Dunno why the bumpers don't fit, even after swapping rear and front ones.)

Rotation might be required, too, for the wipers, for example.

(upps, forgot to care for uvs...)
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

huckleberrypie
mega-veteran
mega-veteran
Posts: 319
Joined: Mon Apr 26, 2010 6:51 am
Has thanked: 95 times
Been thanked: 13 times

Re: WRC 7 .P3D models

Post by huckleberrypie » Wed Nov 14, 2018 3:50 pm

shakotay2 wrote:
huckleberrypie wrote:I do hope someone would be kind enough to do a script which can at least parse these models completely.
yeah, maybe.
Me, I'm finished with this: https://www63.zippyshare.com/v/Deke91Lr/file.html
Toyota_Yaris-P3D-undone.png
Too tired to solve stupid naming puzzles like this one. :roll: Keep in mind that the names DON'T match the parts.

You may try your luck moving the remaining displaced parts to their correct positions.
(Dunno why the bumpers don't fit, even after swapping rear and front ones.)

Rotation might be required, too, for the wipers, for example.

(upps, forgot to care for uvs...)
Yeah, apologies for inconveniencing you. I could've done the dirty deed myself but I kinda' find floating point numbers a bit complex to wrap my head around. One thing though: Could you point me as to where the face indices can be found or how to find them in the RIFF node? The verts themselves seem straightforward, and I might as well try to do the other cars myself to save you the trouble. :)

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2695
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 668 times
Been thanked: 1380 times

Re: WRC 7 .P3D models

Post by shakotay2 » Wed Nov 14, 2018 4:13 pm

huckleberrypie wrote:Yeah, apologies for inconveniencing you.
what? :)
One thing though: Could you point me as to where the face indices can be found or how to find them in the RIFF node?
# FIs at: 20504 47e2c 5151c 58a6c 7ad66 a268e aef2e ef17a 1271aa 16bfa8 17eaa2 184234 19e726 1a956e 1afbc6 1b2704 1ba284 1de366 1f3cd8 1fc1b4 1fde28 20062e 20a08a 2120ec 215ce6 231730 242a16 24aa78 24e672 26a0bc 29235a 29ce14 29e630 29f936 2a0bbe 2b383a 2bdde2 41b8d6 4aa13e 4b506e 4c91dc 4d06b8 5250ca 541ede 579b28 583bfe 5898e0 58c85c 59278a 595a4e 59e38e 5a248e 5ab374 5af474 5b7426 5bc4ce 5c4fb4 5ca05c 5d78ae 5dd0e8 5e2886 5efe1a 5f5654 5fac4e 622dea 631396 641382 66e372 689ac0 68e0cc 6a2118
I might as well try to do the other cars myself to save you the trouble. :)
As soon as the naming riddle is solved I'd release the Make_obj project (with C source).

doors
22 -> 37, this means D_B_Wing_L_22 (which is assigned to the left door mesh :roll: ) needs position offset of Door_L(_37) block in P3D file
26 -> 38
25 -> 37
29 -> 38

36 -> 43
j_bumper
0 -> 10
4 -> 11
1 -> 12
5 -> 13
exhaust
2 -> 6 or 4?

Wiper
3 -> 28 (29?)
6 -> 16 (17?)
engine
30 -> 39

bumper_F
67 -> 64
70 -> 65
Hud
35 -> 43
36 -> 44


Anyways, here's the zip with uvs contained:
https://www7.zippyshare.com/v/3yF3IYqF/file.html

Some uvs may need some scaling (1.5?) but the selected one in the picture obviously not:
Toyota_Yaris-P3D-uvs.png
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

Post Reply