hey there,
i'm currently looking at the WRC Series and failing at the recent two Games (WRC10 and WRC Generations)
here is what i've gathered so far:
Extracting:
Ekey has updated the *.PKG Quickbms Script to extract the new Games
https://zenhax.com/viewtopic.php?t=17621&#p74340
all these Files are using RIFF as a Container which can be viewed more or less with riffpad.exe or any hex editor
.PSI = Scene File -> stores linked *.P3D Mesh and *.PMA Materials
.PAN = Animation File -> well, animation data
.PMA = Material File -> stores linked *.PTX Textures
.PTX = Texture File -> basically a headerless DDS File (DXT1, DXT5, BC4, BC5S, BC7)
.P3D = Mesh File -> Blockwise stored Submeshes
Textures:
Acewell has created a Texture Plugin for Noesis
viewtopic.php?p=139861#p139861
newer WRC games do use BC4 and BC7 Textures aswell - i've added them similar to his BC5S Method
Noesis prints out errors on large scaled Textures but converts them well
Meshes:
h3x3r and Szkaradek123 over at ZenHax already made some research about that P3D Format and already made an Import Script
which works fine with WRC 6,7,8,9, also with ETRC European Truck Racing Championship Vehicles
if vertices exceed the 65k limit (mostly on interior meshes) it will look scrambled
https://zenhax.com/viewtopic.php?t=8872
Vehicles need to have that Bone Structure, otherwise all Meshes will be centered to 0,0,0, ending up with a Puzzle
Hierachy starts with "Root" Node followed by "D_Main" and all Dummies / Nodes, each Node has a Matrix 4x4 Transform data set
WRC 7 has 43 "MeLiMesh" entries and 71 "GeLiGeom" / "SGLiSuGe" probably SubGeometry. 16 bytes after "SGLiSuGe" the 3d data starts:
vpos = Position
vnor = Normals
vtan = Tangents
vuvs = UV Data
indx = Indices
WRC 10 added a livery editor - which added these to the Structure
vski = Skin Data
vcol = Color / Collission?
WRC 10 has 71 "MeLiMesh" entries and 143 "GeLiGeom" / "SGLiSuGe" but it now starts after 24 Bytes instead of 16 Bytes
the Blender import is able to load the Bone Structure of WRC 10 Files - but fails at parsing the Mesh (Index out of Range)
and i cant figure if that 24 Byte Offset causes that Issue
https://imgur.com/Y1wVMWj
Model Researcher shows, WRC10 is fine (except for scaled UV)
https://imgur.com/4nlTBLf
WRC Generations totally flipped over the RIFF structure
the Bones remain the same but now each "NodsNoHe" contains "MeRe" - Mesh Resource? WRC Generations Yaris has again 71 of them
"MeRe_" seems to be the ID [Hex: 4D65526506 00 00 00 _XX_ 00 00 00 FF FF]
Code: Select all
Root
D_Main
Exhaust MeRe 37 55
Exhaust_LOD1 MeRe 1C 28
Wiper_L MeRe 01 01
Wiper_L_LOD1 MeRe 2D 45
Wiper_R MeRe 12 18
Wiper_R_LOD1 MeRe 3E 62
Cockpit MeRe 23 35
Cockpit_LOD1 MeRe 08 08
Cockpit_LOD2 MeRe 33 51
Optics_FL MeRe 18 24
Optics_FL_LOD1 MeRe 44 68
Optics_FR MeRe 29 41
Optics_FR_LOD1 MeRe 0E 14
Optics_RL MeRe 3A 58
Optics_RL_LOD1 MeRe 1F 31
Optics_RR MeRe 04 04
Optics_RR_LOD1 MeRe 30 48
SeatPilot MeRe 15 21
SeatPilot_LOD1 MeRe 41 65
SeatCoPilot MeRe 26 38
SeatCoPilot_LOD1 MeRe 0B 11
Engine MeRe 35 53
Engine_LOD1 MeRe 1A 26
Suspension MeRe 46 70
Suspension_LOD1 MeRe 2B 43
Body MeRe 10 16
Body_LOD1 MeRe 3C 60
Body_LOD2 MeRe 21 33
Body_LOD3 MeRe 06 06
Boot MeRe 38 56
Optics_RM MeRe 1D 29
Optics_RM_LOD1 MeRe 02 02
Boot_LOD1 MeRe 2E 46
Spoiler MeRe 13 19
Spoiler_LOD1 MeRe 3F 63
Glass_R MeRe 24 36
Glass_R_LOD1 MeRe 09 09
Bumper_F MeRe 34 52
Bumper_F_LOD1 MeRe 19 25
Cache_LightPods_B MeRe 45 69
Cache_LightPods_B_LOD1 MeRe 2A 42
LightPods_B MeRe 0F 15
LightPods_B_LOD1 MeRe 3B 59
Door_R MeRe 20 32
Door_R_LOD1 MeRe 05 05
Mirror_R MeRe 31 49
Mirror_R_LOD1 MeRe 16 22
Glass_FR MeRe 42 66
Glass_FR_LOD1 MeRe 27 39
Door_L MeRe 0C 12
Door_L_LOD1 MeRe 36 54
Mirror_L MeRe 1B 27
Mirror_L_LOD1 MeRe 00 00
Glass_FL MeRe 2C 44
Glass_FL_LOD1 MeRe 11 17
Hood MeRe 3D 61
LightPods_T MeRe 22 34
LightPods_T_LOD1 MeRe 07 07
Hood_LOD1 MeRe 32 50
Bumper_R MeRe 17 23
Bumper_R_LOD1 MeRe 43 67
Wing_L MeRe 28 40
Wing_L_LOD1 MeRe 0D 13
Wing_R MeRe 39 57
Wing_R_LOD1 MeRe 1E 30
Glass_F MeRe 03 03
Glass_F_LOD1 MeRe 2F 47
Glass_RL MeRe 14 20
Glass_RL_LOD1 MeRe 40 64
Glass_RR MeRe 25 37
Glass_RR_LOD1 MeRe 0A 10
again 71 "MRsc" -> 150 "GeLiGeom" / "SGLiSuGe" which gives the offsets on the meshdata (vcol,vtan,vnor,vpos,vuvs,vski)
these values will be needed to go through the "GeHeGSiz" starting 4 bytes after "GHda"
First entry seems to be Mirror_L_LOD1
Code: Select all
Mirror_LOD1 Submesh Casing:
vcol 00000000 (0000) File Offset 0x6E
vtan F0040000 (1264) File Offset 0x55E
vnor E0090000 (2528) File Offset 0xA4E
vpos C0130000 (5056) File Offset 0x142E
vuvs 90220000 (8848) File Offset 0x22FE
indx ???????? (????) File Offset 0x27EA
Mirror_LOD1 Submesh Mirror:
vcol 10310000 (12560) File Offset 0x317E
and so on
Looks correct - yet i havent seen the link to the index, but it seems to be at the end of each submesh block
https://imgur.com/vqYi7io
would be awesome if someone could take a look at the Blender Script and help me parsing the WRC Generation Meshes
Here are some example files to take a look at
WRC Generations Yaris with material and some texture files etc.
WRC 7 and 10 Yaris - more or less identical
Riffpad.exe - to view the files with structure
"updated" noesis PTX script - as mentioned i added BC7 BC4
https://www.mediafire.com/file/8u9nqstp ... G.rar/file