Це відео не доступне.
Перепрошуємо.

Unity - Water Surface Ripple Effect Tutorial

Поділитися
Вставка
  • Опубліковано 7 сер 2024
  • In this video, you will learn how to create a water surface ripple effect. This effect can be combined with the water surface shader we made previously to make the water look more realistic.
    Links :
    神奇的小阿飞 : space.bilibili.com/31839293/
    GitHub : github.com/Parrot222/Unity-Wa...
    Previous Video : • Unity Water Shader Par...
    My Patreon : / paro222
    My Discord : paro456d
    Timeline :
    0:00 Opening
    0:37 GitHub
    0:52 Script
    1:30 Shader Graph
    2:07 Camera
    3:09 Particle System
    3:47 Ripple Effect
    4:52 Shader Graph
    6:01 Result

КОМЕНТАРІ • 116

  • @paro456
    @paro456  6 місяців тому +3

    Some people may not know how to apply this effect to the player object, so I made a short video to show you how to do it.
    ua-cam.com/video/U7pH5lIPZOU/v-deo.html

  • @Tukyo
    @Tukyo Рік тому +5

    Thank you for sharing the channel that inspired this! You are seriously one of the best channels on here, your shit looks amazing and I really appreciate how open you are to share all this, in such a clear way.

  • @IslamAudioStation
    @IslamAudioStation Рік тому +3

    Your tutorials are soo good man. Thank you so much.

  • @MadMarcWinnipeg
    @MadMarcWinnipeg Рік тому +2

    Awesome! Thanx bro. I really appreciate this.

  • @atirutwattanamongkol8806
    @atirutwattanamongkol8806 4 місяці тому +1

    This is some really clever tricks. Nice one.

  • @BuyMyBeard
    @BuyMyBeard 6 місяців тому +1

    I gotta say, using an invisible particle system for this is GENIUS, I was trying to find a way to make a ripple system mathematically, and had trouble when I noticed compute shader delay was insane. I submitted a PR to your repo to improve the ripple effect because I noticed it was pretty pixelated. Make sure to check it out!

    • @paro456
      @paro456  6 місяців тому +2

      I've been experimenting with using compute shaders to create ripples recently, and I think the results are quite good. Also, thanks for helping me fix the pixelated normal map issue.

    • @BuyMyBeard
      @BuyMyBeard 6 місяців тому

      @@paro456 how have you done it? Mine involved sending a buffer containing ripple origins and timestamp, and iterating over the buffer to calculate ripples on a texture and blending them onto a heightmap. I think what made it not work was the delay to dispatch the compute shader, making it not update every frame.
      I've also thought of a really cool idea for large planes of water (tiled or not tiled). Instead of having a static camera over the water, having a dynamic camera following the player and then projecting that on the plane at the position of the player. There are some cons like not sampling the entire water for other ripple sources, but I was planning on trying this implementation for my own water shader

    • @paro456
      @paro456  6 місяців тому

      @@BuyMyBeard I'm exploring ways to achieve ripple effects without using a camera but by object positions XZ. A friend mentioned that adding another camera might increase the computational load on the game scene.
      By the way, the compute shader for the ripple effect that I created is mainly based on this tutorial.
      ua-cam.com/video/4CNad5V9wD8/v-deo.html

    • @BuyMyBeard
      @BuyMyBeard 6 місяців тому

      ​@@paro456 I've seen it both in video form (from that video) and in your source code. The implementation is lackluster and mediocre though. The algorithm is very naive and samples heights around it without trying to create any pattern.
      The implementation I was trying seems decent, but I think the issue is agressive loop unrolling (I have to iterate over a buffer of variable size depending on the amount of ripples sent to the GPU)

  • @thegrey448
    @thegrey448 Рік тому +2

    welldone. thanks

  • @munyunu
    @munyunu 10 місяців тому +2

    Thank you~!!

  • @MrElfVR
    @MrElfVR Рік тому +2

    Thank you so much

  • @daniionas2888
    @daniionas2888 11 місяців тому +2

    The best

  • @joshuabidwell2614
    @joshuabidwell2614 Місяць тому +1

    Champion

  • @hyperbatata
    @hyperbatata 9 місяців тому

    This is great, worked perfectly for me. One question. How can you do it for larger bodies of water? From my testing, it looks great for small planes (maybe up to 5 units big) but quality deteriorates over that. Can it be made as the ripples do not bounce at the edges?
    Thank you so much!

    • @paro456
      @paro456  9 місяців тому

      In the script inspector, there's a parameter called Texture Size that controls the resolution of the rendertexture. However, changing it may affect the speed of ripple dispersion. You may need to adjust it several times to find the desired value.

  • @GianDev
    @GianDev 10 місяців тому +1

    Hello, I have a question, is it possible to create waves as high as the sea? I was looking at how to use your github repository but when I opened the project, the water textures were not loaded and it did not have the function. I would like to learn how to make a sea without the computer exploding. u.u

    • @paro456
      @paro456  10 місяців тому

      You can contact me through Discord so that I can provide some images and videos. paro456d

  • @KashishSharma93
    @KashishSharma93 10 місяців тому +2

    great video. have you tried using this with unity's new water system? just curious

    • @paro456
      @paro456  10 місяців тому +3

      I have tried, but I currently don't have a good understanding of how to use it, so I might learn more about it in the future.

    • @KashishSharma93
      @KashishSharma93 10 місяців тому +1

      @@paro456 i will try it out as well

  • @cosmicnarwhalgaming
    @cosmicnarwhalgaming 11 місяців тому

    I'm very new to unity. I have completed your two part water shader video, just wondering how to combine this ripple effect with the other plane because there can only be one shader on a plane, Also, in the shader graph, only one node can go into the normal tangent space, so how do I put the water shader and ripple shader onto the same water plane?

    • @paro456
      @paro456  11 місяців тому

      That's a drawback of this method, but I think it can be improved by modifying the code. Perhaps I'll look into it when I have the time.

    • @paro456
      @paro456  11 місяців тому

      You can combine the normal map animations using Lerp. I remember there was a comment asking about this issue before; maybe you can take a look.

  • @ttsvibelounge
    @ttsvibelounge 7 місяців тому

    What text to speech engine are you using?

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

    really cool, but I just wonder is there anyway to implement tessellation to urp

    • @paro456
      @paro456  Рік тому +2

      I currently know two methods. The first one is to use Amplify Shader Editor, which supports tessellation in the URP pipeline. The other one is to add tessellation functionality in your shader code.

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

    nice video, bro can you make a tutorial on volumetric sunbeams with urp graphics.

    • @paro456
      @paro456  Рік тому +2

      Perhaps when this video reaches 10k views, I will consider it.

  • @matawaristudio4805
    @matawaristudio4805 11 місяців тому

    how if the plane is a rectangular shape?
    I`ve try it but the effect is streched

    • @paro456
      @paro456  11 місяців тому +1

      When I initially created this effect, I only considered surface, not other shapes.

  • @thenewchicken1339
    @thenewchicken1339 5 місяців тому

    Im already confused at 1:35, I don't have the option to create a unlit shader graph. Only a shader itself I'm unsure if this is the same thing.

    • @paro456
      @paro456  5 місяців тому

      You need to install Shader Graph in the Package Manager first.

    • @thenewchicken1339
      @thenewchicken1339 5 місяців тому

      @@paro456 okay Thank you

  • @HansPeter-gx9ew
    @HansPeter-gx9ew 9 місяців тому +2

    you should spawn the ripples in front of the object extrapolated with the velocity vector (has lag bcof CPU-GPU transmission). But nice project

    • @paro456
      @paro456  9 місяців тому +1

      Thank you for your suggestion! :)

    • @BuyMyBeard
      @BuyMyBeard 6 місяців тому

      wouldn't that cause the risk of overshooting a ring when the player stops?

    • @HansPeter-gx9ew
      @HansPeter-gx9ew 6 місяців тому

      @@BuyMyBeard I think yes, but then you ahve one slightly missplaced ring instead of all. Also the player shouldn#t stop instantly anyway

    • @BuyMyBeard
      @BuyMyBeard 6 місяців тому

      @@HansPeter-gx9ew at this point it comes down to a design decision

    • @HansPeter-gx9ew
      @HansPeter-gx9ew 6 місяців тому

      @@BuyMyBeard true; imo having such an effect is difficult enough; shader logic is simple but all the thing around it like how to get acces to texture etc. are extremely annyoing and badly documented. I really hate Unity for making it so complicated. Like making a custom post processing effect

  • @WheatyVR
    @WheatyVR 3 місяці тому +1

    Can you send me the finished shader?

  • @sprythedragon2253
    @sprythedragon2253 6 місяців тому

    Where can I find the last script you mentioned? 6:26

    • @paro456
      @paro456  6 місяців тому

      You can combine this ripple effect with the water shader tutorial I previously created.

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

    how do i add it in the water shader u made like the shader u made in the other video

    • @paro456
      @paro456  Рік тому +2

      You can use the lerp node to do that. Connect the water surface normal map to A and the ripple normal map to B. Finally, connect the R channel of the ripple texture to T then done.

    • @Kaerfca95
      @Kaerfca95 Рік тому

      @@paro456 Hey! I know this is probably the simplest thing, but do you have a screenshot showing this? I've copied both of these tutorials but I'm just not able to get them both connected. Sorry to bother you. Both videos have been super helpful.

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

      @@Kaerfca95 This is how the screenshot of the connection should look like. and change the mode of the ripple texture to black.
      imgur.com/a/do8q8uG

  • @chimpchase
    @chimpchase 3 місяці тому +1

    is there a way you can make the ripples fade out instead of going everywhere

    • @paro456
      @paro456  3 місяці тому +1

      You can decrease the value of *d *= 0.98f;* in the ripple shader.

  • @DriplordVR
    @DriplordVR 23 дні тому

    Please do a tut on sunbeams for urp. Would be sick

  • @ezequielmartinez9583
    @ezequielmartinez9583 9 місяців тому

    Hi. I redo your example here and the only ripple working is at the center of water... the player ripples are not working when the player is collides with water... Did you forget to talk about any script to control this?

    • @ezequielmartinez9583
      @ezequielmartinez9583 9 місяців тому

      Ripple is not working at player's collision position

    • @paro456
      @paro456  9 місяців тому

      I mentioned how I did it towards the end of the video because the process is the same, so I skipped it. If you're not quite clear, you can reach out to me on Discord.

  • @TylerGlenn-ud4ei
    @TylerGlenn-ud4ei 9 місяців тому

    Hey, im having troube with the gorilla tag player script, like it wont play the effect, and you can barely move, can you tell me how to fix these issues, Thanks

    • @paro456
      @paro456  9 місяців тому

      You can discuss your script issues with me through Discord.

    • @TylerGlenn-ud4ei
      @TylerGlenn-ud4ei 9 місяців тому

      @@paro456 how do i add you on discord

    • @TylerGlenn-ud4ei
      @TylerGlenn-ud4ei 9 місяців тому

      can you sent a link to ur serv if u have one?@@paro456

  • @kyd_99
    @kyd_99 Місяць тому

    hello, I'm having trouble with camera that mine doesn't have output texture, instead of it, i have target texture so I just put my render texture in it. but it's not working i think i made mistake here so do I need to download something to see output texture in camera?

    • @paro456
      @paro456  Місяць тому

      what version of unity you use?

    • @kyd_99
      @kyd_99 Місяць тому

      @@paro456 I use unity 2022.3.9f1 version. I need to use this version to connect with other system. is version is the problem?

    • @paro456
      @paro456  29 днів тому

      @@kyd_99 I'm using the 2022 version, and there is an 'output texture' option in the output settings. Maybe you should check again. If it's not there, let me know.

    • @kyd_99
      @kyd_99 29 днів тому

      @@paro456 I opened new project and checked camera again but still it's not there..

    • @paro456
      @paro456  28 днів тому

      @@kyd_99 Could you please provide some screenshots of the camera inspector?

  • @user-zs5rh7ov2n
    @user-zs5rh7ov2n 9 місяців тому

    what program do I need to open shader graph?

    • @paro456
      @paro456  9 місяців тому

      You need to install URP and Shader Graph from the package manager.

  • @Thesomeonevr
    @Thesomeonevr Місяць тому

    how do i combine it with the last water shader

    • @paro456
      @paro456  Місяць тому

      You can download the shader I uploaded on GitHub, or wait until I have time to make another video about water.

  • @masonblue62
    @masonblue62 6 місяців тому

    How do you make the water reflect and move litgh under it

    • @paro456
      @paro456  6 місяців тому

      You need to add a reflection probe in your scene.

    • @masonblue62
      @masonblue62 6 місяців тому

      @@paro456 thank you I appreciate it

  • @user-si5vw9zu8h
    @user-si5vw9zu8h 11 місяців тому +2

    I want to make the water transparent like in the video, how can I do it?

    • @paro456
      @paro456  11 місяців тому +3

      First, change your shader from opaque to transparent. You can use the Scene Color node to obtain the color of opaque objects beneath transparent ones. If the water surface appears gray, it means you haven't checked the Depth Texture and Opaque Texture options.

    • @user-si5vw9zu8h
      @user-si5vw9zu8h 11 місяців тому +1

      Wow, it worked. Thank you so much! Another thing I'm curious about is that even though the particles are above the surface of the water, they're still dripping. How do I fix this?@@paro456

    • @user-si5vw9zu8h
      @user-si5vw9zu8h 11 місяців тому

      It's 1.4 points away from the Y-axis, and if I go below it, it doesn't touch the surface of the water, but it shows the surface of the water shaking
      @@paro456

    • @paro456
      @paro456  11 місяців тому +2

      @@user-si5vw9zu8h You can make the character or objects emit particles only when touching the water surface.

    • @user-si5vw9zu8h
      @user-si5vw9zu8h 11 місяців тому

      @@paro456 Does that mean I have to create and put in a script where particles only run when they touch the water surface?

  • @SuperFunJeffy
    @SuperFunJeffy 11 місяців тому

    How can I get this to work with any object

    • @paro456
      @paro456  11 місяців тому +1

      You can make the character or objects emit particles only when touching the water surface.

  • @TylerGlenn-ud4ei
    @TylerGlenn-ud4ei 9 місяців тому

    Now the issue is that the water ripples spawn at the wrong spot, please help. Thanks

    • @paro456
      @paro456  9 місяців тому

      My Discord : paro456d

    • @pranavmohite8581
      @pranavmohite8581 8 місяців тому

      @@paro456 same issue bro sent u a discord friend request please respond

  • @itzdrify5678
    @itzdrify5678 Рік тому

    Can I make this on hdrp?

    • @paro456
      @paro456  Рік тому

      Yeah, you just need to choose HDRP when creating the graph.

  • @mjin.mtd0604
    @mjin.mtd0604 Рік тому

    how to add unlit shader graph ?

    • @paro456
      @paro456  Рік тому

      1:30
      If you don't have that shader graph option, then you need to install shader graph first.

    • @mjin.mtd0604
      @mjin.mtd0604 Рік тому

      @@paro456 thank u but I want to ask Why I don't have any setting of the camera

    • @paro456
      @paro456  Рік тому

      @@mjin.mtd0604 what camera

  • @Syeda_Dev
    @Syeda_Dev Місяць тому

    can you make that a unity package please

    • @paro456
      @paro456  Місяць тому

      Maybe but not now

  • @kfj795
    @kfj795 3 місяці тому

    very cool but i noticed its bound to the Framerate and setting the fps to be higher than 60 breaks the water s:

    • @paro456
      @paro456  3 місяці тому

      I think moving the code from Update to Fixed Update can solve this issue.

    • @kfj795
      @kfj795 3 місяці тому

      @@paro456 that night be the best choice cuz nowadays ppl want the best FPS and more and more screens are High refresh rate.

  • @user-bb6et5oh9d
    @user-bb6et5oh9d 5 місяців тому

    Can you send me the demo project in the video?

    • @paro456
      @paro456  5 місяців тому

      You can find the GitHub link in the video description.

  • @KENISEG
    @KENISEG 11 місяців тому +1

    using extra camera - this is bad way

    • @paro456
      @paro456  11 місяців тому +1

      This is a fundamental idea, and you can also optimize it further.

  • @turkey_gaming7570
    @turkey_gaming7570 Рік тому +2

    hi

  • @miyeo.n
    @miyeo.n 2 місяці тому

    hi, i can't find "Unlit Shader Graph", where is it can i find?🥲

    • @paro456
      @paro456  2 місяці тому

      Maybe you haven't installed Shader Graph.

    • @miyeo.n
      @miyeo.n 2 місяці тому

      @@paro456 then, i dl Shader Graph on Unity Store right? or on package manager?

    • @paro456
      @paro456  2 місяці тому +1

      @@miyeo.n package manager