Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Tags in this Discussion

Physx Clothing-GPU Solving
  • Hello,

    I am trying to perform cloth simulations on GPU using Physx, however I have failed so far.I got a GTX 560 Ti, and an Intel i7.

    When I clear the clothFlag eGPU on the cloth I am using, the simulation works fine, however when I set it, there is no simulation, and the cloth just stays the same.


    I initialize the scene as following:

    if(!sceneDesc.cpuDispatcher) {
    PxDefaultCpuDispatcher* mCpuDispatcher = PxDefaultCpuDispatcherCreate(1);
    if(!mCpuDispatcher)
    cerr<<"PxDefaultCpuDispatcherCreate failed!"<<endl;
    sceneDesc.cpuDispatcher = mCpuDispatcher;
    }

    pxtask::CudaContextManager* mCudaContextManager;
    pxtask::CudaContextManagerDesc cudaContextManagerDesc;
    mCudaContextManager = pxtask::createCudaContextManager(cudaContextManagerDesc, &gPhysicsSDK->getProfileZoneManager());


    if (!sceneDesc.gpuDispatcher && mCudaContextManager )
    {
    printf("gpu dispatcher done!\n");
    sceneDesc.gpuDispatcher = mCudaContextManager->getGpuDispatcher();
    }
    if(!sceneDesc.filterShader)
    sceneDesc.filterShader = gDefaultFilterShader;

    gScene = gPhysicsSDK->createScene(sceneDesc);


    Create the cloth as following:

    cloth = gPhysicsSDK->createCloth(tr,*fabric,points, cd, PxClothFlag::eSWEPT_CONTACT | PxClothFlag::eGPU);

    And update the physx:

    gScene->simulate(myTimestep,NULL,false);
    while(!gScene->fetchResults() )
    {}


    I know for a fact from debugging that the GPU dispatcher is created.

    Am I missing something? What do I need to do in order to enable GPU cloth simulation?

    Thanks in advance.
  • 6 Comments sorted by
  • Is the PhysX enabled in the NVIDIA control panel?
  • Yes it is, and it does not matter whether I let it be auto selected or forced on NVIDIA.
  • Is there any warning on your console? Are you able to run our cloth sample in the GPU mode?

    Can we have a repro for this? Thanks.
  • No, there is no warning in the console, neither in the physx visual debugger. I can run the cloth sample included in the PhysX 3.2 beta sdk in GPU mode.
  • The user and all related content has been deleted.
  • Then we would need a repro to look into your code. Thanks.