Hello and welcome to the next video from the series Verge3D for Blender Basics! In this tutorial, we'll be setting up the materials and the environment for our knife scene. First, switch to the Shading tab, and move closer to the object. Let's switch to Viewport Rendering mode so that we can have a real-time preview. Now let's open the application folder to which we copied textures. First and foremost, we need to setup environment. Remember that we deleted the default HDR texture in the previous video. We need environment both for image-based lighting and for reflections. So lets' add it. In the node editor, switch to World. And drag the new HDR texture out here. However, it uses a wrong node by default. We don't want it to be in an Image Texture node. So let's delete it, and add an Environment Texture node instead.

Select our texture within it and connect it with the color input of the Background node. Much better already! Now let's make it brighter by tweaking Strength. Now let's switch to Object mode to setup our materials. The first material will be for the outer cover of the knife. Be sure to select it. Go to the Material tab and create a new material. Which we'll name "plastic". As we see, a Principled BSDF node was added automatically. Now we'll be adding textures and connecting them to the inputs of this node. The first texture is for Base Color – add and connect. Next is Metallic texture. Now goes the Roughness texture. Let's rearrange these nodes a bit. And the last comes the Normal texture. You can see how it is displayed in the viewport – a bit incorrectly now but we'll fix it shortly. Let's assign it to the front cover as well.

So the same material is assigned to both covers. Now let's fix our textures. The Base Color texture should have its Color Space set to sRGB – yes it has. The Metallic texture's Color Space should be Non-Color. The same should be for the Roughness texture… …and for the Normal texture. However, in this case we should add another node – Normal Map in between. This makes it work properly. In addition, we can select the right UV that defines the tangent space for the normal map. Now we did everything right. There is another moment we'd like to highlight. The cover object in fact has 2 UV layers. One of them is for material textures that we just created.

The other is for baked ambient occlusion map. Therefore, it is better to explicitly assign the UVs to the textures to prevent messing things up. To do this, add a UV Map node and select the right UV layer for these textures. Finally, connect it with the Texture nodes. Ok, we almost finished with this material. The only thing left is to add ambient occlusion. We baked this texture for the entire geometry of our model. So let's add this texture, as well as another UV Map node. This is because this texture will be using the other UV layer called "ao".

Now add a Mix Shader node and connect the occlusion texture as its factor. The only thing left it to add a shader to represent darker surfaces. It should be completely black. We connect it the upper input… …while the main material comes to the lower input. Now the occlusion is applied to geometry. It is difficult to see it from this direction as there is no occlusion on this side.

However, if we hide some elements… …we'll be able to see occlusion in the cavities of the geometry. So this material is ready! Let's setup all the others. They are muсh simpler as no textures will be necessary. The first material we are gonna set up is chrome-plated steel… …which is used for the blades and other instruments. Now select one of the blades, create a new material and name it "chrome". In this material, move the Metallic slider all the way to 1… …since it is a highly reflective shiny metal. On the contrary, the Roughness should be much less, say 0.1.

That is, a slightly matte. Also we'll make it a bit darker. Well, let's try Roughness 0.2. That is, a bit less polished. The chrome material is ready! Now let's assign it to all relevant parts. So now all the blades are chrome. Let's continue with the partitions between the blades. They will be in aluminium – a softer metal is used to prevent scratches. So let's select a partition and create a new material. Name it "aluminium".

This is also a pure metal. It should have a higher Roughness than chrome though. And it will be in lighter color. Probably Roughness should be a bit less. In fact it can be higher. Yes, this looks more like aluminium. What is left is to assign it to all other partitions between blades. Next material is plastic of which these little parts are made – the tweezers handle and the toothpick. Lets select the toothpick and create a new material named "simple plastic". This is to distinguish from the body cover plastic which is kinda advanced with its surface being relief. All we need is to make it a bit darker. Finally, assign it to the handle of the tweezers. So, now all the visible parts have materials. However, there are some parts that will only be revealed when the instruments are released through animation.

These are hinges which hold the blades. In real knifes these are made of brass. Let's add a material, name it "brass" and start setting it up. Again, Metallic goes all the way up. Lower the Roughness… …and change the color. Assign it to all other hinges and stubs. The hinges will be visible during animation, while the stubs will be visible in exploded view. So all the materials are ready. The only thing we want to add is anisotropic filtering for the textures. It will make them look sharp at any view angle. Especially at oblique viewing angles with respect to the camera. In fact we can check how it looks in the engine right now. Let's just export the scene to .gltf. We added the export function to Blender Quick Favorites via right click menu. Use shortcut "q" to invoke it. Now lets see how it looks in the browser. If you look closer, you may notice that the texture is blurred at oblique view angle.

So it almost disappears. To fix this, lets enable anisotropic filtering for our textures. In the shader editor, select a Texture node, and on the right panel you can find this setting. If the panel is not there, you can reveal it with the "n" shortcut. To make it noticeable, set it to maximum – 16. Do it for all the textures in this material.

Save and export. Now lets get back to the application and reload it the browser which can do with "Ctrl-R" or "F5". Now we can see that the texture preserves its sharpness at any angle. Finally, lets add ambient occlusion to all the newly created materials. To do this quickly, go to the cover material. Select and copy the relevant nodes with "Ctrl-C". Then paste them to each material with "Ctrl-V", and connect with the main node tree. Ambient occlusion is rather pale. But if we hide the blades, that will be moving through animation later, we can clearly see it.

Ambient occlusion serves an important role here. Without it, the partitions would be indistinguishable. You can check this by removing occlusion for aluminum. So ambient occlusion greatly emphasizes different parts of geometry, making the model more realistic. Now save everything, export and check out in the browser. All the materials are in place, as is the environment. And it looks great! That's it. See you in the next part of this tutorial!.