Please add option to enable PhysX Cuda GPU scene. Need test GPU rigid bodies on my racing engine

Please add option to enable PhysX Cuda GPU scene settings . Would like to test GPU rigid bodies on my racing engine
watch → UE4 Rally test - YouTube
UE4 Drift "Dev Run 08" April/2018 - YouTube
UE4 Drift "Dev Run 07" December/2017 - YouTube

documentation about this is here → https://docs.nvidia.com/gameworks/co…gidBodies.html

would be great to have here option to enable this for main PhysX scene used in world or better to check if GPU is cuda capable → if yes – >allow gpu dynamics

Thanks !

They aren’t going to add that option, but you might be able to get something working with the Nvidia Gameworks branch

Anyone knows when Nvidia Gameworks will officially be integrated into UE4 ? Epic Games is known to be adding Nvidia RTX support fo hybrid realtime ray-tracing but all the new updated Gameworks APIs aren’t officially supported yet?

Gameworks will never be officially integrated. Raytracing support is coming in 4.22 by the end of the year.

And the raytracing support is not the Nvidia solution, it’s a DirectX implementation (DXR)

Enabling GPU scene should be very easy, there is just need to load PhysX3Gpu_x64.dll’s & Dynamically GPULOADHOOK them… ( i did sucessfuly from thirdparty module) .

–>here is physxscene creation in PhysScene_Physx::InitPhysScene()




bool GPUPhysxSucess = false;

//There should be some global settings bool variable “AllowGPUPhysx” & then
if(AllowGPUPhysx) {

Then there is needto create CudaContextManager & get GpuDispatcher from it and add it to SceneDesc same as CpuDispatcher

if(CudaContextManager) {
//means you have sucessfuly loaded GPULOADHOOK dlls //if not ? skip
//there we can check if cudadevice is avaliable
if(CudaContextManager->GetGpuDispatcher()){
// Then enable ENABLE_GPU_DYNAMICS;
PSceneDesc.GpuDispatcher = CudaContextManager->GetGpuDispatcher();
PSceneDesc.flags |= PxSceneFlag::ENABLE_GPU_DYNAMICS;
PSceneDesc.BroadPhaseType:: PxBroadPhaseType::eGPU;

GPUPhysxSucess = true

}

}

else {
////no dlls loaded
}

}

GPhysxSDK->CreateScene(PSceneDesc);

For each rigidbody&joints also set flag to (PxConstraintFlag::eGPUCompatible, GPUPhysxSucess) ;

or

Add FPxSceneDescriptorModifyCallback to allow modify PxSceneDesc on scene creation;

Problem is that there is not yet alowwed to create customScene descriptor for PhysxScene on MapLoad or use customPhysxSceneCreation class;

Also important should be (#define PX_SUPPORT_GPU_PHYSX 1 ) in engine source.
Please allow us to make it easier & use UEphysx scene with GPU power with official Engine Release without need to full recompile Engine Source everytime :wink:

  • Convex hulls require PxCookingParam::buildGRBData to be set to true to build data required to perform contact generation on the GPU. If a hull with more than 64 vertices or more than 32 vertices per-face is used, it will be processed on the CPU. If the PxConvexFlag::eGPU_COMPATIBLE flag is used when the convex hull is created the limits are applied to ensure the resulting hull can be used on GPU.
  • Triangle meshes require PxCookingParam::buildGRBData to be set to true to build data required to process the mesh on the GPU. If this flag is not set during cooking, the GPU data for the mesh will be absent and any contact generation involving this mesh will be processed on CPU.
  • Any pairs requesting contact modification will be processed on the CPU.

it has also some limitations →

  • PxSceneFlag::eENABLE_PCM must be enabled for GPU contact generation to be performed. This is the only form of contact generation implemented on the GPU. If eENABLE_PCM is not raised, contact generation will be processed on CPU for all pairs using the non distance-based legacy contact generation

@Rapid_Wirehead

Which is why Epic will not do it. The point here is “third party”.
Epic is very keen to avoid third party dependencies and middleware wherever possible.
So Epic isnt not doing it for technical reasons but its a development choice.

Third party, -> third party is whole PhysX Engine UE4 is based on, from most primitive->rigidbody?primitive for each primitivecomponent in whole unreal engine, This what I am talking about is part of that third party which is already included & has full dev acess from NVIDIA “i believe” , but not complete yet with latest Physx 3.4 features. I understand that everything cannot be completed at once for everyone as there are a lot of UE4 core programmers, always pushing things forward to go with todays technology standards && ALGORYTHMs. I am just pointing to place where could be good place to dig, to get that standards ready for everyone. My strategy : if anyone have it && anyone can acess it ?, anyone can play with it, anyone can make it more perfect and have place to tell whats goint wrong || what is going better with third party NVIDIA PhysX SDK ◘E◘P◘I◘C◘ is based on. :: … As I like digging, i would like to show my digging experience from my last days :smiley:

You can do whatever you want for your own game, but Epic chose not to use features that will only work with specific hardware brands, like the GPU acceleration with PhysX.

there is easy way how to setup it to get it working on whatever hardware engine is based on primitive hardware recognition&description, so If harware doesn"t support for example NVIDIA CUDA , using GPU processing which is in this century1/4 we are AVAILABLE?NOTHING:LIVING developed by NVIDIA which is base base third party dlls this engine is standing on", we shouldn’t unacceptably look into example of technological backstep in place where it can be avoided by the way, way way.

"By the way From->“From the Insanity of my mind&brain” -> there should be tottaly own new newking physics engine for Unreal Engine 4th or 5th generation, it think to be tottaly independent from third party as it is in this core API base for each collision cappable object in scene & sometimes i think it is lagging with realworld time as it is SPINNING very UNRELIABLE with this divident number “1” which is basement for its divisor “1000” to get real 1.0f(miliseconds) of synced ticktime. Todays or in 21thCentry2/4 it is pretty possible & hardware manufacturers should recreate/rebuild/destroy&maketottalynew their hardware/calculators from its microbase & make new world shocking brand new reviews about it :smiley: xD xD & make it as always super super expensive :smiley: lol ?? “just from deep of my insanity” :smiley: Best of on this “from the insanity story” is that, it will will happen, todays||or 100years later||1000years later.

PS: IT RESET by Think Unreal !

.

If it is not multiplatform don’t expect it in UE4 ever.

multiplatform it is not in term that ATI cards doesn’t have CUDA ?, yes U right. But if you own NVIDIA card it will have huge performance boost with gpu rigid bodies & constraints. Thats why that switch should be usefull. Dont know why ATI&NVIDIA didnt planned together to share between their gpu computing.