Closed preist-nvidia closed 11 months ago
Thank you for the report @yananZZZZ we will have a look and get back to you.
Hello, I had a look at the the ovd capture but I could not find something that is obviously incorrect. It might be worth to try a couple of things to see if it starts to work afterwards:
The file I used to experiment is attached. Maybe it helps to copy some settings.
Hi,
I open your usd and the simulation is rather good. however i try to change sdf spacing to 0.001 to make 500 resolution for my mesh shape. it will get IE in GPU dll. I also change
maxRigidContactCount to 5242880
maxRigidPatchCount = 819200;
as it not the default value in your scene. it didn't work neither.
May I know the PhysX version used in Omniverse as i'm using V5.1.3. One more thing, is there still cooking process for mesh shape. If it's the case, it rather fast in Omniverse, I wonder if there is some optimization or tips to share.
thank you
Omniverse 104.x (I guess that's equivalent 2022.3.x) should use the PhysX SDK 5.1.x. Usually the SDKs minor version increases with every new major version of kit. So 2022.4 would probably use 5.2.x but I'm not perfectly well informed on that.
I can try to set up your scene in the PhysX SDK to see if I run into problems too.
About cooking: There is a way to create SDFs on the gpu but it has not made it into the documentation yet. I'll update the docs asap. In the meantime you can try to set it up without documentation as it is quite easy: In the PxSDFDesc structure, make sure the member sdfBuilder points to a valid instance of the gpu sdf builder
sdfDesc.sdfBuilder = PxGetPhysicsGpu()->createSDFBuilder(cudaContextManager);
Make sure you release the sdfBuilder instance after the cooking to avoid memory leeks since the memory is owned by the caller. You might need to inlcude #include "PxSDFBuilder.h"
Hi I'm quite sure you that the version of PhysX is 5.2.x as there is no "PxGetPhysicsGpu" in V5.1.x. I cannot find "PxSDFBuilder.h" in V5.2.x neither. Is this file under a special directory? I get some questions and hope to get some ideas from you:
Sorry to bother you with so many questions as mesh collision is rather complicated and I trying to rule out the any possible cause.
You're right, the SDFBuilder seems to be in the 5.3 SDK version which is not out yet, sorry my fault. Omniverse also has caching built in, so if you compute the same sdf twice, it will take it from the cash after computing it once.
Do you have code you could share with me such that I can reproduce the issue in the SDK? Usually I tend to modify the SDF snippet such that it uses different meshes and different parameters since it is an easy way to get some basic rendering. Having some code from you would simplify the support.
Hi,
I tried to used serialization to export my entire scene into binary and deserialized in the SDFTutorial. however, I encounter some IE when restore my data.
The code I used to serialize the scene is just the demo code in the doc.
PxCollection* collectionScene = PxCollectionExt::createCollection(*m_pScene); PxSerialization::complete(*collectionScene, *m_pSerializationReg); everythingCollection->add(*collectionScene); collectionScene->release(); PxSerialization::complete(*everythingCollection, *m_pSerializationReg); PxDefaultFileOutputStream actorOutputStream("Scene.dat"); PxSerialization::serializeCollectionToBinary(actorOutputStream, *everythingCollection, *m_pSerializationReg); everythingCollection->release();
For the complex mesh data, the deserialization seams ok, but i get IE in the frame render, it looks like the collision between plane and mesh is not work. it works after i change plane to box geometry. I also create a simple box shape mesh and collision between mesh also not work.
Also, I manage to restore some other simple mesh data in to the tutorial but I saw error inside console, does it means it cannot proceed anymore? Attached is my demo code and data. just put the dat file under the same dir with the snippet project the issue should be reproduced. There are three zip files:
Hope you can run the code and get the same result. If need anything, please let me know.
thank you
Sorry for the long delay with answering. I now created a cpp file which you can use to overwrite the SnippetSDF.cpp. It expects the off-3d data file at the location C:\tmp. Feel free to adjust the folder name in the code. Collisions between the complex geometries work but I have not yet tried that base plate rectangle. Please note that SDFs work best on meshes with uniform scaling. Non uniform scaling is not recommended. If non uniform scaling is required, please scale the vertices non-uniformly before you feed them into the cooking pipeline. SnippetSDFwithCustomMesh.zip
Closing for now, please reopen if we should pick this up again.
Discussed in https://github.com/NVIDIA-Omniverse/PhysX/discussions/181