Custom Generated Terrain

Hello guys
I am new to jmonkey and I try to create a game with two scenes

The first one is the default town. For the second one I have created a custom terrain using heightmap and alphamap together with a java class.
I tried to import it to the main java class but I could find it anywhere in the map. My aim is to have the two terrains adjucent with each other.

What could I do wrong?
Can I convert the custom created terrain to j3o mesh format in order to call it using the same method that I call the town?

private void createTerrain() {
sceneModel = assetManager.loadModel(“Scenes/town/main.scene”);

    CollisionShape sceneShape = CollisionShapeFactory.createMeshShape((Node) sceneModel);
    landscape = new RigidBodyControl(sceneShape, 0);


Hope to hear from you soon

Do you have lights?

Via the scenecomposer it should be possible to create a j3o out of it.

No I dont have any light attached to the custom scenery. I only have a light on the main code where I have attached the town.scene

In the class that I have only the custom terrain I can see the terrain correctly.
If I delete the town scene and have only the custom terrain I can see the terrain but when the character lands on the terrain, the character falls immediately under the terrain.
If I have both the default town in as one terrain and the custom terrain as a second terrain I see only the first one, even if the two terrains are one the same position on x and z axis and just +2 on y axis
What could I be missing?

The code for the custom terrain is:

public void simpleInitApp() {

/** 1. Create terrain material and load four textures into it. */
mat_terrain = new Material(assetManager, 

/** 1.1) Add ALPHA map (for red-blue-green coded splat textures) */
mat_terrain.setTexture("Alpha", assetManager.loadTexture(

/** 1.2) Add GRASS texture into the red layer (Tex1). */
Texture grass = assetManager.loadTexture(
mat_terrain.setTexture("Tex1", grass);
mat_terrain.setFloat("Tex1Scale", 32);

Texture dust = assetManager.loadTexture(
mat_terrain.setTexture("Tex2", grass);
mat_terrain.setFloat("Tex2Scale", 32);
/** 1.4) Add ROAD texture into the blue layer (Tex3) */

Texture rock = assetManager.loadTexture(
mat_terrain.setTexture("Tex3", rock);
mat_terrain.setFloat("Tex3Scale", 16);

/** 2. Create the height map */
Texture heightMapImage = assetManager.loadTexture(
    AbstractHeightMap heightmap = null;
       try {
         heightmap = new ImageBasedHeightMap(
             heightMapImage.getImage(), 0.5f );
       } catch (Exception e) { e.printStackTrace(); }
       TerrainQuad terrain = new TerrainQuad(
         "terrain", 65, 513, heightmap.getHeightMap() );

/** 4. We give the terrain its material, position & scale it, and attach it. */
terrain.setLocalTranslation(0, -100, 0);
terrain.setLocalScale(2f, 1f, 2f);

/** 5. The LOD (level of detail) depends on were the camera is: */
TerrainLodControl control = new TerrainLodControl(terrain, getCamera());