From the course: Learning 3D Graphics on the Web with Three.js

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Environment maps

Environment maps

- According to the Three.js documentation, the standard material works best when used in conjunction with the environment map. And the environment map simulates the distance environment reflecting off the reflective surfaces in the scene. It really helps when you're trying to simulate reflectivity on objects. Environment maps in Three.js are in the form of cubemaps. A cubemap is a panoramic view of a scene that is mapped inside a cube. A cubemap is made up of six separate images that correspond to each face of a cube. Even though you could prepare a cubemap yourself using a 360 panoramic image, you will be using one of the maps that's provided in the Three.js examples folder inside their Github page. I'm not including the texture in the exercise files, but you can download it for yourself from this URL. Or you could alternatively use any given cubemap that consists of six images. You can use the Three.js cube texture loader to load in a cube texture into Three.js. A cubemap consists…

Contents