Search Unity

great scribble shader... how did he do this?

Discussion in 'Shaders' started by CauseMoss, Jan 12, 2020.

?

is it ok?

  1. yup.

    11 vote(s)
    100.0%
  2. nope!

    0 vote(s)
    0.0%
  1. CauseMoss

    CauseMoss

    Joined:
    Sep 16, 2017
    Posts:
    20
    I'm in love with this shader. I don't know if the guy who wrote it used it anywhere... anyway... is it ethically ok to ask you to take a closer look, and try together to take it apart? I mean to think how to achieve such effect.
    so for now I'll just ask is it ok to post such question.

     
  2. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    400
    Personally i don't see an ethical dilemma in trying to work out how a shader works. Obviously verbatim copying code violates copyright etc. I suppose there could be other ip protections around it e.g. patents etc but this is quite unlikely.

    In any case, is this kind of similar to what you are looking for?

    https://www.clicktorelease.com/code/cross-hatching/
     
  3. CauseMoss

    CauseMoss

    Joined:
    Sep 16, 2017
    Posts:
    20
    Thank you. I was trying to achieve something like that... cause i didn't know the key words: cross-hatching.
    and I have some ideas for the wobbling ;)
    we'll see.
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    The shading / wobbly line stuff is all fairly straightforward. Hatching textures that are either in screen space or object UV space. Lighting is the usual dot product with controls for adjusting the threshold and scale, with optional stepping.

    The sketchy effect is done by handling the outline and interior coloring separately, with optional vertex displacement noise for both. Plus additionally the hashing texture can be offset or changed each frame, and I suspect the threshold can be affected by the per vertex noise as well.
     
  5. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    yep, very competent use of typical cel shading effect
     
  6. CauseMoss

    CauseMoss

    Joined:
    Sep 16, 2017
    Posts:
    20
    Thank you all. I'll try to struggle with this late. I don't have time now. :)
     
  7. sharmachayank420

    sharmachayank420

    Joined:
    May 9, 2021
    Posts:
    1