Creating Water with Shader Graph in Unity! | 2D Shader Basics (Tutorial)

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • In this video, we are demonstrating how you can create a stylized water shader in Shader Graph by using a combination of scrolling UV and noise patterns. We are also using 2D lights to make our water respond to the lighting.
    🟢 Click here to see the entire 2D Shader Basics Playlist:
    on.unity.com/3...
    🔴 You can download the Assets we used for free here:
    on.unity.com/3...
    🟠 Learn more about Shader Graph here:
    on.unity.com/3...
    🟡 For more information about 2D Lights click here:
    on.unity.com/3...
    Unity Version used 2019.4

КОМЕНТАРІ • 82

  • @wonderingpixel
    @wonderingpixel 4 роки тому +23

    Would love to see a dynamic water tutorial...like splash on collision

  • @NationOfBacon
    @NationOfBacon 3 роки тому +11

    If you set it to 0.5 speed the guy sounds like he's wasted drunk.

  • @AndyHodges10
    @AndyHodges10 4 роки тому +11

    Nice tutorial, but why not include the water normal-map texture it uses? It's not included in the sample project.

  • @gylastra3163
    @gylastra3163 4 роки тому +36

    So they have realized that brackey left the game

    • @andytouch9482
      @andytouch9482 4 роки тому +1

      This video has been in development since before Brackey's announcement. :)

    • @leonardoraele
      @leonardoraele 4 роки тому +6

      Unity tutorials had always been better than Brackey's, imo

    • @gylastra3163
      @gylastra3163 4 роки тому

      @@leonardoraele I see that why unity used to sponsor every video of brackeys😁

    • @gylastra3163
      @gylastra3163 4 роки тому

      @@andytouch9482 I see 👍

    • @vaishnav_mallya
      @vaishnav_mallya 4 роки тому +3

      @@leonardoraele nothing like that. Unity sponsored brackeys so brackeys can fill in where unity didn't cover. They both work together to cover more ground.

  • @dspartan007
    @dspartan007 4 роки тому +25

    Its amazing how Unity is making game development much more easier than before. Years ago, shaders were just code.

    • @robbertzzzzz
      @robbertzzzzz 4 роки тому +5

      They couldn't stay behind unreal and godot of course...

    • @kuinks
      @kuinks 4 роки тому +6

      While it's amazing that they are doing it, it's important to note that Unity is actually catching up and not pushing the industry forward since Node-based shader editor has been the standard in most 3d programs and game engines for quite some time.

    • @tyhokan
      @tyhokan 4 роки тому +1

      @@kuinks This exactly. And the shader-graph is still very much a work in progress, much like it's hard to consider URP "production ready" having worked with it for the last year. Unity engine changes and feature depreciation have been quite painful the last few years in general. On a positive note, now is a fantastic time try out a different game engine!

  • @haachamachama7
    @haachamachama7 3 роки тому +4

    Does anyone know how to implement this with lights? I know how to implement 2D lighting, but as soon as I change the pipeline forward renderer the shader turns to a solid colour. I tried upgrading materials but it simply says it could not upgrade this shader.

    • @wizkreed0
      @wizkreed0 Рік тому +1

      have you find solution?

  • @leagueoflags
    @leagueoflags 4 роки тому +2

    So what's a good way of creating that normal map? I guess desaturate the original texture, create some random noise in Photoshop and use the create normal map feature?

  • @mehmeh8883
    @mehmeh8883 4 роки тому +4

    Will this work for an android game?

    • @unity
      @unity  4 роки тому +1

      You can use Shadergraph when developing an Android game. As for this particular scenario. we say give it a shot!

    • @mehmeh8883
      @mehmeh8883 4 роки тому +2

      @@unity nice! this video helped me a lot! This was right on time i actually needed water shader :) keep making more videos unity.

    • @tyhokan
      @tyhokan 4 роки тому +1

      Depending on the device, and scene complexity, procedurally generating noise on the fragment shader could affect performance. Pick your lowest target device early in production and always test on it aggressively!

    • @mehmeh8883
      @mehmeh8883 4 роки тому

      @@tyhokan Thanks, thats a nice performance test trick by using lowest targeting device!

  • @davidvarga2916
    @davidvarga2916 4 місяці тому

    It boggles my mind how you can just multiply random stuff.

  • @DevNoob
    @DevNoob 4 роки тому +4

    Unity should be included in the wonders of the world. Change my mind.

  • @northy179
    @northy179 4 роки тому +1

    Thank you! Just what I needed :) next time could you slow things down a tad or atleast pause a second longer at the end of putting stuff together? Super fast cuts. Also you didn't include the normal map anywhere. Thanks guys.

  • @Flavkupe
    @Flavkupe 3 роки тому +1

    Looks like the water normal map textures around the 3 minute mark need to be set to wrap mode "Mirror" or "Repeat" (but not Clamp) in order to get the effect shown in this clip. Spent over an hour trying to figure out what was wrong with mine.

    • @meron2606
      @meron2606 3 роки тому +1

      You are my hero man. thank you! couldn't find a solution for this

    • @Flavkupe
      @Flavkupe 3 роки тому +2

      ​@@meron2606 No problem, glad I could help! I mostly like these Unity tutorials but I REALLY wish they spent a bit more time going over some of these smaller details since they end up becoming blockers.

  • @micha2748
    @micha2748 4 роки тому +3

    Can i do the same shader in 3d?

    • @arsylgames
      @arsylgames 4 роки тому

      Normally, it should be possible

  • @orsoniks3431
    @orsoniks3431 3 роки тому

    normal map doesnt work, it just looks completely stretched out
    Edit: Fixed it, change the textures wrap mode to repeat

  • @eternalstud3nt
    @eternalstud3nt 4 роки тому +14

    Right when I needed it.

  • @jaykhandelwal2879
    @jaykhandelwal2879 4 роки тому +3

    Please upload a course on unity learn premium in which you teaches us how to make a complete mobile game with ads, inapp purchases, shop system in depth tutorial 🙏🙏🙏

  • @strategy2128
    @strategy2128 4 роки тому +1

    Here's an idea: you can add some more gradient noise without any tint and make it look like a whitecap. For even more detail, You could add some simple noise onto your gradient noise. And you could use the step node to control how much whitecap you have.

  • @VoltFall
    @VoltFall 4 роки тому +1

    Hire me Unity

  • @mintydog06
    @mintydog06 3 роки тому

    The Water Normal isn't included in the sample project.

  • @thatsthething3218
    @thatsthething3218 4 роки тому +2

    unity is making me addicted

  • @Duart77
    @Duart77 4 роки тому +1

    how do i make a round world?

  • @Megahertzs
    @Megahertzs 3 роки тому

    Yeah! I found your video!

  • @YugiMango
    @YugiMango 2 роки тому

    would be cool to see an hdrp 3d water shadergraph tutorial

  • @Sam-ti9ki
    @Sam-ti9ki 4 роки тому +1

    First

  • @Oxmond
    @Oxmond 4 роки тому +1

    Beautiful! 🤓🧡

  • @MEGA_TREE
    @MEGA_TREE 2 роки тому

    Good video
    I like it

  • @tanvirhossainkhan1498
    @tanvirhossainkhan1498 4 роки тому

    is this shader going to work across platforms like for oculus quest, AR apps for android & iOS?

    • @andytouch9482
      @andytouch9482 4 роки тому

      As its a 2D Shader; it very likely won't work on VR or AR platforms.

    • @tanvirhossainkhan1498
      @tanvirhossainkhan1498 4 роки тому

      @@andytouch9482 make sense. Can you recommend a good water shader for AR/VR platform.

  • @edilsonbispo8271
    @edilsonbispo8271 4 роки тому

    Pls translate for portuguese pls

  • @DotNetCookbook
    @DotNetCookbook 4 роки тому

    Please do more videos on shadergraph

  • @leonardofraga5130
    @leonardofraga5130 4 роки тому

    I've been waiting for this. Thanks!

  • @ratarakishika854
    @ratarakishika854 4 роки тому

    Thank you Unity team! This looks really cool.

  • @kas-lw7xz
    @kas-lw7xz 4 роки тому +3

    I just laugh at this, implementing something that isn't compatible with the old system without properly creating a upgrade system

  • @CSNomad
    @CSNomad 4 роки тому +2

    I wonder if there’s a way to integrate cellular automata to give water/lava a rolling/bubbling/boiling effect.

    • @LuukDomhof
      @LuukDomhof 4 роки тому +2

      Perhaps if you write is as a compute shader yourself in CSharp. I highly doubt the shader graph editor can handle such a thing. Maybe with some custom notes?

    • @CSNomad
      @CSNomad 4 роки тому

      Luuk Domhof I’ll have to look into it. The actual coding behind a CA script isn’t really too complex. I’d be surprised if there WASNT a way to fudge it with custom nodes :p

  • @wonderingpixel
    @wonderingpixel 4 роки тому

    Love youuuu just when I wanted it

  • @j.a.x4837
    @j.a.x4837 4 роки тому +2

    Hey Unity I'm just wondering in this pandemic we can't ho outside. We can't play computer unless we have one. I want to create my games on my phone so bad. Is there anything you could do?

    • @arsylgames
      @arsylgames 4 роки тому +3

      Buy a pc

    • @j.a.x4837
      @j.a.x4837 4 роки тому

      @@arsylgames ahahaha dude

    • @arsylgames
      @arsylgames 4 роки тому

      @@j.a.x4837 it ain't that hard

    • @j.a.x4837
      @j.a.x4837 4 роки тому

      @@arsylgames it's not hard for you because you're country is wealthy unlike ours

    • @dv5870
      @dv5870 4 роки тому

      If you didn't know, Unity learn premium has been made free for everyone during the pandemic. Take advantage of it and start learning from there.

  • @madhusudanpanda6396
    @madhusudanpanda6396 2 роки тому

    Masterpiece

  • @guitarsidadi5069
    @guitarsidadi5069 4 роки тому

    Thanks unity

  • @457Deniz457
    @457Deniz457 4 роки тому

    Nice thanks ! :)

  • @alexleshenko
    @alexleshenko 4 роки тому

    Thanks!)

  • @sanilalkuttimon1755
    @sanilalkuttimon1755 4 роки тому

    😍😍😍

  • @UltraGrater
    @UltraGrater 4 роки тому +1

    well where's the reflection

  • @SamPH
    @SamPH 4 роки тому

    How can i download unity 3D on Windows 10 please help me

  • @mohammadrazakhan3852
    @mohammadrazakhan3852 4 роки тому

    Hello, I have a question is there any way to edit 360 videos in Unity like to Add text to it and and then we can use it for interaction , like that do you have any idea about that ? Please help me

  • @thomlaurent
    @thomlaurent 4 роки тому

    I don't see the interest of using normal maps with static lights like in this scene 🤔

    • @andytouch9482
      @andytouch9482 4 роки тому +1

      But what if the lights change? Either through position, size, etc? Then the normal map details will adapt!

    • @thomlaurent
      @thomlaurent 4 роки тому

      @@andytouch9482 Yep but what I see is in this video the Normal Lights settings have to be checked and that's something which could cost perfs, since the effect can be faked that should be the first and better approach for this demo scene imo

  • @scratchy996
    @scratchy996 4 роки тому +1

    Why so many 2D videos, but so few 3D videos ? :(