The objects that we call materials are essential in 3D rendering. They are used to render objects on the screen and how they are rendered. This means that the materials are used to apply textures and transformations such as waves, for example, manage transparency and more. In other words, materials are interfaces that are used to easily customize the 3D object's appearance.
The following is an example with Babylon.js:
myMesh.material = new BABYLON.StandardMaterial("material", scene); // Done! Now customize everything you want here myMesh.material.diffuseTexture = diffuseTexture; myMesh.material.transparency = 0.5; // Etc.
We will be covering the following topics in this chapter:
- Discussing the awesome theory behind the materials
- Using the Babylon.js standard material
- Using textures with materials