Unreal Engine 4 Tutorial - Decals

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] so today we are going to be looking at decals and how to create them what they are and how we use them now I want to show you different types of decals today and eat how you use them is totally up to you but they are a super powerful and super useful tool in creating more believable worlds so what is a decal well decal essentially is like a stamp and you put like a sticker or stamp on your level to create unique artifacts of your environment so for example if you wanna add like a crack here rather than texture the whole walk differently you just make a decal or a stamp or sticker just stick onto the wall to make it look like there's a crack there we can also do this quite commonly we use it for blood splatters but it holds and things a nature too so you can also spawn them into the world as you wish so how do we actually create a decal well a decal it's actually just a material put onto a special component so let's have a look what we've got here so I've imported a couple of textures already anything will do this is just going to show you how to do this and the first thing we're going to do is after we've imported them is look forward to the decal in the modes box at the top here so in the search box just type in decal and your seat deferred decal and you can click and drag this into your world now a few things to note about how decals work so decal comes up by default with this green box and the green box in itself has a little purple arrow pointing down so this arrow indicates which direction the decal will be facing pointing down means meaning that this decal will appear on the floor and the moment we have got a decoy attached to it so get this default temporary image I guess to appear but we will replace that obviously with our own in a moment so a few things about decals we should know decals can only face one direction and we posted and be pasted in one direction so for example this one's pointing down if I move it onto the wall notice how it stretches along the wall another benefit of decals is because they are pointing down we can drag this onto here and if I increase the bounds of the screen box I can make blood splatter for example spill over the edge and onto the floor here if I wanted to obviously we'll get this effect but there is a way around this and I'll show you that probably in a later video as it's a bit more advanced so how to actually create a decal image well a decal image is similar to a material with a few critical differences so let's get started on making our own so I'm gonna start off with this stain here that I've got a simple stain texture downloaded and I'm the right-click on it and choose create material and I'm gonna call it stain once underscore decal and I've opened this one up so as I said decals are just materials with a few settings changed accession you need to change your on the actual material output itself so click on this big brown box and in the bottom left you will see material domain and it's a surface click on that drop box and you'll see deferred decal now as soon as you do that the image will disappear and you'll get an error message and this is telling you that it needs the blend mode to be translucent now that is just one of the limitations of unreal and the way it works you have to have decals in translucent mode so click on the brown main output again and underneath we'll just change it to differ decal you'll see blend mode saying opaque and this has to be translucent for this to work and the image should reappear excellent so for my stain it works best before stain to have a alpha background okay so has this one's a PNG so it has an alpha layer and I'm going to use that alpha layer to hide the bits that I want to see and the Alpha layer on their texture sample is this bottom pin here this gray one here it means alpha drag this over to opacity and the next thing we're going to do is we're going to change it so it doesn't go to base color and instead goes to emissive color this is because it's now translucent material we wanted to show a bit crisp and a bit clearer and it works better if it's emissive I mean it grows a little bit click apply and then you can close this down and what we can do with that decal here is drag over our stained one decal onto the decal domain there and you can see the decal now appears and if I rotate this around ninety degrees and again another 90 degrees and axis and move it along the wall I can paste it onto the wall and I can scale it how I like and that will stretch and change the image based on my desires so and you can see daddy cow is now on the wall you can see that stretching occurring because we're only facing one way we were not facing this way you get stretching okay so it's literally like a stem like a projection onto the wall but do you minimize these sideb it's an easy fix the net is simply move it so only just clips through the wall like so there you go and that's roughly how decals work there's a few things we can do with decals and one thing we can use them for as I said are like signage and bullet holes and things like that so let's show you how to do signage now the issue we have with decals is they have a couple of limitations and that is mostly because they are translucent they are affected by non static lighting so things like the skylight or any kind of directional light you've got going on by default will affect the decal fortunately there is a way around this so let's show you the problem we've got if I go to this post I've got here I'm going to make interior half this Frank material and up I'm gonna do exactly what I just done put a stain so I'm gonna change this over to a deferred decal make it transfer Lucent because it has to be and I can also put your pasty on even though this texture doesn't have an opacity layer so you can see the problem with the translucent is that it makes the image slightly see-through which isn't ideal because this is a post does not maybe see through a tool like a blood splatter or a stain or anything where you can see the original material underneath it it's may be opaque and if I put this into the game dragon or deferred decal in just going to rotate it and scale it and pop in my poster take mount and you can see already the issue we've got is that you get this sort of translucent see-through ish image which isn't what you want you want to get the full image that you just downloaded and use it as a natural poster so how do we do that well we use a thing no we use a thing called a D buffer and a d buffers a different way of rendering the texture there we assign and we can change this buffer over on the bottom left where we've been doing our changes so far you'll see decal blend mode and he says translucent we can actually change this to D buffer translucent color normal and roughness click on that one and this time you'll see emissive color gets grayed out so we need to hook this up to base color and click apply so now when you put into the world it should be more solid like so and that's how you get solid decals and I said it's great for making posters or signage so you wanna put warning signs or arrows on the walls or graffiti decals are really useful for the crane just that and I can do whatever I like with this thing okay you can see it in-game it's nice and solid like an actual poster okay so that's how you get around that now if you're following along you may have the issue of deep buffers not showing as an option down the bottom here the solution to that is to enable it in the project settings so go to edit project settings and when it loads up you will find in the rendering section and you can just search for it we can search D buffer you wanna make sure deep buffer decals is turned on okay this may we start the editor but once we start you'll see those options appear down here okay and that's roughly it really and for decals I'll do another video later one of how to fix it so you don't get stretching on unwanted surfaces but for now that will do if you have any questions for decals or anything else down down below put a comment in and don't forget to also like and subscribe to the channel and I'll see you next time thanks for watching catch you later bye bye I have one if you do like these videos and you have liked what I've done in the past and want to see what smell else I can do all your support is greatly appreciated on YouTube however I do have a patreon set up as well where you can support me in further money donated by yourself will help me make better videos and better content and more frequently hopefully plus it will help me develop my own projects currently I'm in a project at the moment and I'll hopefully be able to share that with you soon if you do just choose to donate and subscribe to us on patreon are you doing it access to videos two weeks ahead of time plus there are many other rewards available to you too so head on over to www.skinnygainmuscle.com [Music]
Info
Channel: Ryan Laley
Views: 152,624
Rating: undefined out of 5
Keywords: Unreal Engine 4, UE4, Unreal, Games Development, Gamedev, Development, Gaming, Console, PC, PS4, Xbox, Switch, Decals, Deferred Decals, Blood Splatters, Bullet Holes, Damage, Rot, Puddles, Signs, Posters
Id: PjZEDzQuan0
Channel Id: undefined
Length: 11min 37sec (697 seconds)
Published: Sat Aug 04 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.