> Learn to add some distant hills to your scene.

Source: https://doc.babylonjs.com/features/introductionToFeatures/chap5/hills

# Getting Started - Distant Hills

## Distant Hills
We want to set the village in a valley. It would be possible to create hills from meshes; however, there is another way to add vertical height to a ground mesh. This is achieved using a height map, which uses shades of gray to determine the height of the ground. White areas are the highest parts, and black areas are the lowest.
This simple height map

![height map](https://doc.babylonjs.com/img/getstarted/villageheightmap.webp)  
has a large black area in the middle to host the village. The white areas create the hills, and the gray ones create ways out of the valley for roads.

![untextured valley](https://doc.babylonjs.com/img/getstarted/valley1.webp)  
In this image the camera has been pulled further out and the vertical height exaggerated.

```javascript
const largeGround = BABYLON.MeshBuilder.CreateGroundFromHeightMap("largeGround", "https://assets.babylonjs.com/environments/villageheightmap.png" /* url to height map */, 
    {width:150, height:150, subdivisions: 20, minHeight:0, maxHeight: 10});
```

The subdivisions property of *options* splits the ground into 20 x 20 = 400 sections. The more subdivisions there are, the finer the gradation for height calculation. The two properties minHeight and maxHeight determine the vertical heights for the black and white areas respectively, and gray areas are scaled accordingly.

- [Playground: Basic Height Map](https://playground.babylonjs.com/#KBS9I5#39) - Create terrain from a plane with a height map.

We can add textures in the usual way.

![textured valley](https://doc.babylonjs.com/img/getstarted/valley2.webp)  

- [Playground: Height Map With Texture](https://playground.babylonjs.com/#KBS9I5#40) - Add a texture to your terrain.

Finally, we give the village ground a texture similar to that of the large ground, but clearer.

```javascript
//Create Village ground
const groundMat = new BABYLON.StandardMaterial("groundMat");
groundMat.diffuseTexture = new BABYLON.Texture("https://assets.babylonjs.com/environments/villagegreen.png");
groundMat.diffuseTexture.hasAlpha = true;

const ground = BABYLON.MeshBuilder.CreateGround("ground", {width:24, height:24});
ground.material = groundMat;

//large ground
const largeGroundMat = new BABYLON.StandardMaterial("largeGroundMat");
largeGroundMat.diffuseTexture = new BABYLON.Texture("https://assets.babylonjs.com/environments/valleygrass.png");

const largeGround = BABYLON.MeshBuilder.CreateGroundFromHeightMap("largeGround", "https://assets.babylonjs.com/environments/villageheightmap.png" /* url to height map */, 
    {width:150, height:150, subdivisions: 20, minHeight:0, maxHeight: 4});
largeGround.material = largeGroundMat;
largeGround.position.y = -0.01;
```

This line
```javascript
largeGround.position.y = -0.01;
```
ensures the two grounds do not fight and cause flickering.

- [Playground: Layering Textures](https://playground.babylonjs.com/#KBS9I5#85) - Add a clearer texture to the area within the village.

We add the dwellings back and create a file to import.

- [Playground: Adding The Dwellings](https://playground.babylonjs.com/#KBS9I5#86) - Add the dwellings back into the village scene.

Then we can add the car back, but this time passing through the village.

- [Playground: Adding The Car](https://playground.babylonjs.com/#KBS9I5#87) - Add the animating car back into the village scene.

Let's now further improve the environment by adding a sky.
