Oh wow, it’s been a long time since I heard from you, great to see you checking it out!
yes, there could be some asserts, I am still covering the basics functionality.
I think I got to a stable point now.
I you get another, please let my know about.
Yes, the notifications can definitely be confusing, even more so now.
One thing that helps clarify it is understanding that two types of objects can have notifications: ndRigidBodies and ndModels.
When you’re working with a model, you typically go through the model updates, grab the bodies you’re interested in, and from there you get the body notifications.
It takes a bit more code, but once you get the idea it actually feels more object-oriented.
I still want to continue my motocross project, but for now…
In this latest SDK I’ve added a lot of features. The most important one is that skeleton joints are now solved using a preconditioned LCP solver. This fixes one of the major issues with long chains that include loops and contacts, the solver now converges almost every time and very much quickly.
That said, there is one caveat: the preconditioned solver isn’t as smooth. It solves each row very quickly, but because it doesn’t always distribute enough iterations across the system, the error in other joints can end up being larger compared to a regular Gauss-Seidel approach.
This is very similar to what happened in version 1.xx.
In practice, though, it’s a rare issue, you’ll barely notice it outside of edge cases.
For example, I only spotted it in the roller coaster demo.
Later I may add an option for a “looser solve” or something along those lines, but for now I’ve just left it out of the demos.
Th either big improvement I made is the adaptive thread dispatcher.
when I made the thread pool, the CPU what two, for or six cores.
at that number of hardware core, dispatching jobs to a thread is not a big deal.
however ever with the increase of core count, this becoming a high fix cost time consuming operation.
image you have 32 threads, and your scene is very small,
the cost of running with all the tread was significant slower that just launching with one thread.
for address that I made the thread dispatcher adaptive. similar to how GPU enqueue kernels.
basically, the invocation passes the number of jobs in advance, and the dispatcher determine how many cores are needed.
This has the effect that setting a high thread count does is no slower, and also the CPU run a lot less so it consumes less power.
It also good for the new Bit/Small cores systems. because by dispatching the low core more frequently, the OS can designate Big Cores to the task more than randomly selecting cores.
seem to work much better.