> Continue your Babylon.js learning by combining meshes in your scene.

Source: https://doc.babylonjs.com/features/introductionToFeatures/chap2/combine

# Getting Started - Combining Meshes

## Combining Meshes Using Merge Meshes
This is a straightforward way of combining two or more meshes.

```javascript
const combined = BABYLON.Mesh.MergeMeshes(Array_of_Meshes_to_Combine)
```
In our case, this would be:
```javascript
const house = BABYLON.Mesh.MergeMeshes([box, roof])
```
- [Playground: Combining Meshes In Your Scene](https://playground.babylonjs.com/#KBS9I5#75) - A playground demonstrating how to combine meshes inside of your scene.

![house 5](https://doc.babylonjs.com/img/getstarted/house5.webp)

The first thing we notice is that the whole house is covered by only one of the materials used. Fortunately, this can be corrected using the multiMultiMaterial parameter of *MergeMeshes*. Unfortunately, this is the final parameter in a long list. The code now looks like this:
```javascript
const house = BABYLON.Mesh.MergeMeshes([box, roof], true, false, null, false, true);
```
At this stage, it is important to note that setting the second parameter to `true` disposes of the original meshes, and setting the last parameter to `true` allows the original material to be applied separately to the parts matching the original meshes.

- [Playground: Combining Meshes And Preserving Material Assignments](https://playground.babylonjs.com/#KBS9I5#76) - A playground demonstrating how to combine meshes while preserving material assignments.

![house 3](https://doc.babylonjs.com/img/getstarted/house3.webp)

Before considering how to make multiple copies of our house we will first: find out the basics of [exporting](https://doc.babylonjs.com/features/featuresDeepDive/Exporters/glTFExporter) our models; how to [import](https://doc.babylonjs.com/features/featuresDeepDive/importers/glTF) models made with Babylon.js or other software; and how to display your scene or models on your own [website](https://doc.babylonjs.com/features/introductionToFeatures/chap2/app2).

## Further reading

- [More on Merging Meshes](https://doc.babylonjs.com/features/featuresDeepDive/mesh/mergeMeshes)
