Water Ripples Shader - UE4 Materials 101 - Episode 23

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ต.ค. 2024
  • For the next few weeks, we're going to be making a water shader in the Unreal 4 Material Editor. This week, we're going to focus on creating the ripples on the water surface. Then in the following week's we'll create the depth opacity and color, and the reflection and refraction. For the surface ripples, we sample a ripple normal map several times and combine the samples together. Each sample is a different size and scrolls at a different speed. The result is a complex, ripply surface - just like we observe in the reference.
    Download the textures used in this video:
    www.bencloward...
    ------------------------------
    Learn more!!
    Other videos like this one:
    • Water Surface Overview...
    • Translucent Water Deta...
    • #3 How to Create Water...
    Web Resources
    www.unrealengi...
    forums.unreale...
    Shader Book Recommendations
    www.bencloward...
    ------------------------------
    Learn to write shaders in HLSL:
    • HLSL Shader Creation 1...
    • HLSL Shader Creation 2...
    • HLSL Shader Creation 3...
    ------------------------------
    Theme Music
    Peace in the Circuitry - TeknoAXE
    teknoaxe.com/Li...
    Background Music
    Speo - The Little Things
    • Speo - The Little Things

ความคิดเห็น • 67

  • @martinhodges2488
    @martinhodges2488 4 ปีที่แล้ว +13

    Thank you for this! Very straight forward tutorial. I like that you explain why we are adding certain nodes rather than just doing it without explanation.

  • @jesseg.3371
    @jesseg.3371 3 ปีที่แล้ว +3

    I really enjoy listening to you. So pleasant and so very helpful and informative. Thank you very much, Ben. You are an incredible help!

  • @santoshranjandas
    @santoshranjandas 4 ปีที่แล้ว +1

    Very good descriptive tutorial. Good work Ben. Please continue doing this. Really like it

  • @Preirin
    @Preirin 4 หลายเดือนก่อน +1

    water is my nemesis... thanks for this

  • @marklavania3680
    @marklavania3680 4 ปีที่แล้ว +3

    Thank you Ben! you pack so much information in your tutorials....just wondering if you could pack the week smaller so that we can more frequent tutorials. hhahahah....Just kidding. Thanks again...and best wishes!

  • @joserororo9240
    @joserororo9240 10 หลายเดือนก่อน

    ...I envy Ben... how many things you know..., thanks for another fantastic tutorial, Un Saludo.

  • @nirajutamang4906
    @nirajutamang4906 ปีที่แล้ว +1

    Thanks for Providing such a greate tutoirals ...

  • @FireballVFX
    @FireballVFX ปีที่แล้ว

    Hi Ben, thank you for tutorial. I followed it and created my own water material. However there is one issue I encounter and I wonder if you had the same problem in regards to camera focus. This water material does not respond to camera focus. If I set camera focus with shallow depth of field onto stone that is in the river, everything else beyond the focal point goes defocus, apart from the river/water material. I cannot find the issue why and how to solve it. Did you encounter the same problem and maybe you know why it is happening? Thank you.

  • @50shadesofskittles9
    @50shadesofskittles9 9 หลายเดือนก่อน +1

    Nice insight. I love your videos

  • @1_Man_Media
    @1_Man_Media 4 ปีที่แล้ว +2

    awesome choice Ben, water is my second favorite thing next to rain. I hope you keep pushing your water shader to insane levels for my to copy :)

  • @yuxinyao8178
    @yuxinyao8178 4 ปีที่แล้ว +1

    Thanks for sharing Ben

  • @emrenkaya
    @emrenkaya 4 ปีที่แล้ว +1

    Nice tutorial series man, thanks a lot.

  • @unreallevel1
    @unreallevel1 4 ปีที่แล้ว +1

    Thank you Ben. It helps me a lot!

  • @lamprosgiannopoulos8489
    @lamprosgiannopoulos8489 4 ปีที่แล้ว +1

    Thanks Ben!

  • @joeljones4422
    @joeljones4422 9 หลายเดือนก่อน

    Hi Ben, have a missed anything that described how to rotate the ripple direction? the ripples appear to be flowing across my landscape coast rather than toward it.
    p.s. thank you for uploading the content

  • @snookofficial7211
    @snookofficial7211 3 หลายเดือนก่อน +1

    Blimey that ended up being more than expected, as I didn't have the ripple MF, then making that there were MFs inside MFs!! Anyway, awesome tutorials, learnt loads.

  • @MegaKhaitan1
    @MegaKhaitan1 4 ปีที่แล้ว +1

    Wow, beautiful

  • @ilaksu09
    @ilaksu09 2 ปีที่แล้ว +1

    Wow...Very Nice..

  • @AlexUE5
    @AlexUE5 3 ปีที่แล้ว +1

    Thank you! Very informative!

  • @sofiansofian4092
    @sofiansofian4092 2 ปีที่แล้ว +1

    How did you get the water-ripples box? what is the way from where?

  • @MorganFuse
    @MorganFuse 3 ปีที่แล้ว +1

    This is awesome, thanks a lot.

  • @DrR0bot
    @DrR0bot 2 ปีที่แล้ว

    Ben, ,really good video. How would you remove the tiling and stretching effect if you want to apply the material in a lake. Thanks so much! proud follower

  • @KaustavMajumder
    @KaustavMajumder 3 ปีที่แล้ว

    8:12 - The Multiplication just before the Texture node is also a significant contributor to the slowdown of the speed. Not just the fact that we are using World Space Coordinates. Please correct me if I'm wrong. Thanks. 🙂

  • @申辉-w2l
    @申辉-w2l 4 ปีที่แล้ว +1

    thank u so much,ben!

  • @mehranvaysee8927
    @mehranvaysee8927 2 ปีที่แล้ว +1

    Thank you for this

  • @manonthedollar
    @manonthedollar 3 ปีที่แล้ว

    When do you know to add normals together, vs using the BlendAngleCorrectedNormals node? Thanks so much for these wonderful videos!

    • @BenCloward
      @BenCloward  3 ปีที่แล้ว +1

      It depends on how accurate you want the results to be. For something like water ripples where you just want something that looks chaotic, the precise angle of each normal is not important at all - so you can add them and it's cheaper. If you're doing something that needs more precision - especially if you've baked out your base normal map from a high resolution mesh, you want to use BlendAngleCorrectNormals to get better results.

  • @faeiii9004
    @faeiii9004 4 ปีที่แล้ว +1

    Thank you, these are awesome :-)!

  • @oksemgo
    @oksemgo 7 หลายเดือนก่อน +1

    Great!

  • @jinpower6505
    @jinpower6505 3 ปีที่แล้ว +1

    THank you!!! 감사합니다

  • @irajmh
    @irajmh 4 ปีที่แล้ว +2

    Want to see an interesting shader? See vehicle demo from learn tab in ue4 store. So many brilliant tricks they did in that shader.

  • @cablekingtv6557
    @cablekingtv6557 3 ปีที่แล้ว +1

    Another good one. I don’t like the new water tools so far. This should sharpen me up plenty.

  • @Mrabet_Houssem
    @Mrabet_Houssem 4 ปีที่แล้ว +2

    please continue with water shader tutorial (ocean,river...)

  • @ricardogoncalves7043
    @ricardogoncalves7043 2 ปีที่แล้ว

    Cara, você é simplesmente fantástico. Muito obrigado pela aula

  • @cinemyscope6630
    @cinemyscope6630 2 ปีที่แล้ว

    Nice!

  • @DavidWKimber
    @DavidWKimber 4 ปีที่แล้ว

    LOVE this series, extremely valuable service to the community here!
    Question: So, when I use the DeriveNormalZ_Function, I get completely flat areas of the surface mixed in with the bumpy normal parts. When I just feed my Add node directly in, I don't get that. Is that b/c of the normal texture I'm using? All other settings are identical from what I can tell. Thanks in advance!

    • @BenCloward
      @BenCloward  4 ปีที่แล้ว +1

      I noticed that issue too when I was making the video. I'm not sure why it happens to be honest. I think that using the Add is the better way to go in this case.

    • @DavidWKimber
      @DavidWKimber 4 ปีที่แล้ว +1

      @@BenCloward FWIW, I did end up grabbing the normal map you were using, and that 'fixed' the issue, even using the DeriveNomal_Z function. So the normal I was using initially must have had some values that responded in that way. Later I watched a vid of Alan from Epic explaining a water shader they had for Content Examples (can't find it now though), and he had a version that did that exact thing, it being a 'glassy lake with ripples' example. So, there is a use for that visual!

  • @胡书恒-h7k
    @胡书恒-h7k 2 ปีที่แล้ว

    Good master, good video

  • @emorange
    @emorange 3 ปีที่แล้ว

    Hi Ben, a question that when I plug the DeriveNormalZ_Function into the Normal input pin, it appears holes in the material, what's wrong with it?

  • @akianchainey-raymond8570
    @akianchainey-raymond8570 2 ปีที่แล้ว

    Hi, Ben. I seem to have an issue with the intensity of the rain droplets. I've double checked the values on both the tutorials, but it seems like mine are getting lost in the water ripples. Would upping the intensity or weight of the rain ripples be a way to fix this?
    Thank you in advance!

  • @hammertl2673
    @hammertl2673 4 ปีที่แล้ว

    Thank you for this amazing video! But I've got a quick question, what is the different between using Texcoord and world position as the UV coordinate?

    • @BenCloward
      @BenCloward  4 ปีที่แล้ว +4

      Texture coordinates are on the surface of the model - so they depend on the data in each mesh. World position is independent of any mesh. If you have multiple meshes, world position will tile correctly across meshes because it's continuous in the world. With texture coordinates, the coordinate will move around as you move the mesh around. World coordinates stay in their world position regardless of how the model is moved. It's the same with scale. If you scale the model up or down, the texture coordinates will get larger and smaller with the model, but world position will remain the same size.

    • @hammertl2673
      @hammertl2673 4 ปีที่แล้ว

      @@BenCloward Really Thanks for your reply, but I have got another question, maybe still need your help, when I increasing the intensity of wave(the normal map), it gets a lots of artifacts, it that general situation? Or I missed any stuff?

    • @BenCloward
      @BenCloward  4 ปีที่แล้ว

      @@hammertl2673 It's hard for me to know what the problem is from just your description. Could you send me a screen shot of it? ben@bencloward.com

    • @mcc2795
      @mcc2795 3 ปีที่แล้ว

      @@BenCloward hi mr i'm a child so.. i doesn't understand a few thing how did you got the material function water ripples and if you are answering me then thank you in advise.

  • @tbunreall
    @tbunreall ปีที่แล้ว

    is there a reason you used derivenormalzfunction instead of just derivenormalz? It uses 8 more instructions

    • @BenCloward
      @BenCloward  ปีที่แล้ว

      It must have been a mistake. No, I don't have a specific reason. Thanks for letting me know.

    • @tbunreall
      @tbunreall ปีที่แล้ว

      @@BenCloward Ok, thanks for responding, I'm a newbie so I have no idea about things like that

  • @reffect5338
    @reffect5338 3 ปีที่แล้ว +1

    again tip top!

  • @taguetrash
    @taguetrash 3 ปีที่แล้ว +2

    Judging by your GDC talk and these videos you must be the 'water shader guy' at your job, eh?

    • @BenCloward
      @BenCloward  3 ปีที่แล้ว +2

      Yep, that’s me!

    • @condorgames1438
      @condorgames1438 3 ปีที่แล้ว

      Not only water 😳 he is the shader guy

  • @JieDu-yj2vd
    @JieDu-yj2vd ปีที่แล้ว

    What does DeriveNormalZ do? Why is there no difference between using it and not using it? Is it okay if I don't?

    • @BenCloward
      @BenCloward  ปีที่แล้ว +1

      I've talked about this in some of my more recent videos. A normal vector consists of three components - X, Y, and Z. If the vector is normalized (the length is 1.0) then you can get away with just storing the X and Y components in the texture and then using some simple math to compute the value of the Z component. This math is what the DeriveNormalZ node does. It takes the X and Y components of a normal vector, computes the Z component, and then gives you the full normal vector - including the Z. Using this node will give you an accurate result in all cases - but it's not free. The math to compute the Z includes a square root instruction - which is a somewhat expensive one in terms of performance. So when you need precise and accurate normals computed from just the X and Y, DeriveNormalZ is what you'll want to use. However, for something like water ripples where you don't really care about precision, you can save some performance by skipping the DericeNormalZ node and just use a hard-coded value for Z instead. And if you can't tell the difference, it's totally fine if you don't use it.

    • @JieDu-yj2vd
      @JieDu-yj2vd ปีที่แล้ว

      @@BenCloward Hi,I am confused about Power and Multiply. If Exp of Power is given to 3, which is more expensive to multiply three same numbers?

    • @BenCloward
      @BenCloward  ปีที่แล้ว

      @@JieDu-yj2vd The shader compiler will always find a way to make the power operation as cheap as it can under the hood. So for raising to a power of three, it will most likely convert that to 2 multiplies.

    • @JieDu-yj2vd
      @JieDu-yj2vd ปีที่แล้ว

      @@BenClowardFirst of all, thank you very much for your answer. According to your previous answer, if Power is used as an integer, will Power be automatically converted to multiplication by UE at the bottom? If not, do I need to use multiplication instead of Power?

  • @saicharan1850
    @saicharan1850 4 ปีที่แล้ว +2

    how to get the weather ripple function? 16:24 .

    • @BenCloward
      @BenCloward  4 ปีที่แล้ว +4

      The card pop-up at 16:08 linked to that video, in case you missed it - it's here: th-cam.com/video/ABWzKYc6UQ0/w-d-xo.html

    • @saicharan1850
      @saicharan1850 3 ปีที่แล้ว

      @@BenCloward hey got it, thanks

  • @Ruumablood
    @Ruumablood 3 ปีที่แล้ว

    My 3rd normal map makes it look weird so and i been playing with the parameters... maybe i need to switch my normal map entirely.. any one else got parameter settings for 3rd normal map?

  • @dreamsprayanimation
    @dreamsprayanimation 3 ปีที่แล้ว

    Skyrim Water

  • @seanposkea
    @seanposkea 3 ปีที่แล้ว +1

    Your tutorials are incredibly informative but your background music is incredibly annoying. You've got a great voice and amazingly interesting content. No need for the techno elevator muzak.

    • @BenCloward
      @BenCloward  3 ปีที่แล้ว

      Thank you for the feedback.