Minie v7 physics libraries

Season’s greetings!

A new version of the Minie physics library was released today.

There are some API changes, but they’re all in fairly obscure places. I doubt they’ll impact any applications.

Version 7.0.0 solves a slew of troublesome bugs, mostly related to cloning and (JME) serialization. See the release log for details.

The new version also provides some additional double-precision accessors for collision objects. These might prove useful if you’re simulating physics in a large world—one larger than, say, 20,000 physics-space units in diameter. To make effective use of these accessors, you’d need a version of Minie with double-precision native libraries, such as:

    implementation 'com.github.stephengold:Minie:7.0.0+dp'
19 Likes

The latest version is now 7.0.1

Edit: now 7.0.2

3 Likes

The latest release is now 7.1.0

v7.1.0 adds a new option to generate cylinder collision shapes in DynamicAnimControl.

Also, DacWizard has a new button to display joint angles in radians.

12 Likes

There’s now a 7.2.0 release of Minie, which fixes a few bugs and adds 2 methods for testing and debugging. It’s been a busy month …

The key motivation for v7.2.0 was native-code bugs involving global weak references that could never be deleted. The bugs were discovered on Android JVMs, which reportedly track GWRs in a table limited to 51,200 entries. During tests, the table filled up in about 10 minutes! Special thanks to @tharg2 for reporting the issue and providing the stack trace that pointed me to the root cause.

The new release includes many technical changes “under the hood”. I hope they won’t cause any new issues. For instance, the Windows natives were built using Visual Studio 2022 instead of VS 2019.

The added methods are intended to help debug issues around multi-threaded native libraries and/or BulletAppState.ThreadingType.PARALLEL. Parallel-threaded physics is tricky to get right, and going forward I hope to add runtime checks for threading issues.

(No new progress toward Voronoi fracture, by the way.)

Expect another Minie release once JMonkeyEngine 3.6.0-stable becomes available.

12 Likes

Expect another Minie release once JMonkeyEngine 3.6.0-stable becomes available.

I decided Minie v7.3 can’t wait for JMonkeyEngine v3.6.0-stable. Instead, I’m basing it on v3.6.0-beta3, which looks good so far. I hope this will encourage other software developers to test beta3 in their own projects.

Details to follow…

7 Likes

First off, Minie v7.3 fixes a handful of nasty bugs. These are briefly summarized in the release notes. I’ll gladly go deeper into those if you have questions or concerns.

The DacWizard application has been enhanced in several ways:

  • You can now test ragdolls in poses other than bind pose. This comes in handy if the model’s bind pose is something other than the typical “upright T” pose.
  • You can now configure the torso’s “main bone” from the application. There’s a whole new screen just for this purpose. This feature comes in handy if the model’s root bone is located near its feet—or anywhere other than its pelvis.
  • If you generate Java code from the “test” screen, the output file now includes a utility method to configure the ragdoll. Sometimes a utility method is more convenient than a subclass for this purpose.

DynamicAnimControl has acquired a new kinematic submode, named “reset”. The idea is that, as an alternative to blending the model to a canned animation or to bind pose, you can blend it to a pose that has been previously saved by invoking the saveCurrentPose() method.

There’s a new physics control named JointedBodyControl. The control is similar to RigidBodyControl, except it extends AbstractPhysicsControl and it is aware of physics joints. When you remove the control from a space, all its joints are automatically destroyed.

The CollisionSpace class (a superclass of PhysicsSpace) got a new option to force updates to all AABBs. The option is enabled by default. In theory, disabling the option should boost performance of spaces containing many deactivated (“sleeping”) bodies. I haven’t tried to measure the performance gain.

6 Likes

Addendum:

The new release is actually named “7.3.0+for36”. (That’s in case I ever need to publish a similar release targeting JME v3.5.x .) All the usual variants (“+big3”, “+droid”, “+debug”, etcetera) are provided. For example, to use the “big3” variant in a Gradle project:

repositories {
    mavenCentral()
}
dependencies {
    implementation 'com.github.stephengold:Minie:7.3.0+big3+for36'
}
3 Likes

And now there’s Minie v7.4.0 … which blends the juicy goodness of JME 3.6.0-stable with the latest bugfixes and new features:

  • Fixed 2 bugs in BetterCharacterControl by replacing raycasts with sweep tests:

    • onGround() now works reliably on non-flat surfaces such as terrain.
    • Controls no longer oscillate when trying to unduck near the edge of an overhang.
  • Added kinematic modes to BetterCharacterControl and JoinedBodyControl:

    • Now you can switch between dynamic and kinematic behavior within a single control.

Downloadable from GitHub, Maven Central, and wherever fine artifacts repose.

repositories {
    mavenCentral()
}
dependencies {
    implementation 'com.github.stephengold:Minie:7.4.0+big3'
}
14 Likes

Just released today: Minie v7.5.0 … to fix one more bug.

The bug occurs while cloning collision objects with ignore lists: for instance, when a 3-D model with DynamicAnimControl is loaded from the JME asset cache. I plan to write a detailed analysis in my devblog.

repositories {
    mavenCentral()
}
dependencies {
    implementation 'com.github.stephengold:Minie:7.5.0+big3'
}

EDIT Here are the relevant blog posts in order:

  1. Tinkering in Public on Tumblr
  2. Tinkering in Public on Tumblr
  3. Tinkering in Public on Tumblr
6 Likes

Minie v7.7.0 was released today. Relative to v7.5.0, it adds:

  • a new collision shape (MinkowskiSum) that combines 2 shapes using Minkowski addition
  • a new filter to select physics objects by type (ClassFilter)
  • restored support for zero-mass kinematic rigid bodies

The new release is downloadable from GitHub or Maven Central:

repositories {
    mavenCentral()
}
dependencies {
    implementation 'com.github.stephengold:Minie:7.7.0+big3'
}
16 Likes

Minie v7.8.0 was released today. This is now the recommended version for all users.

It includes the new ContactManager interface and a couple bug fixes. It can be downloaded from GitHub or Maven Central:

repositories {
    mavenCentral()
}
dependencies {
    implementation 'com.github.stephengold:Minie:7.8.0+big3'
}
16 Likes

After the v7.8.0 release, I discovered a regression in one of my projects. I’m working to pin it down so I can issue a patch.

Those who haven’t upgraded to v7.8.0 may want to hold off.
Those who upgraded and are now seeing issues may want to revert to v7.7.0 .

Watch here for updates…

6 Likes

Using bisection search, I identified the bug. Soon there will be a Minie 7.8.x patch release.

3 Likes

Minie v7.8.1 has been released. It can be downloaded from GitHub or Maven Central:

repositories {
    mavenCentral()
}
dependencies {
    implementation 'com.github.stephengold:Minie:7.8.1+big3'
}
10 Likes

In hindsight, I believe the regression in v7.8.0 only affects very complicated collision shapes. In my closed-source project, the trigger was a static rigid body with mesh shape containing 225 parts, 6,086 triangles, and 16,259 vertices.

The symptoms were: ray tests missing when they should hit, missing contact response, incomplete debug visualization, and eventual JVM crashes. As you can imagine, I was very concerned.

Apparently Bullet has (undocumented) limits on the complexity of mesh shapes. I should figure out what those limits are, document them, and (if possible) add run-time checks.

12 Likes

What is the meaning of the “+big3” suffix on the versioning and why did you choose it?

1 Like

big 3 operating systems - win + linux + osx

1 Like

big 3 operating systems - win + linux + osx

Correct! Thank you, Adi.

More precisely, it supports x64 desktops and nothing else.

One of these days I should probably transition the macOS piece of the “+big3” build from x64 to ARM.

1 Like