UE4 - Tutorial - Painterly Post Processing - Kuwahara Filter

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 พ.ย. 2024

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

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

    For anyone having issues with the sides of the screen showing stretching in Unreal 5.0+, changing the sceneUV node to "return GetDefaultSceneTextureUV(Parameters, 14);" seems to fix this.

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

      Not working for me UE5.03

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

      @@bs3764 could you elaborate on 'not working'? does the code not compile? are you still getting incorrect UVs?

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

      @@MatthijsVerkuijlen sorry, actually its work as filter, but screen showing stretching in Unreal 5.0+. And I couldnt fix it.

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

      @@bs3764 alright, and you replaced the code in the SceneUV node with the code above, that still didn't improve it?

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

      @@MatthijsVerkuijlen yes, I replaced the code in the SceneUV node with the code above, but there erorr messege (LogShaderCompilers: Warning: Failed to compile Material /Engine/Transient.Kuwahara_Directional_PP_MaterialBase for platform PCD3D_SM5, Default Material will be used in game.
      /Engine/Generated/Material.ush(2460,1): err0r X3000: syntax error: unexpected token '}'
      /Engine/Generated/Material.ush(2479,24-29): err0r X3004: undeclared identifier 'RADIUS'
      MaterialEditorStats: Error: [SM5] /Engine/Generated/Material.ush(2460,1): error X3000: syntax error: unexpected token '}'
      MaterialEditorStats: Error: [SM5] /Engine/Generated/Material.ush(2479,24-29): error X3004: undeclared identifier 'RADIUS')

  • @redwoolfred2
    @redwoolfred2 7 หลายเดือนก่อน +6

    This tutorial is AMAZING. I use Unreal a lot as an animation student, and with zero knowledge of any coding, I was able to follow along to create this cool effect. Incase anyone is wondering, this worked flawlessly in UE5.3.2 without any modifications from the video.

    • @MatthijsVerkuijlen
      @MatthijsVerkuijlen  7 หลายเดือนก่อน

      that's great to hear, thank you!

    • @candypop5701
      @candypop5701 6 หลายเดือนก่อน

      Hey! im also using 5.3, im just wondering did you get an error on the scene texture node? I've been getting errors on everything and I'm afraid this ain't going to work lol

    • @redwoolfred2
      @redwoolfred2 6 หลายเดือนก่อน +2

      @@candypop5701 any errors I encountered were because of typos in the code. I had to double and triple check for no mistakes. In my case I used a full stop insead of a comma, and forgot to change the X or Y values when copy and pasting.

  • @maciejklosowski6006
    @maciejklosowski6006 ปีที่แล้ว +9

    Thank you so much for this tutorial, works like a charm in UE5! Only 2 things I would like to mention is:
    1) Parameter naming convention (i.e. capital casing) needs to be consistent between the code and UE material editor (General->Parameter Name), otherwise it will prompt an error during compilation.
    2) For this to affect the whole scene, infinite extent (unbound) needs to be checked in the post process volume.

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

      Hey, no worries! Yes, both of those are correct, sorry if I wasn't clear about that in the video!

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

      @@MatthijsVerkuijlen no problem, I enjoyed following the video, now will be focusing on the part2!

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

      ​@@maciejklosowski6006how to download th filter

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

    the post process material made everything brighter multiplying "color" by 0.5 in the custom node fixed that. great video thank you so much!

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

    I've been looking for an effect like this, thanks for taking the time to explain it.
    Absolute legend!

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

    Thank you very much for this tutorial, the post process is crazy and the explanation very clear for someone who touches from time to time code and shaders.

  • @bramtempelaere8494
    @bramtempelaere8494 10 หลายเดือนก่อน +1

    bless you!! Men favoriete postprocess effect be looking real good on my new environment! Thanks for taking time to make this video! very clear explanation and love the little slider thingy you showed!!

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

    man, this is amazing! Thank you for sharing this.

  • @TNoire52
    @TNoire52 3 หลายเดือนก่อน +1

    Amazing tutorial can confirm it works for ue5

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

    A very interesting effect!! so nice of you to share this!!

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

    Thx a lot to taking time to explain the process!!! I am super happy about your tuto :D

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

    Thank you so much for this!!! I really appreciate it, as I've been looking for a good tutorial for this kind of thing for quite some time. Cheers!!!

  • @뉴욕뚤기
    @뉴욕뚤기 10 หลายเดือนก่อน

    The bes tutorial I've ever seen.

  • @sam.1839
    @sam.1839 6 วันที่ผ่านมา +1

    Thanks for the tutorial.
    Will it be heavier on game performance? Or the opposite?

    • @MatthijsVerkuijlen
      @MatthijsVerkuijlen  4 วันที่ผ่านมา

      you're sampling full screen textures multiple times per pixel, so sadly there will be a cost to it! The bigger the radius, the more samples you're doing, the more expensive it gets

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

    This is gold. Are you going to do the anisotropic kuwahara filter? That would be so cool!

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

      I gave an anisotropic filter an attempt here th-cam.com/video/LXqzoeiZ4PY/w-d-xo.html

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

    A very helpful tutorial! thanks a lot for this.

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

    Really interesting, thanks for explaining!

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

    Thank you SO much for this tutorial, it has been incredibly helpful! I'm currently getting compile errors stating "unexpected token 'float2' and "undeclared identifier 'offsets' from the custom node. Any idea what might be causing those?

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

      Glad you liked it! That sounds like the type of error you'd see if the previous line is missing a semi-colon. If it's not that, feel free to send me your code and I'll have a look!

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

      @@MatthijsVerkuijlen this not work in 4.27? I always fail and get SM5 error, with { and Radius, I already connect the node change it to 5 and name it Radius

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

      @@sakattodesign9927 No it should still work in 4.27. If you send me your code & your errors I can have a look for you

  • @regstar212
    @regstar212 10 หลายเดือนก่อน +2

    Looks very interesting, and I gave it a try, but the shaders won't compile. No errors. Just stuck on "Preparing Shaders (3)" at 25%. Any help would be really appreciated

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

    Awesome tutorial! Worked brilliantly! I just wanted to ask how one can keep the effect consistent regardless of screen size/resolution. I assume it has to do with the SceneTexture node? Not sure :/ Any pointers would be great!

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

      Great question! So right now, you're setting the Radius regardless of the screen resolution. What you'd want to do instead is author your Radius for a specific resolution. Let's say your screen is 1920*1080, and your Radius is 5 pixels. For a 3840*2160 screen, you'd want your Radius to then be 10 pixels, while for a 1280*720 screen you'd want 3 pixels (really 3.3333 but we're still rounding to integers). Since at this point in the tutorial we're still treating the radius as a single float, rather than a float2, I'll only take the X axis of the screen in account for now.
      Your authoredRadius (5) is valid for your authoredResolution (1920). To convert that radius to the outputResolution(3840), you can do (authoredRadius / authoredResolution) * outputResolution. So in this case ( 5 / 1920 ) * 3840 = 10. If you plug that math into the radius, your effect should stay consistent over varying screen sizes. The authoredRadius should be a shader input, as should the authoredResolution. The output resolution is the Red value you're getting from the ViewSize node.
      Let me know if that fixes the issue for you!

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

      @@MatthijsVerkuijlen Wow thank you so much for taking the time to reply so thoroughly! I will definitely be trying this out tonight.
      Thanks again, brilliantly explained :)

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

      @@card00r I think either is fine. The next tutorial does turn the radius into 2 floats, so you'll have to scale both numbers, but it's not a very large change so it doesn't matter much whether you'd do this before or after. I'd love to see what you end up doing with it!

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

    Thank you so much for your hard work!I\o/ I have zero idea about coding but I LOVE the effect enough to give it a try! I needed to use Notepad++ instead but I think it works regardless :) I just have two errors, saying error x3000: syntax error: unexpected token '=' and error x3004: undeclared identifier 'j' and I dont know how often I have controlled it now but I can not find the mistake on my own, do you have an idea?^^

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

      you're most likely missing a bracket or semicolon. If you can't find it, feel free to send me your code on twitter or artstation and I can have a look over it.

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

    Could you pop the code you wrote into the description or as a comment please mate. Thank you and awesome video. ;)

  • @OhBoy3DTime
    @OhBoy3DTime 9 หลายเดือนก่อน

    wow this video was just great! Is there any way to make the effect look like watercolor?

  • @cmds.learning7426
    @cmds.learning7426 2 ปีที่แล้ว +1

    amazing!

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

    Great info. Just a question, how would I go about to apply this effect to other effects or shaders instead of the SceneTextureLookup. I mean, for instance I created another post process that changes color of the scene, but then I want to apply this filter on top of that.

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

      I believe you can chain post process materials together to get the effect you're looking for. Just add multiple post process materials to the same post process volume.

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

      @@MatthijsVerkuijlen oh, I hadn't thought about that, I'll give it a try. Thank you very much.

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

    Hi there. Amazing shader! I've implemented the SceneUV fix but it simply does not work for me. Not sure what I am doing wrong. From one point onwards on the right side of the screen the image either distorts or goes completely dark. Any ideas?

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

      Hey, I'm not quite sure! I've heard some other people having issues with this with different size screens, but I havent been able to test this myself. You could probably just keep using the TexCoords, if that works, instead

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

      @@MatthijsVerkuijlen, Awesome effect, just purchased it! Im having the same issue in the editor(Unreal 5.0.3). If I use TexCoords, it works fine in "New Editor Window(PIE), but it's squashed vertically in the editor window. If I use SceneUV, it's squashed horizontally in both. Perhaps it's related to High DPI screens? I'm on a Mac + 4k monitor with 3000+ as my screen rez. Any suggestions?

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

      @@MatthijsVerkuijlen Found the solution: in "SceneUV" I used " return GetDefaultSceneTextureUV(Parameters, 14);" and it worked flawlessly.

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

    Thanks for the tutorial! Had you also tried a directional Kuwahara filter so the samples are rotated based on pixels for a better effect?

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

      that's not something I've tried. So you would do non square samples, stretched in a specific direction? What would you base the direction on, the surface normals? Sounds like an interesting experiment!

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

      @@MatthijsVerkuijlen It would use sobel to determine the angle of pixel edges to then use that orientation to rotate where it takes the actual Kuwahara samples. I was searching for UE4 Kuwahara implementation and found this where it is described www.raywenderlich.com/100-unreal-engine-4-paint-filter-tutorial It probably adds a lot to the performance it takes though but get rids of the sometimes blocky look

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

      @@TocoVideos Oh that's cool. The effect with it applied looks great, thanks for linking!

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

      I gave adding directionality a try, and I was surprised with how much of a difference it makes. th-cam.com/video/LXqzoeiZ4PY/w-d-xo.html Thanks again for suggesting!

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

    This tutorial is amazing -- only issue i'm having is it's not actually rendering out in my post-pro in the slightest
    I've spent two days trying to get it to be useable but it's still not coming out at all. Any idea what it could be?
    SM6 is fine, no code errors, all priorities are correct and so is the code itself. So far though no luck with applying it to the scene

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

    thanks a lot for this, it's great! can you also explain how to go about separating the radius value to two different parameters?

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

      Splitting the radius values is pretty straight forward. You need to split the RADIUS parameter into two different parameters, RADIUS_X and RADIUS_Y, so make sure to add two separate inputs for them. On line 15, in the offsets, replace the RADIUS with RADIUS_X or Y depending on whether it's the first or second elements in each float2. On line 22, replace RADIUS with RADIUS_X and on line 24 replace RADIUS with RADIUS_Y. That should do the trick if you just want to split them into separate parameters

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

      @@MatthijsVerkuijlen thank you so much for the reply! i'm editing this right now but i'm getting a compile error because there is one more RADIUS left, in line 36:
      float n = pow(RADIUS + 1, 2);
      What should I change this one to?

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

      @@ali3ser ah, missed that one! You can replace that line with float n = (RADIUS_X + 1) * (RADIUS_Y + 1). Hope that helps!

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

      @@MatthijsVerkuijlen thank you so much for taking the time!! works perfectly, i've found giving Y radius a higher value gives some sort of an impressionistic painting look, really cool.

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

      @@ali3ser Great, happy to hear that! Please do feel free to send over your results when you have something worth sharing, I'd love to have a look!

  • @ianfavreau9776
    @ianfavreau9776 5 หลายเดือนก่อน +1

    Does anyone know how to do this in Unity HDRP?

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

    Hey there! Im trying this in UE5.4 and after 13:56 , i hit apply and the entire screen is just one colour. The colour does change depending on where in the world you are looking but I can't seem to figure out how to make like it looks in the video. Im thinking it might be some scaling issue? Ive looked at the code from the video and my code that Ive written down and it seems identical and there is no compiling issue. Does anyone have any ideas ?

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

    Hey man Thank you for the tutorial, the result is amazing, do you know where this kind of error in the shader can come from ? :
    [SM5] /Engine/Generated/Material.ush(1859,15-18): error X3000: syntax error: unexpected token 'mean'
    [SM5] /Engine/Generated/Material.ush(1873,7-72): error X3017: 'offsets': initializer does not match type
    Again thank you for sharing your work

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

      the second error, about the offsets, is a mistake I made in the video. The line "float offsets[4]" should be "float2 offsets[4]". As for the first error, could you be missing the variable type before mean? If you send me a message with your code, I'm happy to have a look!

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

      @@MatthijsVerkuijlen We found out the mistake thank you ! How can we try to tweak the itnensity of the effect depending of the depth of the scene ?

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

      Or the camera position to be precise

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

      @@hugoducrocq4428 from the sceneTexture node, you can sample the sceneDepth, which I believe returns the depth in centimeters but you might have to have a look at that. If you take that value, divide it by the distance you want the maximum value to be at, and saturate that, you have a 0 - 1 value for your depth. If you use that value to lerp between a minimum kuwahara radius, and a maximum kuwahara radius, that might give decent results. Just don't forget to use your round after the lerp, otherwise you'll get weird values.

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

      I had this problem. it turns out I just needed to set the RADIUS param to a number that is more than 1

  • @mgodoi3891
    @mgodoi3891 7 หลายเดือนก่อน

    how to apply the effect uniformely?
    The problem is when the camera get very close to an object the effect isn't applied. I could increase the radius to avoid that but isn't cool either

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

    I did all the steps but the filter is just blurring the scene

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

    thanks a lot for the tutorial! I'm having an issue where the filter is darkening everything, but yours seems to look fine. do you know why this may be happening?

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

      It could be a few things, it could be not adding the samples together in the way it should, dividing by too much, or the number of steps not being rounded. I'm happy to have a look over your code to see if I can spot an issue.

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

      @@MatthijsVerkuijlen i managed to find a solution by looking at other Kuwahara implementations in UE4. :) thank you for the offer though!

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

      @@alfiesummers1633 Great to hear! Did you find out what was causing it?

  • @DeekerActual
    @DeekerActual 7 หลายเดือนก่อน

    not quite sure what im doing wrong here.. Instead of a kuwahara effect it looks like the dark parts of the scene simply turn black and the rest of the scene is unaffected. I've 1combed through both of Matthijs' tutorials on various version of unreal to see what might be my discrepancy but cannot find out for the life of me why im not getting the effect to work. any ideas? thnx!

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

    Hello, Loved the tutorial, thank you very much ! However, when I press f11 to be in full screen the bottom get very stretch and the rest and the rest of the screen is slightly compress due to the botom glitch. Maybe it's related to the viewsize. Can annyone help me if you know what I'm talking about please ?

  • @Zoykzmc
    @Zoykzmc 7 หลายเดือนก่อน

    I am gettting the error: [SM6] SceneTexture expressions cannot use post process inputs or scene color in non post process domain materials in ue5.3, am I doing something wrong?

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

    How can I blend between normal scene view and this filter, using scene depth.Basically I just wanna have this PP a certain distance from the player ?

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

      I'd multiply the depth down to the range you want to use it in, use saturate to clamp it between 0 and 1, then multiply it by the radius before the rounding. That'll probably give you the best results. You could also try lerping the results of this with the normal scene view, but that's probably not as good. I'd recommend just trying out some different things until you get something that looks nice.

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

    Hey, do you know why when the game window is very small the effect is very weird?

  • @buster5661
    @buster5661 9 หลายเดือนก่อน

    can you do a translucency shader?

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

    Do you think there's any way to recreate the code in blueprints? I managed to do everything in code and it works great but just the compilation time is way too long when I want to see the real-time changes I'm doing. I'm not sure if there are some things in that code that just can't be put in blueprints but if you say it can I'll give it a try.

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

      blueprints aren't shader code though, so no, I don't think that's possible. But if you mean the material graph, yea, it's possible to get the same effect through nodes. Because you can't do for loops in nodes, you'll have to 'unroll' the loops, which means you'll be adding a lot of nodes, but it can definitely be done.

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

    I have one question how can you apply the Kuwahara Filter to a regular material not a post process material?

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

    When it comes to the studio code bit does it matter which category I select like c++ or diff? I never touched this stuff before.

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

      I'm fairly certain that's just for syntax highlighting. Unreal Engine takes HLSL, so you could set it to that for appropriate syntax highlighting if you want.

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

      @@MatthijsVerkuijlen oh so nothing to worry about

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

      @@MatthijsVerkuijlen it's hard to tell but are you using = or - ? For some reason it's a bit blurry. Also I'm having a bit of trouble putting the stuff together I have two errors one is a x3000 syntax error: unexpected token ' = ' and the other is a x3004: undeclared identifier 'RADIUS'

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

      @@seanstrizak3654 depends on what line I imagine. I don't recall using - anywhere here, but I used = a lot. The 'undeclared identifier 'RADIUS' warning makes me think that RADIUS isn't set up properly. Did you do what I did at 3:35? I imagine fixing that might make the other error disappear, if not, you can send me your code on Artstation or Twitter and I can have a look.

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

      @@MatthijsVerkuijlen It's not complaining about RADIUS anymore but idk where i went wrong cause it's always complaining about something else when it's not for you. I swear I'm following what you said to do and it will complain for me. I'm working on Unreal 5 just so you know. I set up a Twitter Account so I can send a pic of the code and whatever else you you'd need to look at.

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

    Is there a possibility to fix renderdistance issues? For example my brickwalls in the background tend to overlap its texture

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

      You could change the Radius by sampling the scene depth and remapping that to a range you're happy with, then using that to drive a LERP between a 'near' Radius and a 'far' Radius

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

    Is it possible to do in blueprints?

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

    I have some issues when enabling DLSS or TSR. When I set the screen percentage to something low, the Kuwahara effect looks low resolution and looses its quality. I suspect that the PPM is using the downscaled image for the filter. Any idea on how to solve this?

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

      Because DLSS or TSR reduces the resolution you're rendering at, your texelsize becomes much bigger. You'll have to compensate for that. You could also try to run this effect after tonemapping (in the settings), which means you're still running it at full resolution & after DLSS (I believe, anyway?), but then you're still paying for it at full resolution as well

    • @grilledcheese7445
      @grilledcheese7445 7 หลายเดือนก่อน

      ​@@MatthijsVerkuijlen Thank you for answering! It's been a few weeks since I've worked on the post process material, but back then I did a quick fix by plugging the actual values of the screen resolution into the VIEWSIZE input node. I think the regular viewsize node uses the down scaled resolution before the upscaling happens.

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

    Does this not work the same with UE5? I keep getting a "use of undeclared identifier RADIUS" error

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

      it should still works in Unreal 5, have you exposed RADIUS as an input on your custom node?

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

    I followed the tutorial, and all that happens is that it looks super blurry, nothing like yours :(

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

    Could you paste the code that you used somewhere? Perhaps in the description?

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

    Tutorials be like:
    "Today I will show you how to setup this effect"
    "Before we start, let's understand what is a computer, but in order to do that we need to look at the history of electricity"

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

    YO DUDE awsome work! but i need help. somehow when i try it my filter goes yellow, is there any idea to fix it?

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

      Without seeing your code/node graph, debugging it is difficult, but I'm guessing you're not getting the blue channel somewhere. Just to be sure, your 'col' variable is declared as 'float3 col', not 'float2 col', right?

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

      wait nah nevermind it works! thanks a lot tho. it's for my school projects!

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

      @@MatthijsVerkuijlen i want to ask again. when i'm in fullscreen mode, there's some stretch appears. is there any adsjusments to fix that?

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

      @@andhika1176 Hey, have you followed the instructions in the pinned comment? that should hopefully fix it

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

      Oh, my bad it worked!. Thank you so much

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

    i followed the tutorial very carefuly but everything is black.

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

      You're most likely missing a step. If you send me a screenshot of your graph and your code on twitter or artstation, I can have a look to see if I can spot what's going wrong

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

      @@MatthijsVerkuijlen Thank you very much for offering to help! I appreciate it lot. I'm writing it again cause I think TH-cam removed my reply because there was an Imgur link in it, so I sent you in artstation as you requested.

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

    can someone send this code???

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

      Here you go : gist.github.com/GuillaumeCailhe/51c5d13cbb77a9704cc9f3cef73c02ec

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

      @@Helgrind44 Thanks a ton. Checked mine a couple of times and just couldn't find my error. Finally works

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

      @@florianschmoldt8659 Glad to help !

  • @suguboii7688
    @suguboii7688 7 หลายเดือนก่อน

    This does t seem to work on ue5

    • @MatthijsVerkuijlen
      @MatthijsVerkuijlen  7 หลายเดือนก่อน

      It worked when I tried it in multiple versions of Unreal 5, and I've seen projects of multiple people who have been using this in Unreal 5 as well. What version are you running, and is there anything specific that isn't working?

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

    Hi, thank you for the tutorial! When I compile the shader in Unreal it turns the screen black. Any guess as to why that is?

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

      Sounds like something isn't hooked up properly. If you send me a screenshot of your node graph and your code (on Twitter or Artstation), I'm happy to have a look.

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

    so mine only has an over all blur as well as when i try to do the screen overlay there are errors
    [SM5] (Node LinearInterpolate) Arithmetic between types float2 and float3 are undefined
    [SM5] (Node LinearInterpolate) Coercion failed: MaterialFloat3 Local3 = CustomExpression1(Parameters,Local0.rgba,Local1,Material.ScalarExpressions[0].y,Local2);
    : float3 -> unknown
    [SM5] (Node LinearInterpolate) Coercion failed: Local0.rgba.rg: float2 -> unknown

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

      nvm i forgot to add the mask and fixed it. i guess my question would be how did you get good at making custom nodes and materials like this? any adivce for taking this path?

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

    Using Unreal 5.0.3, can you help me with that?
    [SM5] /Engine/Generated/Material.ush(2492,4-45): warning X3206: implicit truncation of vector type
    [SM5] /Engine/Generated/Material.ush(2494,4-7): error X3000: syntax error: unexpected token 'mean'
    [SM5] /Engine/Generated/Material.ush(2505,10): warning X3078: 'i': loop control variable conflicts with a previous declaration in the outer scope; most recent declaration will be used
    Thank you for sharing!!

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

      Found the issue, was missing a semi-colon! 😅

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

      @@pedromameluque1734 hah, it happens, good that you figured it out :D

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

    Hi! I have been trying to follow the tutorial and I can't make it past the first part of the code. I am using 5.01 and I have this errors popping out.
    [SM5] /Engine/Generated/Material.ush(2495,16-29): warning X3206: implicit truncation of vector type
    [SM5] /Engine/Generated/Material.ush(2492,13-54): warning X3206: implicit truncation of vector type
    [SM5] /Engine/Generated/Material.ush(2495,30): error X3000: syntax error: unexpected token ';'
    I checked multiples times, and I can't find the mistakes.

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

      Hi, feel free to send me your code on twitter or artstation and I can have a look

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

    Hello! Im trying this in UE5.1. I followed everything step by step but I get a lot of errors. Please help me, I have no idea how to code, I just need the filter to be working :(
    [SM6] /Engine/Generated/Material.ush:2687:23: error: use of undeclared identifier 'RADIUS'
    float2 offset[4] = {{-RADIUS, -RADIUS}, {-RADIUS, 0}, {0, -RADIUS}, {0, 0}};
    ^
    [SM6] /Engine/Generated/Material.ush:2687:32: error: use of undeclared identifier 'RADIUS'
    float2 offset[4] = {{-RADIUS, -RADIUS}, {-RADIUS, 0}, {0, -RADIUS}, {0, 0}};
    ^
    [SM6] /Engine/Generated/Material.ush:2687:43: error: use of undeclared identifier 'RADIUS'
    float2 offset[4] = {{-RADIUS, -RADIUS}, {-RADIUS, 0}, {0, -RADIUS}, {0, 0}};
    ^
    [SM6] /Engine/Generated/Material.ush:2687:60: error: use of undeclared identifier 'RADIUS'
    float2 offset[4] = {{-RADIUS, -RADIUS}, {-RADIUS, 0}, {0, -RADIUS}, {0, 0}};
    ^
    [SM6] /Engine/Generated/Material.ush:2694:25: error: use of undeclared identifier 'RADIUS'
    for(int j = 0; j

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

      hey, that looks like you might not have set up RADIUS as one of the custom node inputs? I set it up around 3:25

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

      @@MatthijsVerkuijlen Ah yes...I actually ,made the output but I made a typo in it...ups :P Thank you very much for your help sir! :)