Giter Club home page Giter Club logo

Comments (6)

PierreTerdiman avatar PierreTerdiman commented on June 24, 2024 1

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.

proc-sim avatar proc-sim commented on June 24, 2024

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.

jcarius-nv avatar jcarius-nv commented on June 24, 2024

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.

proc-sim avatar proc-sim commented on June 24, 2024

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.

jcarius-nv avatar jcarius-nv commented on June 24, 2024

Do you have, by any chance, another repro available for that case? I could then check the exact code path taken.

from physx.

proc-sim avatar proc-sim commented on June 24, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.