Replies: 3 comments 2 replies
-
Continuing discussion from #72 I had a look into a 32 bit game using PhysX. Specifically at Sacred 2. I will not be able to do it myself, but if there's someone out there who wants to take a stab, here's my thoughts:
|
Beta Was this translation helpful? Give feedback.
-
I'm still hoping one day that Mirror's Edge 2008 could support it, most of the games supporting PhysX can actually brute force the computation through the CPU, but for some reason Mirror's Edge 2008 uses the CPU in single thread when processing PhysX effects like glass particles breaking etc... Making it absolutely unusable with anything else than an Nvidia card (we're talking +- 15 FPS with top of the line CPUs). |
Beta Was this translation helpful? Give feedback.
-
I absolutely endorse this idea, and while I don't have any real dev skills, I have a 7900 XTX and Arkham Knight (and other hardware-PhysX games) so I can test stuff and provide data. |
Beta Was this translation helpful? Give feedback.
-
This might seem not fitting, however I think here is the best place since ZLUDA is the only project I've seen so far that comes close to how I think it should work. More specifically - re-implemented nvcuda.dll file that can be placed where needed.
What is this about?
PhysX is a "realtime physics engine middleware" as its wikipedia page says. Developed by NovodeX AG which was acquired by Ageia in 2004, and Ageia was acquired by Nvidia in 2008. Both Ageia and Nvidia used it to promote their hardware. Nvidia had to rewrite parts of it so it would use CUDA on their graphics cards, so for some years it was a subject of criticism and controversy in some communities. PhysX can fully work on CPU and only use GPU mode when supported Nvidia card is available. Basically, Nvidia did all they could to promote PhysX among game developers but did nothing to help them properly optimize it, which made their hardware look more appealing due to big performance difference.
That changed a bit with introduction of PhysX v3 in 2011 which was a significant rewrite, and it did bring performance improvements to CPU mode. Right now it's not easy to find information about whether or not some new game uses PhysX v3 (or above) and supports GPU mode for it - I wouldn't be surprised if there is only a couple of such games. This may also be thanks to collaboration with Epic Games - PhysX was well integrated with Unreal Engine since UE3, but UE4 does not offer hardware acceleration support for its PhysX v3/v4 features. Even though its GPU mode is still there, it was rarely or never used, because most features run well on CPU.
Since its v4, PhysX became open source and it's available here: https://github.com/NVIDIAGameWorks/PhysX
The problem still remains with those games that were released with PhysX v2 included. There is no way to move them to newer PhysX versions to improve performance, and all those added effects still massively impact performance even on modern CPUs when enabled. There is also a huge contrast in visuals of most of such games when compared between PhysX on/off modes - since it mostly served marketing purposes, it was rarely implemented properly. In some cases it's a choice between excessive amounts of smoke/particles/debris and zero amounts of those. In other cases the game might allow to switch between 2-3 presets or manipulate some settings through configuration files, but in absolute most cases it will not be enough to make the game playable while PhysX is enabled.
A rough list of affected games can be found here. There is another list of wikipedia but it's much less accurate and sometimes misleading.
Why care about video games?
It could be a significant milestone for a project like this. It gives one more reason to make it work on AMD (or any other) GPU. And it certainly will be appreciated by PC community.
Can it even work?
It's unknown. But at least PhysX v2 calculations that are done through CUDA do not depend on anything that happens in game - CUDA device does not need to have access to 3D renderer.
There are multiple problems that can be outlined though.
Theoretically it's already possible to test ZLUDA as a CUDA processor for PhysX on a real game - I think the only fitting 64-bit game is Batman Arkham Knight. However it uses PhysX v3 which may require access to 3D renderer for certain bits (just my assumption), so it might not be the frendliest case. I can't test this myself for now since I don't own a supported Intel GPU.
@vosen suggested posting the details here. I guess this can be considered a milestone draft or a discussion place for anyone interested.
Beta Was this translation helpful? Give feedback.
All reactions