Project CARS Modding Questions & WIP

So, I spent some time today on pCars working with a new "tester" addon car, hex editing the windscreen MEB and got the rain working. I know that Autoprophet released a Zonda with rain working, but that windscreen was just a copy of existing pCars MEB with no edits.
This is a pic of the tester (so, some items of the cockpit are not completed). Also, I would need to detach wipers as their own meb and animate, too.....
pcars_rain_test1.jpg
[/URL][/IMG]
pcars_rain_test1.jpg


Small problem with hex editing the Meb was that graphic anomalies appear in certain views...see the pic below....
pcars_rain_test2.jpg

Perhaps somebody from Machine Dojo modding team (or another modder) has resolved this anomaly on their own tester cars and would care to respond?
Great work.Now you just need to add some more uv channels for wiper mask and reflection. To animate the wiper, it seems that the only way is using another car's wiper model unless you know how to rig the new model. But still you can edit the vertex position to fit the wiper to your car. Also you have to use the wiper mask from another car because it's not easy make the texture yourself. As for the graphic anomalies, you just need to hex edit other .meb files.
 
@Autoprophet-ZR
I did add in all missing UV channels to match an original pCars windscreen meb. I'm used to hex editing mebs (I've hex edited numerous track/car Mebs between NFS Shift and S2U)..nothing new there.

So, you are saying that the graphics anomaly comes from other mebs that require editing? I suppose I'll need to poke around with that.

I already know what it takes to animate the wipers (just haven't started working on it). I know how to rig up the bones and skeleton in Zmodeler, due to doing that in S2U to make parts shake and bounce around (along with knowing how to configure the animation files). So, I wouldn't go and use existing wiper models from another car....that just wouldn't look right.

I noticed the wiper mask textures are quite involved and had figured that there should be enough existing textures to find one that works.
 
@Autoprophet-ZR
I did add in all missing UV channels to match an original pCars windscreen meb. I'm used to hex editing mebs (I've hex edited numerous track/car Mebs between NFS Shift and S2U)..nothing new there.

So, you are saying that the graphics anomaly comes from other mebs that require editing? I suppose I'll need to poke around with that.

I already know what it takes to animate the wipers (just haven't started working on it). I know how to rig up the bones and skeleton in Zmodeler, due to doing that in S2U to make parts shake and bounce around (along with knowing how to configure the animation files). So, I wouldn't go and use existing wiper models from another car....that just wouldn't look right.

I noticed the wiper mask textures are quite involved and had figured that there should be enough existing textures to find one that works.
That's awesome. Rigging the models is the only thing I can't figure out in modding this game. I used R18's wiper on the test car RPX1 with edited vertex position, which acutally looks not bad. But there's another challenge that the .bas files are binary now. Maybe you can still use the existing animation files.
 
Excellent work:thumbsup:, I unfortunately can not help since stopped trying to move the driver:(
the driver position is controlled by the .cdv file. You need to edit the following addresses:
1. 0034-0037 (x pos: external view)
2. 0038-003B (y pos: external view)
3. 003C-003F (z pos: external view)
4. 0040-0043 (x pos: cockpit view)
5. 0044-0047 (y pos: cockpit view)
6. 0048-004B (z pos: cockpit view)
I edit float values to get the driver aligned with the steering wheel.
to get the driver to show up you need to have the files from animation folder of autoprophet's car but rename the .bab. Then you need to replace s2u with these zonda files in this location: MODS\your car\vehicles\your car: cdv, cdp, cgp. Rename them to reflect the name of your car.
 
could you please let us know which mebs need to be adjusted with new UV layers?
Basically models with paint or glass materials. I'm not very sure of that so far. But you can test it by removing some models and see if there're graphic anomalies. And hex editing involves not just UV layers, there're more you need to explore.
 
@Autoprophet-ZR
Animating the suspension could be possible in theory. It's just many more bones to articulate, along with applying bone affection (using Zmodeler). It would be best if we had the 3dsmax tools used by SMS for animating objects, especially for a suspension model.

Yes, the animation files are now binary. What I did in S2U was take an existing animation file to use as a "Donor", then edit the information for node names, along with updating the quaternion data of the "Transform" section for each node. Seeing as pCars animation file is binary, it's just a matter of locating all of those transform quaternion addresses in the file.

[as a short overview of the process]
In Zmodeler, using an animated model from the same car that donated the animation file(s), I would import the model into my project. Attach the skeleton/bones to my model, then delete the meshes of the donor model. I would them locate/rotate each bone over the area of the mesh I wanted to affect, along with deleting any extra nodes/bones. From there, I would select a bone (make current) and apply weight painting to the appropriate vertices. Then I would select the next bone and repeat the weight painting process. When finished, I would record the x/y/z positions (and orientations) of all bones. Those positions would be entered into a quaternion spreadsheet (that Chevyopala provided) and would generate the "transform" data to be entered into the animation file.
Prior to exporting the new animated model, I would make the materials of the animated meshes a skinned material.


[regarding edits for windscreen meb]
When reviewing/editing the windscreen meb, I did see that the original pCars meb has 10 vertex sections. So, I noticed I had 3 sections missing in the meb of my tester car.
I first set address 0x05 to "01" to match existing.
I copied section 02000000 02000000 00000000 to make sections 02000000 04000000 00000000 and 02000000 05000000 00000000
I was missing UV Channel #4 (typically used as the lighting channel), so I copied channel #0 to make channel #4.

I filled all words in UV Channel #4 with a floating point value of 1.0, while leaving a pad word of 00000000 at the start of the data section. For the most part, the original pcars windscreen has mostly 1.0 used for most words.

Once I changed the data in newly created section 02.... 04... 00... to a common floating point value, the rain appeared. The graphic anomaly appeared after the rain effect activated.

perhaps you have discovered other things that must be done to the windscreen meb?

EDIT: I did a quick test where I stripped the cockpit VHF down to just the cockpit windscreen and no longer see those graphic anomalies. So, I now know that the other cockpit mebs require editing, as you mentioned.
 
Last edited:
For instance, if gauges are a separate meb, they need sections 02.... 04..... 00... and 02.... 05.... 00... added in. The same for needles.
So, just open original pCars mebs for various items and be sure to include any missing sections in the meb. Remember to change the # of vertex data sections at the beginning of the file, too.
 
i seem to have eliminated graphical anomalies: added uv4 to bonnet, body, boot, and bumper. The major change happened after editing bumper lods so if anyone tries in the future, start with that one, and perhaps you wont have to go through the painful routine.
 
@Autoprophet-ZR
Animating the suspension could be possible in theory. It's just many more bones to articulate, along with applying bone affection (using Zmodeler). It would be best if we had the 3dsmax tools used by SMS for animating objects, especially for a suspension model.

Yes, the animation files are now binary. What I did in S2U was take an existing animation file to use as a "Donor", then edit the information for node names, along with updating the quaternion data of the "Transform" section for each node. Seeing as pCars animation file is binary, it's just a matter of locating all of those transform quaternion addresses in the file.

[as a short overview of the process]
In Zmodeler, using an animated model from the same car that donated the animation file(s), I would import the model into my project. Attach the skeleton/bones to my model, then delete the meshes of the donor model. I would them locate/rotate each bone over the area of the mesh I wanted to affect, along with deleting any extra nodes/bones. From there, I would select a bone (make current) and apply weight painting to the appropriate vertices. Then I would select the next bone and repeat the weight painting process. When finished, I would record the x/y/z positions of all bones. Those positions would be entered into a quaternion spreadsheet (that Chevyopala provided) and would generate the "transform" data to be entered into the animation file.
Prior to exporting the new animated model, I would make the materials of the animated meshes a skinned material.


[regarding edits for windscreen meb]
When reviewing/editing the windscreen meb, I did see that the original pCars meb has 10 vertex sections. So, I noticed I had 3 sections missing in the meb of my tester car.
I first set address 0x05 to "01" to match existing.
I copied section 02000000 02000000 00000000 to make sections 02000000 04000000 00000000 and 02000000 05000000 00000000
I was missing UV Channel #4 (typically used as the lighting channel), so I copied channel #0 to make channel #4.

I filled all words in UV Channel #4 with a floating point value of 1.0, while leaving a pad word of 00000000 at the start of the data section. For the most part, the original pcars windscreen has mostly 1.0 used for most words.

Once I changed the data in newly created section 02.... 04... 00... to a common floating point value, the rain appeared. The graphic anomaly appeared after the rain effect activated.

perhaps you have discovered other things that must be done to the windscreen meb?

EDIT: I did a quick test where I stripped the cockpit VHF down to just the cockpit windscreen and no longer see those graphic anomalies. So, I now know that the other cockpit mebs require editing, as you mentioned.

Thanks for your share of knowledge. I'm really not good at handling ZM's skeleton tools and for me there's still much to learn about this software. From my view there's no way SMS can release their Blimey Tools for 3ds max. Indeed this game was never designed for modding.

Regarding the cockpit windscreen edit, if you use model imported from sources other than this game, you need to flip the normals in section 2 2 0 by changing the sign of the float values. Then you can get the right "refraction" effect (simulated by reflection in fact).
 
When I pull models from Forza, I always flip the windscreen while working with it in Zmodeler.

Yeah...all of this hex editing is just crazy....I feel more like a programmer than a modder when working with pCars.
The cockpit of my tester car is cleaned up now (all mebs and materials are good). Windscreen is reflecting, shows cracks with heavy damage and the rain is working. As you mentioned, I had to run through all mebs and add missing sections, when needed. I'll probably play with the wipers in Zmodeler tomorrow, to get them animated. I'll have to decode the animation binary, too.
 
When I pull models from Forza, I always flip the windscreen while working with it in Zmodeler.

Yeah...all of this hex editing is just crazy....I feel more like a programmer than a modder when working with pCars.
The cockpit of my tester car is cleaned up now (all mebs and materials are good). Windscreen is reflecting, shows cracks with heavy damage and the rain is working. As you mentioned, I had to run through all mebs and add missing sections, when needed. I'll probably play with the wipers in Zmodeler tomorrow, to get them animated. I'll have to decode the animation binary, too.
Yes in ZM the windscreen need to be flipped so that it can be seen from inside. Yet I still need to hex edit the normals so that the rain drop "refraction" effect looks right. In your pictures, however, it looks ok. Perhaps you've solved it in another way.

RPX1 in patch 2.5. Haven't updated this test car to fit patch 3.0 yet. Just a matter of materials and trail maps.
damage.jpg wiper&rain drops.jpg
 
@Autoprophet-ZR
Your test car is looking very good.
I took a shortcut on the tester car and pulled the Acura NSX out of S2U. My thoughts being that there would be less to edit, while I learn the differences between S2U and pCars. So, maybe SMS has flipped the normals for the windscreens in S2U by default, since the rain drops appear ok on my test car. I didn't make any changes to what existed for section 2 2 0

But, thank you for the tip on the normals. Because, I'm sure I'll have the problem once I throw out this test car and start working with models I actually want to use.

@Thom60600
We are not repacking original BFF files (the game fails to load when you do that). When we add a car, we make new "dummy" BFF files, which are copies of original BFF files. Then, we simply work with our files, placing them into appropriate folders.
 
Last edited:
Autoprophet,
would you mind updating your mtx resource? There have been some changes with 3.0 patch (I started editing windscreen and noticed new sections were added) and I can't get to grips with bmt to mtx conversion. I specifically need the values for the rainstreak. I noticed your zonda has all that sorted but it's all in bmt format.
 
I did send revised mtx for exterior windows and windscreen to gvse to keep him going.

@gvse, if you spot any other changes, let me know and I'll run them through bmt2xml. Until Autoprophet gets the time to update his resource.
 

Latest News

What's needed for simracing in 2024?

  • More games, period

  • Better graphics/visuals

  • Advanced physics and handling

  • More cars and tracks

  • AI improvements

  • AI engineering

  • Cross-platform play

  • New game Modes

  • Other, post your idea


Results are only viewable after voting.
Back
Top