Procedural Edge Masks in Blender (Both EEVEE and Cycles) without AO!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys and welcome to a new video today this is about Edge masks I know it's been done one million times hasn't it but have you actually found uh one reliable method for Evie I haven't and that's why I decided to make this video Let's Take a look on what options do we have I have prepared two models one hard surface and one organic which is our Suzanne and let's look at the possibilities that we have for the for the edge mask let's switch to Cycles renderer because that one is pretty straightforward also switch to rendered view so we can actually see what we are doing and the first possibility is uh the pointiness socket of the geometry node so we have this information on pointiness and let's plug it through a color ramp so we can uh so we can tune it a bit with the contrast so plug in the to base color and now if we play around with the with the color ramp let's also assign it to Suzanne to actually see it on the ordering model as well and now you can see that we have the we have kind of uh edges or the convex surfaces I think it's convex right but on the hard surface model there isn't pretty much we don't have pretty much any control over it so that's not really not really an uh option for only organic model it's working working pretty well so that's a that's an option for the for the organic models but for the hard surface models not so much if we if we invert it we have the concave surfaces if we invert the color Ram so now let's get rid of it and uh at a bevel node so we have to actually combine the bevel node with a normal output of the of the geometry via uh via a vector math so let's add a vector mouth node plug in the normals and change it to change it to dot product that will make a scalar value of the of the vector the now we have a great control over the edges let's actually invert the color ramp so we can we can see the masked edges and now we have a great control on the hard surface model over the the thickness let's say of the of the edge mask the only problem let's say would be that it doesn't distinct between convex and concave surfaces you have uh it uh kind of uniformly uh marks all the all the edges and on top of that uh let's say on on Susan it doesn't look doesn't look very well so this is very usable for the for the hard surface models you have great control over the over the final result but uh there are some limitations to it now next possibility is ambient occlusion this works both for uh for cycles and for Ev the problem the only problem with the ambient occlusion is that it's pretty computational demanding but the results are great from the from the ambient occlusion so we can also switch it if you switch the inside check you get the you get the convex surfaces masked out and uh you have also a lot of control by changing the distance so this looks pretty pretty well and it works also also in uh in EV so let's switch to EV and you have the you have to enable it in the render view to actually see the see the result the only problem with EV is that the ambient occlusion is a screen space effect and when you move the object out of the screen you can see on the bottom it the the ambient occlusion is actually disappearing and if you have an object that's uh static or if you have a static scene our object that's perfectly in the center of the view then it's okay but it can create this weird weird effect so it's usable but there are some limitations to it now we get actually to the methods that I that I found out and it's not from my head I got inspired by the blender 3.4 splash screen demo I I opened it up because I wanted to see what the what the guys did there and I was walking through walking through the scene and I discovered the floor panels Let's uh let's move on to it the scene is crazy complex and uh my computer is quite slow so let's isolate the isolated floor panel uh invert the selection actually let's zoom on it invert the selection and I will hide the the rest of the the rest of the scene okay and object height selected okay now let's switch to preview mode and let's zoom on in do you see the the Beautiful the beautiful edges and I wondered how how they did it so I I checked the material you can you can see that it's some group and when you when you open it it's this this crazy note setup yeah they they are they are on another level the guys who did that there are also uh detailing groups uh their own trip planner groups so this is this is insane and I try to orient it by searching for the metallic mask and I found out they are using an attribute an edge angle attribute but uh this attribute is actually not a default attribute they have to get it somehow so I checked the modifiers and they are actually using a bevel and a geometry nodes modifier so let's check the let's check the geometry notes tab and let's see let's see what they what they have there so they use a store named attribute and they plug their assigned angle value so let's actually try to replicate it for uh for our model now let's uh let's switch to rendered View and see like their model let's delete the ambient occlusion notes uh select the select their model and assign it the geometry nodes modifier let's make a new one and call it a store named attribute or store attribute okay go to Geometry nodes now add the store named attribute node plug it between the geometry and let's search for the edge angle okay we have to plug in the signed angle value which gives us uh from negative 1 to 1 values depending on the angle of the edges and let's name the attribute that we will store an edge angle let's also assign it to Suzanne geometry nodes and store attribute and now let's return to shading Tab and let's assign it uh let's assign the let's add the add attribute node actually okay and edge angle attribute okay now if we plug in the factor into the base color let's see the result and now we can see that it's very similar to the pointiness output of the geometry we see the very dark areas they are actually negative value and we have to separate them let's plug let's put in a mob range node and for the negative values so from say minus 0.01 to -1 this will make out our uh our concave mask and let's duplicate the map range and for the positive values from zero to one this will make our convex masks or Edge masks from from actually from zero to one and let's plug it into the base color and now we have the the edges or the or the convex surfaces the another trick that I saw from the from the from the demo was actually to use a math note and set to power and now when you change the exponent you have a control over the contrast contrast of the Mask so this is a great trick it's extremely fast probably faster than uh than uh than color ramp and also when you can go past one value in the map range to get even more control so let's also plug in the power for the for the crevices or for the concave concave parts and now you have a great control another thing we can do to further fine tune the mask on the hard surface is actually to add a bevel modifier move it on top of the geometry nodes and change the amount of the bevel to something reasonable like five millimeters for such a model let's plug in the plug in the convex mask and the trick here is to use actually two segments and to change the profile to value of 0.75 now when you zoom in you have a beautiful uniform Edge masks and you have a control over the over the let's say amount or the diameter radius of the of the bevel or of the of the Mask and also for the organic organic surface it works uh it works pretty well so this is actually a great solution because it's Universal for both Eevee and Cycles you have great control over a hard surface models and it works it works well for the organic surfaces as well so this now becomes my my favorite solution for the edge masks and that's a wrap for today thank you for watching if you like the content I'm creating make sure to hit that subscribe button to get notified when I release a new video see you at our next project
Info
Channel: Zeta CG
Views: 7,656
Rating: undefined out of 5
Keywords: blender, tutorial, geometry nodes, animation, CG, Edge mask, Edge wear, Shader
Id: GWfOKeL1nNQ
Channel Id: undefined
Length: 11min 29sec (689 seconds)
Published: Sun Jun 11 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.