Comments (6)
Notes so far:
If you run this in Debug you quickly hit asserts triggered by NaNs in the system. It is likely that they are the source of non-determinism. Now the question is why/where they're coming from - I haven't figured it out yet.
The issue seems to vanish if you set the mass/inertia properly, as I think you tried to do in commented out lines.
It only seems to affect the PGS solver running on the GPU.
Note that local & global poses are usually not interchangeable. The local poses are mainly used to create 'compounds', so for simple bodies with a single shape like in your test, the proper way would be an identity local pose and a non-identity global pose, i.e. the version that doesn't work here.
from physx.
Thanks for checking this out.
In my production application, setting mass/inertia properly doesn't seem prevent the indeterminism, nor does switching to TGS (both PGS and TGS on the GPU are indeterministic). However, not all configurations of rigidbodies demonstrate this behavior...the configuration in the snippet I posted is particularly egregious - with RBs flying off to infinity right away. In some tests of other configurations, it can take 10-15 run-throughs of the same sim to notice only minor jiggles of indeterminism after many frames that don't happen each time. And I also noticed that I don't get the indeterminism with small numbers of RBs in other configurations. The sweet spot seems to be in the 150+ range.
Here's a clip showing a configuration where it happens in both TGS and PGS:
2023-02-27.13-31-50.mp4
from physx.
Hi @Tysoni
I managed to trace down the issue to a buffer overflow problem in GPU box-box contact generation. With the fix applied your snippet remains deterministic. The problem should, therefore, be solved in the next release.
Thanks again for reporting and providing a full reproduction!
from physx.
That's great news, @jcarius-nv, although I also get the issue with convex hulls (not sphere hulls from what I can see). Would the buffer overrun fix for box-box contacts affect convex hulls as well? Or would that be a separate overrun?
from physx.
Do you have, by any chance, another repro available for that case? I could then check the exact code path taken.
from physx.
@jcarius-nv Hmm, so I thought I had one, but looking closer at the setup (it's a bit complex) the issue may be related to a box-collider fallback I use for degenerate input geometry. In simpler setups I am not able to cause indeterminism when I force convex colliders for all meshes.
So, I'm going to mark this issue as closed and will re-open a separate issue if I run into further indeterminism after the next build is released. Thanks!
from physx.
Related Issues (20)
- Position Based Dynamics: Set Particle Position and Velocity HOT 4
- TGS instability with drives HOT 4
- crush in PxContactStreamIterator getFaceIndex0 when GPU enabled and contact with custom geometry or mesh HOT 2
- PxRigidBodyExt::setMassAndUpdateInertia of kinematic rigid actor with triangle mesh causes: Assertion failed: mG.isFinite() HOT 2
- setting driveForceLimit does not work HOT 2
- SDF cause CUDA error , even black screen (driver crash)
- SDF cause CUDA error , even black screen (driver crash?) HOT 4
- Increasing Damping ingnores ForceLimit of PxD6 Joint HOT 9
- PxCustomGeometryExt::BaseConvexCallbacks::raycast doesn't report back which fields are valid HOT 2
- Trigger emulation and character controller HOT 3
- Crash inside SAP Broad phase when there is too much collision pairs HOT 2
- issue with getting a center of mass
- Unable to compile with Clang - __m128 is not a structure or union HOT 3
- TGS solver does not support PxPairFlag::eNOTIFY_THRESHOLD_FORCE_... flags HOT 2
- Blast build for Visual Studio 2022
- I can not link physx 5.3.0 library from vcpkg into my project HOT 3
- Static contact forces are not correct on inclined plane HOT 5
- linux - cannot build libraries (error: 'src' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage]) HOT 9
- Bad task scheduling due to lack of priority HOT 2
- How to read data from Flow HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from physx.