Really appreciate these little videos. I've been working on my project for years and have a spline-based procedural river system which is an absolute nightmare - one of the biggest headaches was that overlapping polygons and whatnot of the meshes would cause artifacts cos of the translucency doubling up. Never knew about single layer water as an option, and this video made it very clear and succinct how it works - and since it's actually opaque it doesn't cause the artifacts. Of all the dev channels I follow, yours is the one that consistently helps me in my project the most, and I'm really impressed with what you've done with your own game. Thanks for this
Anyone having trouble with the refraction moving the whole plane: You need to activate "generate distance fields" in PROJECT SETTINGS, too! It is not default active in higher versions of unreal. Greetings :)
What fixed this shadow/refraction jumping issue for me was making sure whatever ground geometry is under the water plane has affect distance field lighting set to false.
For anyone coming across this video with 5.4 and doesn't see their ripples, I believe refraction is disabled by default? If it is disabled, you can search "Refraction" in the materials details panel and select "Index od Refraction" from the drop box and you should be gucci
Got a tip for you. If you use a one minus after your absorption then you can actually choose your water colour exactly in your instance, rather than always working with opposites..
Haha I love making things from scratch because it's much easier to make it do specific things, where as using the pre-existing stuff often comes with limitations since they were specifically designed for a specific use case
For me, the "DistanceToNearestSurfase" doesn't work like in the video. Whole water area just bounces. Turning "generate distance fields" on doesn't help.
If you still have some issues with the refraction, you can alternatively change Index of Refraction to Normal Pixel Offset in the material settings which distort the picture based on the normal map. It is not physicaly accurate by any means and without normal map it does nothing (not great for still water) but it does not have the weird reflection artifact near the shore. See UE4 documentation.
So glad you made this, translucency is just not very good with the cel shader and my game is stylized so I was just not going to have translucent water but this looks great and I think refraction and "translucency" will look way better in my game overall
I was in a hurry once (school deadline) and needed a shallow stream for a small ditch, which i tried to follow Ben Cloward's huge water series to do lmao, this would've been perfect to do instead... 😂 Your channel has taught me more about shaders with this little series than my school ever will tbh. (Edit: Ben's channel is great btw, just in case it came across differently)
Thank you! By the way, if you use 0 for metallic, specular and 1 for roughness, the number of instructions will be significantly reduced for stylized water
Also, only using one of Absorption/Scattering will reduce the complexity as well. Keep in mind, however, that instruction count isn't a very accurate way to measure performance of a shader since all instructions have different costs (an Add an a Texture Sample are 1 instruction each, but one may be 100x more expensive than the other)
@@albertusugd3100 700 is quite normal for a SLW shader. If you're using unreal 5 they might have changed the way the instructions are calculated (more accurate to performance etc) Feel free to chuck a screenshot in the discord :)
That tutorial is really cool but, have a lot of cut and a lot of node appears, i'm a bit lost even if i can have a good water at the end without all that new nodes
Another great video. I had water working well enough on my own, I knew Single Layer Water existed, but I never experimented with it for some reason. Thanks for showing me the possibilities :)
Refraction must go 1.33, the reason you see it wrong is because on the root is default “index of refraction” but you have to select the second option which is more fitting for larger surfaces like water
Got to say I really love your videos! It helps me a lot in learning more about everything shader related into Unreal. I was wondering how did you manage to make your foam work around your character? (9:12) I tried some stuff like adding basic static meshs onto the character bones (since distance fields doesn't work with movable meshs) but I just can't figure it out! Do you plan to do a video on that? That would be awesome! :)
Heya Victor! The foam around the character is actually a completely different system that uses a render target and a depth capture - it's the exact same method as my landscape interaction stuff. I'll be making a video on it in the future :)
@@PrismaticaDev Thanks, I'll be checking your landscapes videos and keep on trying while waiting for new content! Keep up the great work, your channel is awesome!
I did it and shared it on the discord, for anyone reading this, yes this water is cheaper than traslucent water, specially in forward rendering, and looks perfect in VR
Do you know if there's a way to tune the Fresnel angle within a material using the Single Layer Water Shader? I want my reflections to be more prominent at steeper angles of view. Love your content, btw...some of the best on YT!
For anyone who is encountering weird issues, i.e., normal maps not working, make sure you have the refraction method set to Index of Refraction in the material details.
Just wondering how you got the zeros to come up with just a click? I can't seem to find an answer online so I'm guessing it was a hotkey? Thanks in advance and I appreciate the uploads!
Dammit. Got this working because my other water material casts weird reflections. But the shadows cast on the water of SingleLayerWater can not be soft.
How would you go about adding reflections to the water? They don't work by default. The only way, as fa as I know for now, is by adding SSR reflections to your post-process volume which sadly prevents you from using Lumen reflections in your scene. Planar reflections also doesn't work on single layer water.
@@nether6209 No smart ass. There was no reflections for the single layer water. But it has been added with the latest update of the engine around a month ago. Thank me later.
@@alexanderalikin1210 ? what's the reason for rudeness? I was trying this today and your comment had no reply. You're a poor excuse of a human being. Also I have no reason to thank you.
@@PrismaticaDev It's post process but It was my bad!! I had a value 0 constant on my Base Color and my water was glowing ahaha. Sorry!! Nice tutorial, I'm learning a lot!!
Bless this comment, was having the same issue. My base color was 0, which was messing up my cel shader and making it completely dark. Setting the color to 1 caused it to glow, but then setting specular to 0 fixed it for real.
@@hugo-samson the colour of the SingleLayerWater type comes from the Absorption values, not the Base Colour. The Base Colour denotes the colour of the surface of the water
Hello - I created it in Photoshop a while ago, but there are plenty of free noises on the internet. You can also create custom noise using Quixel Mixer and other material design apps
alright video, I don't like how only half the screen is shown because at multiple points in the video I am noticing the settings of things are changing without it even being mentioned. Also, this video has a lot of add this here without even saying what 'this' is
Great content! Do you think that ~600 instructions is good? I also couldn't find a way to reduce it with dynamic water.. Also, in the last part of the video I don't know if that was the same material, but you had there 200 instruction with what seemed like the same result, how come?
Heya Mark! I wouldn’t get hung up too much on Instruction Count - it doesn’t take instruction complexity in to account so it can be quite misleading. SLW is also opaque so it doesn’t result in any overdraw/rendering pixels twice. As for the instruction difference later on, it might have been when I enabled/disabled Scattering
Just to be sure, if anyone arrives here and wonders why it doesnt work for you. There's a good chance you used a PLANE in a low poly asset pack, they consist of only 1 singular plane, not great to display textures on ;p
Unreal engine is really tough to learn, huge amount of options, I still cant get my head around it, still messing with blueprints and third person character and it seems there is override option on each screen. Give me one setting at one place lol
Great showcase for the shader model! This might be a stupid question but how did you get your character to make ripples in the water? What I have found is that a skeletal character dosen't produce a distance field?
this channel has honestly become a gold mine about niche UE4 topics and I'm here for it
Haha hope you're looking forward to more nuggets!
Really appreciate these little videos. I've been working on my project for years and have a spline-based procedural river system which is an absolute nightmare - one of the biggest headaches was that overlapping polygons and whatnot of the meshes would cause artifacts cos of the translucency doubling up. Never knew about single layer water as an option, and this video made it very clear and succinct how it works - and since it's actually opaque it doesn't cause the artifacts.
Of all the dev channels I follow, yours is the one that consistently helps me in my project the most, and I'm really impressed with what you've done with your own game. Thanks for this
Yes, it's absolutely perfect for doing things like waves and avoids overlap! I appreciate the really kind words :)
Anyone having trouble with the refraction moving the whole plane: You need to activate "generate distance fields" in PROJECT SETTINGS, too! It is not default active in higher versions of unreal. Greetings :)
Thank you Legend :>
still have flickering after i turned it on ....
What fixed this shadow/refraction jumping issue for me was making sure whatever ground geometry is under the water plane has affect distance field lighting set to false.
For anyone coming across this video with 5.4 and doesn't see their ripples, I believe refraction is disabled by default? If it is disabled, you can search "Refraction" in the materials details panel and select "Index od Refraction" from the drop box and you should be gucci
hmm this didnt work for me.
@@mehface me either
it worked for me
Press 1 and left mousebutton to create a Note. You can also use 2 or 3. In case someone didnt knew that.
thank you
Exactly this. Thanks!
my saviour!
Literally came in the comments to look for this. Life saver
thank you I actually got pissed he didn't tell how wtf he did at the second node.
Got a tip for you. If you use a one minus after your absorption then you can actually choose your water colour exactly in your instance, rather than always working with opposites..
Haha I don't know why I hadn't thought of that before!
Epic: "Check out our new water system in 4.26!!"
Charlie: "Nah, ill just make something more simple and easy while also looking awesome."
Haha I love making things from scratch because it's much easier to make it do specific things, where as using the pre-existing stuff often comes with limitations since they were specifically designed for a specific use case
@@PrismaticaDevAnd it makes it easier to adjust since you know how it was put together.
@@bobcharlotte8724 That's exactly right :) It's always worth having a go at DIY
I stumbled upon your videos recently (like a week ago) and I must say I have learnt so much :) Thank you for all of these tutorials ^^
Bro. Better results in 3 minutes than an hour and a half epic live stream. Immediate sub.
Finally i've found a great explanation how to work with single layer water, not with experimental water plugin (UE5, it's very buggy at the moment).
For me, the "DistanceToNearestSurfase" doesn't work like in the video. Whole water area just bounces. Turning "generate distance fields" on doesn't help.
I have the same issue!
select water plane and uncheck "Affect distance field lighting"
Literally how dare you be this good.
I'm sorry :((( I just have too much spare time haha
If you still have some issues with the refraction, you can alternatively change Index of Refraction to Normal Pixel Offset in the material settings which distort the picture based on the normal map.
It is not physicaly accurate by any means and without normal map it does nothing (not great for still water) but it does not have the weird reflection artifact near the shore. See UE4 documentation.
So glad you made this, translucency is just not very good with the cel shader and my game is stylized so I was just not going to have translucent water but this looks great and I think refraction and "translucency" will look way better in my game overall
Folks at the UE Streams should learn a thing or two from you. Straight to the point. No bullshit.
I was in a hurry once (school deadline) and needed a shallow stream for a small ditch, which i tried to follow Ben Cloward's huge water series to do lmao, this would've been perfect to do instead... 😂
Your channel has taught me more about shaders with this little series than my school ever will tbh.
(Edit: Ben's channel is great btw, just in case it came across differently)
Haha it's apples and oranges - there are always multiple ways to do anything! And I love Ben's videos myself, he's an incredible presenter :)
Both educational and entertaining :) Thanks Charlie!!
Haha I'm glad to hear it! You're very welcome :)
Thank you! By the way, if you use 0 for metallic, specular and 1 for roughness, the number of instructions will be significantly reduced for stylized water
In UE 5.1 you need to disable nanite for the water plane, otherwise it will cause the engine to crash
OMG! thanks :D
Thanks for heads up
Do you know if that's still an issue in 5.3? I intend on using nanite for my project if possible.
Can someone tell me how did he reduced the base pass shader count from 608 to 133 in minute 7:59?
If the opacity is a constant 0 or 1, it doesn't have to render both "versions" of the shader.
Also, only using one of Absorption/Scattering will reduce the complexity as well. Keep in mind, however, that instruction count isn't a very accurate way to measure performance of a shader since all instructions have different costs (an Add an a Texture Sample are 1 instruction each, but one may be 100x more expensive than the other)
@@PrismaticaDev can i send you a screenshot of what im working on? i still have like around 700 instructions
@@albertusugd3100 700 is quite normal for a SLW shader. If you're using unreal 5 they might have changed the way the instructions are calculated (more accurate to performance etc)
Feel free to chuck a screenshot in the discord :)
That tutorial is really cool but, have a lot of cut and a lot of node appears, i'm a bit lost even if i can have a good water at the end without all that new nodes
love the ruenscape music
I felt educational entertained. ;D Thank you for helping out! :))
0:20 cat vibing in the background
There are always cats vibing in my studio :P
Another great video. I had water working well enough on my own, I knew Single Layer Water existed, but I never experimented with it for some reason. Thanks for showing me the possibilities :)
Glad to hear it Tianni :) I think SLW was gone under everyone's radar but it's actually super useful haha
Dude, this is gold.
Great Video! Can you please make a video about flowing water like we can see in the background? 0:40
"Let's just create a plane" *drops gigantic picture of his head* love it lmao
Refraction must go 1.33, the reason you see it wrong is because on the root is default “index of refraction” but you have to select the second option which is more fitting for larger surfaces like water
Awesome 👏 can’t wait to try this out
Happy to hear it - let me know if you run in to any issues my dude :)
Fantastic video, thanks, you're a life saver!
Phase G is actually the anisotropy that controls light reflection onto the water
where did you find the texture for caustics?
When you zoomed in on the kitty… I’d subscribe to your channel a thousand times.
4:50 where can i find that caustics effects
You're covering things that I've never seen others have ever covered.
wait i could make water in 1 minute? you're awesome thanks !
Wow! I'm just desperate to know how you make the full ocean material.
the little waves on the edge of the water is there BUT its soo small idk how to make it more visible
elegantly done.
My refraction is disabled In the Mat , even with the distance field in settings ON , any ideas on how to fix it ?
What a great tutorial!
Amazing video :)
Thank you
You are incredible! very cool presentation of information, very nice to watch! thanks
Got to say I really love your videos! It helps me a lot in learning more about everything shader related into Unreal.
I was wondering how did you manage to make your foam work around your character? (9:12)
I tried some stuff like adding basic static meshs onto the character bones (since distance fields doesn't work with movable meshs) but I just can't figure it out!
Do you plan to do a video on that? That would be awesome! :)
Heya Victor! The foam around the character is actually a completely different system that uses a render target and a depth capture - it's the exact same method as my landscape interaction stuff. I'll be making a video on it in the future :)
@@PrismaticaDev Thanks, I'll be checking your landscapes videos and keep on trying while waiting for new content!
Keep up the great work, your channel is awesome!
that was an excellent video, I'm going to be testing this shader on vr with forward shading and see what happens :)
Oooh yes! Please let me know how it goes - hopefully it's a great alternative to Translucency
@@PrismaticaDev sure! I will do it today
I did it and shared it on the discord, for anyone reading this, yes this water is cheaper than traslucent water, specially in forward rendering, and looks perfect in VR
Do you know if there's a way to tune the Fresnel angle within a material using the Single Layer Water Shader? I want my reflections to be more prominent at steeper angles of view. Love your content, btw...some of the best on YT!
where di dyou get the texture sample from for the colour scale behind water bit at 4:30
It's just a cloud noise texture that I made in photoshop. You should be able to find some in the engine files :)
@@PrismaticaDev yeah I realised afterwards, I’m getting back into the whole dev thing after a pretty long break. 😅
Thanks tho
For anyone who is encountering weird issues, i.e., normal maps not working, make sure you have the refraction method set to Index of Refraction in the material details.
Amazing, as always!
Have to love the “Forest” track, one of my favorites
Just wondering how you got the zeros to come up with just a click? I can't seem to find an answer online so I'm guessing it was a hotkey? Thanks in advance and I appreciate the uploads!
Nevermind, the Unreal Engine 5 facebook group had the answer. Just hold 1 and left click the grid pattern in the material window :)
@@bronsoncjmj Was just about to answer but you've already got it! There are a tonne of useful little shortcuts like that
@@PrismaticaDev thanks!
ty for this helpful tutorial!
Awesome tutorial, thanks you :D you gained a subscriber.
Hey Charlie, how did you go about making the sparkles in your water?? I think it looks amazing and I would love to do something similar.
Very cool effect. Great work as always.
Wow thanks for the tutorial it gived a big level up to my project!!
Awesome Vid! How do I put it on the world space?
Thx
Came for shader stuff, watched the cat all along
how are you able to just bring up the parameters boxes without right clicking?? im curious of the shortcut key
1,2,3 = Constant Vectors / S and V=Parameters / A,D,M,S = Math Operations / T = Texture Sample and so on
this is exactly what i've needed thank you :')
D-Distance to nearest surface??
Dammit. Got this working because my other water material casts weird reflections. But the shadows cast on the water of SingleLayerWater can not be soft.
Thanks great tutorial as usual
No worries :) Hope you found it useful!
How would you go about adding reflections to the water? They don't work by default. The only way, as fa as I know for now, is by adding SSR reflections to your post-process volume which sadly prevents you from using Lumen reflections in your scene. Planar reflections also doesn't work on single layer water.
Specular = 1
@@nether6209 No smart ass. There was no reflections for the single layer water. But it has been added with the latest update of the engine around a month ago. Thank me later.
@@alexanderalikin1210 ? what's the reason for rudeness? I was trying this today and your comment had no reply. You're a poor excuse of a human being. Also I have no reason to thank you.
Oh wait I checked your channel and you look like a serial killer irl. No wonder.
@@nether6209 The reason for my rudeness is the fact that your answer was useless and had nothing to do with reality and with what I initially posted.
this tutorial was very useful, thanks, Gyro.
Inspiring! Definitely will tune in and try to learn.
how did you make that celshader
Check out my cel shader video :)
This foam awesome!
Thanks mate! :)
Another great video!!!
Cheers Chris! Hope you learned a new trick :)
Thank you! How do I make this work with my Celshade???
Is your cel-shader material-based or post-process based? If it's post process, it should just work by default :)
@@PrismaticaDev It's post process but It was my bad!! I had a value 0 constant on my Base Color and my water was glowing ahaha. Sorry!! Nice tutorial, I'm learning a lot!!
@@yunoswaifu Ahhh yep, that would have been causing a Divide by 0 artifact haha. Glad you fixed it! :)
Bless this comment, was having the same issue. My base color was 0, which was messing up my cel shader and making it completely dark. Setting the color to 1 caused it to glow, but then setting specular to 0 fixed it for real.
Just wondering where you got the cloud noise texture? would love to use it if thats ok? great tutorial for water:)
Im a new subscriber bc this seems like such a good game!
Thanks James
But then how do you remove the shadows on it? Cause now shadows are just cast like any opaque materials
Set the Opacity to 0. The "Opacity" means the surface opacity, not the water opacity.
@@PrismaticaDev but I use the opacity for the cusp with distance to near.. Since 0 opacity doesnt show the color, i use the distance as an alpha
@@hugo-samson the colour of the SingleLayerWater type comes from the Absorption values, not the Base Colour. The Base Colour denotes the colour of the surface of the water
question but where did you download cloud noise?
Hello - I created it in Photoshop a while ago, but there are plenty of free noises on the internet. You can also create custom noise using Quixel Mixer and other material design apps
Oh and there are a few floating around in the engine files themselves :)
How to work with Cel-Shader, it's just black?
The foam, and the green stuff being removed, are you doing that with renderTargets and SceneCapture? I love you dude, your tutorials are the best!
thaanx
thank you very much for the material)))😄
Thanks G
alright video, I don't like how only half the screen is shown because at multiple points in the video I am noticing the settings of things are changing without it even being mentioned. Also, this video has a lot of add this here without even saying what 'this' is
what about the. physic on the plane
how are you able to walk thought it like water
Where did you get the caustics noise?
and right at the second node I couldn't follow :/ wtf is the 0 node?
If you hold 1 and left click, you'll get a Constant scalar value. You can do the same for 2, 3 and 4
How do you get the sort of rainbow noise color texture for the caustics?
SO. GOOD. :D Thank you!!
Great content! Do you think that ~600 instructions is good? I also couldn't find a way to reduce it with dynamic water.. Also, in the last part of the video I don't know if that was the same material, but you had there 200 instruction with what seemed like the same result, how come?
Heya Mark! I wouldn’t get hung up too much on Instruction Count - it doesn’t take instruction complexity in to account so it can be quite misleading. SLW is also opaque so it doesn’t result in any overdraw/rendering pixels twice. As for the instruction difference later on, it might have been when I enabled/disabled Scattering
Lovely
Single layer water? Is it used for water shaders by any chance?
Hmmmm... Possibly. You never know for sure with Unreal though, right?
So cool
Just to be sure, if anyone arrives here and wonders why it doesnt work for you.
There's a good chance you used a PLANE in a low poly asset pack, they consist of only 1 singular plane, not great to display textures on ;p
That’s nice 🙂. Works with forward shading?
I THINK so, but I'm not 100% sure. It might say in the documentation somewhere but I would have to test to find out
Water water water
water water water water
Man, you are amazing. It would be very interesting if you made a waterfall.
Unreal engine is really tough to learn, huge amount of options, I still cant get my head around it, still messing with blueprints and third person character and it seems there is override option on each screen. Give me one setting at one place lol
mines all messed up, jumps around , cant get color right and its not rippling
Great showcase for the shader model! This might be a stupid question but how did you get your character to make ripples in the water? What I have found is that a skeletal character dosen't produce a distance field?
attach invisible cubes or spheres to your skeletal mesh and use those. One on each foot, one on the pelvis, and one on the chest.
I can't find the cloud texture you used, isn't it default in the engine?
Great videos