Tutorial: Improving 3D Water in Godot 4

Поділитися
Вставка
  • Опубліковано 7 січ 2025

КОМЕНТАРІ • 32

  • @flamelizard
    @flamelizard 2 роки тому +32

    Great video showcasing the power of the ProximityFade Node :D I am happy my PR comes to use

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

      I have to heartily thank you! That node made this video 15 minutes quicker! 😅

  • @Thiago-i1r7b
    @Thiago-i1r7b 2 місяці тому

    Man i was searching for this for a long time. Can't thank you enough

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

    You make the best shader tutorials. The explanations and slower pace for beginners like me is just perfect. Thank you so very much.

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

    If you don't want to use visual shaders, the gdshader equivalent of proximity fade is:
    ```
    float depth_tex = texture(DEPTH_TEXTURE, SCREEN_UV).r;
    vec4 depth_world_pos = (INV_PROJECTION_MATRIX * vec4(SCREEN_UV * 2.0 - vec2(1.0), depth_tex, 1.0) / );
    depth_world_pos.xyz /= depth_world_pos.w;
    float proximity_fade = clamp(1.0 - smoothstep(depth_world_pos.z + proximity_fade_dist, depth_world_pos.z, VERTEX.z), 0.0, 1.0);
    ```
    Where proximity_fade_dist is a tunable knob

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

    Superb way of explaining, I love the slower pace!
    I hope your channel grows fast now with all the drama around Unity and people coming to Godot in droves.

  • @thisisgood44
    @thisisgood44 7 місяців тому +1

    ur the goat, thanks bro u really helped me im new to the godot visual shader

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

    Idk if these "low" engagement ratings are telling ya this isnt worth it.. but it is, youre a brackeys level tutor making things so incredibly understandable i cant thank you enough. Ive been in godot tutorial hell and youre a light fren ❤

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

    This was super useful. I'm attempting to use this same depth of field concept to recreate brackey's tutorial force field.

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

    man you are such a genius, I'm so glad I've found your channel thanks.

  • @Jasonsumm
    @Jasonsumm 2 роки тому +1

    Fantastic work as always :) THANKS!

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

    Great tutorial thank you! May you have a tutorial on how to make waves crashing at the beach animation like in the zelda wind waker?

  • @user-rx3xl7zn1u
    @user-rx3xl7zn1u Рік тому +5

    Thank you for this tutorial. Is there a way to keep the ripple on the surface of the water instead of following the geometry below?

  • @spielville8742
    @spielville8742 2 роки тому +1

    Could you make a video about terrain generation in Godot 4? Like techniques that use blender or in-built godot functionality or plug-ins?

  • @maximiliantaubert4669
    @maximiliantaubert4669 2 роки тому +2

    I need to look at shader graphs again. Writing them by hand is still too scary but that looked way more managable 😅

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

      It's so worth it! I'm pretty much doing all my shaders with the graph now 😊

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

      You can always look at the code side-by-side and try to learn (even for simple shaders with two or three nodes). Writing this stuff in code isn't *that* hard as long as it doesn't involve all the nasty matrix multiplication etc.😉

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

    Hey I am curious, but is there any way to fade in a color as it gets closer to a mesh?
    As the ProximityFade node works on the cameras perspective and not the perspective of a point on a mesh.

  • @MoreEspresso1
    @MoreEspresso1 8 місяців тому +1

    I cant seem to find a ProximityFade node, im using Godot 4.2.2, do you know what the new node is called? (If there is one)

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

    Thanks for these water videos. I just have one question. Is there a way to change the plane size without just stretching everything? I want to be able to resize the plane and keep the same "wave density" or whatever you want to call it.
    Edit: I originally asked how to make a plane viewable from both sides. Figured I'd share in case anyone had the same question: material > shader > modes > cull - set disabled

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

    that helped. thanks you.

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

    Has anyone tried this out with a moving object such as a model of a boat? I am curious what it would look like.

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

    There's only one word for your videos: Noice! 😘👍

  • @norlagamer
    @norlagamer 7 днів тому

    how did you expand the water to the horizon? i can't do it it becomes a very big wave someone help

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

    how can i make an object bounce along with the water, like emulating byouency? (apoligies on the spelling.)

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

    i have a question, lil bit late but how did you expand the water to the horizon?

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

    Great tutorials!
    Update: this works with Beta15

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

    The proximity fade node doesn't seem to exist anymore. Maybe it has changed names?

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

      Make sure you're in Godot 4. I think it's specific to that version (don't quote me on that, though...)

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

    Wow, great tutorial! But i cant understand how to apply colour to ripples?

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

      multiply the end result of the ripples to a color i think i havent tested tho then u add that to the wave material thing

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

    was anyone able to make the shader work in and ortographic view ? ... i found some reference in the forums but wanst able to make it work ... and im way to supid to understand it yet cause the matrix bramwell talked about at the start dosnt apply to ortho as depth is different i guess ... the code i found was :
    float base_depth = getDepth(SCREEN_UV, FRAGCOORD.z, INV_PROJECTION_MATRIX);
    float surface_depth = getDepth(SCREEN_UV, texture(DEPTH_TEXTURE, SCREEN_UV).x, INV_PROJECTION_MATRIX);
    float diff = surface_depth - base_depth;
    and i think the linearSceneDepth node has something to do with it in the VS variant ... checking the code it gave something similar ... anyway if someone could help i would be very happy :)