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.
@atirutwattanamongkol880611 ай бұрын
Can you up the volume in post pls I just can't 😭😭
@Code_It_All11 ай бұрын
So sorry for the audio
@l3andfriends6 ай бұрын
have you found a fix to this yet?
@user-og6hl6lv7p4 ай бұрын
You need to create an occlusion mask to find objects that are in front of the water. Then you need to fade the edges of the mask, so when the refraction hits the edge of the mask the fade will reduce it's effects, so objects that are in front of the water plane are not distorted around it's edges.
@whatsupbro311 ай бұрын
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!
@meccanizer11 ай бұрын
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.
@ColinFreeman-c4f11 ай бұрын
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.
@ColinFreeman-c4f11 ай бұрын
this same principle will give you much better water caustics as well.
@jasoniswrongabouteverythin823011 ай бұрын
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
@wukerplank11 ай бұрын
Thank you! Looking forward to the depth part as well 😊
@Jun-o3l6t11 ай бұрын
The video is kinda quiet
@999satyam11 ай бұрын
Same. I thought it was only me.
@Cunnah10111 ай бұрын
what?
@blarvinius11 ай бұрын
Or the audio, you might say... 😊
@Xenthera11 ай бұрын
Plenty loud on my phone. Had to turn it down a bit
@timisafe80911 ай бұрын
Me when no adhd inducing video
@FriendshipMech11 ай бұрын
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!
@havocthehobbit11 ай бұрын
This was great, I learnt alot. Please keep making videos , you have a style that works well
@joejeojoe-l5kАй бұрын
Thanks for such a clear and detailed tutorial!
@studiomalaka11 ай бұрын
I also sometimes keep putting an "f" after float numbers like you did at 5:47! :D
@Code_It_All11 ай бұрын
Lol
@studiomalaka11 ай бұрын
@@Code_It_Allyears spent developing with Unity can't just be forgotten without any issues I'm afraid 🤣
@ThalisUmobi8 ай бұрын
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_All8 ай бұрын
Thanks! Making it simple was the goal honestly even though it might not look the best shader out there...
@yannickbovier391511 ай бұрын
Going to tinker with this right now ! Subscribed for the water depth part
@lossynights11 ай бұрын
Thanks a bunch for this, your explanations were very helpful and the demonstrations you did were also great.
@anthonygg_11 ай бұрын
You deserve 10000 times the subscribers. Good video.
@Gureenu11 ай бұрын
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
@MelideProd10 ай бұрын
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 !
@Mcs1v11 ай бұрын
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_All11 ай бұрын
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!
@Benjamin_Thio7011 ай бұрын
just coming from the other videos, well explained... LOVE IT~
@KunyeeFilms8 ай бұрын
besides the quiet video and the oily look to the aberration this was a rather good introduction to Shaders in Godot.
@laujimmy92823 ай бұрын
Amazing tutorial, thank you
@leo_148711 ай бұрын
Great video!
@Code_It_All11 ай бұрын
Thanks!
@TheBendixSA8 ай бұрын
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.
@AlexanderPrussak11 ай бұрын
TYSM, good learning. love the jazz music
@Bread-qz3ht11 ай бұрын
Amazing tutorial, really helped me tp understand shaders more
@63557411 ай бұрын
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_All11 ай бұрын
I once did something similar with mix() function and switched between two noises with sine(TIME)
@guilllexx11 ай бұрын
Amazing content ! keep up the good work :)
@Xenthera11 ай бұрын
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?
@sjfsr5 ай бұрын
The gpu image, omg what a powerhouse. I think my first agp gpu was similar in size
@venetiria11 ай бұрын
one of the best godot tutorıals in youtube. seviliyorsun
@jRsqILVOY8 ай бұрын
The caustics illusion is amazing for how relatively simple it is (physical simulation is very complicated).
@baq999 ай бұрын
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_All9 ай бұрын
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...
@baq999 ай бұрын
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!
@TheRanguna11 ай бұрын
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_All11 ай бұрын
You could do that in godot, and that would probably give you more unique waves 🤔
@sturdyfool10311 ай бұрын
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
@rerere156910 ай бұрын
Damn thank you so much, good stuff
@Matrox47311 ай бұрын
Nice video ! keep it up :)
@oplayer984611 ай бұрын
Wow shaders look like magic to me
@MikeMcRoberts11 ай бұрын
Now make the water react to things in the water such as boats
@ld2studio67511 ай бұрын
Very interesting. Thank you for sharing
@drawmaster7711 ай бұрын
nice tutorial. I've been using Unity for a decade, considering making a switch to Godot..
@garffild11 ай бұрын
Great video! Thank you!
@boduzapho9 ай бұрын
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
@kairu_b11 ай бұрын
Nice vid!
@osaid5611 ай бұрын
indeed a treasure this is.
@WiseNoodleOfficial11 ай бұрын
990th sub, absolutely earned it good sir! Remember me in the future o7
@Code_It_All11 ай бұрын
I will, Thanks for the sub!
@card_craft6 ай бұрын
How does't thou learn shader like this? This is great
@mad_circuits11 ай бұрын
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_All11 ай бұрын
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.
@terrawest950011 ай бұрын
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_All11 ай бұрын
You are so welcome! You probably need water simulation, I think there are some tutorials for godot on youtube.
@LukeDupin11 ай бұрын
I want subnautica water. The uneven surface is really engaging
@dominobuilder1008 ай бұрын
Nice video, but almost couldn't hear anything...
@retrorimos584111 ай бұрын
Thank you
@rosiethekitty852611 ай бұрын
i hav subscribed pls part 2
@nowherebrain11 ай бұрын
good video, but kinda quiet..really had to crank up my headphones.
@SvenHeidemann-uo2yl11 ай бұрын
Not Bad 👍
@RussPainter811 ай бұрын
Seems good. But i couldn't bear the music.
@cycomkid10 ай бұрын
Good
@kvdrr11 ай бұрын
its called caustics
@Code_It_All11 ай бұрын
Hmm thanks for the info!
@minnoxzmozzesmx891511 ай бұрын
audio too low
@ayzhol96206 ай бұрын
Niiiiice
@zherka_pill11 ай бұрын
increase audio
@jasonwilliams873011 ай бұрын
👍
@bagboybrown11 ай бұрын
Quiet AF. That's unfortunate, I was kinda interested in this.
@CharleyDonar5 ай бұрын
THANK YOU!
@hldfgjsjbd11 ай бұрын
Thumbnail is misleading, it doesn’t look even close. Also, that is not water, that’s some kind of jelly
@Code_It_All11 ай бұрын
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.
@Darkstrawberry1511 ай бұрын
@@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.
@simpson670011 ай бұрын
wow another perlin noise water tutorial...
@ভোমরা11 ай бұрын
godot
@MerlasPaul11 ай бұрын
yeah its easy to build shit, its hard to make it realistic :)