The correct way to make decals in Blender (NO SHRINKWRAP)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] this is how I see most blender users making decals and this is a new way no shrink wrap nonsense just a material projection this technique lets me do some things that a shrink wrap doesn't look the dirt here is a decal I can use it on two different objects at the same time extremely useful for hiding awkward intersections made by lazy work like like here with some climbing plants hiding and otherwise very obvious seam also this I can mix the decal with the material underneath like with this graffiti uh it picks up the normal map from the bricks and gets bumpy it also blends with dirt from the ground I'll show you exactly how to do that a shrink wrap looks a little too flat on here baking yes if you're so happy with your work that you want to make it permanent bake it now it's part of the object forever I'll link to a good baking tutorial if you're interested in that here's the real kicker they can cut a hole in an object this is not a Boolean it's a texture with an opacity channel that lets you see right through and since it's all done in the node editor it plays well with this crack too this is simply a better way to do decals and without it I could not have made this [Music] clip [Music] we'll start with the graffiti on the wall so slide over a Shader editor and click into the material of the wall now let's add an image texture in here and open up the graffiti I have just a transparent PNG here that I downloaded from the internet if you have the node Wrangler add-on turned on you can press contrl T and that will bring up the mapping coordinates of this texture let's review this by control shift left clicking on it and let's actually preview the alpha channel to see what we're dealing with the way to project this using an empty is to use the textures object coordinates so we'll move this from UV to object and then select an empty I'll shift a add a cube empty here move it over to roughly where we want it and let's actually pin this Shader editor so we don't lose it when we click on anything else so in here we can select the object to pick the coordinates from and it will project downwards using this object's Z axis like this so all we have to do is rotate this on X just like here and there we go say 90° and we can fix the aspect ratio roughly just stretch it out a little bit now you can see it's repeating so let's go to the image text here and change it from repeat to clip that way we'll only get one but it's offset into the upper right quadrant of the empty that is because it uses UV coordinates if you think of this Center Point as zero and then you have the y axis going up and the x-axis going over the UV is in positive space so all we have to do is go to the mapping node and change the location all the components to 0.5 and that'll move it to the center and we can also stretch it out to the borders by setting scale to 0.5 now it behaves like we would expect so let's mix this into our material We'll add a mix node set it from float to color and let's just mix it into the base color for now using this Alpha I'll drive the factor and mix in say a red color control shift right click on the principled bsdf to preview it and there we have it it's just mixing into the base color at the moment but there is in fact a problem that we can't see right now but it'll be obvious once we move over to the other side this thing is projecting all the way through and if we had more geometry over here it would project onto that as well so we have to limit it somehow there are a couple of ways to do that but my favorite way is to use the object coordinates again here and separate out the X Y and Z components if we preview these you'll see that this shows us the X values of this coordinate system it's zero here meaning it's black it goes all the way to White and it even goes past white but it can't show that because it only goes from black to white we page through these we go to the Y AIS and finally to the z-axis this is what we want you can tell that the positive side is white and the negative side is black so we want to restrict this to only be within where our box is which is going to be from negative 1 to positive one over here so let's pull out from this Z component and type in less than this will separate the component with a hard line of whatever value this is so to get this line to be exactly on here here let me visualize that by scaling it down a little bit to get this line over here we want this to be one let's it right there let's make another one to make a line at this point which is negative 1 however we want to flip it so instead of saying less than we can do a greater than negative -1 control shift right click between these to mix them together and let's set that to multiply turn up the factor to Max now we have a little bar showing just the area of the m if we multiply these colors over this Factor right here let's do that mix color multiply over this Alpha then it'll take the black parts of each of the pipes and exclude the decal from anywhere else let's preview that to see if it works and it definitely seems to it's no longer on the back side so now you can choose where it'll be by whether or not it is inside the geometry so that's the basic setup for the decal you can even scale it on its own Z axis to restrict the range like that and this is how I made the graffiti that I used in the render you saw earlier now let's do the sewer Grill because that uses a slightly different technique than this one it has its own bump its own opacity it's basically own material overlaid onto this material right here so here I have the sidewalk set up with all the other decals you'll see in the material that there's the normal material part and then there are these nodes these correspond to the decals one for each so we have the tree grate we have the dirt along the edge and we have the crack so let's make one of these but for the sewer Grill so we'll add a principled bsdf and control shift t on the keyboard with node Wrangler enabled and this material is a PBR decal that I downloaded from substance 3D assets you can get these from textures.com from quickel bridge so I'll select all the maps that I want for now and press principled texture setup that will set up the entire texture for me everything mapped up correctly so let's preview that onto the surface and it looks absolutely horrible because we have haven't set up the mapping correctly of course we do need the object coordinates and we want to select the empty now to change from repeat on all of these at the same time you can select all the nodes and while holding down alt you can change repeat to clip that'll do it for all of them move the mapping over 05 and scale it5 so it fills in a logical way and let's mix this into the whole pipe with control shift right click to mix them together with a mix Shader move that over to the right and we have a problem it's mixing in a bad Alpha on the whole thing so everything becomes transparent so we need to tell blender where exactly to mix this in and you might think well let's use this Alpha Channel then and let's try that let's move this Alpha Channel and pipe it into the mix Factor it of course only shows where the material has Alpha meaning these holes should be transparent and not show the asphalt underneath so for that I had to make another map let's duplicate this Alpha map open it up and you'll see that I have made a version of the alpha mat where I painted in the center to make that completely white this is where we want to mix in the new material so let's pull that up right into the mix factor and now we should have a working material look at that that's fantastic fastic so to make the node like I did with these other ones let's pull this down a little bit and pull this away from its source so I can pick this from outside the node select all of these contrl G to make a new group contrl tab to go out of the group again and rename this to sewer Grill this object here I want to keep right underneath it let's crl H hide what I don't need from that node and move it into the pipe now where you put this in the pipe is important for instance if I move this crack over over behind it then the crack will be over the sewer Grill which is which is which is not correct I'll just show you just because it's kind of neat since all of these wall objects have the exact same material applied to them then this decal will work over all of them doesn't matter what object it is and you can even make that work with separate objects for instance this dirt right here if I want this to be both on the ground and on the wall look here let's go into the ground material and we will find the dirt Corner decal if I mute that you'll see that turns it off and back on again so we can controll C copy that and paste it on the wall material and if we mix this in after the wall material like so it'll apply to both of them at the same time and it will respect the transformation of the controller decal here it is so here that will respect both of them and if you were wondering about these spotlights here look I'll uh turn down the world a bit so you can see them these are actually not IES lights they are controlled with nodes fully customizable and I have a tutorial on them that you can watch right now if you want recording this my channel has 65 subscribers among them my mom and dad and most of my friends as you can imagine one new subscriber means a lot at this stage so if you like the video subscribe it would make me very [Music] happy
Info
Channel: Robin Squares
Views: 12,984
Rating: undefined out of 5
Keywords: Blender 3D, Graffiti, Spray, Grafitti, Grafiti, Graffitti
Id: rUP8aAG4AQ8
Channel Id: undefined
Length: 12min 26sec (746 seconds)
Published: Sun Jan 07 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.