Models and Scenes

Like Shapes, 3D models are also made up of Meshes, but models are more complex than Shapes. While Shapes are built into jME3, you typically create models in external 3D Mesh Editors.

Using Models and Scenes with jME3

To use 3D models in a jME3 application:

  1. Export the 3D model using a Supported External File Type.

  2. Save the files into a sub-directory of your jME3 Assets directory.

  3. In your code, you use the Asset Manager to load models as Spatials into a jME application.

    Spatial model = assetManager.loadModel(
        "Models/MonkeyHead/MonkeyHead.mesh.xml" );

(For the release build:) Use one of methods recommended for your 3D model Supported External File Type to convert the model to .j3o format. You don’t need this step until you deploy your application if you are making frequent changes to your models, however, you should get into the habit of always converting your models.

Creating Models and Scenes

To create 3D models and scenes, you need a 3D Mesh Editor such as Blender.

Learn how to create UV textures for more complex models, it looks more professional.

3D model editors are third-party products, so please consult their documentation for instructions how to use them. Here is an example workflow for Blender users: