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

Unlock the full course today

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

MeshLambertMaterial and MeshPhongMaterial

MeshLambertMaterial and MeshPhongMaterial - JavaScript Tutorial

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

MeshLambertMaterial and MeshPhongMaterial

- [Instructor] Let's take a look at the mesh Lambert material. I will update to get material function, to provide me with the Lambert material. By passing the string Lambert in "get material" function, I will be activating the switch to return me the Lambert material that is being defined here. I will also update the surface color for the plane, and the sphere as well, so here, I will make the surface colors to be white, actually, so I will change it to 255 for the zero values. Let's check out our scene. Now, as you can see, the surfaces are updated. Mesh Lambert material can be a suitable material to simulate nice, shiny surfaces, such as rubber, clay, or stone. It uses a very simplistic shading model, which makes it very (speaks softly) but it might not yield the most accurate results. Use this material whenever you can get away with it, but using a mesh Phong material can be a better choice, since it allows you to control the highlights on the material as well. So let's switch our…

Contents