Тёмный

Tutorial: Improving 3D Water in Godot 4 

Bramwell
Подписаться 18 тыс.
Просмотров 18 тыс.
50% 1

Today I'm expanding on my previous water tutorial to use depth textures to make the water ripple around meshes that intersect it!
Check out part 1 here: • Tutorial: Simple 3D Wa...
This tutorial is using Godot 4 Beta 6 with no extra material needed, but you can find the project files on Github here:
🎁 Source code available on Github here: github.com/bramreth/Godot4Wat...
📰 Check out my Godot 4 course here! bramwell.itch.io/godot-4-begi...
✨ Socials ✨
🐦 Twitter: / bramreth
💬 Discord: / discord
☕ Buy me a coffee: www.buymeacoffee.com/bram
🎮Games: bramwell.itch.io/
🕺TikTok: / bramreth
🤖 The sixth beta release for Godot 4 I used in the video is here: downloads.tuxfamily.org/godot...
Chapters:
00:00 Intro
00:42 Setup
01:32 Proximity Fade
03:11 Masking
05:00 Example Ripples
05:38 Sin Waves
08:52 Adding A Minimum
10:36 Customizing Sin
14:36 Further ideas
15:21 Godot 4 Beginners
#Godot4 #GodotEngine #Gamedev

Опубликовано:

 

21 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 27   
@flamelizard
@flamelizard Год назад
Great video showcasing the power of the ProximityFade Node :D I am happy my PR comes to use
@BramwellWilliams
@BramwellWilliams Год назад
I have to heartily thank you! That node made this video 15 minutes quicker! 😅
@alek2341
@alek2341 Год назад
You make the best shader tutorials. The explanations and slower pace for beginners like me is just perfect. Thank you so very much.
@derelicts9503
@derelicts9503 10 месяцев назад
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.
@Jasonsumm
@Jasonsumm Год назад
Fantastic work as always :) THANKS!
@stevenlandow7372
@stevenlandow7372 Месяц назад
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
@thisisgood44
@thisisgood44 Месяц назад
ur the goat, thanks bro u really helped me im new to the godot visual shader
@hawkgamedev
@hawkgamedev 9 месяцев назад
man you are such a genius, I'm so glad I've found your channel thanks.
@DriftWare
@DriftWare 4 месяца назад
This was super useful. I'm attempting to use this same depth of field concept to recreate brackey's tutorial force field.
@user-rx3xl7zn1u
@user-rx3xl7zn1u Год назад
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 Год назад
Could you make a video about terrain generation in Godot 4? Like techniques that use blender or in-built godot functionality or plug-ins?
@dueddel
@dueddel Год назад
There's only one word for your videos: Noice! 😘👍
@thoughted6069
@thoughted6069 3 месяца назад
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.
@brunch1572
@brunch1572 7 месяцев назад
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
@MikeMcRoberts
@MikeMcRoberts 2 месяца назад
Has anyone tried this out with a moving object such as a model of a boat? I am curious what it would look like.
@DaveyGame
@DaveyGame 6 месяцев назад
how can i make an object bounce along with the water, like emulating byouency? (apoligies on the spelling.)
@ferdeboergd256
@ferdeboergd256 Год назад
Great tutorials! Update: this works with Beta15
@maximiliantaubert4669
@maximiliantaubert4669 Год назад
I need to look at shader graphs again. Writing them by hand is still too scary but that looked way more managable 😅
@BramwellWilliams
@BramwellWilliams Год назад
It's so worth it! I'm pretty much doing all my shaders with the graph now 😊
@Smaxx
@Smaxx Год назад
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.😉
@blba2
@blba2 Месяц назад
i have a question, lil bit late but how did you expand the water to the horizon?
@MoreEspresso1
@MoreEspresso1 2 месяца назад
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)
@smorty3573
@smorty3573 Год назад
The proximity fade node doesn't seem to exist anymore. Maybe it has changed names?
@JoshSauder
@JoshSauder 6 месяцев назад
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?
@DaveyGame
@DaveyGame 6 месяцев назад
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 :)
Далее
Lessons from 1 Year in Godot 4
11:33
Просмотров 32 тыс.
Tutorial: Simple 3D Water in Godot 4
22:03
Просмотров 37 тыс.
Hamster Kombat 20 July Mini Game
00:13
Просмотров 10 млн
2DROTS vs WYLSACOM! КУБОК ФИФЕРОВ 1 ТУР
07:25
How to Make 3D Fractals
7:48
Просмотров 1,6 млн
How You Can Easily Make Your Code Simpler in Godot 4
6:59
Immersive Sim in Godot 4: COGITO - Overview
8:22
Просмотров 35 тыс.
All about Fog Shader in Godot 4.0
18:25
Просмотров 7 тыс.
Tutorial: Stylized Grass in Godot 4
39:26
Просмотров 33 тыс.
Making a Spaceship in 1 hour vs 10 hours vs 100 hours
22:18
Godot 4 - Online Multiplayer FPS From Scratch
45:40
Просмотров 224 тыс.
ROCKET that LITERALLY BURNS WATER as FUEL
19:00
Просмотров 1,3 млн