Book Image

Babylon.js Essentials

By : Julien Moreau-Mathis
Book Image

Babylon.js Essentials

By: Julien Moreau-Mathis

Overview of this book

Are you familiar with HTML5? Do you want to build exciting games and Web applications? Then explore the exciting world of game and Web development with one of the best frameworks out there: Babylon.JS. Starting from the beginning, the book introduces the required basics for 3D development and the knowledge you need to use the Babylon.js framework. It focuses on the simplicity provided by Babylon.js and uses a combination of theory and practice. All the chapters are provided with example files ready to run; each example file provides the previously learned features of the framework. Finally, developers will be ready to easily understand new features added to the framework in the future.
Table of Contents (15 chapters)
Babylon.js Essentials
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Summary


In this chapter, you saw what materials are, the theory about what is happening backstage, and how to use the standard materials of Babylon.js. You saw that using a material in Babylon.js is also easy.

The example files tend to reproduce the notions viewed in this chapter: colors, alpha, textures, fog, back-face culling, and so on. Now, you can practice with materials and customize appearance of meshes.

As a concrete example, the materials are highly used in all the 3D scenes and configured by 3D artists: if we take a scene of Babylon.js made by Michel Rousseau, where he used two meshes and two different materials to reproduce the following image:

The first mesh is the body of the vase with a standard material applied to it and the second mesh represents the embers with another standard material applied to them. Each material is configured with a different diffuse texture. If we set the body as isVisible = false, we can see how the embers look in reality, as shown in the following...