The Minie Project is about improving the integration of Bullet Real-Time Physics into the jMonkeyEngine Game Engine.
It contains 2 sub-projects:
- MinieLibrary: the Minie runtime library (in Java)
- MinieExamples: demos, examples, and test software (in Java)
Summary of features:
DynamicAnimControl
for ragdoll simulation:- set dynamic/kinematic mode per bone
- deals with attachments
- highly configurable, with multiple options for bone mass, center, and shape
- apply inverse-kinematic controllers and joints
MultiSphere
collision shapes based onbtMultiSphereShape
EmptyShape
collision shapes based onbtEmptyShape
- enhanced debug visualization:
- customize debug material per collision object
- dump contents of physics space
- visualize in multiple viewports
- hi-res debug meshes for convex shapes
- options to generate debug meshes that include normals
- all joints, shapes, and collision objects implement
JmeCloneable
- enable/disable a joint
- create single-ended joints
- settable global default for collision margin
- fixes for many
jme3-bullet
bugs (including 740, 877, 896, 923, and 938) - access the linear factor of a rigid body
- improved Javadoc and inline documentation
- decoupled from the jMonkeyEngine release cycle
- tutorial, demo, and test apps provided
- Java source code provided under FreeBSD license
Features of jme3-bullet
that Minie omits:
CharacterControl
: useBetterCharacterControl
instead, or else usePhysicsCharacter
directlyKinematicRagdollControl
,HumanoidRagdollPreset
, andRagdollPreset
: useDynamicAnimControl
insteadRagdollUtils
: useRagUtils
instead
Other important differences:
- The default collision margin increased from 0 to 0.04 .
RagdollCollisionListener
interface changed and moved from thecom.jme3.bullet.collision
package to thecom.jme3.bullet.animation
package.BulletAppState.stopPhysics()
is not longer public: detach theAppState
instead
- Downloads
- Conventions
- History
- How to install the SDK and the Minie Project
- How to add Minie to an existing project
- An introduction to DynamicAnimControl
- External links
- Acknowledgments
Newer releases (since v0.5.0) can be downloaded from GitHub.
Older releases (v0.1.1 through v0.4.5) can be downloaded from the Jme3-utilities Project.
Maven artifacts are available from JFrog Bintray.
Package names begin with
jme3utilities.minie
(if Stephen Gold holds the copyright) or
com.jme3.bullet
(if the jMonkeyEngine Project holds the copyright).
The source code is compatible with JDK 7.
Since November 2018, the Minie Project has been an independent project at GitHub.
From January 2018 to November 2018, Minie was a sub-project of the Jme3-Utilities Project.
Most of Minie was originally forked from jme3-bullet
,
a library in the jMonkeyEngine Game Engine.
The evolution of Minie is chronicled in its release notes.
Minie currently targets Version 3.2.2 of jMonkeyEngine. You are welcome to use the Engine without also using the SDK, but I use the SDK, and the following installation instructions assume you will too.
The hardware and software requirements of the SDK are documented on the JME wiki.
- Download a jMonkeyEngine 3.2 SDK from GitHub.
- Install the SDK, which includes:
- the engine itself,
- an integrated development environment (IDE) based on NetBeans,
- various plugins, and
- the Blender 3D application.
- To open the Minie project in the IDE (or NetBeans), you will need the
Gradle Support
plugin. Download and install it before proceeding. If this plugin isn't shown in the IDE's "Plugins" tool, you can download it from GitHub. You don't need this plugin if you merely want to use a pre-built Minie release in an Ant project.
Clone the repository using Git:
- Open the Clone wizard in the IDE:
- Menu bar -> "Team" -> "Remote" -> "Clone..."
- For "Repository URL:" specify
https://github.com/stephengold/Minie.git
- Clear the "User:" and "Password:" text boxes.
- For "Clone into:" specify a writable folder (on a local filesystem) which doesn't already contain "Minie".
- Click on the "Next >" button.
- Make sure the "master" remote branch is checked.
- Click on the "Next >" button again.
- Make sure the Checkout Branch is set to "master".
- Make sure the "Scan for NetBeans Projects after Clone" box is checked.
- Click on the "Finish" button.
- When the "Clone Complete" dialog appears, click on the "Open Project..." button.
- Expand the root project node to reveal the sub-projects.
- Select both sub-projects using control-click, then click on the "Open" button.
- In the "Projects" window, right-click on the "MinieExamples" sub-project to select it.
- Select "Build".
Adding Minie to an existing JME3 project should be a simple 6-step process:
- Remove any existing physics libraries which might interfere with Minie.
- Add libraries to the classpath.
- Create, configure, and attach a
BulletAppState
, if the application doesn't already do so. - Configure the
PhysicsSpace
, if the application doesn't already do so. - Create physics controls, collision objects, and joints
and add them to the
PhysicsSpace
, if the application doesn't already do so. - Test and tune as necessary.
Minie replaces (and is therefore incompatible with) the following jMonkeyEngine libraries:
jme3-bullet
jme3-bullet-native
jme3-jbullet
Before adding Minie, you should remove these libraries from your project so they won't interfere with Minie.
Look for artifacts with these names in the dependencies
section
of your project's gradle.build
file and remove them.
Open the project's properties in the IDE (JME 3.2 SDK or NetBeans 8.2):
- Right-click on the project (not its assets) in the "Projects" window.
- Select "Properties to open the "Project Properties" dialog.
- Under "Categories:" select "Libraries".
- Click on the "Compile" tab.
- Look for libraries with these names in the "Compile-time Libraries" listbox. Select them and click on the "Remove" button.
- Click on the "OK" button to exit the "Project Properties" dialog.
Minie comes pre-built as a single library that includes both Java classes and native libraries. The Minie library depends on 2 Jme3-utilities libraries (jme3-utilities-heart and jme3-utilities-debug) which in turn depend on 3 of the standard jMonkeyEngine libraries (jme3-core, jme3-effects, and jme3-terrain).
For projects built using Maven or Gradle, it is sufficient to specify the dependency on the Minie library. The build tools should automatically resolve the remaining dependencies automatically.
Because Minie is not on JCenter yet, you have to explicitly specify the repository location:
repositories {
maven { url 'https://dl.bintray.com/stephengold/jme3utilities' }
jcenter()
}
dependencies {
compile 'jme3utilities:Minie:0.6.4'
}
For project built using Ant, download the 3 non-standard libraries from GitHub:
- https://github.com/stephengold/Minie/releases/tag/0.6.4
- https://github.com/stephengold/jme3-utilities/releases/tag/heart-2.18.0
- https://github.com/stephengold/jme3-utilities/releases/tag/debug-0.9.9
You'll want all 3 class JARs
and probably the -sources
and -javadoc
JARs as well.
Open the project's properties in the IDE (JME 3.2 SDK or NetBeans 8.2):
- Right-click on the project (not its assets) in the "Projects" window.
- Select "Properties to open the "Project Properties" dialog.
- Under "Categories:" select "Libraries".
- Click on the "Compile" tab.
- Add the
jme3-utilities-heart
class JAR:- Click on the "Add JAR/Folder" button.
- Navigate to the "jme3-utilities" project folder.
- Open the "heart" sub-project folder.
- Navigate to the "build/libs" folder.
- Select the "jme3-utilities-heart-2.18.0.jar" file.
- Click on the "Open" button.
- (optional) Add JARs for javadoc and sources:
- Click on the "Edit" button.
- Click on the "Browse..." button to the right of "Javadoc:"
- Select the "jme3-utilities-heart-2.18.0-javadoc.jar" file.
- Click on the "Open" button.
- Click on the "Browse..." button to the right of "Sources:"
- Select the "jme3-utilities-heart-2.18.0-sources.jar" file.
- Click on the "Open" button again.
- Click on the "OK" button to close the "Edit Jar Reference" dialog.
- Similarly, add the
jme3-utilities-debug
JAR(s). - Similarly, add the
Minie
JAR(s). - Click on the "OK" button to exit the "Project Properties" dialog.
Strictly speaking, a BulletAppState
isn't required for Minie
, but
it does provide a convenient interface for configuring, accessing, and
debugging a PhysicsSpace
.
If your application already has a BulletAppState
, the code will probably
work fine with Minie
. If not, here is a snippet to guide you:
BulletAppState bulletAppState = new BulletAppState();
bulletAppState.setDebugEnabled(true); // default=false
stateManager.attach(bulletAppState);
Section to be written.
Section to be written.
Section to be written.
The centerpiece of Minie is DynamicAnimControl
, a new PhysicsControl
.
Adding a DynamicAnimControl
to an animated model provides ragdoll physics and
inverse kinematics.
Configuration of DynamicAnimControl
mostly takes place before the Control
is added to a model Spatial
. Adding the Control
to a Spatial
automatically creates the ragdoll, including rigid bodies and joints.
No ragdoll exists before the Control
is added to a Spatial
,
and removing a Control
from its controlled Spatial
destroys the ragdoll.
The controlled Spatial
must include the model's SkeletonControl
.
Usually this is the model's root Spatial
, but not always.
For a very simple example, see
HelloDac.java.
A model's ragdoll is composed of rigid bodies joined by 6-DOF joints.
Within the Control
, each PhysicsRigidBody
is represented by
a PhysicsLink
, and the links are organized into a tree hierarchy.
PhysicsLink
has 3 subclasses:
BoneLink
: manages one or more bones in the model’sSkeleton
. EachBoneLink
has a parent link, to which it is jointed. Its parent may be anotherBoneLink
or it may be aTorsoLink
.TorsoLink
: is always the root of a link hierarchy, so it has no parent link. It manages all root bones in the model'sSkeleton
. It also manages anySkeleton
bones that aren't managed by aBoneLink
.AttachmentLink
: manages a non-animated model that's attached to the main model by means of an attachmentNode
. AnAttachmentLink
cannot be the parent of a link.
The default constructor for DynamicAnimControl
is configured to create a
ragdoll with no bone links, only a TorsoLink
.
Before adding the Control
to a Spatial
, specify which Skeleton
bones
should be linked, by invoking the link()
method for each of those bones.
I recommend starting with a default LinkConfig
and a generous range of motion
for each linked bone:
dynamicAnimControl.link(boneName, new LinkConfig(), new RangeOfMotion(1f, 1f, 1f));
For a simple example, see HelloBoneLink.java.
You probably don't want to link every Bone
.
For instance, if the model has articulated fingers, you probably want to link
the hand bones but not the individual finger bones.
Unlinked bones will be managed by the nearest linked ancestor Bone
.
The TorsoLink
will manage any bones for which no ancestor Bone
is linked.
If you link too many bones, the ragdoll may become inflexible or jittery
due to collisions between rigid bodies that don't share a PhysicsJoint
.
YouTube videos about Minie:
- December 2018 demo (inverse kinematics) https://www.youtube.com/watch?v=ZGqN9ZCCu-8 (6:27)
- December 2018 teaser (inverse kinematics) https://www.youtube.com/watch?v=fTWQ9m47GIA (0:51)
- November 2018 demo (single-ended joints): https://www.youtube.com/watch?v=Mh9k5AfWzbg (5:50)
- November 2018 demo (
MultiSphere
): https://www.youtube.com/watch?v=OS2zjB01c6E (0:13) - October 2018 demo (
DynamicAnimControl
): https://www.youtube.com/watch?v=A1Rii99nb3Q (2:49)
Like most projects, the Minie Project builds on the work of many who have gone before. I therefore acknowledge the following artists and software developers:
- Normen Hansen (aka "normen") for creating most of the
jme3-bullet
library (on whichMinie
is based) and also for helpful insights - Rémy Bouquet (aka "nehon") for co-creating
KinematicRagdollControl
(on whichDynamicAnimControl
is based) and also for many helpful insights - Paul Speed, for helpful insights
- "oxplay2", for reporting a
PhysicsRigidBody
bug and helping me pin it down. - Nathan Vegdahl, for creating the Puppet model (used by
TestDac
) - the creators of (and contributors to) the following software:
- the Blender 3-D animation suite
- the Bullet real-time physics library
- the FindBugs source-code analyzer
- the Git revision-control system and GitK commit viewer
- the Google Chrome web browser
- the Gradle build tool
- the Java compiler, standard doclet, and runtime environment
- jMonkeyEngine and the jME3 Software Development Kit
- LWJGL, the Lightweight Java Game Library
- the MakeHuman Community
- the Markdown document conversion tool
- Microsoft Windows
- the NetBeans integrated development environment
- Open Broadcaster Software Studio
- the PMD source-code analyzer
- the WinMerge differencing and merging tool
I am grateful to JFrog and Github for providing free hosting for the Minie Project and many other open-source projects.
I'm also grateful to my dear Holly, for keeping me sane.
If I've misattributed anything or left anyone out, please let me know so I can correct the situation: sgold@sonic.net