Gradient Shading | Apply Two Different Materials To One Single Object | Blender Eevee & Cycles

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial we will learn about two different techniques to use multiple materials for a single object one is a simple and easy method and then we have gradient shading for this default cube let us apply different materials on different faces to do that first go to the materials tab by default we have one material already created for this let us change its color to something in red then add one more material in this index list create a new material and change the color this time to green and add yet another material create new material and change the color to a third color blue so we have created three materials for this cube now to apply them go to the edit mode first turn on the face selection mode then deselect everything and select any one face the red material is already selected so just click on this assign button to see the effect turn on the rendered view mode do not worry if you see the entire cube turning red we will change it select any other face this time then select another material and click on a sign you can see that two different colors now appear for two different faces select any other face and in the same way select the third material and assign the three faces now have three different materials likewise you can change other faces as well let us now go back to the object mode this technique can be used where we want completely different colors on different sides of an object but if we want one material to gradually change into another material and create a smooth mix along the length or height of the object we have to use a different and slightly complex method let us delete this cube and then add a cylinder for this example on gradient shading we will first convert its surface into a smooth surface i have explained in details in another tutorial how to create a smooth cylinder or cone the link is in the video description we will quickly wrap up this part here okay so we want a gradient shading for this cylinder it will have two different colors at two ends and these materials will mix smoothly throughout its height so go to the materials tab and create a new material then choose any color say this shade of yellow now we have to do the rest of the setup in the shader editor so split the screen into half let us resize it a bit then open the shader editor in the left side a principal bsdf shader is added by default let us make use of it press shift d on your keyboard to duplicate this node then change its color to anything maybe this green instead of this you can use any other shader as well we need to mix these two shaders so add a mix shader node and place it before the material output then connect the two bsdf nodes to this mix node it will mix them in equal proportion but we do not want to just mix them together we want these two colors to mix in a variable proportion it should change over the height of our cylinder so we need to access the coordinates of our objects or the location of each point on the cylinder and based on that location change this fac value of the mixed node it is not really difficult we just need to set up some additional nodes the first node that we need is a texture coordinate node then we need to separate out the coordinate for the height so add one separate xyz node now connect the object output to this node it will basically split the coordinates into three different components but we cannot use this z value directly we need to convert it using one more node from the converter group a map range connect the z input to this node the z value for any object varies from minus one to plus one so the first two fields here will be minus one and plus one and the output range will be zero to one which we can then use in the mix shader as the fac input it is as easy as that the result is quite nice the cylinder has one particular color at the bottom which gradually changes over to the other color at the top a smooth mixing of materials if you select the x or y input in place of z we get a different kind of shading now the left and right parts have two different colors and it mixes in the middle you can also control the width of this changeover you can design a more sudden change or a flat change at the border of these two let us do that first add one clamp node and place it after the map range node to clamp its output now go to add then input and add a value node then from the converter group also add a math node change the type to multiply connect the value node to the first value and enter minus 1 in the second value we are basically inverting our value node through this now select this node and press shift d to duplicate it connect the value node here change the type to add and in the second value field enter one we have inverted the value field in the first node and increased it by one in the second they will become the new range for our map range node now simply through this value node we can control the bandwidth of the color mix by changing its value we can get a wide or a narrow border the range where the two colors overlap if we make it very high we get almost a single line with a sharp change whereas lower values will spread the mix and make it flatter select a value that suits your requirement and you are done we can use a similar approach to mix two materials for any object i hope you like this tutorial thanks for watching and don't forget to subscribe to this channel
Info
Channel: 5 Minutes Blender
Views: 24,094
Rating: undefined out of 5
Keywords:
Id: laovpUpW9WU
Channel Id: undefined
Length: 5min 59sec (359 seconds)
Published: Fri Feb 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.