Тёмный
No video :(

So I Made A Water Shader In Godot 4 And It Was Quite Simple 

Code It All
Подписаться 3,8 тыс.
Просмотров 42 тыс.
50% 1

Making water in godot 4 is actually much simpler than you think, making it realistic, lighting and whatelese is taught in this tutorial.
• KNOWN ISSUES:
The refraction effect shown in this video is still an experiment, meaning sometimes if you put an object in front of the water you can see waves around it, the work around would be to lower the amplitude multiplier on _suv variable or just turning the effect off, it really depends on your game, however for like a small pond or surafce water this should work fine.
GDQuest's channel: ‪@Gdquest‬
You'll learn about normal maps, shaders, textures, noise, vertex shaders, fragment shaders, even if you're just starting oit on godot.
you can use this in your games or projects ( credit is appreciated ) for horror games, fps games, shooters, adventure, 3d and even 2d games.
Things We'll use in this shader:
ALBEDO
NORMAL MAP
ROUGHNESS
NORMAL
chromatic abberation
UV offseting
UV scaling
Check out my previous project ( Realistic Horror FlashLight ) :
• How To Make A Realisti...
Getting Started In Godot ?
check this out:
• How To Make A Simple F...
original godot logo in the thumbnail by Andrea Calabro, license (CC BY 4.0 International): creativecommon...
#realism #realistic #fps #godot #game #gameplay #realistic #lighting
#water #shader #programming #gdscript #tutorial #howto

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

 

24 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 93   
@Code_It_All
@Code_It_All 6 месяцев назад
PLEASE READ • KNOWN ISSUES: The refraction effect shown in this video is still an experiment, meaning sometimes if you put an object in front of the water you can see waves around it, the work around would be to lower the amplitude multiplier on _suv variable or just turning the effect off, it really depends on your game, however for like a small pond or surafce water this should work and I'll see if I can fix it in the second part. Your help would be appreciated.
@atirutwattanamongkol8806
@atirutwattanamongkol8806 6 месяцев назад
Can you up the volume in post pls I just can't 😭😭
@Code_It_All
@Code_It_All 6 месяцев назад
So sorry for the audio
@l3andfriends
@l3andfriends Месяц назад
have you found a fix to this yet?
@FriendshipMech
@FriendshipMech 6 месяцев назад
For a tutorial about something as complex as writing shaders you made this super easy and straightforward to understand. Great tutorial, I'm hoping you make that part two!
@user-qv1vl8bn2m
@user-qv1vl8bn2m 6 месяцев назад
The video is kinda quiet
@999satyam
@999satyam 6 месяцев назад
Same. I thought it was only me.
@Cunnah101
@Cunnah101 6 месяцев назад
what?
@blarvinius
@blarvinius 6 месяцев назад
Or the audio, you might say... 😊
@Xenthera
@Xenthera 6 месяцев назад
Plenty loud on my phone. Had to turn it down a bit
@timisafe809
@timisafe809 6 месяцев назад
Me when no adhd inducing video
@meccanizer
@meccanizer 6 месяцев назад
I highly recommend adding a second noise textures then blending it with the first one. Then scrolling it in the opposite direction to give the waves more life and to hide any warping. Looks much better then just using the single noise texture.
@user-ch2ou4tr1i
@user-ch2ou4tr1i 5 месяцев назад
yeah I was about to type this same piece of advice. Waves in general are always reflected off of the corners of the object containing the water. which creates and interference effect. scrolling two noises against each other mimics this.
@user-ch2ou4tr1i
@user-ch2ou4tr1i 5 месяцев назад
this same principle will give you much better water caustics as well.
@wukerplank
@wukerplank 6 месяцев назад
Thank you! Looking forward to the depth part as well 😊
@whatsupbro3
@whatsupbro3 6 месяцев назад
This video was incredible!! I've always struggled with understanding shaders, but this video actually thoroughly went through what each function and variable does. I loved this tutorial, i haven't seen anything else on youtube describe shaders in this coherent of an explanation. I'll be sticking around for part two!
@jasoniswrongabouteverythin8230
@jasoniswrongabouteverythin8230 6 месяцев назад
This video is awesome. A few months ago I spent a couple days trying to write a similar shader but it didn't really work out. This is great! And very easy to follow! You've earned a new subscriber
@635574
@635574 6 месяцев назад
Static surface normal map is kinda ugly, if you want something that appears to move youd need to blend 2 noise patterns that are in motion, IDK the details.
@Code_It_All
@Code_It_All 6 месяцев назад
I once did something similar with mix() function and switched between two noises with sine(TIME)
@havocthehobbit
@havocthehobbit 6 месяцев назад
This was great, I learnt alot. Please keep making videos , you have a style that works well
@ThalisUmobi
@ThalisUmobi 3 месяца назад
This is the most painless shader tutorial i've ever seen! So simple and direct, mostly using the editor features, no alien math involved, chef's kiss!!!
@Code_It_All
@Code_It_All 3 месяца назад
Thanks! Making it simple was the goal honestly even though it might not look the best shader out there...
@baq99
@baq99 4 месяца назад
Water highlights on the ocean floor are called caustics. Interesting stuff in ray tracing with caustics as they're incredibly difficult to simulate using rays. U and V in UV are literally X and Y in XY. Someone super clever decided to rename the axes for pixels just to confuse everyone and now we all have to write UV.x and UV.y which when you think about it is like saying XY.x and XY.y which makes no sense. Otherwise, this is a super cool video. I'm always on the lookout for new videos about water shaders and this is an excellent example. Could you do a video delving into the vertex shader next and explore something like Gerstner waves. Currently trying to export a surface approximation for a Gerstner wave algorithm for buoyancy (which is harder than you'd first imagine). I'm also trying to transition between beach waves and ocean waves as the shader detects shallow water. Also a nightmare. Great stuff though! I'm looking forward to more.
@Code_It_All
@Code_It_All 3 месяца назад
Thank you, yeah I had to approximate the caustics in a super simplified way that didn't require those stuff. As for the vertex waves I'm not sure if I can handle that yet lol, but I'm always on the lookout for new stuff...
@baq99
@baq99 3 месяца назад
What you've produced is really good and you explained everything really well. Maybe go for a sin wave next as they're a bit easier than Gerstner waves? I think the second part of the video you referenced takes you through it. Either way keep at it boss! Great content!
@yannickbovier3915
@yannickbovier3915 6 месяцев назад
Going to tinker with this right now ! Subscribed for the water depth part
@studiomalaka
@studiomalaka 6 месяцев назад
I also sometimes keep putting an "f" after float numbers like you did at 5:47! :D
@Code_It_All
@Code_It_All 6 месяцев назад
Lol
@studiomalaka
@studiomalaka 6 месяцев назад
@@Code_It_Allyears spent developing with Unity can't just be forgotten without any issues I'm afraid 🤣
@YeeDevs
@YeeDevs 3 месяца назад
besides the quiet video and the oily look to the aberration this was a rather good introduction to Shaders in Godot.
@Mcs1v
@Mcs1v 6 месяцев назад
Eyyy, you just won a subscriber with that goldsrc reference (just kidding). Keep up the good work! Back to that known issues: "if you put an object in front of the water you can see waves around it" Just pass the depth buffer too with the screen space buffer and sample from it with the calculated suv coords. If the sampled depth is bigger than the depth from the vertex shader, just skip the screen texture from the final result. Its not the best approach, but its solves the weird artifacts with the front objects. The more advanced version: do a binary search between the original screen space UV and the calculated screen space UV to find the edge of the object and use lerp to the edge (its fill up the holes with a nice transition and the holes will be less noticeable)
@Code_It_All
@Code_It_All 6 месяцев назад
Lol, thanks a lot. I played around with the depth buffer, and switched between calculated suv and original one, it kinda "works". Thanks for the tip man!
@jRsqILVOY
@jRsqILVOY 3 месяца назад
The caustics illusion is amazing for how relatively simple it is (physical simulation is very complicated).
@lossynights
@lossynights 6 месяцев назад
Thanks a bunch for this, your explanations were very helpful and the demonstrations you did were also great.
@drawmaster77
@drawmaster77 6 месяцев назад
nice tutorial. I've been using Unity for a decade, considering making a switch to Godot..
@MikeMcRoberts
@MikeMcRoberts 6 месяцев назад
Now make the water react to things in the water such as boats
@TheBendixSA
@TheBendixSA 2 месяца назад
the effect at 8:33 is called "Water Caustics" or just Caustics... not that many years ago it was all the rage, today it's taken for granted.
@leo_1487
@leo_1487 6 месяцев назад
Great video!
@Code_It_All
@Code_It_All 6 месяцев назад
Thanks!
@LukeDupin
@LukeDupin 5 месяцев назад
I want subnautica water. The uneven surface is really engaging
@Benjamin_Thio70
@Benjamin_Thio70 5 месяцев назад
just coming from the other videos, well explained... LOVE IT~
@MelideProd
@MelideProd 4 месяца назад
Thank you so much, I actually understand better shader coding thanks to this video! Also I love the little details from Godot renamed to « best engine out there » to the water mesh node called « wata », really fun !
@AlexanderPrussak
@AlexanderPrussak 6 месяцев назад
TYSM, good learning. love the jazz music
@Bread-qz3ht
@Bread-qz3ht 6 месяцев назад
Amazing tutorial, really helped me tp understand shaders more
@anthonygg_
@anthonygg_ 6 месяцев назад
You deserve 10000 times the subscribers. Good video.
@sturdyfool103
@sturdyfool103 6 месяцев назад
If you’re trying to make it look better with your caustics, you should change your chromatic aberration’s intensity based off of the water’s surface normal
@Xenthera
@Xenthera 6 месяцев назад
Just a little note, your specular highlights should be constantly changing. They’re just kind of spinning around in circles. Maybe animate the fractal noise texture?
@prathamreddyzindabad9176
@prathamreddyzindabad9176 6 месяцев назад
you earned a subscriber.
@guilllexx
@guilllexx 6 месяцев назад
Amazing content ! keep up the good work :)
@oplayer9846
@oplayer9846 6 месяцев назад
Wow shaders look like magic to me
@venetiria
@venetiria 6 месяцев назад
one of the best godot tutorıals in youtube. seviliyorsun
@WiseNoodleOfficial
@WiseNoodleOfficial 5 месяцев назад
990th sub, absolutely earned it good sir! Remember me in the future o7
@Code_It_All
@Code_It_All 5 месяцев назад
I will, Thanks for the sub!
@TheRanguna
@TheRanguna 6 месяцев назад
I don't know godot, but a way to make the water "move" when using noise textures is to increase one (or multiple) parameters on the noise function. Usually this creates a moving effect on the noise.
@Code_It_All
@Code_It_All 6 месяцев назад
You could do that in godot, and that would probably give you more unique waves 🤔
@card_craft
@card_craft 29 дней назад
How does't thou learn shader like this? This is great
@boduzapho
@boduzapho 4 месяца назад
good stuff but it does not scale up when you increase the planemesh size. I know there is a way to fix that but I am unsure how
@garffild
@garffild 5 месяцев назад
Great video! Thank you!
@rerere1569
@rerere1569 4 месяца назад
Damn thank you so much, good stuff
@CharleyDonar
@CharleyDonar 10 дней назад
THANK YOU!
@ld2studio675
@ld2studio675 6 месяцев назад
Very interesting. Thank you for sharing
@Matrox473
@Matrox473 6 месяцев назад
Nice video ! keep it up :)
@kairu_b
@kairu_b 6 месяцев назад
Nice vid!
@terrawest9500
@terrawest9500 5 месяцев назад
Thanks for this tutorial. I tried to figure out water ripples. (circles that goes and grows around an object interfering the water surface) but can't figure that out. Could you help me please?
@Code_It_All
@Code_It_All 5 месяцев назад
You are so welcome! You probably need water simulation, I think there are some tutorials for godot on youtube.
@osaid56
@osaid56 6 месяцев назад
indeed a treasure this is.
@mad_circuits
@mad_circuits 6 месяцев назад
Nice. But You have to calculte the normal map after translating the UVs. It looks kinda weird to have the highlights squeezed over the surface.
@Code_It_All
@Code_It_All 6 месяцев назад
This was my first attempt in making a water shader so yeah it's not perfect, but I'm reading more about shaders to hopefuly improve myself.
@nowherebrain
@nowherebrain 6 месяцев назад
good video, but kinda quiet..really had to crank up my headphones.
@dominobuilder100
@dominobuilder100 2 месяца назад
Nice video, but almost couldn't hear anything...
@rosiethekitty8526
@rosiethekitty8526 5 месяцев назад
i hav subscribed pls part 2
@Gureenu
@Gureenu 6 месяцев назад
yo nice video man, just a thought please increase your sounds volume in the future just a bit and two tads other then that your video was amazing and you explain things pretty well
@retrorimos5841
@retrorimos5841 6 месяцев назад
Thank you
@RussPainter8
@RussPainter8 6 месяцев назад
Seems good. But i couldn't bear the music.
@ayzhol9620
@ayzhol9620 Месяц назад
Niiiiice
@cycomkid
@cycomkid 4 месяца назад
Good
@zherka_pill
@zherka_pill 6 месяцев назад
increase audio
@SvenHeidemann-uo2yl
@SvenHeidemann-uo2yl 6 месяцев назад
Not Bad 👍
@minnoxzmozzesmx8915
@minnoxzmozzesmx8915 5 месяцев назад
audio too low
@simpson6700
@simpson6700 6 месяцев назад
wow another perlin noise water tutorial...
@jasonwilliams8730
@jasonwilliams8730 6 месяцев назад
👍
@kvdrr
@kvdrr 6 месяцев назад
its called caustics
@Code_It_All
@Code_It_All 6 месяцев назад
Hmm thanks for the info!
@ভোমরা
@ভোমরা 5 месяцев назад
godot
@bagboybrown
@bagboybrown 6 месяцев назад
Quiet AF. That's unfortunate, I was kinda interested in this.
@hldfgjsjbd
@hldfgjsjbd 5 месяцев назад
Thumbnail is misleading, it doesn’t look even close. Also, that is not water, that’s some kind of jelly
@Code_It_All
@Code_It_All 5 месяцев назад
The thumbnail was made using this water shader, adjust color slider untill you get rid of transparency, also there was some other light sources in my scene.
@Darkstrawberry15
@Darkstrawberry15 5 месяцев назад
@@Code_It_All As some other people have pointed out, the reason it looks like jelly instead of fluid is because the noise is warping but staying in the same shape and location. To give a better illusion of a liquid surface the noise itself should be animated instead of just the UVs.
@MerlasPaul
@MerlasPaul 5 месяцев назад
yeah its easy to build shit, its hard to make it realistic :)
Далее
The biggest lie in video games
15:18
Просмотров 1,8 млн
I Made An Endless Ocean in Godot 4
8:40
Просмотров 36 тыс.
SPONGEBOB POWER-UPS IN BRAWL STARS!!!
08:35
Просмотров 10 млн
Yana bir yangi qo'shiq YORAM BIYO | Yaqin kunlarda
00:57
Jiggle Physics in Godot
13:31
Просмотров 75 тыс.
Damascus Steel From Stick Welding Electrodes
14:15
Просмотров 650 тыс.
I Tried To Beat Minecraft Backwards
18:53
Просмотров 1,4 млн
These awesome 3D games are made in Godot
5:40
Просмотров 115 тыс.
How Games Fake Water
22:52
Просмотров 203 тыс.
5 Games Made in Godot To Inspire You
4:14
Просмотров 56 тыс.
Pretty Much Everything About GPUParticles in Godot 4
24:13
SPONGEBOB POWER-UPS IN BRAWL STARS!!!
08:35
Просмотров 10 млн