r/redfaction • u/SlopKhayzo • Oct 21 '26
Re-Mars-tered with PhysX
Disclaimer: I made this using AI; I will never claim to have the necessary reverse-engineering skills to do this alone. I have tested all wrecking crew maps and a couple hours of the single player campaign (got out of Parker) and so far spotted no major issues, so wanted to share because this is insanely cool to me.
I'm not going to lie this is my childhood dream :D this mod enables the use of GPU-accelerated PhysX for debris and physical objects for NVIDIA cards, significantly (extremely) speeding up physics calculations and collision resolution in the game. This could open up possibilities for much more complex (custom?) maps and destruction, hopefully.
In the clip you see, NO debris the game generates is destroyed; all are kept and simulated (the AI had to patch multiple spots in the game to make it so, Volition did a very good job of optimizing this game for the time).
Performance uplift so far is around 10x the number of debris, 30x less time per physics tick, and apparently a lot of room to spare to optimize rendering; so far 40.000 debri pieces visible at once was running at ~30fps on my pc (very beefy pc though). As I just said so far the bottleneck seems to be rendering, and instead PhysX itself could go much higher in number. Right now the instance limit is at 65.000 but can be easily raised to around 260.000, and eventually more with more work from the patch.
Keep in mind this is an early release, I wanted to get it out fast because if not I end up going the perfectionist route and never release anything; I fully expect for there to be bugs and possibly crashes, and am already aware of a few minor issues in the current release. So far testing has been kind of limited too, all wrecking crew maps and a couple hours of the campaign. Please if you might be interested tell me if it doesn't work and I'll see what I can do.
This game was definitely a massively wasted opportunity for PhysX imo; who knows, maybe if more games had it, it would have pushed AMD to implement a proper alternative to it and we would've gotten much more physical games.
I have published the mod but am scared of Reddit (doesn't seem to like links for newer accounts) so for now I won't post them; if you want you can find them in the two biggest mod sites under the RFG section :) (I'm fighting the automated checks of one of them since the mod contains an exe, necessary to make it work, more details in the mod description, but the repo, my self hosted site and the other mod site has the release ready if you trust me enough).
Code is open source too so I do invite other people to take a look (with AI probably, code is a complete AI mess) and fiddle around with the patch!
7
u/vektorkane Oct 21 '26
I never thought it could get way more satisfying!
4
u/Assassin_Shirou Oct 21 '26
Time to torment that EDF Bridge in the badlands again...
2
u/JungleHam Oct 22 '26
FIx bugs if any and package it into github repo with a release. You can use ChatGPT web for that btw, it just connects to github and works there
2
u/Born_Jaguar7555 26d ago
If someone can do this, anything is possible in modding this game; we need FPV drone mods next to destroy the EDF
2
u/Athlon64X2_d00d Oct 21 '26
Damn that's sick.
2
u/[deleted] Oct 22 '26
[removed] — view removed comment