Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question 2d unity sprites

Discussion in 'Shader Graph' started by ahmedosm12, Jul 15, 2023.

  1. ahmedosm12

    ahmedosm12

    Joined:
    Jul 15, 2023
    Posts:
    3
    Hi everyone, Hope everyone is fine and well
    Can I manipulate 2d unity sprites' vertex to make some points in and out like a broken line?
    If I want to make an effect like this How and What did he use to make the card fade with a broken Line (mask)
    ArtStation - Gwent - Ciri Debut
    One thing Eles how Did Hearthstone make their shaders?
    Thank you
     
  2. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,520
    d - Copy.png
    Here's my guess for how the wavy lines might work.
    1. Ciri card with portrait (texture A)
    2. Interpolates into another texture that's shows the blue-green outline of the card (texture B), no portrait
    3. Texture B has its UVs distorted over time by scrolling noise. This creates broken line effect. In general, you can make an image wavy like that by offsetting its UVs with a noise texture and scrolling the noise texture with Time.

    In shader graph, this would be plugging a Tiling and Offset node into the UVs of Texture B sample node, and then plugging in a noise node into the Offset property. The raw noise output is 0 to 1, so you need to Remap node that to like -0.2 to +0.2 or something. Then, fiddle around to tune it for some time.
     
    ahmedosm12 and FredMoreau like this.
  3. ahmedosm12

    ahmedosm12

    Joined:
    Jul 15, 2023
    Posts:
    3
    ok I will try it but i want to know the size of the Texture will fact in youtube most of the they make texture size 512*512 as noise
     
  4. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,520
    512x512 probably good for a noise texture for this. There's also the Simple Noise node which is quick to use, tho a texture is better long term.
     
    ahmedosm12 likes this.
  5. ahmedosm12

    ahmedosm12

    Joined:
    Jul 15, 2023
    Posts:
    3
    Thank you So much for your help :)