Hatching shader tutorial

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

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

  • @tatoforever
    @tatoforever 11 หลายเดือนก่อน +6

    Hey Kamil, small tip here. If you desaturate both SceneColor and BaseColor before dividing them, you will end up with a better lighting (without the harsh black spots) that we saw at the roof of the building. Great stuff, keep them coming!

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

      Thanks for pointing that out!

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

    awesome tutorial. Some tips for anyone wanting to go to the next level of hatching, Im an artist who uses hatching every day and there are a few ways to get your hating to pop. So first of all line weight, (im going to make a comment on his outline video as well for that one this will just be for hatching, but remember the thicker the outline the longer the hatch, not the only thing that effects the hatch length tho) a more curved surface uses longer hatches, a sharper corner uses shorter hatches. Your hatches will look better the closer they look to other hatches in their proximity, same thickness, similar distance between, the less random it looks the more polished it will become. I know most people think of hatching as lines, but they look significantly better as triangles, starting thick from the shadow and going thin towards the light. The darker an area the thicker a hatch should be, cross hatching is not only to add darkness and texture but to add more depth, the more directions of hatches you put on an object the clearer its form becomes. When cross hatching one of the directions should be a major and one should be a minor, the major should be thicker and longer, the other should be used as an accent. Lastly remember that hatching comes from shadows, this is really taken care of by the engine in this case, but for those who want to draw, do not just add random hatch marks to places in the drawing, make them be naturally casted out of the shadows they come from. David Finch is a comic book artist for marvel and dc, he has a channel that teaches you a lot of stuff how to draw, and IMO he is one of the best hatch artists of all time.

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

      Fantastic input Silas! Thank you for sharing it! I have been thinking about incorporating your suggestions in the next iteration of the hatching shader. Hopefully I will find some time to do so.

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

    using green for low, red for mid, and blue for high will help a more natural look when analyzing curves in RGB

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

      also when you open the atlas you can look at all the curve icons at once to see how much they overlap

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

      @@leifur2000 Super good points! Thanks for sharing!

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

    Dude I can't believe you don't have 500k subs. These are some of the best material videos out there.

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

      Thanks Jake! Maybe I should start saying "click like and subscribe" in my videos 🤣😉

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

    This is so interesting. Feels like we could even use the curves here to create cel shading.

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

      Absolutely, curves are very versatile

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

    your vids are epic , please don't quit

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

      Thank you for the very kind comment! 🙏

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

    This is gold !! Thanks For sharing Bro !!!

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

    You rule! Thanks for the extremely in-depth tutorial :)

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

    This is so cool to see in action. Would love to try this in a game sometime, maybe one with a bedtime story framing device.

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

      Totally, also it could work well as a game intro, where you have a narrator telling the story and you watch it unfold.

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

    Really a great effect! And a really great tutorial with a lot of depth! From now on subscribed for everything that comes! Am very grateful.

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

      I'm happy to hear! Thanks for kind words!

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

    Wow! this is an amazing tutortial, very well explained too, well worth the runtime for the result this shader gives! Thank you so much for passing along this shader technique

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

      Thank you for a kind comment! I appreciate it!

  • @子木逝水
    @子木逝水 ปีที่แล้ว

    nice Very good tutorial

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

      Thank you!

  • @anusreeashokan9100
    @anusreeashokan9100 9 หลายเดือนก่อน +2

    hey Kamil this video is proving to be of great help for a graphic novel that I am creating but I am facing one issue. as soon as I divide the original scene color and mask my shader flickers. I have checked with the code you have in this video and typed exactly same. what should I do

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

      I believe you want to set the post processing to Before Tonemapping instead of After Tonemapping.

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

      This is a good point. Have you checked the tone mapping setting, as @8thlvlMage mentioned?

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

    Excellent work!!!

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

    really nice! I love stuff lilke this.

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

    Hey, awesome video so far!
    I am having trouble with my textures constantly vibrating, and it's incredibly hard to watch but I've run through the video a few times and can't find what I'm doing wrong!

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

      Do you have auto exposure turned off?

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

    dope

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

    awesome video! ever thought about doing a watercolor effect?

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

      Thank you! Yes, watercolor effects are super interesting. Probably will do something about it in the future
      👍

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

    Hey Kamil, thank you so much for this awesome tutorial. I have a question. I have three materials currently that are blending in the scene. The outline post proc material, the squiggly line material, and a Kuwahara filter material. Currently when I try and set it up the squiggly line material affects the entire scene including the Kuwahra material, I have been trying to make it where it only affects the outline material, sort of how it appears in your blending of the colors with the hatching tutorial video. I have tried reordering the priority list that doesn't seem to help, I have also tried adding in a custom node and hooking it up to the Scene Texture World normal node with the code to get the base scene colors with lighting, which doesn't seem to work either. Could you please help me with this? It is also worth mentioning that the project is in UE5 with Lumen turned on.

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

      Could you double-check whether the 'Blendable Priority' parameters on your post-process materials are set correctly?

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

    wow

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

    This is great! What would I do if I wanted to hatching art to stay in place and not move based on the cameras movement?

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

      Thanks! It's super easy to do, here is the test: th-cam.com/video/-cnSxjTvUng/w-d-xo.html and all the info 👋

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

      @@HepnerKamil thanks so much for showing how!!!

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

    Amazing video! How can I use a material with color and that hatching effect at the same time? For a character for example

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

      In post-process material try to experiment with blending SceneTexture:BaseColor with hatching material. Or replace the paper texture with it.

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

    all information here can easily be converted to Unity Shader Graph or Amplify Shader Editor (and HLSL of course), thanks a lot!

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

      You're right, setup is simple and universal. Wanted to post it on the unity forum.... but then thought that I wouldn't be appreciated since is unreal

  • @练鸿屿
    @练鸿屿 หลายเดือนก่อน

    Can this be used in the game scene, the feeling will change with the camera movement

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

    I'm wondering...
    I've swapped the camera based version to a world aligned texture version so the textures are more "static" when the camera moves. But it looks kinda not good on any objects that are moving (characters, e.g.)
    Is there a way to do a similar effect using per-object UVs? I realize that would require more work in different ways, but I would like to have a version of this that would be good for animated objects. Any thoughts?

    • @BornStellar-yp5st
      @BornStellar-yp5st 10 หลายเดือนก่อน

      Do you mind if I asked how you did that?

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

      I'm working on something that will work well with animations, especially for animated characters

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

      @@HepnerKamil I'm excited about that. I've been playing around a lot with different visual styles. I'm a filmmaker working in animation and am experimenting with trying to get something that looks really different. So far my best results have been outside of UE; creating essentially manual toon lines in Maya, converting that to actual geometry, then "wiggling" it in Unreal to get the sort of line wiggle look. Using PPM's works ok but the results aren't amazing on animated things. Looking forward to seeing what you're coming up with

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

    great tutorial with good explanation! thanks

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

      Saturate node just clamps the value in a way that they always between 0-1 it has nothing to do with color saturation. I know it's a confusing name.
      De saturate turns color output into B&W where we already working with single channels and our ADD nodes take single channels inputs instead of vectors. Basically speaking input to ADD node has been already de saturated.

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

      @@HepnerKamil thanks for the reply. i got confused because i made the mistake to not set the textures to greyscale and got weird colored pixels inbetween but i figured it out and it worked like in your video! great content ! hope more people find this

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

    Amazing Video! Really helped with some tricky shader math ive been struggling with. However i'm having an issue with utilising this in UE5 with lumen. The Base colour from Gbuffer scene node samples the roughness aswell, which breaks the PP hatching. Also i cant seems to get the intersections of assets to hatch they dont show up in the shadow mask? are there any tips you could think of?

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

      I'm glad you enjoyed it. Good question, if you look at my ko-fi page you will see a tutorial for lighthouse. These files have been tested for UE5. However, I have tested it with lumen disabled. Do you need lumen to be enabled? Have you tried setting roughness to 1 on the objects materials?

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

      I'm having the same problem. Have you found a solution to this?

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

      You have to divide the SceneTextureBaseColor from the GBuffer by the SceneTextureRoughness before mixing with the SceneTextureWorldNormals for it to work with Lumen.

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

      @@l_t_m_f 🙏🙏🙏

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

    This looks awesome (particularly the Static version). Is this available for UE5.1?

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

      Thank you! This particular tutorial files has been only tested with UE4, but a while ago I've released the lighthouse project. And that one has been setup for UE5: th-cam.com/video/P-Z6Wz0wP9o/w-d-xo.html please have a look and feel free to ask questions

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

    Hello Kamil, thank you for this amazing tutorial. I just bought your lighthouse pack to get a more precise understanding of your workflow, but currently i'm stuck. The post process doesnt recognize my ambient occlusion in the scene texture : adding the "reverse ambient occlusion" part doesn't change anything, even if i set the power to 1000... So i can't go further on the tutorial. Do you have an idea of how i can fix that ?

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

      PS : Actually in unreal engine 5 Ambient Occlusion doesn't work with the Lumen Global Illumination.. I don't know if it is mentionned in your videos maybe i've skipped that part accidentally but whatever i can continue

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

      Thanks for pointing that out. Currently, the entire setup does not support Lumen enabled global illumination.

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

    Thanks for the tutorial! What is the equivalent node for UE5 to Mask RGB in 19:45 ?

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

      Never mind, just found out it's Component Mask :D

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

      Sorry for late, yes it's the same Component Mask.

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

    Hi, thanks for this great tutorial. How would I go about locking down the cross hatching onto my geo so it is not swimming?

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

      Hi, you can find the "static "version in this video: th-cam.com/video/-cnSxjTvUng/w-d-xo.html please check the video description.

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

    I'm getting an effect where the hatching fades away across surfaces over time (5 seconds?), I'm not sure what the problem is. (working with the version from Ko-fi) The hatching seems to persist around the periphery but is particularly bad in areas closer to the center.

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

      Can you double check if your auto exposure is off and if you aren't using Lumen?

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

    I am trying to create a post process material where stencil 1 does not cast shadows on stencil 2. Is that even possible ?

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

      In short the answer is NO, there is no way to specify that in stencils. Depending on what you want to accomplish, there could be different solutions. I guess that disabling "Cast Shadows" on the actor wouldn't work for you?

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

      @@HepnerKamil no butit cool thanks for your help

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

    thank you so much such an informative tutorial!! although my general scene color is very grey, whereas yours is very vibrant and white I've tried tweaking light settings and exposure and cant seem to change the grey any reason why this is?

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

      Sorry for late, so the auto exposure is off?

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

    Hey so I'm currently using this on top of my existing scene with colours etc, I cant seem to find a way to remove the initial shadow pass so as the hatching textures REPLACE the shadows instead of being added on top of the existing ones? Would you know how to fix that? (Using the static shadows method)

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

      Oh, I believe you've been attempting to mix (Lerp) it with either SceneTexture:PostProcessInput0 or SceneTexture:SceneColor. Instead, try mixing it with the SceneTexture node, but set it to DiffuseColor or BaseColor.

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

      ooh ok thanks ill try that!@@HepnerKamil

  • @s.kanessuperbiatv6464
    @s.kanessuperbiatv6464 2 ปีที่แล้ว

    After I put the code in at 17:44, I get two different errors and the vignette stays. "unexpected integer constant" and "no matching 0 parameter function." I've gone over the video several times to make sure I copied the code right and set the material properly, and I've done everything right. Idk what's wrong

    • @Ay-zx6wi
      @Ay-zx6wi 2 ปีที่แล้ว +1

      it should be parameters in plural with an "s" , that fixed it for me :)

    • @s.kanessuperbiatv6464
      @s.kanessuperbiatv6464 2 ปีที่แล้ว

      @@Ay-zx6wi thanks but I've already got it in plural, that's why I'm confused. Am I supposed to create a parameter somewhere outside of the code?

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

      What version of Unreal are you using?

    • @s.kanessuperbiatv6464
      @s.kanessuperbiatv6464 2 ปีที่แล้ว

      @@HepnerKamil 4.27

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

    Is there a way to use this shader in UE in VR with the Oculus Quest, without post processing, without transparency and with only forward rendering?

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

      Sorry Joan, but I never had a chance to test it in VR.

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

      The short answer is no. I played around for several weeks looking at getting the shadows out of a forward rendering setup so I could do material specific things with shadows. I guess back in the 4.1 days you could get the shadows that drop on an object out without a post process filter (ala Tom Loomen), but you no longer can access the gbuffer that way. This would have been sweet for me because I could swap the stencil in and out based on item. But instead I'm using the post process with a custom stencil to get an on/off situation. So if you can tolerate a post process on the quest you should be fine.

  • @1EagleTutoriais
    @1EagleTutoriais ปีที่แล้ว

    Is this different with Lumen from UE5? I'm using the exact same values for the curves as you did but the shadows (especially on the floor) are behaving strangely, not on a static way like yours.

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

      It should works with UE5, there is a lighthouse project on my channel that utilized similar technique and was tested on UE5. Have you disabled dynamic exposure?

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

    Hi Kamil! How could I have the hatching lines black on top of a scene? Here I only get it with a white background. Thank you!

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

      Apparently I just fixed. I add a Lerp Node and plugged everything as an Alpha, using a Post-Process on A and a Black (3V) on B.

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

      @@guilhermenaco Yes! That's how lines are mixed/added in this tutorial. Good job!

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

    why my material show sky sphere lines

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

      Hope that answers your questions:
      th-cam.com/video/pJ42ylVyDpc/w-d-xo.html

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

      ​@@HepnerKamil thanks for answer, yeah i did it like video do, and succed cull the sphere, BUT when i blend with hatch material, it shows again, no matter static version and dynamic.

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

      @rudychristmas1210 You'll need to pinpoint at which node the issue arises. It's likely that something breaks before the blending process. I suggest debugging it node by node. You can also reuse the "culling nodes" to cull out anything at anypoint.

  • @sii-gul5852
    @sii-gul5852 ปีที่แล้ว

    Can you do a shader that resembles a manga panel?

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

      Of course, every one depends on what you would like to achieve. There are many different managa styles, also do we want object to move, or maybe camera just moves, or maybe we just render still images. Everything depends on the particular case. Breaking down the results you're seeking is the best way to begin.

    • @sii-gul5852
      @sii-gul5852 ปีที่แล้ว

      @@HepnerKamil th-cam.com/video/cQviJ4TKmFo/w-d-xo.html this particular video has a scene during a special movie that has a really nice black and white manga like effect, although it is in Roblox, would it be possible to do it in ue4?

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

    Thank you for this tutorial, is this compatible with lumen? When i get my shadowmap debug with RBG All the colors move, I try to quit the lumen global ilumination but still dont look good, any idea what could this be? thank you!

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

      Haven't tested it with Lumen, can you double-check if the "Blendable location" of your material is set to Before Tone Mapping. Also double-check if auto exposure is turned off and the bloom effect is off. At least for the moment when you debug your shadowmap.

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

      @@HepnerKamil Hello sorry for the long time, yes I have all that, everything looks good but even with the auto exposure Off i still have changes in the ilumination im not sure why. I tried disabling lumen also but when I got closer or further of the object it changes the light :(

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

      With other post process this doesnt append, not sure why...

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

      For what i can see it even happends in the shader graph, in the default Ball that unreal shows the sphere also happends

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

      Sorry for the 1000 comments, I am testing real time, the thing that cause this is when I add the final Linear interpolation, then if a get closer to blacks they turn whites

  • @Samuel-hd2ni
    @Samuel-hd2ni 2 ปีที่แล้ว

    How big are the hatching textures you used?

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

    好强!! 什么时候来中国教学?

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

      谢谢你! 我很想教书

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

    i suggest you record your ranbling instructions on video.
    take the transcript from you tube.
    copy it all into chat gpt and ask it to clean it up and fix all the grammar.
    then put the text through a speech app so it sounds normal.
    it is so hard to understand what you are talking about