How to make a Procedural Halftone Shader - Blender 2.9 tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
here we will be creating this halftone shader and to practice a bit with notes for this shader we will have these controls this one to change the size of the texture we have a contrast that changes the contrast between light and shadow color for light and shadow and we can rotate the texture and also what most shaders that i saw before did or behave like was that were when you get far from it well the distance from it uh doesn't affect the texture it's always the same size even if you are far away so that's fine if you are going to to make a like a still image but if you are going to make an animation i don't know you may want to the texture to scale with with distance so you can switch that here and now if you get close to the to the object you you see the dots are bigger and as you get far away they get smaller we will also be making this outline and okay so let's get started okay so i will start with with a sphere ctrl 3 to valid subdivision and shade smooth i will go to shading and probably the first thing we can do well we will be working with evie so we are the new material this will be our halftone and we have a new another material for the outline we won't use the shader because we won't we don't want a shadow on the on that right lane and this material settings activate the backface column gonna solidify my fire set this to one change the thickness and invert the normals and change the material offset to one that way it will use the second slot and with the inverted normals what we do is we invert the normals and since we have a backspace calling or i'm not sure how you pronounce that but we can only see the the inside of the of the shader and not the the front that's why we see it like this if we change this so that's for the outline you can change the color here if you want we'll leave it like this for now and you can change the thickness by changing this i can show you quickly how to for example if you want you can go to object custom properties and edit this change it to thickness or whatever we will make it i don't know zero to one for now okay right click copy as your driver and paste here based driver now you can control properties you can change it here and also you can edit here this is the new one edit this one change it to corner and here property 1.0 [Music] then when you click outside you can change here to linear color okay this is a little bit more complicated but it's if to be able to drive the color with this you will have to go to rgb and do it for each of the channels copy as you drive or the red paste it here green to green and blue to blue there we go now you can change here and then we you have the controls here since we have two materials or practical okay now to the slot one remove this and we will start by making the texture that we we will use for the after we will use the view vector and boronite texture if we set this to we will use the distance and let's change the size first so you can see and we change the randomness to zero so we get this and now if we you have a you could use a range map color ramp or greater than in this case we will use this would be easier to to control and i will change this to 2d also so now we can control the size of our dots with this slider and we have to find a way to make the dots bigger when the when there's more shadow and smaller when there's more light so for that we will use first i diffuse to catch the the shadow the light let me first use scene lights it's where we go directly here and let's make nightlight we have to one more thing to the to the outline here what we what we see is the shadow of the the outline that it's on top of the material that we're working you go here and you change the shadow mode to none and that's it go back to the slot one and now okay so we have the information of the light here we will use [Music] shader to rgb now this will take this information and transform it into actual color that we can manipulate and change and has a value and we use this value to change the size of those dots so if we plug this here you will see that we already have something going on now we can use you could invert this but it's it makes no sense to me because we are going to use a mix rgb node and two colors so you can choose whatever you want we use this as a factor and we can change now this will be our light color and our shadow color like this so the size of the texture we can control it with this we have the value node just to remind me of that and we can could also use a math note here and multiply this value to change the contrast so and now as i told you before these dots are not affected by the distance of the viewer and i would like to have the option at least to change that you could use whatever the whatever you like if you want to keep it like this you can just switch a slider and change it so to do that we will [Music] we will add here a mix rgb and we will have the normal scale on one of the colors and on the other we will create something different and we plug this to scale so when this is at factor zero it's taking this value and when at the moment we have nothing here but when we change this to one we have this value so we will have like a switch and to change this we will connect this to the when we create the node group to change that so now what we need is at first when i started this i use this view distance i will show you what happens to multiply this value so we have this when we multiply it by the distance plug it here and we change this okay first it's too big so too small so we have to adjust it okay so as you can see if you i will remove the three cores as you can see it works but not on all shapes if you if you have like a very in some angles i will also decrease this and bring the light of it as you can see the dots on the border are being stretched and it's more noticeable in other shapes like a square for example in a cube sorry there as you can see now what's going on here is that this view distance calculates the distance between the viewpoint the camera and the shading point so this distance is not the same as this one so what we really need is the distance between the camera and the origin point of the object and to do that we will first calculate thanks to erindale that helped me with this part i will leave this cue around to [Music] show you how this gets fixed so what we need here is to instead of multiplying this here we will [Music] first and it is geometry and camera we have to calculate the location of the [Music] camera and the location of the object and then we calculate with those two values we can calculate the distance between them and now if you plug this here you will see that the dots respect the distance and also you don't get that stretching because the distance now it's the same for all points of the of the objects okay so now we take everything but this ctrl g then you can duplicate this first i will change this because it's not a corner first value it's our contrast you can then limit these numbers as you want um we also have the second is the texture size for the top size i can change this back to one or maybe even remove it for now um we will plant the colors here this is the light or the the color just the color and this one will be the shadow then we have the factor that changes the if if it reacts to the distance or not or it's fixed the size so call it whatever you want and we will test this we will probably have to adjust with the the size for the the texture when it's not using this let me check so if we switch back yes it's too big so we have to multiply this just this part just something similar to the to the other this is just user friendly stuff so when when we switch it's not like a super different size that's fine one gets smaller when we go when we get far away and this one remains always the same size okay now we can change the corner we have here also the prop plane if you want to do the same to the other object you can do the same process and am i missing something my contrast works fine and i think that's all i almost forgot the rotation so i will add this little part here all we have to do is this is our texture so and this is our vector so we have to rotate that vector vector rotate we plugged it here and then we control the rotation with this we play it here we'll change the name as you want and here you can set the angle whatever you want and that's it see you in the next video thanks for watching
Info
Channel: Sanctus - Blender Procedural
Views: 2,938
Rating: undefined out of 5
Keywords: Blender, Blender3D, B3D, Sanctus Art, Blender With Sanctus, Procedural Textures, Blender Procedural, Textures in Blender, Procedural in Blender, Introduction to Procedural, Procedural Beginners, Procedural Textures Explained, Procedural Starter Tutorial, Procedural Textures Course, Procedural Textures Tutorial, math nodes, mixing math nodes, Halftone, Blender Halftone, Procedural Halftone
Id: Z-1w4pYdUNQ
Channel Id: undefined
Length: 25min 27sec (1527 seconds)
Published: Tue Dec 01 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.