JME 3 - API / Feature Mapping

This page provides a quick answer to the questions "I want my game to do X, where do I find that in jME 3 ??"

Knowing exactly what you are looking for allows you to search more efficiently, find documentation more quickly, and ask clearer questions on the support forum. This intermediate page assumes that you already went through the beginner tutorials. Feel free to add APIs, tutorials and javadoc links that helped you understand and use a feature!

Applications and SceneGraph

How do I…?Use this JME 3 Feature!Learn more here…
Start with a preconfigured gamecom.jme3.app.SimpleApplicationHello SimpleApplication
Make an object appear in the sceneAttach nodes and geometries to the rootNode: rootNode.attachChild(geo);
com.jme3.scene.Node, com.jme3.scene.Geometry
node.setCullHint(CullHint.Never);
The Scene Graph
Hello Asset
Hello Node
Make an object disappear from the sceneDetach nodes and geometries from the rootNode: rootNode.detachChild(geo);
node.setCullHint(CullHint.Always);
The Scene Graph
Hello Asset
Hello Node
Use third-person viewUse default camera cam
com.jme3.renderer.Camera
ChaseCam WIP
Use first-person viewUse camera flyCam
com.jme3.input.FlyByCamera
Hello Collision
Increase camera speedflyCam.setMoveSpeed(50f);
Only draw outline of the sceneUse a wireframe material, e.g. for debugging. Debugging
Change the background colorCall viewPort.setBackgroundColor(ColorRGBA.Blue);N/A
Customize the applicaton classExtend com.jme3.app.SimpleApplication (or com.jme3.app.Application) and set Application SettingsSimpleApplication 
AppSettings
Disable the logger outputLogger.getLogger("").setLevel(Level.SEVERE);
java.util.logging.*
Logging

Creation and Manipulation of Objects

How do I…?Use this JME 3 Feature!Learn more here…
Make simple shapes like cubes, spherescom.jme3.scene.Geometry, com.jme3.scene.shape.* Hello Node, Shape
TestCylinder.java, TestBox.java, TestSphere.java
Create a 3-D modelCreate the model in a 3-D mesh editor (for example Blender) and export it as Ogre XML mesh.Download Blender, Blender tutorial, Blender-to-Ogre plugin
3D Models
Load a 3-D modelImport asset as Ogre XML mesh.
jMonkeyPlatform: Converting Ogre to j3o binary format speeds up model loading.
AssetManager, com.jme3.scene.plugins.ogre.*, com.jme3.scene.Geometry
Hello Asset
jMonkeyPlatform j3o converter
TestOgreLoading.java, TestOgreConvert.java
Move or turn or resize an objectUse transformations: geo.setLocalTranslation(), geo.rotate(), geo.scale()
geo.updateGeometricState();
Hello Node
Spatial
Concatenate transformations (e.g. rotations around several axes in one step)com.jme3.math.Quaternion, slerp()
com.jme3.math.Transform, interpolateTransforms()
rotate, rotate_about_a_point, quaternion, math_for_dummies
Make an object move by itselfChange the geo's translation in the update phase of the main loop. Or remote-control the motion using cinematics.
com.jme3.scene.Geometry, setLocalTranslation(), setWalkDirection() for physical objects.
Hello Loop
Update Loop
Custom Controls
Cinematics
TestBumpModel.java, TestOgreLoading.java
Manipulate the color or shininess of an objectMaterials, AssetManager Hello Material
Materials Overview
TestNormalMapping.java, TestSphere.java
Manipulate the surface of an object (wood vs stone vs metal etc)Textures, AssetManager.Hello Material
Materials Overview
TestSimpleBumps.java
Blender: Creating Bump Maps and Normal maps
Make objects cast a shadowcom.jme3.shadow.BasicShadowRenderer, com.jme3.light.DirectionalLight
setShadowMode()
Light and Shadow
TestEverything.java, TestShadow.java
Render transparent objects (glass, window panes, water, tree leaves)Assign a transparent texture to the Material and set material.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);Hello Material
Materials Overview
Force or disable Backface cullingcom.jme3.material.RenderState.FaceCullMode: Back, Front, FrontAndBack, Off
e.g. material.getAdditionalRenderState(). setFaceCullMode(FaceCullMode.FrontAndBack);
N/A
Make procedural or custom shapescom.jme3.scene.MeshCustom Meshes
Keep my models, textures, sound files in orderPut all assets in subdirectories of a project directory named assets and use the assetManager to load them.Hello Asset, Asset Manager
Identify Named Sub-Mesh in ModelGeometry result = spatial.getName().startsWith(name);Spatial

Actions, Interactions, Physics

How do I…?Use this JME 3 Feature!Learn more here…
Implement the game logic and game mechanics Use Controls to define behaviours of types of Spatials. Use Application States to implement global behaviours. Use the simpleUpdate() loop for the remaining tests and interactions. Use Cinematics to remote-control objects in scenes.Hello Loop
Update Loop
Custom Controls
Application States
Cinematics
Let players interact by pressing keyboard keyscom.jme3.input.KeyInput, com.jme3.input.binding.BindingListenerHello Input
Input Handling
Let players interact by clicking, e.g. picking up objects, opening doors, shootingIntersect a Ray from the player with the Bounding Volume of the target: com.jme3.bounding.*, com.jme3.math.Ray, com.jme3.collision.CollisionResults.Hello Picking
Collision and Intersection
TestRayCollision.java
Animate objects and charactersCreate an animated OgreMesh model with Bones in a 3-D editor (e.g. Blender).
com.jme3.animation.*
Hello Animation
Animation
animation, Blender animation tutorial
Keep players walking on floors of scenesCollision detection – raycasting or physics.Hello Collision
Physics
Prevent players from walking through walls in scenesCollision detection using physics and bounding volumes.
com.jme3.bullet.*, CapsuleCollisionShape / CompoundCollisionShape, PhysicsCharacterNode / PhysicsNode
geo.setModelBound(); geo.updateModelBound();
Hello Collision
Physics
Let balls, cars, etc bounce off obstacles and roll on floorsUse physics nodes and bounding volumes: com.jme3.bounding.*, com.jme3.bullet.collisions, com.jme3.bullet.nodes.PhysicsNode etc
geo.setModelBound(); geo.updateModelBound();
Hello Physics
Physics
TestSimplePhysics.java, more samples
Steer cars, motorcycles, etcUse physics characters and vehicles: com.jme3.bullet.*, PhysicsCharacterNode, PhysicsVehicleNodeVehicles
TestFancyCar.java, TestPhysicsCharacter.java
(Press HUJK keys to steer, spacebar to jump.)
Let an object swing like a pendulum or chain linksUse physics joints: com.jme3.bullet.joints.PhysicsHingeJointHinges and Joints
TestPhysicsHingeJoint.java
(Press HK keys to turn, spacebar to swing.)

GUI Display

How do I…?Use this JME 3 Feature!Learn more here…
Get rid of default debug display (fps, stats etc) in SimpleApplication app.setDisplayFps(false);
app.setDisplayStatView(false);
N/A
Display text (score, health), flat mini-maps or status iconsAttach a picture to the orthogonal guiNode to create a heads-up display (HUD).
com.jme3.font.*, com.jme3.ui.Picture. guiNode.attachChild()
HUD
TestOrtho.java, TestBitmapFont.java
Display buttons to let the player switch between the game/settings/score screensNifty GUINifty GUI
TestNiftyGui.java

Environment Effects: Sound, Landscape

How do I…?Use this JME 3 Feature!Learn more here…
Play sounds and noisesAudioRenderer, Listener, and AudioNode from com.jme3.audio.*Hello Audio
Audio
audio
Simulate fire, flames, smoke, explosions, swarms, dust, magic spellsUse particle emitters:
com.jme3.effect.EmitterSphereShape,
com.jme3.effect.ParticleEmitter
Hello Effects
Particle Emitters
Bloom and Glow
Effects Overview
TestExplosionEffect.java, TestParticleEmitter.java
Simulate water, waves, reflectionscom.jme3.water.* Water
Post-Processor Water
TestSceneWater.java
Generate a terraincom.jme3.terrain.*Hello Terrain
Terrain
TestTerrain.java
Simulate a sky
rootNode.attachChild(SkyFactory.createSky( assetManager,
       "Textures/Sky/Bright/BrightSky.dds", false));
skyGeo.setQueueBucket(Bucket.Sky) 
Sky
TestCubeMap.java

Back-End Properties

How do I…?Use this JME 3 Feature!Learn more here…
Check graphic card capabilitiescom.jme3.renderer.Caps
Collection<Caps> caps = renderer.getCaps();
Logger.getLogger(HelloJME3.class.getName()).log(Level.INFO, "Caps: {0}" + caps.toString());
N/A
Optimize the heck out of the scenegraphjme3tools.optimize.GeometryBatchFactory
GeometryBatchFactory.optimize(rootNode);
N/A

view online version