Simple Post Process Outline in Unreal

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 มิ.ย. 2019
  • English learners: change the video speed to be slower ⚙️ This tutorial will show you how to draw an outline around an object using a simple post process material.
    This effect does not use the Sobel operator.
    If you are making a toon outline, follow this tutorial but use custom depth nodes instead of the custom stencil nodes. Then use a threshold value instead of the custom stencil value.
    The post process material can be copied and pasted from here:
    blueprintue.com/blueprint/tl5...
    The same material but with a depth test so the outline isn't visible through walls:
    blueprintue.com/blueprint/n1r...
    Finally a version of the material that supports multiple outline colors:
    blueprintue.com/blueprint/tv0...
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 208

  • @juanferrer5924
    @juanferrer5924 4 ปีที่แล้ว +12

    This was easily the most efficient tutorial ever. Seriously kickass. Def not for beginners but to people who are sick of having to wait through basic setup this is a godsend

    • @Kokuyous3ki
      @Kokuyous3ki 4 ปีที่แล้ว

      So damn right. I think it was AI Detour Crowd tutorial? The guy talked like 40 minutes about nothing and then didn't basically just added the built-in Detour controller for AI and that was his tutorial. Like WTF? How is that a tutorial? And more than half an hour? At least talk about how we can tweak it!
      Sry for ranting. Anyways I'm really really fed up with the sh*tty tutorials that just waste time but hog focus from actual tutorials someone poured their heart and soul into. So annoying when I can barely find the actual tutorial because 9/10 search results just bring up the trash and the actual tutorial won't get the attention it deserves.
      Graaah! Imma go eat something sugary, maybe that helps...

    • @juanferrer5924
      @juanferrer5924 4 ปีที่แล้ว

      Kokuyous3ki it’s always something. I get that sometimes you need to start like that for beginners but with ANYTHING post process related- just like why? Everyone should know most of these things or at least be able to get it from context clues. If you can’t, you need to go back and learn basics first

  • @yunggbonker
    @yunggbonker 3 ปีที่แล้ว +6

    quick, to the point and thorough. more tutorials need to be like this.

  • @danqiqian5752
    @danqiqian5752 4 ปีที่แล้ว

    This tutorial is too good! Quick and super helpful and straightforward!!

  • @elfideorubio1308
    @elfideorubio1308 2 ปีที่แล้ว +11

    If you want to get rid of the jitter effect the outline has go to the material properties search for "Blendable location" set the drop down to before tone mapping.
    Amazing tutorial btw to the point and it works like a charm thank you :)

  •  2 ปีที่แล้ว

    Surprisingly simple process. Great tutorial.

  • @mortiss69
    @mortiss69 3 ปีที่แล้ว

    Very concise and works great. Thank you!

  • @aghayejalebian7364
    @aghayejalebian7364 ปีที่แล้ว

    This was an awesome tutorial, covered everything. Thanks.

  • @blendomatik1368
    @blendomatik1368 4 ปีที่แล้ว

    Thank you for the tutorial! I watched quite a few but yours was by far the best and most comprehensive!

  • @amhathaw
    @amhathaw 2 ปีที่แล้ว

    This was so hopeful! Thank you!

  • @orangecatninja
    @orangecatninja 4 ปีที่แล้ว

    I liked how quick and to the point it was! To anyone that wants it a bit slower, use the TH-cam speed settings, it will help

  • @Ferodra
    @Ferodra ปีที่แล้ว

    Thank you so much for this!
    I've found lots of different ways to create such an outline, but this one makes the most sense and probably is the best one too

  • @charmie20
    @charmie20 4 ปีที่แล้ว +2

    This was incredibly helpful. So often I come across tutorials that take forever and it doesn't work. Yours was fast and actually worked the first try. This will help me tremendously in future projects. Thanks!

  • @m0rph3u5.
    @m0rph3u5. 3 ปีที่แล้ว

    This is the best tutorial covering this type of workflow ... short and to the the point.. you're a star :)

  • @NJoint
    @NJoint 2 หลายเดือนก่อน +1

    This was very useful and to the point. I wish you did more videos like this

  • @VRDivision
    @VRDivision 3 ปีที่แล้ว

    Thanks a lot man! the is the best tutorial on the topic ever made!

  • @suitoha9336
    @suitoha9336 3 ปีที่แล้ว

    Amazing tutorial!!! Thank you so much for sharing!

  • @murakamih951
    @murakamih951 3 ปีที่แล้ว

    Perfect tutorial, thanks!

  • @markjones5692
    @markjones5692 4 ปีที่แล้ว

    Brilliant, thanks a lot, exactly what I need, concise and to the point

  • @dimaferox5133
    @dimaferox5133 3 ปีที่แล้ว +2

    Great tutorial, thanks! Also your code links are great :)

  • @jblader540
    @jblader540 2 ปีที่แล้ว

    Thank you very much for this short and helpful tutorial. :D

  • @ofeklivny
    @ofeklivny 3 ปีที่แล้ว

    Splendid tutorial. Helped me alot!

  • @Arquipartidas
    @Arquipartidas 4 ปีที่แล้ว

    Thank you so much! It was so easy making it possible following your steps!!

  • @marcosdiaz6529
    @marcosdiaz6529 3 ปีที่แล้ว

    Awesome work! Thank you so much!

  • @nawakman
    @nawakman 3 ปีที่แล้ว

    Thank you, you are the only one out there that explains how to make ans outline on exterior side

  • @superduperman909
    @superduperman909 2 ปีที่แล้ว

    This was great. Thank you!

  • @DavidGWilliams1981
    @DavidGWilliams1981 ปีที่แล้ว

    Thanks, just what I needed.

  • @Tallone55
    @Tallone55 ปีที่แล้ว +2

    This tutorial is an absolute gem. It provides enough detail that I can understand exactly how the effect works, while being quick, easy, and simple enough that it can be quickly followed.

  • @nicolaykoriagin
    @nicolaykoriagin 2 ปีที่แล้ว

    Thank you, very useful tutorial. It's fast and effective. Thanks again.

  • @prestonschulz6319
    @prestonschulz6319 3 ปีที่แล้ว +4

    For anyone having issues with the outline not showing up, make sure to set your Post Process Volume in your scene to "unbound". This will make it so the processes will be active regardless of if you are inside the volume or not.

  • @hottestmanevar
    @hottestmanevar 3 ปีที่แล้ว

    Perfect tutorial, thank you good sir

  • @imakegamesgains4
    @imakegamesgains4 4 ปีที่แล้ว +1

    amazing, thank you!

  • @abs22x23
    @abs22x23 2 ปีที่แล้ว

    Thank you very much ! Great tutorial, and thank you for the code links :)

  • @ShereefHisham
    @ShereefHisham 3 ปีที่แล้ว

    This is suuuuuuuuuuper good .. Thank you so much!!!

  • @tenium2912
    @tenium2912 11 หลายเดือนก่อน

    Oh, thanks for link! ❤

  • @Jukerlaw
    @Jukerlaw 3 ปีที่แล้ว +8

    You’re too good and straight to the point. But i think if u keep ur pace x0.5 or 0.75 it would be easy to follow.

  • @pfg8800
    @pfg8800 3 ปีที่แล้ว

    Thanks you This is best video on this theme

  • @bheret
    @bheret 4 ปีที่แล้ว

    great tutorial! just what I need it Thx! Please make more tutorials.

  • @Mr30friends
    @Mr30friends 4 ปีที่แล้ว +3

    Perfect pace. And you even show the complete thing at the end. Nice.

  • @Hochban_FX
    @Hochban_FX 8 หลายเดือนก่อน

    Great video

  • @adamdburton
    @adamdburton 2 ปีที่แล้ว +2

    Thanks for this! In UE5 I had to add a Mask (RGB) node from the Color output of the SceneTexture before its used for the If and Add nodes.

  • @SPSSkals
    @SPSSkals 4 ปีที่แล้ว

    Thank you

  • @JustSuds
    @JustSuds 4 ปีที่แล้ว

    This video is fantastic, the pace is great - no time wasted, no useless waffling or irrelevant information. Thank you

  • @evansmith8375
    @evansmith8375 3 ปีที่แล้ว

    Hi @wizvanmeter - thanks for the tutorial. Does this work for Skeletal Meshes as well? If not, have you got any tips on how to get it working for them? Thanks.

  • @TrueTydin
    @TrueTydin 2 ปีที่แล้ว

    Is there a way to sample from the material to create a shade for the outline that’s a darker shade but same hue as the base it’s attached to?

  • @DusanFajler
    @DusanFajler ปีที่แล้ว +3

    Thanks a lot!

  • @CaliberBeats
    @CaliberBeats 4 ปีที่แล้ว +2

    any way to alias this effect? works well, but looks like its a line drawn in an 8bit world when running in my 4k game...
    edit: and 1080p

    • @ryanvanmeter6648
      @ryanvanmeter6648 4 ปีที่แล้ว +3

      Try rendering the material Before Tonemapping. The option to do that is in the material, at the left, scroll down a lot. This might change the color and opacity a little, but I think the tonemapping process does anti-aliasing. By default, post processes are the last thing to render, after tonemapping.
      The stencil buffer is binary; each pixel is either the stencil value or it isn't, so if the tonemapping doesn't smooth the result then I'm not sure there's an easy way to do it. You'd have to render the buffer at a higher resolution or manually blur the buffer or something.

  • @321Green1Fork123
    @321Green1Fork123 3 ปีที่แล้ว

    Will this work if I already have a cel shader material in the post process volume?

  • @masterzh
    @masterzh 4 ปีที่แล้ว

    Thank you very much for this ! worked perfectly

  • @antonyashy3850
    @antonyashy3850 2 ปีที่แล้ว +3

    If you followed this and it didnt work, do this. There are 2 Component mask nodes at 1:49. One of them should be mask(R) and the other one should be Mask (G). I did this and it worked.

    • @Noey145
      @Noey145 2 ปีที่แล้ว

      Mine had to be 2 Mask (R), it's also like that in the blueprint from the description

  • @Rethunium
    @Rethunium 2 ปีที่แล้ว

    You are a true wizzard

  • @Cloganart
    @Cloganart ปีที่แล้ว +4

    On Shader Model 6 in UE5 this gives an Arithmetic error on the final IF node once a Float4 is used for A>B to change the color of the outline if you want it to be a parameter. Any other ideas as to how to make the color change a parameter?

    • @wizvanmeter
      @wizvanmeter  ปีที่แล้ว +7

      Unreal might think the parameter is a Float3 even though it should be a Float4. This was a problem in UE4. Try adding an append vector node right before the A>B. Append a scalar 0 or 1 to your parameter to make Unreal think it's a Float4 again. Or use the MakeFloat4 node.

  • @curtisnewton895
    @curtisnewton895 2 ปีที่แล้ว +1

    ue4.27 one have to set "render custom depth pass" in the static mesh options

  • @syverlauritz
    @syverlauritz 2 ปีที่แล้ว

    With a few Append nodes this works great, but I can't get that live preview that you have, which is a bit annoying.

  • @ToTaLoVeR
    @ToTaLoVeR 4 ปีที่แล้ว +2

    Hi, and thank you for tutorial, is there any way to make multiple of this? Like few colors for few diffrent things ?

    • @wizvanmeter
      @wizvanmeter  4 ปีที่แล้ว +4

      Yes I think you could modify this material to have different colored outlines. You'd need to make new if statements and choose a different stencil value for each new color.
      1) Duplicate (ctrl + w) the if statement after the distance node. Make sure the copy is also connected to the distance node and is checking for a different stencil value in its B input. Add the result of these if statements together and connect the sum to the A input of the final if statement.
      2) All outline colors go through the A>B input of the final if statement, so the material needs to decide which color to draw just before that. You might not need any fancy color-choosing logic. Make some color nodes and try multiplying each color by the result of the if statement that checks for the stencil value associated with that color. Then add the result of those multiply nodes together and connect the sum to the A>B input of the final if statement.
      Not sure if I explained that well, and I didn't test it either. So let me know if it doesn't work or if you want more details.

    • @hirvielain9013
      @hirvielain9013 4 ปีที่แล้ว

      @@wizvanmeter That worked!

  • @PsyCoCinematics
    @PsyCoCinematics 2 ปีที่แล้ว +3

    Hah, found it. If you have issues where the entire object is the outline color, make sure the Screen Position Viewport UV node is only being used, not Pixel Position. Unless that's what you *want*, in that case put the Pixel node into the Add instead.

    • @jblader540
      @jblader540 2 ปีที่แล้ว +1

      Thank you very much dude. I had the same problem and your comment saved my life

    • @PsyCoCinematics
      @PsyCoCinematics 2 ปีที่แล้ว

      @@jblader540 Sure thing! Happy to have helped ^_^

  • @_Caose
    @_Caose 3 ปีที่แล้ว

    It works when the object is on the left side of the screen, but does not work correctly on the right side?
    Also, there is a working range. So, it is not working for far objects.

  • @matteyevee2333
    @matteyevee2333 7 หลายเดือนก่อน +1

    i love you

  • @CommanderColson
    @CommanderColson 3 ปีที่แล้ว

    How could you make it where you cant se it through walls?

  • @AlexMacsim
    @AlexMacsim 3 ปีที่แล้ว +3

    in my game the material is already active and i have to pass with my character through the colision box to stop it. why do you think this is happening?

    • @GRENADEable1
      @GRENADEable1 3 ปีที่แล้ว +1

      Go to your rendering on the object and set the 'CustomDepth Stencil Value' from 2 to 0

  • @friedrichschadow
    @friedrichschadow 4 ปีที่แล้ว +1

    Only works wit opaque materials, is there a way to use this with transluscent materials?

    • @wizvanmeter
      @wizvanmeter  4 ปีที่แล้ว +1

      Not that I know of. The workaround is to use two opaque materials: Duplicate the mesh with translucency, assign an opaque material to the copy, then uncheck "Render in Main Pass" on the copy.

  • @poomaan777
    @poomaan777 2 ปีที่แล้ว

    Hey man, amazing tutorial, really helped me in my project!!
    There was one problem though, objects with translucent materials don't seem to have a boundary on them. Is there any way to fix that?
    Any help will be greatly appreciated!

    • @wizvanmeter
      @wizvanmeter  2 ปีที่แล้ว

      Only works on opaque materials but there is a workaround. Duplicate the object with translucency, assign any opaque material to the copy, then uncheck "Render in Main Pass" on the copy. The result will be 2 objects on top of each other, one looks translucent and the other is invisible but has the outline.

  • @leavitodeaver
    @leavitodeaver 4 ปีที่แล้ว +3

    Do you know of a way to reduce the "jitter" the outline has? Not sure if that's my monitor or what, but the outline is all but vibrating. Very useful, nonetheless

    • @wizvanmeter
      @wizvanmeter  4 ปีที่แล้ว

      Not sure either. Try a larger outline by increasing the width. If there's still jitter, maybe make the outline be a solid color instead of flashing. Or choose colors with less contrast like blue and dark blue. If there's still jitter then I don't know, maybe the stencil buffer is at a different resolution or something. If you figure it out, please share your fix in case other people have the same problem.

    • @leavitodeaver
      @leavitodeaver 4 ปีที่แล้ว

      @@wizvanmeter I ended up taking out the strobing effect entirely, but the jitter is still pretty obvious, and increasing the width doesn't really help either. Thanks though

    • @davidwilliamson502
      @davidwilliamson502 4 ปีที่แล้ว +11

      Found it (at least it worked for me). Open your material. Click the final node (InteractableOutline or whatever you may have called it). Go to the details tab. Scroll to Post Process Material. Change Blendable Location to Before Tonemapping. Hope this helps.

    • @_SweetJP
      @_SweetJP 4 ปีที่แล้ว

      @@davidwilliamson502 Was going to recommend the above. Saw it in a different tutorial and it solved the issue immediately.

    • @leavitodeaver
      @leavitodeaver 4 ปีที่แล้ว +2

      @@davidwilliamson502 Worked beautifully, thanks much

  • @ChezzyKnytt
    @ChezzyKnytt 3 ปีที่แล้ว

    This looks good, is there any way to make the outline have a constant width? This has points on my mesh where the outline thins out to almost nothing, depending on angle.

    • @wizvanmeter
      @wizvanmeter  3 ปีที่แล้ว

      To have a constant width you would need to make the outline in a different, non-simple way. This video only offsets the stencil in 2 directions, but instead you could add a few more offsets to go in all 8 directions. If you don't need the outline to be a post effect, you can try the classic method of duplicating the mesh, scaling up along the normals slightly, and inverting the normals.

    • @ChezzyKnytt
      @ChezzyKnytt 3 ปีที่แล้ว

      @@wizvanmeter Okay, thanks for the help!

    • @tsolarbear1977
      @tsolarbear1977 3 ปีที่แล้ว +2

      @@wizvanmeter If I may ask, how would you make an offset in a different direction?
      EDIT: Figured it out; split the "ViewportUV" pin into Float2 components, which you can then add or subtract separately to move the stencils in whatever direction you want. If you duplicate the two-stencil method shown in the video, edit the new one so that the stencils are on the other two diagonals, and add this new code to the original right before the if-statement containing the "PostProcessInput0" node, it'll be equally thick all the way around and just really look great.

    • @warguy5556
      @warguy5556 2 ปีที่แล้ว +1

      @@tsolarbear1977 Is there any way you can show an example of what you mean?

  • @FF-FAN9999
    @FF-FAN9999 3 ปีที่แล้ว +1

    im getting an error on the if node (arithmetic between types float3 and float 4 are undefined. and Cannot force a castg between non numeric types. (i did add the masks to the distance, so im not sure why im getting this message

    • @FF-FAN9999
      @FF-FAN9999 3 ปีที่แล้ว +2

      nvm i fixed it. i was using a vector 3 color instead of a vector 4

  • @fluffypanda75
    @fluffypanda75 4 ปีที่แล้ว +3

    Greetings. Is there a way to make the outlines avoid going through objects or a character?

    • @wizvanmeter
      @wizvanmeter  4 ปีที่แล้ว +2

      Yes, you can hide outlines with a depth test. Add these nodes and compare their color in an if statement:
      SceneTexture:CustomDepth (objects with outlines)
      SceneTexture: SceneDepth (all objects)
      If CustomDepth is greater than SceneDepth, then the outline is behind something so the result of A>B should be the SceneTexture: PostProcessInput0. If CustomDepth is equal to or greater than SceneDepth, then the outline is visible and the result of A==B and A

    • @fluffypanda75
      @fluffypanda75 4 ปีที่แล้ว

      Thanks for the reply. I have recreated your instructions, but there are some problems:
      - The If statement gives an error: [SM5] If input A must be of type float
      - If I connect that If directly to the Emissive Color slot, the If used for the Stencils is disconnected.
      I also tried connecting the final If (the one connected to the Emissive Color) to the Depth If nodes, but still nothing.

    • @wizvanmeter
      @wizvanmeter  4 ปีที่แล้ว +7

      Oh right, the color output of the SceneTexture nodes is a probably a Vector 3 but the if statement needs floats. So when you connect CustomDepth and SceneDepth to the if statement, each need to pass through a ComponentMask node. When you make the two masks, make sure only R is checked so that only a single float gets through. Leave G, B, & A unchecked.
      ^^I updated the video description to include a pastebin that has the depth test. It's this link here: blueprintue.com/blueprint/n1rpvznq/

    • @fluffypanda75
      @fluffypanda75 4 ปีที่แล้ว

      Ah alright.
      Many thanks for the help!

  • @user-mf2bf1kk1q
    @user-mf2bf1kk1q 4 หลายเดือนก่อน

    Brilliant. What side effects are there in using this method?

    • @wizvanmeter
      @wizvanmeter  4 หลายเดือนก่อน

      This method is a post process, which can be expensive. And this method requires a work-around to draw the outline around objects with translucent materials. Not recommended on mobile or on an animated skeletal mesh that has translucent materials.

  • @happytimelogan
    @happytimelogan 3 ปีที่แล้ว

    This is fantastic, would there be a way to set up a few of these materials to outline different things with different colors but at the same time? Or with this method, is only 1 outline color possible?

    • @wizvanmeter
      @wizvanmeter  3 ปีที่แล้ว +1

      Yes you can define multiple outline colors in this one material by using more if statements to test for other stencil values.
      EDIT: I suggested chaining if statements into each other but that won't work. Instead see the comments below or check the video description to find a working example of a material that supports multiple outline colors.

    • @petarus625
      @petarus625 3 ปีที่แล้ว

      @@wizvanmeter I'm completely new to Unreal, and I'm trying to figure this out.
      In the first if statement, I connected the color to A == B. However, I can't connect the result to another if statement because the result is a 3vector, not a float.

    • @wizvanmeter
      @wizvanmeter  3 ปีที่แล้ว

      @@petarus625 You're right, that doesn't work! My bad. Unreal expects to compare values of the same type. So instead of chaining them together, you combine the results after doing separate tests.
      First connect the result of the difference node into multiple if statements, each testing for a different stencil value. Then the result of each one needs to be combined to connect to the A of the last if statement. The A tests against 0 in B to find where all the pixels with outlines are. And finally the result of each if statement also needs to be combined with each color before connecting to A > B, which draws the outline pixels.
      It's a little complicated so I made a working example. I've edited the video description to include a new pastebin: blueprintue.com/blueprint/tv0u7g68/
      You can copy/paste the nodes into your material.

    • @dakuma8539
      @dakuma8539 3 ปีที่แล้ว +3

      1) Set up one material
      2) make the colour a parameter
      3) Create an instance of the material for each colour you'd like to define.
      4) You can even dynamically create an instance and allow the colour to be set in the blueprints.

  • @A1rWaxta
    @A1rWaxta 4 ปีที่แล้ว

    I have got a problem: [SM5] SceneTexture expressions cannot be used in opaque materials
    how to repair this issue?

    • @wizvanmeter
      @wizvanmeter  4 ปีที่แล้ว

      Look in the material editor, in the details to the left just above the Blend Mode you should see the Material Domain and that needs to be set to Post Process, not surface or anything else.

  • @user-fu7zr5us5f
    @user-fu7zr5us5f 4 ปีที่แล้ว +5

    the outline is shaking , how to make it better~? thx

    • @Styv93
      @Styv93 4 ปีที่แล้ว +11

      Set "Blendable Location" to "Before Tonemapping" in the final material node

  • @piorism
    @piorism 3 ปีที่แล้ว

    Hello - can you specify which version of the engine is being used ? And can you confirm that this effect works in 4.26 ?

    • @wizvanmeter
      @wizvanmeter  3 ปีที่แล้ว +1

      My tutorial project is currently saved in version 4.22.3, but I might have recorded this in an older version. I don't remember, it's been a couple years now.
      Also, I just opened a new project in 4.26.2 and I can confirm that the outlines work in this version of the engine.

    • @piorism
      @piorism 3 ปีที่แล้ว

      @@wizvanmeter Hello ! Thank you for the reply. There must be something obvious I am missing, I'll keep digging.

    • @monkeber
      @monkeber 3 ปีที่แล้ว

      Hi! Aside from rechecking all constants and default values in material, make sure you checked the box on "Infinite Extent (Unbound)" property on your PostProcessVolume. Found this tip browsing related questions.
      BTW, I got it working on UE5 as well.

  • @nonpurplestar4158
    @nonpurplestar4158 2 ปีที่แล้ว

    Thx for the tutorial but will this work for a sprite_?!

    • @austinbryan6759
      @austinbryan6759 2 ปีที่แล้ว

      Why not just try it. Or just add a black board to your sprites.

  • @marcelinoborges5088
    @marcelinoborges5088 4 ปีที่แล้ว +7

    Mine is giving me a few errors, like the last ADD node of the time/outlinecolor chain, connected to the A>B of the last IF. First it says "[SM5] Arithmetic between typers float3 and float4 are undefined" and, second, "[SM5] Failed to compile AGreater ThanV input"(exactly because of the add node error). And even if I insist to save the material, I get a texture (that editor brown-yellowish wall texture) on my camera. And the outline doesn't show up in my actors. I have watched this video 3 times... lmao
    Screenshot: drive.google.com/open?id=1OIEaQdzvfmO62O5-7cVY66rYWg-Q-xw2

    • @wizvanmeter
      @wizvanmeter  4 ปีที่แล้ว +5

      Your screenshot is correct >__< it's a bug in Unreal. I get the error too as soon as I turn the outline color from a constant Vector4 into a VectorParameter (which should still be a Vector4). Unreal thinks the parameter is a Vector3.
      The workaround is to use an AppendVector node before you add. Append a scalar 0 or 1 to your parameter to make Unreal think it's a Vector4 again.
      Their bug tracker says it was issue UE-21967 and that it was fixed in 4.18 but the bug is definitely in 4.19 and whatever your version is.

    • @marcelinoborges5088
      @marcelinoborges5088 4 ปีที่แล้ว

      @@wizvanmeter Hey, thanks for the quick answer!! The append vector worked and the error is gone, but the outline hasn't come out. =( I set the project settings stuff, I put the material in the post process volume and I set the "Render CustomDepth Pass" to true in my static mesh, but still not working at all... =/

    • @marcelinoborges5088
      @marcelinoborges5088 4 ปีที่แล้ว

      @@wizvanmeter BUT, at Custom Depth buffer visualization my meshes get grey!

    • @marcelinoborges5088
      @marcelinoborges5088 4 ปีที่แล้ว

      @@wizvanmeter One last thing (sorry to bother you)... Is there a way I can avoid the outline showing up in front of my character? When the player character os in front of the outlined mesh, the outline stays shows up in front of him...

    • @wizvanmeter
      @wizvanmeter  4 ปีที่แล้ว +1

      ​@@marcelinoborges5088 Looks like you got the outline working? Now you would set Render CustomDepth Pass to true on your player character. Then just below, set the CustomDepth Stencil Value on your character to a different number from the outline. So, not 2.
      Unfortunately, the parts of your character that use a transparent material won't block the outline. To make transparent things cover the outline, you would need to do the workaround in the other comments. You duplicate the mesh that has the transparent material, assign an opaque material, then uncheck render in main pass. Having a second character mesh might be difficult though.

  • @zodix44
    @zodix44 ปีที่แล้ว +1

    2:07 how did you get that Zero?

    • @wizvanmeter
      @wizvanmeter  ปีที่แล้ว +1

      Hold 1 on the keyboard while you click inside the material viewport. That's the shortcut for making a scalar value and by default that value is 0.

  • @ddvictor
    @ddvictor 2 ปีที่แล้ว

    Hey, thanks for the tutorial, really good! But I couldn't make it work on 4.27. Followed all the tutorial bunch of times but still can't make it work... When set the view mode to Stencil it shows correctly the objects set to render custom depth but I can't see the outline. Custom stencil value is correct also, post process set to unbound too. Any suggestion?

    • @wizvanmeter
      @wizvanmeter  2 ปีที่แล้ว

      Not sure. Sounds like you've done everything correctly. You could try to copy and paste one of the materials from the link in the description. Then double check to see that the correct material is assigned in the post process volume.

    • @ddvictor
      @ddvictor 2 ปีที่แล้ว +1

      @@wizvanmeter thanks for replying! I did try again and also copied the nodes, still couldn't make it. That's weird, must be something on the version I'm using 4.27. I followed another tutorial and could make it work anyway. Your version is easier though hahaha Thanks for the video and replying my message.

    • @NanaLove011
      @NanaLove011 2 ปีที่แล้ว

      @@ddvictor Hi, which video have you followed? I'm having the same problem too

    • @ddvictor
      @ddvictor 2 ปีที่แล้ว

      @@NanaLove011 This one th-cam.com/video/KakLXqpwnjo/w-d-xo.html. It's pretty similar but somehow this worked.

    • @NanaLove011
      @NanaLove011 2 ปีที่แล้ว +1

      @@ddvictor thank you!

  • @zodix44
    @zodix44 ปีที่แล้ว

    Im using 4.27 and it is over my object rather than being behind it

  • @321Green1Fork123
    @321Green1Fork123 3 ปีที่แล้ว +1

    Anyone know why mines jittery?

  • @SuperVillianStudios
    @SuperVillianStudios 2 ปีที่แล้ว

    How do you create those "custom" Parameters?

    • @wizvanmeter
      @wizvanmeter  2 ปีที่แล้ว +2

      They're scalar nodes. The shortcut is: hold 's' and left-click in the material window. You can also right-click to make a scalar, then right-click the scalar node and convert it to a parameter.

    • @SuperVillianStudios
      @SuperVillianStudios 2 ปีที่แล้ว

      @@wizvanmeter Thank You!

  • @abdulrahmanelkorek3042
    @abdulrahmanelkorek3042 4 ปีที่แล้ว

    Awesome and quick tutorials .. Thanks a lot :)

  • @TwitchinCat
    @TwitchinCat 2 ปีที่แล้ว

    I have been trying to get this to work for hours, only to realize my post process volume was not enabled...lol

  • @tsurayamiku1721
    @tsurayamiku1721 3 ปีที่แล้ว +1

    My outline is covering all the actor instead of only the edges. I'm using UE 4.26.1.
    Btw, amazing tutorial.

    • @wizvanmeter
      @wizvanmeter  3 ปีที่แล้ว +2

      The problem might be with the comparison between 1:37 and 2:15 in this video. That distance node makes sure the outline doesn't cover the entire actor because the 2 nodes going into it are the same buffer and the distance between the buffer and itself is 0. Just after that, the if statement checks to see if any of those buffer values are not 0, which should be true only at the edges of the actor. It's possible that you didn't give the custom_stencil_value parameter a value. That parameter defaults to 0 when you make it so be sure to give it the same stencil value assigned to your actor.
      The problem also might be the if statement at 2:38 in the video. The only condition for an outline is a stencil value greater than 0. The previous comparison made most of the values 0 by testing against a single stencil value. But if you set several different stencil values with other actors then you will need more complex logic than "greater than 0".
      The engine version shouldn't matter.

    • @tsurayamiku1721
      @tsurayamiku1721 3 ปีที่แล้ว +1

      @@wizvanmeter I check everything twice, it's all right, but it doesn't help.

    • @gigisimpson2753
      @gigisimpson2753 2 ปีที่แล้ว +1

      The tutorial was great but I have the same problem

  • @patrickabroad
    @patrickabroad 2 ปีที่แล้ว +1

    The outline offsets from the object on screenspace UV [1,1] and [-1,-1] but there is no offset in the screen space UV [-1,1] and [1,-1] directions, so the outline gets really thin there. I tried creating TextureCoordinates and feeding it into some SceneTexture: CustomStencil node, but that threw up a Texture2 to Texture4 error. Can you tell me how to offset in the other two directions to get a more complete outline? Thanks.

    • @wizvanmeter
      @wizvanmeter  2 ปีที่แล้ว +2

      You can make offsets for [-1,1] and [1,-1] by using the result of SceneTexelSize multiplied with Width. This result is the [1,1] offset so you need to negate each axis individually. Connect the result of the multiplication to 2 channel mask nodes, one that has 'R' checked and another that has 'G' checked. Multiply the 'R' mask by -1 and connect it to an append node. Connect 'G' to the other input of the append node to get [-1,1]. Now you can connect this to another SceneTexture node. Multiply the 'G' by -1 and append to 'R' to get [1,-1].
      For an example of an 8 way offset, you can look for a material function called SceneTextureAverage that offsets scene textures in 8 directions.

    • @patrickabroad
      @patrickabroad 2 ปีที่แล้ว +2

      @@wizvanmeter Took me a while to get back to this but thank you very much. Worked great.

    • @cryptic_owl4245
      @cryptic_owl4245 2 ปีที่แล้ว +1

      @@patrickabroad Would you mind showing a pic of the node editor?

    • @cryptic_owl4245
      @cryptic_owl4245 2 ปีที่แล้ว +1

      @@wizvanmeter how would you add the other two stencils to the If statement part? drive.google.com/file/d/1EBTjVKrB1hLobXSP2-hNah0mDuKdI4_K/view?usp=sharing

    • @wizvanmeter
      @wizvanmeter  2 ปีที่แล้ว +2

      @@cryptic_owl4245 Add the result of the first two if statements together then connect the sum into A of the final if statement. That final if statement is testing for anything greater than 0 so you can add the previous stencil tests together. Also you might need to swap the inputs going into the append node at the bottom where you're doing the [1, -1] offset because it looks like the green is the first value instead of red.

  • @autodriv3r405
    @autodriv3r405 2 ปีที่แล้ว +2

    Super Cool Tutorial but a pity that there is no glow coming out of the outline and that it looks like there is no Anti Aliasing on the Outline. Edit:
    When doing what El Fideo Rubio said + Multiply the 4 Vector Color with a high value then it works perfectly! :)

    • @mohammadsami881
      @mohammadsami881 2 ปีที่แล้ว +1

      Please explain more

    • @autodriv3r405
      @autodriv3r405 2 ปีที่แล้ว +3

      @@mohammadsami881 Do first this here: "If you want to get rid of the jitter effect the outline has go to the material properties search for "Blendable location" set the drop down to before tone mapping." and then Multiply the 4 Vector Color which goes into the A < B Plug. Im using a Scalar Parameter which i called "Emissive Power" and gave it a default Value of 1. Now i have a nice looking Outline which also Glows.

    • @mohammadsami881
      @mohammadsami881 2 ปีที่แล้ว +1

      @@autodriv3r405 Thamk you so much 🙂

    • @autodriv3r405
      @autodriv3r405 2 ปีที่แล้ว

      @@mohammadsami881 No Problem!

  • @williamrutherford553
    @williamrutherford553 3 ปีที่แล้ว +1

    Doesn't work for me. Your last If statement has an error saying "arithmetic between float3 and float4 not supported"

    • @wizvanmeter
      @wizvanmeter  3 ปีที่แล้ว +1

      Did you change any Vector4 Color nodes into a VectorParameter? It should still be a Vector4, but Unreal thinks the parameter is a Vector3.
      The workaround to this bug is to use an AppendVector node before the if statement. Append a scalar 0 or 1 to your parameter to make Unreal think it's a Vector4 again.

    • @MiljanBojovic
      @MiljanBojovic 3 ปีที่แล้ว

      IF that's the case and you want a custom parameter, then just don't connect the Float 4 parameter directly to the "IF", use "MakeFloat4" in between and it should work :)

    • @nghtrunnr7378
      @nghtrunnr7378 2 ปีที่แล้ว

      @@wizvanmeter That worked for me but now I'm getting an error saying that it couldn't compile the if statement. Thanks for the video, it helps anyway.

  • @schrottiyhd6776
    @schrottiyhd6776 ปีที่แล้ว +1

    nice short vid!

  • @CrazyKiLL3R44
    @CrazyKiLL3R44 4 ปีที่แล้ว

    Hey, sorry but I don't understand what you mean when you say "If you are making a toon outline, follow this tutorial but use custom depth nodes instead of the custom stencil nodes. Then use a threshold value instead of the custom stencil value."
    Can you explain this a little, please ? Very nice tutorial btw !

    • @wizvanmeter
      @wizvanmeter  4 ปีที่แล้ว +5

      It might be hard to explain without visuals, but if you want to see an outline where part of an object overlaps itself, then custom stencil nodes wont work. You'll only get an outline around the farthest edges of an object. Good for highlighting things, but you'll need something different to see outlines drawn on interior edges.
      .
      The custom stencil node gives you a single value across the whole object.
      The custom depth node gives you a gradient of values across the object. The gradient is the distance from the camera.
      .
      The if statement at 1:54 tests for values that equal exactly 2. But if you use depth instead of stencil, then you're working with a gradient and you don't test for an exact value. Instead, test if the distance is greater than ...I don't know. Try 2. Try 20. This number now represents a threshold. If the distance is bigger than this threshold then there must be an edge. A smaller or larger threshold will give you more outlines or fewer outlines.

    • @CrazyKiLL3R44
      @CrazyKiLL3R44 4 ปีที่แล้ว

      @@wizvanmeter Ok, thanks a lot for your response !

  • @col_panic9802
    @col_panic9802 ปีที่แล้ว +3

    can show final effect before you start, thought this was a tutorial for something else.

    • @JumboTTV
      @JumboTTV ปีที่แล้ว +3

      or you could use common sense and skip to the end of the video to check lol

  • @LoneBerseker
    @LoneBerseker 3 ปีที่แล้ว +1

    At 2:45 my mesh just shows a solid color, no outline at all....

    • @dimaferox5133
      @dimaferox5133 3 ปีที่แล้ว +1

      Check on the description you can just coppy:
      blueprintue.com/blueprint/tl596esl/

  • @runsbuns3675
    @runsbuns3675 2 ปีที่แล้ว

    how can i make the outline thicc

    • @merchantofstories
      @merchantofstories 2 ปีที่แล้ว +2

      Just increase the width parameter slightly .... between 1 and 2.. to make it thiccccc......

  • @curdlegames8576
    @curdlegames8576 4 ปีที่แล้ว

    Great! When the objects overlap, their stencils merge. How do I fix this?

    • @wizvanmeter
      @wizvanmeter  4 ปีที่แล้ว +1

      If you can manually set the "CustomDepth Stencil Value" of each object, then set the second object's stencil value to something other than 2. Create two more if statements to test for a second custom stencil value and assign a second outline color.
      1:55 in the video shows how the if statements are used to test the stencil value and to assign the flashing outline color. Before you connect this final result to emissive color, you can daisy chain more if statements here.
      The other way to do this is to use custom depth nodes instead of custom stencil nodes. The node logic would be mostly the same except the first if statement would test for a distance from the camera. Then outlines should appear around overlapping objects as long as they are far enough apart from each other.

  • @Zumito
    @Zumito ปีที่แล้ว +2

    How can I put an antialiasing?

    • @jackstrosahl
      @jackstrosahl 9 หลายเดือนก่อน +1

      @elfideorubio1308 mentioned this, you can set "Blendable Location" in the material details to "Before Tonemapping".

  • @dawidwizor7205
    @dawidwizor7205 3 ปีที่แล้ว

    For me this material flickering a lot ;/

    • @murakamih951
      @murakamih951 3 ปีที่แล้ว

      Just change the Sine node Period value, more big, more slow.

  • @RoberBot
    @RoberBot 3 ปีที่แล้ว +2

    in my project, its all white.

  • @Greenman4890
    @Greenman4890 2 ปีที่แล้ว +5

    I guess this doesn't work on unreal 5. I have the exact setup like you but nothing happens no matter what I do

    • @JustaCide
      @JustaCide 2 ปีที่แล้ว +2

      Same

    • @ralphabrooks
      @ralphabrooks 2 ปีที่แล้ว +2

      @@JustaCide For me, the key was to make sure that infinite extent was selected for the post processing volume.

    • @austinbryan6759
      @austinbryan6759 2 ปีที่แล้ว +1

      Same, I just get white dots

    • @UnrealQW
      @UnrealQW ปีที่แล้ว

      I downloaded sample project and migrated material (+ assigned it in PostProcessVolume). Works fine in UE 5.1

  • @HumpaLumpaBiriBam
    @HumpaLumpaBiriBam 2 หลายเดือนก่อน

    This Outline is only diagonal. 50% of success ;(. You wont see outline on opposite sides, as you demonstrated in 3:07 (see top right of table and left leg)

  • @Betazeno
    @Betazeno 4 ปีที่แล้ว +7

    Great tutorial but minor gripe just slow down a bit. I had to pause re-wind so many times

  • @speicalkeek4579
    @speicalkeek4579 3 ปีที่แล้ว

    dont work

  • @ianxy6474
    @ianxy6474 ปีที่แล้ว

    outrolline...

  • @askumi6576
    @askumi6576 4 ปีที่แล้ว +3

    Good tutorial but you may want to speak a bit slower

  • @Metalwrath2
    @Metalwrath2 3 ปีที่แล้ว +2

    simply doesnt work 4.25

    • @SohanZaman
      @SohanZaman 3 ปีที่แล้ว

      Thanks man! I've spent hours to figure out what's wrong and just saw your comment. I've used this method for outline in the past but it's not working now! Do you have any Idea why it's not working?

    • @Metalwrath2
      @Metalwrath2 3 ปีที่แล้ว

      @@SohanZaman Honestly I don't know. Tutorial itself seems good but I think something is broken with UE updates. But I don't know what :/

    • @SohanZaman
      @SohanZaman 3 ปีที่แล้ว

      @@Metalwrath2 I see custom stencil is not showing in buffer visualizer. I also found that the issue is reported. Someone answered that turning on custom depth temporal AA jittering fixes it but doesn't work for me. Let's wait for 4.26

    • @Metalwrath2
      @Metalwrath2 3 ปีที่แล้ว

      @@SohanZaman Yea I guess we should wait for a fix. Thanks for the information.

    • @walterbrown6082
      @walterbrown6082 3 ปีที่แล้ว +1

      I think you made something wrong. I've followed to this tutorial and made this effect

  • @phantomapprentice6749
    @phantomapprentice6749 4 ปีที่แล้ว +7

    its one of these tutorials of someone who thinks everyone else can read his mind and instantly know what is going on.