Unity Low Poly Water in Shader Graph With Foam v2!

Поделиться
HTML-код
  • Опубликовано: 19 сен 2024
  • Thank you for Subscribing. I worked really hard on this video so if you think that you learnt something please hit that sub and like button. Share this video with your friends if you think it could help others. Also, join my discord where you get sneak peeks into the upcoming content and you can get help for anything related to unity. / discord
    Shader Files: github.com/Fla...

Комментарии • 132

  • @ziyadcodes
    @ziyadcodes 2 года назад +5

    Very nice understandable high quality video, thank you so much for making this tutorial, you saved me A lot of time

  • @pixiedust5239
    @pixiedust5239 2 года назад +1

    You are such an incredible person for making this video. Seriously thank you so much!

  • @kajawho4921
    @kajawho4921 11 месяцев назад

    Very cool, still works with Unity 2022.3.11f1 and if anyone's wondering you do not need to use URP, I've set this up in a project without that pipeline setup and it works absolutely fine.

  • @riteshrobotics9713
    @riteshrobotics9713 3 года назад +2

    Very nice done like the shader graph. Keep it up!

  • @sudharsanelango3356
    @sudharsanelango3356 3 года назад +3

    Looks like the game raft ngl, apart from the house. This looks epic!

  • @zeldinus
    @zeldinus 5 месяцев назад

    This shader was exactly what i was looking for!!! And its free!!!! Thanks bruv.

  • @Hyphen3372
    @Hyphen3372 2 года назад +1

    coolest shader tutorial im fairly new to shaders and i am making a subnautica inspired game and i understand mostly “everything” you said good
    tutorial m8!
    .

    • @Flaroon
      @Flaroon  2 года назад +1

      Good luck with your project man. I hope it does well. Have a great day!

    • @Hyphen3372
      @Hyphen3372 2 года назад

      @@Flaroon also the waves kinda look like gerstner waves thats cool i just noticed that.

    • @Flaroon
      @Flaroon  2 года назад +1

      @@Hyphen3372 Yep, I was going for that look without the baggillion nodes that would have been required to actually make gernster waves. Close enough I guess.

    • @Hyphen3372
      @Hyphen3372 2 года назад +1

      @@Flaroon im look forward to your future tutorials because i have only been doing this since october of 2020 when i was 12.

  • @Thebaker3
    @Thebaker3 2 года назад +1

    after 3 hours i found a shader that worked, thank you 😁

  • @bogoid
    @bogoid 2 года назад +1

    Came for the content, subscribed for the music

  • @ShadowOrigin28
    @ShadowOrigin28 Год назад

    With your help I managed to make some cool looking Skybox shader!

  • @Fluppr
    @Fluppr 2 года назад +4

    Many thanks for the tutorial!! split -> Vector 2 (R goes in X, B goes in Y) -> Tiling and Offset (UV) into the gradient noise. After this, you can tile many 1x1 together and their waves will be synced.

    • @HomeGameCoder
      @HomeGameCoder 2 года назад

      THIS IS GOLD !!!!!

    • @teodor_morosanu
      @teodor_morosanu 2 года назад

      @@HomeGameCoder Yeah but for a large pile of planes it will significally slow down your game. I try to figure out how to scale for example 100x100 and still look like 1x1 if you know what i mean

    • @teodor_morosanu
      @teodor_morosanu 2 года назад

      But i think i got it. The default plane mesh has 200 triangles and 21 vertices. That's why we can't modify it through Shader, we must change the mesh. For example: at 1x1 scale, we can use the default plane mesh, at 100x100 we must use a mesh that has 20000 triangles and 2100 vertices. The thing is you will save a lot of performance doing this. Tilling next to each other ~6000 default planes will kill your performance, especially if you are designing the game for mobile. My idea is that to make a special mesh, fiting my needs.

    • @teodor_morosanu
      @teodor_morosanu 2 года назад

      Actually, there are 121 vertices not 21, unity don't display the hole number, but in blender for 200 faces we need 121 verices.

  • @Jono1982
    @Jono1982 3 года назад +2

    Could you please make a video on how to replicate the water effects from Wind Waker including making the texture. I know its a big ask but its something I'm really interested in learning about.

  • @RogDolos
    @RogDolos 2 года назад +4

    Could this be modified to allow for buoyancy calculations? Perhaps move the noise & wave calculations into a script that feeds into the graph & can be synced with additional scripts for floating objects?
    (I don't know the exact process, which is why I'm asking with this guess)

    • @voulyful
      @voulyful 2 года назад +1

      Im interesed too, because i think there is no way getting the y values of the waves

  • @hddbvdcx
    @hddbvdcx Год назад

    Bro is as fast as SONIC is thi video lol . But great video it helped me a lot THX

  • @strangestmp4737
    @strangestmp4737 Год назад

    hello loved the vid!!! im having a hard time adding a drivable boat to float in your water. could really use a tutorial or help with that

  • @oscarlundh1060
    @oscarlundh1060 2 года назад +1

    When I plugged in my Alpha for the depth perception the water dissapears and i couldn't see it. I double checked that i did everything right and I did. Do anyone have any ideas

  • @YassinTheDestroyer
    @YassinTheDestroyer 3 года назад

    Great video!!

  • @mumr1ken
    @mumr1ken 2 года назад +4

    Hey, thanks for the tutorial! I tried to recreate it, but my plane is invisible. I have downloaded your version and compared it, but I cant find anything that's different. I also read that you said in the comments to "make sure that your colors have 1 alpha" but as far as I can see they have that. The last Split goes into Alpha(1) in fragments. Any idea what could be wrong?
    Also my material is missing sliders and are just editable numbers?

    • @kokosonev6675
      @kokosonev6675 2 года назад +3

      have you found a solution ? For me when i connect the depth color to the alpha this is when it becomes transparent

    • @ShaileshWaran
      @ShaileshWaran 2 года назад +1

      same

    • @ShaileshWaran
      @ShaileshWaran 2 года назад +1

      any solution???

    • @jesper9622
      @jesper9622 Год назад

      @@ShaileshWaran The alpha value of the watercolors (in the inspector) must be greater than zero

  • @itay7884
    @itay7884 2 года назад +3

    I have a problem where the foam is visible only in the scene view(I also checked directly with your downloaded shader to make sure it's not just me), any thoughts?

    • @Flaroon
      @Flaroon  2 года назад +1

      Try turning on the opaque and depth textures in the render pipeline.

    • @itay7884
      @itay7884 2 года назад

      @@Flaroon worked, thanks

  • @tenabrae
    @tenabrae 2 года назад +4

    You move through the steps of creating the nodes very fast, but spend a lot of time showing yourself making the graph look pretty. It would be more useful as a tutorial if you spent more time on how and WHY you're creating the nodes (as you do in some parts of the tutorial) and show less time playing tetris with the nodes themselves.

    • @Flaroon
      @Flaroon  2 года назад +1

      I completely agree. Looking back at the tutorial, I did spend a long time going through the nodes. But the thing about shadergraph is that it takes time to understand each node and the only way to do so is to watch many many tutorials and basically do trial and error. Bit if you think my tutorial is not detailed enough there are plenty of detailed 40 minute tutorials out there. I'm sure they could help your understanding and then you can come back to my tutorial.

    • @tenabrae
      @tenabrae 2 года назад +2

      @@Flaroon completely fair, and for all i know you cover more in those other tutorials. It just really stood out to me how fast you were going through the practical stuff, and how much time you were spending on aesthetics.

  • @teodor_morosanu
    @teodor_morosanu 2 года назад +2

    Hi, great video! I just wonder how i can scale for example the plane 100 times and still look like 1x1. If i just scale it the whole things scale. I don't want to put side by side 2000 planes, i want just 1.

    • @teodor_morosanu
      @teodor_morosanu 2 года назад

      But i think i got it. The default plane mesh has 200 triangles and 21 vertices. That's why we can't modify it through Shader, we must change the mesh. For example: at 1x1 scale, we can use the default plane mesh, at 100x100 we must use a mesh that has 20000 triangles and 2100 vertices. The thing is you will save a lot of performance doing this. Tilling next to each other ~6000 default planes will kill your performance, especially if you are designing the game for mobile. My idea is that to make a special mesh, fiting my needs.

    • @teodor_morosanu
      @teodor_morosanu 2 года назад

      Actually, there are 121 vertices not 21, unity don't display the hole number, but in blender for 200 faces we need 121 verices.

    • @Flaroon
      @Flaroon  2 года назад +1

      Yes, using I plane that is subdivided many times will be best for this use case. I made the planes tile in my video to demonstrate one of the features of the water and to assist people if they are using a chunk loading system.

  • @solomonlyons10
    @solomonlyons10 2 года назад +2

    How can I expand it to cover a large area?

  • @ClockcloudStudios
    @ClockcloudStudios 2 года назад +2

    Hey. I am having a problem with the blank shader, it's not coming up in the "Create > Shader" are. I am confused!!!

    • @Flaroon
      @Flaroon  2 года назад +1

      That is most likely as you are using the older versions of unity. I have another Tutorial on my channel for the older versions of unity so check that out instead. But if you do not need to create the shader in the older version of unity I advise you to update unity as this shader is a lot better than the last one.

    • @ClockcloudStudios
      @ClockcloudStudios 2 года назад

      @@Flaroon Thanks

  • @YassinTheDestroyer
    @YassinTheDestroyer 3 года назад +1

    can you do a day and night cycle tutorial in 3d?

  • @Hyphen3372
    @Hyphen3372 2 года назад +2

    Also will you make a tutorial on water buoyancy with this shader or no?

    • @Flaroon
      @Flaroon  2 года назад +1

      Sadly no, as you can not get the vertex position data from a shadergraph in any easy way.

    • @Hyphen3372
      @Hyphen3372 2 года назад

      @@Flaroon oh ok then. I guess yeah since I think there is no easy way of sending data from the GPU to the CPU but I have heard about asyncgpu or something but it's like a few frames behind but I could also just make a simple buoyancy script were it randomly goes between two values but Idk how to make that? There is a thing called random.range in unity but Idk how to use it in code.

  • @robertgordon7724
    @robertgordon7724 11 месяцев назад

    Good afternoon. How is the foam effect supposed to work? I don't have it.

  • @Fikule
    @Fikule 2 года назад +1

    Hey there. I have an issue with the Y position. In the shader it all looks fine in the preview, but in the scene all the Y positions return to zero at the same time frequently. I'm at 4:36 in the video and have checked and re-checked my graph against yours. It all looks fine. The material values match the preview values I have in the shader, but the Y continues to return to 0 on a loop. I can only assume there is a setting for the unity project I am missing or something?

    • @Fikule
      @Fikule 2 года назад

      Never mind, it seems my issue was having the noisescale as a rounded number caused it

    • @eNNercY
      @eNNercY Год назад

      @@Fikule Im having the same issue and cant wrap my head around it. What do you mean with rounded number issue? What did you do to fix it? Thanks!

    • @Fikule
      @Fikule Год назад

      @@eNNercY I think it just sorts itself out when he re-factors the waves later on in the tutorial (since he does multiple waves)

  • @kaveenhettipathirana1912
    @kaveenhettipathirana1912 3 года назад +1

    Neat Bro!

  • @theearthburner6159
    @theearthburner6159 3 года назад

    Wow, very epic

  • @Kuyrim
    @Kuyrim 2 года назад

    [Question] Hi thank you for your tutorial, subbed. I wanna ask if you run into the issue when put pink cube object above this water and get blue edge when camera is moving a bit fast, same issue happen with yellow cube it got green edege.

  • @wiktor10h
    @wiktor10h Год назад

    Hey, I have downloaded your shader. The water looks great in the scene view but when I put the VR goggles on, the water turns white for some reason. Do you how to fix it?

  • @Hyphen3372
    @Hyphen3372 2 года назад

    So I have a little problem. The water shader is very bright and I dont know why I followed the video and I did not put on the emission and it's currently blinding my eyes right now.
    Hold up nvm I forgot to put a saturate node sorry.🤣

  • @alpersevdin9296
    @alpersevdin9296 2 года назад

    hi, thanks for this tutorial. I am a complete beginner in unıty but i got a questıon, my plane ıs not movıng at all. What may i have missed? I am sure %100 followed the set up.

  • @JustSomeBricks
    @JustSomeBricks 2 года назад

    Hi. Could you make a tutorial on how to make boats float on this water? Thanks!

  • @sri-vishnurajagopal1990
    @sri-vishnurajagopal1990 Год назад

    Hello, I see your video , I dowload your files in your description but I have a pink error ion the material ,and i don't know to correct this ? Someone can help me , please ?

  • @tinstirums9233
    @tinstirums9233 3 года назад +1

    When I add alpha from depth Colour group to fragment shader alpha it makes the water plane invisible

    • @Flaroon
      @Flaroon  3 года назад

      make sure that your colors have 1 alpha

    • @kokosonev6675
      @kokosonev6675 2 года назад +1

      @@Flaroon how ?

  • @retekcorp
    @retekcorp 3 года назад

    NEAT! LOVE IT!!!!

  • @ShaileshWaran
    @ShaileshWaran 2 года назад

    downloaded and used it ....no colors...i changed the alpha of colours to 1 ..it become visible...what should i do?

    • @Flaroon
      @Flaroon  2 года назад

      Are your render pipeline assets set correctly and if they are please copy the material settings at the end of the video

  • @Smarceloz
    @Smarceloz Год назад

    Greate Tutorial!!!

  • @호박박-r3i
    @호박박-r3i Год назад

    Thank you!!

  • @Hyphen3372
    @Hyphen3372 2 года назад

    hello i came back to watch this vid so i can so your noise method to make clouds because unity is broken for me .

  • @ishatter2132
    @ishatter2132 2 года назад

    for some reason my water stays grey, does anyone know why? And yes i picked the colors and stuff xD

  • @frejchemnitz2489
    @frejchemnitz2489 2 года назад +1

    my plain is invisible?

    • @Flaroon
      @Flaroon  2 года назад

      Try making the alpha of your colours 1

  • @lewisjosephevans
    @lewisjosephevans 3 года назад

    thanks so much

  • @emoneydatruth1
    @emoneydatruth1 2 года назад +1

    How can I make a big ocean? Is it possible to make a big ocean inside unity?

    • @Flaroon
      @Flaroon  2 года назад

      the demo at the beginning has a big ocean. I did this by tiling a lot of default unity planes. you could also install pro builder and subdivide the plane to create a more detailed ocean.

    • @emoneydatruth1
      @emoneydatruth1 2 года назад +1

      @@Flaroon OK thank you, I'm making a smaller scale game that is 2.5D and your water will make a wonderful addition to the world I'm creating. Bless you for sharing this!

    • @emoneydatruth1
      @emoneydatruth1 2 года назад

      @@Flaroon Is it possible to make it look like you are underwater if I make my player jump in? 🤔 I am pretty new using unity, Just starting Visual Scripting, I have some sprite animations that are swimming 🏊‍♀️ and I would love to make it look like he is under the water. Is this possible with your water effect? I looked on RUclips and your effect is the best looking for a retro/modern mix. I appreciate you posting this greatly.

  • @Hyphen3372
    @Hyphen3372 2 года назад

    and also will you make a tutorial on a cloud shader that looks some what real maybe even volumetric?

    • @Flaroon
      @Flaroon  2 года назад +1

      Been trying out cloud shaders for a while but anything that is relatively simple is not that good and things that are too complex are decent but not explainable for a video.

    • @Hyphen3372
      @Hyphen3372 2 года назад

      @@Flaroon i asked if you could because the simple noise node isnt working in unity 2021.2.3 and it doesnt tile correctly and im wondering if i could maybe fix it?

    • @Flaroon
      @Flaroon  2 года назад +1

      @@Hyphen3372 A lot of features are broken in newer builds of unity. Stick to 2020.3 for now as it has most of the features. I think unity will fully release 2021 be December so I don't have a fix for you sorry. If its a node error you can join the discord server and I can help you from there?

    • @Hyphen3372
      @Hyphen3372 2 года назад

      @@Flaroon ok then ill go back to unity 2020 for now. i was using unity 2021 because of decals and the improved ssao but ok. :)

  • @JustSomeBricks
    @JustSomeBricks 2 года назад

    I have an issue where when I get close to the water it disappears, do you know how I can fix this?

    • @Flaroon
      @Flaroon  2 года назад

      If this is inside the scene view you can't really do anything about it because the planes are clipping out to improve performance. This is done internally my unity so there is no way to disable this. It will not effect gameplay

    • @JustSomeBricks
      @JustSomeBricks 2 года назад

      @@Flaroon So this is completely inside of Unity? If I package the game and play it as a actual game this would not happen?

    • @Flaroon
      @Flaroon  2 года назад

      @@JustSomeBricks no, this will not happen in game

  • @conspiracyscholor7866
    @conspiracyscholor7866 2 года назад +1

    Which song is this? It's Mozart right?

    • @Flaroon
      @Flaroon  2 года назад

      Pachabelles Canon in D

    • @conspiracyscholor7866
      @conspiracyscholor7866 2 года назад +1

      @@Flaroon Thanks for the quick response and for the excellent video, cheers!

  • @morroyalgamesstudio5116
    @morroyalgamesstudio5116 2 года назад

    0:10 i think it's an Anti-aliasing bug!

  • @lewisjosephevans
    @lewisjosephevans 3 года назад

    How would I tile it to work with bigger meshes?

    • @Flaroon
      @Flaroon  3 года назад

      it automatically tiles

    • @wathc7722
      @wathc7722 2 года назад

      @@Flaroon it doesn't for me

    • @Flaroon
      @Flaroon  2 года назад

      @@wathc7722 if you have a correctly set-up urp project, go the the description and download the files from there.

  • @Hyphen3372
    @Hyphen3372 2 года назад

    Hey man what's up. I came back to this video because I switch from may laptop to iMac and couldn't get may file to may iMac and I downloaded the water shader again and I wanted if you would maybe add refraction to this shader cheer's Skye.

    • @Flaroon
      @Flaroon  2 года назад +1

      Hey Skye. Thanks for checking out the video again. I have plans for new updated and optimised water shaders. Rn I've been really busy with life so I haven't been able to work much. Refraction is a planned addition to the water shader series aswell as platform specific optimisation.

    • @Hyphen3372
      @Hyphen3372 2 года назад +2

      @@Flaroon good to know and i hope things will work out for you man glad to see that youre fairly active on yt hope to see the water bender "hehe" to come back also goodluck on your life i wish you the best of luck.

  • @sasko2005
    @sasko2005 2 года назад

    hi, when my camera look at certain angles, my water disappear, can you help me?

    • @Flaroon
      @Flaroon  2 года назад

      this only happens in the scene view. It will not effect the gameplay

    • @sasko2005
      @sasko2005 2 года назад

      @@Flaroon thx for early reply, I built and run game and I see that it effect the gameplay, I think that the problem is that the plane on which is water shader, is under water. If the plane is not seen on camera, water disappear, can you solve this?

    • @Flaroon
      @Flaroon  2 года назад

      @@sasko2005 yes that is the issue but it only happens in scene view correct?

    • @sasko2005
      @sasko2005 2 года назад

      @@Flaroon Unfortunately, not only in the scene view, the problem was also in the built game, I don't know what to do with it

    • @Flaroon
      @Flaroon  2 года назад

      You may be doing some sort of culling but that should not be happening

  • @RagnarDragonson
    @RagnarDragonson 3 года назад

    Hey I tried to make my mesh bigger but it messes it up instead. Works amazing when I keep the scale at 1

    • @Flaroon
      @Flaroon  3 года назад +1

      Try downloading the ahader from github. You may have messed up one or 2 nodes as in my testing the shader works fine.

    • @RagnarDragonson
      @RagnarDragonson 3 года назад

      @@Flaroon hey I managed to mess around a little and found adjusting the height helped, I lowered it to 0.02

    • @alexthompson8977
      @alexthompson8977 2 года назад +1

      @@Flaroon my mesh looks wonky when it did it do you know any reason why?

    • @Flaroon
      @Flaroon  2 года назад

      @@alexthompson8977 may be because the noise scale is too high. Try reduce it to 005

    • @alexthompson8977
      @alexthompson8977 2 года назад

      @@Flaroon I set my settings and graph exactly like yours(even imported your to compare them directly). Yours works but mine doesn't.

  • @duzx4541
    @duzx4541 2 года назад

    Cant create the Blank shader graph D: any ideas why? URP is installed correcntly

    • @Flaroon
      @Flaroon  2 года назад

      Which unity version are you using?

    • @duzx4541
      @duzx4541 2 года назад

      @@Flaroon Nvm, they just changed it to be a seperate category above the shader option lol

    • @duzx4541
      @duzx4541 2 года назад

      @@Flaroon So I´m currently following the graph creation. Minute 5:37 right now but my water is not moving, its just a flat plane now. I should have done everything exactly the way you did it D:

    • @Flaroon
      @Flaroon  2 года назад

      @@duzx4541 try playing around with the noise settings in the material. if everything is right then maybe your variables may be too low or high

    • @duzx4541
      @duzx4541 2 года назад

      @@Flaroon Oh yeah, I scaled my plane by 300x, so they are probably too low?
      Bad question, but how do I change the variables to be higher?

  • @l1nx99
    @l1nx99 2 года назад

    good, but i think this is too heavy

    • @Flaroon
      @Flaroon  2 года назад

      Maybe. I still had good performance but you cam decrease the octaves to make it faster.

  • @matteoZattera
    @matteoZattera 3 года назад

    My shader remain pink

    • @Flaroon
      @Flaroon  3 года назад

      Make sure that you have a new urp project. Then it should work. Brackeys has tuts on how to set urp up correctly

    • @matteoZattera
      @matteoZattera 3 года назад

      @@Flaroon ty, with an URP project it works, but if I want to switch from a 2D project to a 3D URP is there a way?

    • @Flaroon
      @Flaroon  3 года назад +1

      @@matteoZattera There is probably a way but it is likely that its not worth the trouble. If you dont have a full game already made in 2d and you would like to switch to 3d you should just restart and import all of the previous assets into your 3d project. another option is a add urp to the 2d project and then creating your own render pipline asset. then you can assign this in the graphics settings and your good to go.

    • @matteoZattera
      @matteoZattera 3 года назад

      @@Flaroon thank you so much

  • @donloh7454
    @donloh7454 2 года назад

    Crazy slow on quest 2)