UE4: Stealth Invisibility Effect (With Distortion)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi in this video I'm going to show you how to make your character invisible it will have an additional distortion effect on it all of this will be done in post process so there is no translucent material used it's very efficient instead of translucency we will use a feature that is called custom deaf so now I will revert all the changes I made this is how it looks like plus a normal character running around the first thing we need to do is to create a post processed volume a post produced volume applies a post processing shader onto the screen it's very important to set unbound here because otherwise it will apply its effect on inside this box with unbound it works everywhere fine now let us create a material the only thing we need to change is the material domain let's set post process here and please make sure that none double location is set to faster tone mapping will default on mapping fine contents of our screen are provided by the node which is called same texture scene texture and the scene texture idea is post process input zero listen this is the content of our screen the only output is emissive color so let's attach color to emissive color and for it to have any visible effect let's multiply this color by for example a green cone apply now to enable the effect we need to go to post process volume into its settings let's find the blendable add the first element choose acid reference and drag and drop our material fine it works so what about this transparency effect this distortion as you can see this in texture node has UV as its input this UVs are coordinates of every pixel imagine the post processing shredder running over every pixel on the screen and each of these pixels has to read its contents from the scene texture so the UVs are just the location of the pixel on this scene texture it's equivalent to using texture coordinates texture coordinate without any modification so your tiling 1/v tiling one as you say is the same but if we modify this coordinates then the pixels will read from a different part of the texture for example now we have scaled the coordinates everything is scaled twice and this is what we are going to use this is what we are going to use to our advantage let's go back to one here I will use a normal map can be any normal map for now I will take only the this normal map looks like this but I will only use the red and green channel from it some component mask red green this is how it looks like the default texture coordinates when visualized as color values look like that so you can see increasing green and increasing red it's equivalent to increasing X values and Y values zero half one now if I add ten or Mama to dis coordinate like this then this is what I get distort the TVs the effect is too strong for now and goes on the in right and down directions so first let me subtract a constant hull so this distortion goes in both directions and then multiply it to change the strength of this effect as color parameter will help with that distortion strength I multiply the normal map by distortion strength of for example 0.1 cool now I can control this effect like that so let's see what using this you v's gives us this is a standard these are the standard coordinates and if we replace them by our new coordinates then the screen looks like that is heavily distorted as you can see but fortunately we can control the strength 0.01 looks okay of course we can change this map is something else if the texture is too small then UV time 0.1 will scale it 10 times uh-huh 0.3 maybe yeah fine so our basic distortion effect works very well now we need two things first it should be applied only inside the character's silhouette only inside the shape of the character not on the whole screen obviously and the second thing is that we need to make the character invisible so let us close this post-processed shader for a moment I will show you how it looks like okay let's go to post-process volume and disable it for a while and so we can see anything okay let's select the character and let us now proceed to this custom death feature the dev buffer is a buffer that contains the information about how far the pixel is from the camera when we are up close it goes dark because it's near zero but for far away object is increasing towards white because the values of the distance increased now there is a special buffer that is called custom death which contains the Deaf only of the selected objects only of the objects that have custom deaf writing enabled custom deaf is enabled inside the mesh so let us select the character and here is the rendering tab and inside this rendering tab we have an option to render custom deaf paths as you can see enabling this shows the death of the object in the custom death buffer that's what that's exactly what we need they've now inside the post-process Raider we can extract this information by using scene texture now not post-process input 0 but custom deaf and to see anything meaningful we need to compare this custom deaf with a standard cinders because this cinder contains deaf of every pixel and discussed on deaf only of our character with all other pixels being transparent now if we add a value to the standard cinder for example making it more deep it's like offsetting all this depth that 0 becomes 1 1 becomes 2 and so on then if we compare these two values then only for the character they will be different because all all pixels does not cover the character are empty in custom deaf this is our first color mask component masks are a key component mask because it's not a color it's a single value and the same here this if no works like that if a s is greater than B or equal then use the first value and if is no more than B so if the seen depth we've added one is smaller than custom def then use one or maybe the other way one and zero let's see what it does put it inside the missive color for now apply back to lid and enable this post process again fine if the values of death on our character are different than the rest of the scene the pixels output one we will take the standard contents of the screen with normal coordinates and the distorted texture okay and if this is on a character then use the distorted texture while outside the character use the standard texture okay that's it that's exactly what we need inside the character we have the distortion outside we don't have it I will show you the shader this is the shader the mask the distorted texture screen texture and the standards in texture okay now there is one thing we need to do because as you can see the character is still here okay it gets distorted but it isn't invisible so back to the characters mesh here by default it's hidden so let's expand it and there is render in main path if we disable it the character disappears it writes only to the custom def pass that's what we need so disable render in main pass enable custom def pass and we are done thanks and good luck with your projects bye
Info
Channel: Tech Art Aid
Views: 57,243
Rating: undefined out of 5
Keywords: Unreal Engine, tutorial, unreal, unreal technical art, ue4 technical art, Tech Art Help, how to make character invisible, stealthing, dissolve, transparent character, cloaked character, cloak shader, cloak material, ghost effect, custom depth pass, separate translucency, distortion postprocess, ue4 blendable, ue4 outline, ue4 post process, distortion post process, ue4 main pass, ue4 post process material
Id: 9ZawosRVZrs
Channel Id: undefined
Length: 17min 8sec (1028 seconds)
Published: Sat Jun 18 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.