*Poll time!* Have you tried the Boat Attack demo before? Let us know 👇 Also, the fuller and more complex (original) version of this water is included in the demo! Download Boat Attack here: on.unity.com/2O2GbYl
For anyone wondering how to enable Depth Texture and Opaque Texture, at least on 2019.4.4f1 that setting was moved to be under the UniversalRenderingPipelineAsset on the inspector -- NOT under Project Settings.
If anyone is having issues where the plane becomes 100% transparent after the step of adding the split node to the lerp node, and then adding the alpha of the split to the PBR Master Alpha. Check your color's alphas. I set my colors, but I assumed the alpha would default to 1. They defaulted to zero, which force me to trouble shoot for a while. Set them to around 50% or something above 0.
@@romanelbr6851 Hi, in the video, we add two color properties named: "Deep Water Color" and "Shallow Water Color", it was these colors that had defaulted the alpha to 0 for me. You should be able to change them in the inspector. Just FYI, in the most recent version of Unity has replaced the PBR Master shader with the Lit shader under Universal Render Pipeline -> Lit Shader, or HDRP -> Lit Shader.
If you are having a problem with depth textures not showing up in the game view, go to your camera settings and in the rendering settings, set both Depth Texture and Opaque Texture to 'On'.
This is nice and all, but more people would benefit from this if you explained what you were doing. You're just adding nodes without really explaining why this particular one is used etc. I wouldn't call this a tutorial, it's more of a recipe you follow blindly. Maybe there's other tutorials out there going over what the nodes do in detail and such. I think it would be a good idea to have tutorials going over common tricks and principles used in shaders. Like the depth check here which I bet is used to achieve other effects as well. Then in the end of each video you challenge viewers to create their own shader using that particular trick (maybe it's a bit much to ask out of free content though). I've linked a few resources in a reply to hos comment.
There are plenty of tutorials explaining each and every node, so it would've been detrimental to explain absolutely everything there is to know about the noise node in this tutorial about making water.
What's funny is that they didn't bother to explain the clip vs screen space transformations but they did explain "In shaders, 0 is black and 1 is white..."
The video title don't say anything about tutorial. It says Making a water shader in Unity. It doesn't talk about any tutorial, just how to create a water shader. If you expect a tutorial, just search for another video
If you're having trouble with scene looking flushed out by light, disable bloom and tone mapping in the global volume object that comes default with URP project.
Ok so I tried to understand what was happening here by doing some research. Fair warning, this may be all wrong: The scene depth gives the normalized distance between the camera and the current point on the material surface, so a 0-1 value. This is then multiplied by the camera far plane (the distance between the camera and the farthest rendered surface point in the view in world units) which gives the non-normalized scene depth value. I don't know if my understanding is right since setting the scene depth to raw instead of linear should give the same value without the hassle, so it's probably wrong (maybe the scene depth actually starts at the near plane instead of the camera location). The raw screen position's alpha value (the w component), if I understand right, is the the depth value of the surface point in camera space before perspective projection. Subtracting this from the scaled scene depth should give a value which starts at 0 (not factoring in the depth offset scalar) at the camera near plane (the distance between the camera and the closest rendered surface point) and also ends at 0 at the camera far plane but is the largest in between somewhere depending on the FOV and clipping distance. I guess this mask can be used to make the water transparent around where the camera is looking but is more opaque if the distance from the camera is too close or too far. To have more control over this falloff, a depth offset scalar is used. Anyone can feel free to correct me on anything I got wrong.
It seems that Unity is going for Z being the vertical 3d axis in Shader Graph now, so if you have troubles with generating waves by displacement on recent engine versions, make sure you are connecting the Combine node to the B(lue) input, not the G(reen)
Thank you for taking the time to make a tutorial, appreciate it a lot. I'm a fairly new Unity user and considering the description of this tutorial it ought to be meant for me. :) But I'm having terrible problems following the not explained quick clicks and selections "all over the place". I am aware not everyone is pedagogically inclined but if Unity want people to learn the procedures I would suggest putting more effort in the "for dummies" tutorials. On top of the above it seem to be outdated when using 2020.x. So maybe update it or mention the versions it applies to? Just my 2 cents. :-)
Sadly you probably won't get much as far as explanations go in these video's. If your looking to understand it you may need to learn how to write your own shaders in code.
If you are struggling to get the alpha to work, a workaround is to take the output of the clamp into a separate add node, add a small amount like 0.5 then use that as alpha input. This essentially uses the gradient seen near the beginning with a little added to prevent it being fully transparent (invisible) near the water line.
I've looked through a couple of water shaders in past and this is the one with the best outcome. But as others already have pointed out: it is not really a tutorial. More explanation and the slower talking would be nice. Besides that it would be awesome if you could add the normal maps.
i dont see any "create ---->PBR graph" for my project. I've already upgraded to urp... im using unity 2020.3.2f1 Had to use shader ---> lit and instead of vector 1 (I used float) and instead to finally put the whole nodes to the albedo i placed it to the base color....and it doesnt work
Excuse me are you using the same Unity version as in the tutorial? Cause i'm on Unity 2022.3.12f1 and frankly can't even start following this tutorial cause it looks like it's completely obsolete. How did you manage to follow through?
Shaders are truly a messed up topic, and writing shaders before Shadergraphs implementation was a pain in the a**. Don't try to learn too much about it, just hop into Shadergraph and play around with all these nodes until you're happy with the result :D
2:32 My plane is still the default grey. Anyone know what I missed? Ive been rewatching the first portion of the video trying to figure it out on my own but Im not noticing anything wrong. My plane has the material using the shader. Edit: NVM, After some googling, I found out you have to click save asset in the top left. I thought ctrl + s would save it but I guess not.
I can't get to the Quality settings for Depth and Opaque textures, I did turn them both on in my universal render pipeline asset but theyre not allowing me to change the depth of the material in the editor
For those of you who are tryna find that extra subdivisions plane, Go to blender create plane and add subdivision from right properties tab. Do a little research on it.
To get one with the same topology used in the video that deforms a little better: 1. Subdivide a number of times and apply. 2. Go to edit mode and select all faces. 3. Use Selection > Checker Deselect and then Face > Triangulate Faces. Use "Quad Method: Fixed" in the options. 4. Use Selection > Invert and then Face > Triangulate Faces. This time use "Quad Method: Fixed Alternate".
If Depth colors are not showing go into graph setting in the graph inspector go to universal and surface type to transparent then in your material tab open the color and increase alpha its defaultly set to 0 for some reason. hope it helps i thought my unity is broken
Some issues I had and how i resolved them with HDRP 2020.2.1f1. I couldn't find Depth texture or opaque texture anywhere in project settings or HDRP asset inspect settings. So select the water material and change the surface type from opaque to transparent. The PBR shader graph option doesn't exist, instead create shader->HDRP->decal shader graph and set the material from decal to lit in the graph inspector graph settings window. When following video, vector1 isn't a thing but a create a float value instead and change its value in graph inspector.
wow, I´m having the issue. Thanks! So, where do I find this Graph Settings Window? And, instead of Albido, which option should I connect in the Decal Master Node?
okokok I got It! Instead of Clamping the final Depth values into the Albido, you should use the "Smooth Step" node. That works for me like magic. Everything else is exactly the same, just add this Smooth Step Node right before the Albido channel (instead os using Clamp).
Only 2 months have passed and this tutorial already needs to be updated for new versions, I can't find where to change the depth of my material, having activated those options in my URP Asset. I'm using the 2020.1
Make it in Blender: Open Blender. Get rid of the cube. Shift+A, add a plane mesh. With the plane highlighted, go into edit mode (tab). Right-Click, click subdivide. In the subdivide tab that'll show up, specify how many you want (I believe in this video it's around 81, based off another comments answer). Export your mesh and put it into Unity.
I love these tutorials click in "unexisting button" that only appear if you install an obscure package that we will never tell you where to find or what its called. after that the tutorial is just super easy!
Any idea how to get this to work in VR (SinglePass)? I don't see any shine or ripples, its just a smooth blue plane that wiggles. This is my 4th attempt/asset, why is water so hard to get to work in VR?
can I know what are the assets used in this video can anyone provide the link here??? I don't want to work on the boat attack demo I want to start from scratch that's why I am asking for the water textures and all(assets)??? if possible please provide a link for the asset
thanks this was helpful even in 2020.3+, once i got urp from the package manager and found the prperties and settings in the shader settings(top right) i was able to follow this video and get a very similar result, i did however have to review a couple times and flip the plane on one axis but this worked quite well
As a Unity Developer who is not interested in shaders & in copying all the steps in this tutorial, Can I find this Water Shader file separately with the Subdivided Plane Mesh ? If someone can drop a link I would be grateful! Thanks in advance
no início a água não se moveu, então eu fiz o que você disse, conectar a saída do multiplicador ao B do combinado. a água se movia, mas achatando e comprimindo. de um lado para o outro em vez de cima para baixo
at 2:34 mine is just pink, not the same as what it shows here EDIT: I switched to URP because I was using HDRP and it works now i dont see the gradient on the plane, but i do see a gradient on the material ball thingy sus shape idk unity's left ball or something i just realized thats because there is nothing under the plane since its the middle of the ocean so that means it works
This is super fast and well made, I’m going to have to rewatch many time possibly at half speed till I follow completely along and get it, but I do think it’s a great help and leap from where I was thinking I was at in my concept project. Before learning about water shaders I actually thought I was going to have to make an entire fluid simulation just for a small ocean scene I have an idea for.
4 ปีที่แล้ว +1
Is it fast? yes, is it well made? absolutely not, this guy in the tutorial actually has no idea what he is doing. please don't go over and over doing what he did, because is wrong. Don't ever add two normal maps together like that, you will end up messing all the light speculars direction on the surface, look at the water with a critical mind and see at 8:00 how the whole reflections are messed up. in shader graph there is a node called "Normal Blend" (if im not mistaken) which does what the guy in the tutorial poorly tries to do, just use that instead, or if you still want to follow this guy's approach, after adding one normal map to the other, split the result and cancel the blue (B) channel, or just normalize it, then combine all the channels again.
That's absolutely normal. It's just a plane and not a water tight mesh. Also, it's a surface shader and not a volume shader. So as soon as you are inside of a mesh, you don't see it anymore. Surface shaders are only rendering the surface of a mesh but nothing inside of it. The depth is just faked with the z buffer. Perhaps you could use a post processing volume with fog that is everywhere under the surface of the water. But I think then it would look like the atmosphere is full of water too, when you're under water and look up. Perhaps it would be possible make another shader that is used for a second plane which is also at the level of the water surface, just flipped upside down. Perhaps with another calculation with the z buffer it would be possible to calculate how much water and how much air is between the camera and the first opaque object or the sky.
@@ernestnovakhov I'm also thinking about trying out Unreal, just for other reasons. But this is the first time I hear someone say Unreal is more beginner friendly than Unity. Usually, it's the other way around. You shouldn't make the mistake, especially as a beginner, to make the conclusion any software is too complicated after you run into the first problem you can't solve right away, while it works fine in other software. In other cases, it might be the other way around. The question is not if Unreal or Unity is better or more beginner friendly. This is about choosing the right tool for the job. So the best idea would be to learn Unity AND Unreal. The fact that it was much simpler in Unreal to achieve what you want, might mean that, under the hood without knowing, you're just throwing much more processing power on your game and call it a day. But that would be completely against the idea of the Universal Render Pipeline. This video is about doing it in the Universal Render Pipeline, which was formerly called Lightweight Render Pipeline. With your resources in mind, you want to fake as much as possible to reduce the requirements on the hardware. Unfortunately, that also means that, depending on what you do, you're breaking the illusion. In this case, you shouldn't put the camera under water. Fortunately, as a game developer, you have full control over what the user can do and what not (that's really a problem with VR, because as a developer, you're loosing direct control over player movement). This tutorial was made with the tech demo for the Universal Render Pipeline, which is a racing boat game. That's a game where you don't need the camera to be under water, so you just code the game in a way that the camera stays over the water all the time. This way you're saving resources (instead of just using a volume shader) but you make sure the user never breaks the illusion.
@@juschu85 it's honestly easier and I find that there are more tutorials to things I want to know in order to build my game , there isn't as much free available assets like with unity store but it'll have to do because in unity the simplest things are over complicated
Im still using unity 2018, and trying to use a tutorial that explains better for someone who is new and wants to get involved using unity. the version I'm using doesn't even have that shader pbr graph, nor do I understand how to get more subdivision. I also cant upgrade to the newest unity version cause vrchat is far behind on their unity version
Not sure if i have something configured differently as I did change some steps, however when I reached the step where the combine node is used for displacing the vertices, the Green input does not appear to correspond with the Y direction in Unity. For me it was the Blue. Again I did some things differently for my shader, but thought I would share. One more thing, this probably depends on your mesh/scale, but .5 was way too high for my displacement value.
I need some help here.. I try to follow the tutorial but I first have the problem that I don't get the Depth option even thou I enabled the Depth and Opaque in the URP asset. When I open the PBR shader I get the error: "The active master node is not compatible with the current render pipeline....". I did assign the UniversalRenderPipelineAsset to Project Settings > Quality > Rendering. If I keep following the tutorial everything looks completely different than in the tutorial (Black like it is invisible). Can anyone help me out please? I can't find anything on Google about this.
@@zeus9834 did you find the normal map textures?? I also tried finding them but couldn't find anywhere. I need that normal map textures. Please help me 🙏
nah I got simpler, just put probuilder in package manager and create a plane using that tool, there are probuilder tutorials out there. Moreover, you just increase the amount of verteses on that plane and voila
Okey i have question. Why my water shader is pink . At the start i greated it, its pink. I used the colors and textures but its sitll pink. Pls answer, i need to know.
This video would be way more useful to new comers if you actually explained what each node was, and why you were doing it. like others have said this is more just a showcase of you quickly putting together a basic shader, not explaining what's going on and then saying if we want to learn more just look at a already complete shader, sure people may learn it eventually but making a 'tutorial' this way is kinda counter intuitive and leaves people with not much more understanding about shaders than before they viewed the video. it would be nice if unity provided something that when through and explained some major concepts with shaders and nodes and showed examples of the types of things they could achieve with them, we would benefit much more with tutorials like that.
Nice tutorial. Has anybody an idea how to get the "height of a wave"? For exampe that the balls in the water moves up and down depending on water height under it. Is it possible to e.g. update a collider with the changed mesh?
Edit > Project Settings > Graphics, at the top where it says "Scriptable Render Pipeline Settings", Click on the URP asset that is added there, and it will highlight the asset somewhere in your project's folder, then click on that asset, and you'll see the settings.
Hello,Official, a great introduction and a great demo, but could your guys please share the doulbe normal textures(middle version)and noise as well, everyone need these but not the final dummy project...
If anyone else has the problem where the plane goes invisible after attaching the split node to the lerp node, but fixing the alpha in the shader graph doesn't work: you have to fix the alpha in the inspector, not the shader graph. for some reason, if you set the alpha inside the shader graph, it doesn't actually translate to the material in the scene. no idea why lol but that fixed it for me
i've done this exactly as the video ( had to use Lit shader though as PBR no longer available ), and on the last step, add the noise/time displacement asks to the vertices positions of the master node, messes up my mesh. Anyone else have this issue? EDIT: it is something to do with the displacement value.
@@zeramino as being a c++/java/c# programmer, i also felt that too and all because i have no experience using bolt or visual scripting. They do know that their community is full of programmers but doing this for artist is just dumb, c# is an okay language as it's not too nightmarish as c++ was.
@@graphitic5578 you can be the best programmer out there but this still is better if you want to do something quick. Programming shaders from scratch takes a lot longer
@@Rioni that is right but using visual scripting is an organizing mess and for coding is efficient because there's something called comments. But srsly im not explaining about youtube comments but like the comments feature in some programming languages.
@@graphitic5578 I know what comments are, I'm a student and I'm learning C# I know what you mean but comments are not really necessary here. They are helpful and I would like to have some kind of comments but knowing what each node does and seeing the shader working can give you an idea. Organizations of the nodes depended of you. It's just rearrange them so they are organised.
@@muskydev thanks so much, I did feel it lacking some things. I was really new to unity at the time - still am. I plan on trying this again soon. thing I struggled with most was that water asset, do you know where I can find a good one?
How in the world do you learn this, how do you come to the realization of needing those boxes? is this a process of experimenting and testing? I'm just starting with Unity and shaders have always messed with my head.
zeramino There lots of node tutorials for Blender which uses the same pbr based workflow as this, once you get your head around it, the basic concepts, you can just transfer the skills from one software to the other, Substance Designer is also the same, it’s just a bunch of math encapsulated in nodes
After adding the strength property and clamp and multiplication nodes, the shader material just turns into a dark grey in the editor view, and off white in the game view. I don't know why the clamp and multiply nodes are messing this up.
May i suggest going to package manager and importing ProBuilder. Then under tools you can Builderize selected objects which then allows you to subdivide them. OR use pro builder window to create a primitive, change to plane and set the vertices
I found it very handy if you assign Vector2 nodes to the tiling input of each Tiling and Offset node of the respective Normal node, so that you can control the main and secondary Normal Tiling from the Inspector. You can similarly do so with Vector1 (or Float in newer versions) for the Normal Speed. Over all excellent tutorial but as many mentioned, it needs to slow down a tiny bit and maybe give some links to the Normal Maps :)
A criminally underrated comment right here. For other newbies like me, create 2 floats for the X and Y using the "+" icon. That way the floats are public. And then assign the same X float to the X value of the Tiling and Offset node for both the first and second normal maps. And then apply the Y float you created to the Y input of both the Tiling and Offset nodes. You can then tweak the numbers in the inspector
Unity: You need a plane with more subdivisions *doesn't provide plane with more subdivisions or teach you how to make them Unity: Are you still watching idiots?
*Poll time!* Have you tried the Boat Attack demo before? Let us know 👇
Also, the fuller and more complex (original) version of this water is included in the demo! Download Boat Attack here: on.unity.com/2O2GbYl
No, i haven't. But i will now, after seeing this!
Plz make a mobile version of unity;-;
No, My pc is too bad for URP but one day i will try it :D
Next Tutorial On URP Gradient Fog !!!
PLEASE MAKE TUTORIAL ABOUT SAND
For anyone wondering how to enable Depth Texture and Opaque Texture, at least on 2019.4.4f1 that setting was moved to be under the UniversalRenderingPipelineAsset on the inspector -- NOT under Project Settings.
Dude you just make my day jajajaja, i was looking for the options in the project settings like 1 hour....
Thanks!
This needs to be pinned!
Depth was looking good in my viewport but broken using the game camera. This tip fixed the problem. Thanks!
@@gr8m8n8 After doing the shader graph nodes, click save asset in the upper left corner. @2:29 Worked for me, I didn't see him do it the first time.
If anyone is having issues where the plane becomes 100% transparent after the step of adding the split node to the lerp node, and then adding the alpha of the split to the PBR Master Alpha. Check your color's alphas. I set my colors, but I assumed the alpha would default to 1. They defaulted to zero, which force me to trouble shoot for a while. Set them to around 50% or something above 0.
Thank you! Such kind souls in the comment section on educational youtube
Thank you. You saved my time
Saved me man!,I was about to just give up after troubleshooting a whole lot.
I'm sorry but where do you find the color's alphas ?
@@romanelbr6851 Hi, in the video, we add two color properties named: "Deep Water Color" and "Shallow Water Color", it was these colors that had defaulted the alpha to 0 for me. You should be able to change them in the inspector. Just FYI, in the most recent version of Unity has replaced the PBR Master shader with the Lit shader under Universal Render Pipeline -> Lit Shader, or HDRP -> Lit Shader.
If you put it at .25x speed, you can almost see what he's doing. XD
exactly!
LOL. I thought I was fairly intelligent and then I watched this video.
What the heck this is a completely normal video?
You could also just look up a better step by step video of this since this is a clearly an overview and not meant to be step by step
😂😂😂
If you are having a problem with depth textures not showing up in the game view, go to your camera settings and in the rendering settings, set both Depth Texture and Opaque Texture to 'On'.
Saved my day. Thanks a lot!
You're a hero. Thanks!!
This is nice and all, but more people would benefit from this if you explained what you were doing. You're just adding nodes without really explaining why this particular one is used etc. I wouldn't call this a tutorial, it's more of a recipe you follow blindly. Maybe there's other tutorials out there going over what the nodes do in detail and such.
I think it would be a good idea to have tutorials going over common tricks and principles used in shaders. Like the depth check here which I bet is used to achieve other effects as well. Then in the end of each video you challenge viewers to create their own shader using that particular trick (maybe it's a bit much to ask out of free content though). I've linked a few resources in a reply to hos comment.
Yupp. This isn’t much more helpful than just a map of the final shader graph layout would be :(
There are plenty of tutorials explaining each and every node, so it would've been detrimental to explain absolutely everything there is to know about the noise node in this tutorial about making water.
What's funny is that they didn't bother to explain the clip vs screen space transformations but they did explain "In shaders, 0 is black and 1 is white..."
Yes! Thank you. I don't want to just follow a recipe, I want to learn what these do and why.
The video title don't say anything about tutorial. It says Making a water shader in Unity. It doesn't talk about any tutorial, just how to create a water shader. If you expect a tutorial, just search for another video
If you're having trouble with scene looking flushed out by light, disable bloom and tone mapping in the global volume object that comes default with URP project.
Thanks
Thank you
the problem with unity tutorials is that it becomes outdated pretty soon :/
What I would like to hear are more explanation on what the different nodes in the shaders exactly do when you add them.
Ok so I tried to understand what was happening here by doing some research. Fair warning, this may be all wrong:
The scene depth gives the normalized distance between the camera and the current point on the material surface, so a 0-1 value. This is then multiplied by the camera far plane (the distance between the camera and the farthest rendered surface point in the view in world units) which gives the non-normalized scene depth value. I don't know if my understanding is right since setting the scene depth to raw instead of linear should give the same value without the hassle, so it's probably wrong (maybe the scene depth actually starts at the near plane instead of the camera location).
The raw screen position's alpha value (the w component), if I understand right, is the the depth value of the surface point in camera space before perspective projection. Subtracting this from the scaled scene depth should give a value which starts at 0 (not factoring in the depth offset scalar) at the camera near plane (the distance between the camera and the closest rendered surface point) and also ends at 0 at the camera far plane but is the largest in between somewhere depending on the FOV and clipping distance. I guess this mask can be used to make the water transparent around where the camera is looking but is more opaque if the distance from the camera is too close or too far. To have more control over this falloff, a depth offset scalar is used.
Anyone can feel free to correct me on anything I got wrong.
For anyone who doesn't see the "Vector 1" property, use "Float" instead.
thank you man my water was green
But I also didn't see the PBR Master
common knowledge
It seems that Unity is going for Z being the vertical 3d axis in Shader Graph now, so if you have troubles with generating waves by displacement on recent engine versions, make sure you are connecting the Combine node to the B(lue) input, not the G(reen)
you saved my life thanks
Thank you for taking the time to make a tutorial, appreciate it a lot.
I'm a fairly new Unity user and considering the description of this tutorial it ought to be meant for me. :) But I'm having terrible problems following the not explained quick clicks and selections "all over the place". I am aware not everyone is pedagogically inclined but if Unity want people to learn the procedures I would suggest putting more effort in the "for dummies" tutorials.
On top of the above it seem to be outdated when using 2020.x. So maybe update it or mention the versions it applies to? Just my 2 cents. :-)
decent tutorial but lots of “do this do that” without much explanation of the nodes or what you’re actually doing
Sadly you probably won't get much as far as explanations go in these video's. If your looking to understand it you may need to learn how to write your own shaders in code.
Thanks man! Great content. And for those who are using HDRP 2020, just change the CLAMP node for the SMOOTH STEP node. It works just fine
You also must set the "Surface Type" to "Transparent" in the "Graph Inspector"s "Graph Settings" or the depth buffer won't be available.
Thank you so much man!!!
If you are struggling to get the alpha to work, a workaround is to take the output of the clamp into a separate add node, add a small amount like 0.5 then use that as alpha input. This essentially uses the gradient seen near the beginning with a little added to prevent it being fully transparent (invisible) near the water line.
I've looked through a couple of water shaders in past and this is the one with the best outcome. But as others already have pointed out: it is not really a tutorial. More explanation and the slower talking would be nice. Besides that it would be awesome if you could add the normal maps.
Definitely would like to see more videos on URP! HDRP too actually, both SRPs are super interesting.
They literally giva us love and kindness
sykoo literally knows what they are building
i dont see any "create ---->PBR graph" for my project. I've already upgraded to urp... im using unity 2020.3.2f1
Had to use shader ---> lit and instead of vector 1 (I used float) and instead to finally put the whole nodes to the albedo i placed it to the base color....and it doesnt work
I would love to see URP used to generate something similar specifically for VR, to see what corners are cut in order to achieve a similar effect.
Thanks isn't enough, a great tutorial which provided a very good intro to shader-graph for me 👍
Excuse me are you using the same Unity version as in the tutorial? Cause i'm on Unity 2022.3.12f1 and frankly can't even start following this tutorial cause it looks like it's completely obsolete. How did you manage to follow through?
Poll Time! how many of you guys understand what he is talking about. Me! no idea.
I followed along and I was able to create some basic water... I did understand a bit... But some stuff scaped me
Shaders are truly a messed up topic, and writing shaders before Shadergraphs implementation was a pain in the a**. Don't try to learn too much about it, just hop into Shadergraph and play around with all these nodes until you're happy with the result :D
He barely talks and also, where DO we get the water block!
I do
I'm seriously looking for shader courses that deal with the foundations. This is the one thing that kicks my ass when it comes to game dev
This and sounds
Bruh, what an easy-to-follow and amazing tutorial. Thank you so much!
2:32 My plane is still the default grey. Anyone know what I missed? Ive been rewatching the first portion of the video trying to figure it out on my own but Im not noticing anything wrong. My plane has the material using the shader.
Edit: NVM, After some googling, I found out you have to click save asset in the top left. I thought ctrl + s would save it but I guess not.
Same :(
Increase alpha of your colours
Also assign the normal maps
thank you lol how could i miss that
@@mohitrathi1433 even after increasing alpha and applying normals.. it's still not working. I am using unity 2020.3 Please help me
r/unity3d will be filled with water shaders now. Cool tutorial though.
ikr
Lol yes
I can't get to the Quality settings for Depth and Opaque textures, I did turn them both on in my universal render pipeline asset but theyre not allowing me to change the depth of the material in the editor
@Tim Klanderud could you explain please, what do you mean? "In the Water Shader add a setting of 1"
@Tim Klanderud thanks, yoy are right. I did it)
how do you add depth to the water? my water is as thin as a piece of paper. i followed the tutorial did i miss something?
@Tim Klanderud can you help ?
@@ernestnovakhov idk dont now neither
How to create that custom water mesh: water block_50m, or could you provide a download?
For those of you who are tryna find that extra subdivisions plane, Go to blender create plane and add subdivision from right properties tab. Do a little research on it.
To get one with the same topology used in the video that deforms a little better:
1. Subdivide a number of times and apply.
2. Go to edit mode and select all faces.
3. Use Selection > Checker Deselect and then Face > Triangulate Faces. Use "Quad Method: Fixed" in the options.
4. Use Selection > Invert and then Face > Triangulate Faces. This time use "Quad Method: Fixed Alternate".
@@keldencowan thanks man
Thank you for this tutorial. It has been very helpful for my commercial projects.
If Depth colors are not showing go into graph setting in the graph inspector go to universal and surface type to transparent
then in your material tab open the color and increase alpha its defaultly set to 0 for some reason.
hope it helps
i thought my unity is broken
Some issues I had and how i resolved them with HDRP 2020.2.1f1. I couldn't find Depth texture or opaque texture anywhere in project settings or HDRP asset inspect settings. So select the water material and change the surface type from opaque to transparent. The PBR shader graph option doesn't exist, instead create shader->HDRP->decal shader graph and set the material from decal to lit in the graph inspector graph settings window. When following video, vector1 isn't a thing but a create a float value instead and change its value in graph inspector.
wow, I´m having the issue. Thanks! So, where do I find this Graph Settings Window? And, instead of Albido, which option should I connect in the Decal Master Node?
okokok I got It! Instead of Clamping the final Depth values into the Albido, you should use the "Smooth Step" node. That works for me like magic. Everything else is exactly the same, just add this Smooth Step Node right before the Albido channel (instead os using Clamp).
No need for this working around for me. And no need to find these settings on the project settings (apparently they don´t exist - but it work already)
Only 2 months have passed and this tutorial already needs to be updated for new versions, I can't find where to change the depth of my material, having activated those options in my URP Asset.
I'm using the 2020.1
Neither can I bro
Your voice reminds me of the guy from how its made, your voice keeps me well informed m8, thanks for that
where could we get the custom plane from? (with the extra subdivisions)
Make it in Blender:
Open Blender.
Get rid of the cube.
Shift+A, add a plane mesh.
With the plane highlighted, go into edit mode (tab).
Right-Click, click subdivide.
In the subdivide tab that'll show up, specify how many you want (I believe in this video it's around 81, based off another comments answer).
Export your mesh and put it into Unity.
You know what would be even cooler? Dark theme for personal users! My eyes hurt! Thanks Unity!
I love these tutorials
click in "unexisting button" that only appear if you install an obscure package that we will never tell you where to find or what its called. after that the tutorial is just super easy!
Any idea how to get this to work in VR (SinglePass)? I don't see any shine or ripples, its just a smooth blue plane that wiggles. This is my 4th attempt/asset, why is water so hard to get to work in VR?
can I know what are the assets used in this video can anyone provide the link here???
I don't want to work on the boat attack demo I want to start from scratch that's why I am asking for the water textures and all(assets)???
if possible please provide a link for the asset
Did u find it ?
thanks this was helpful even in 2020.3+, once i got urp from the package manager and found the prperties and settings in the shader settings(top right) i was able to follow this video and get a very similar result, i did however have to review a couple times and flip the plane on one axis but this worked quite well
As a Unity Developer who is not interested in shaders & in copying all the steps in this tutorial,
Can I find this Water Shader file separately with the Subdivided Plane Mesh ?
If someone can drop a link I would be grateful!
Thanks in advance
For anyone having issues in the displacement step, try connecting the output of the multiply node to B on the combine node.
Thank you!
no início a água não se moveu, então eu fiz o que você disse, conectar a saída do multiplicador ao B do combinado.
a água se movia, mas achatando e comprimindo. de um lado para o outro em vez de cima para baixo
I'm trying to find the water textures in the boat attack demo... am I missing them?
at 2:34 mine is just pink, not the same as what it shows here
EDIT: I switched to URP because I was using HDRP and it works now
i dont see the gradient on the plane, but i do see a gradient on the material ball thingy sus shape idk unity's left ball or something
i just realized thats because there is nothing under the plane since its the middle of the ocean so that means it works
Can you tell me how can I switch please? I'm pretty much a starter, sry :D
Did you include normal maps for water in the demo project? I could not find it.
Me too, maybe because in the more complex version of the water they use a method for wave other than the normal maps
This is super fast and well made, I’m going to have to rewatch many time possibly at half speed till I follow completely along and get it, but I do think it’s a great help and leap from where I was thinking I was at in my concept project. Before learning about water shaders I actually thought I was going to have to make an entire fluid simulation just for a small ocean scene I have an idea for.
Is it fast? yes, is it well made? absolutely not, this guy in the tutorial actually has no idea what he is doing. please don't go over and over doing what he did, because is wrong. Don't ever add two normal maps together like that, you will end up messing all the light speculars direction on the surface, look at the water with a critical mind and see at 8:00 how the whole reflections are messed up. in shader graph there is a node called "Normal Blend" (if im not mistaken) which does what the guy in the tutorial poorly tries to do, just use that instead, or if you still want to follow this guy's approach, after adding one normal map to the other, split the result and cancel the blue (B) channel, or just normalize it, then combine all the channels again.
@ just because you had one problem with it, doesn't mean everyone else will have the same problem. It depends on if you were paying attention or not.
how do you add depth to the water? my water is as thin as a piece of paper. i followed the tutorial did i miss something?
That's absolutely normal. It's just a plane and not a water tight mesh. Also, it's a surface shader and not a volume shader. So as soon as you are inside of a mesh, you don't see it anymore. Surface shaders are only rendering the surface of a mesh but nothing inside of it. The depth is just faked with the z buffer.
Perhaps you could use a post processing volume with fog that is everywhere under the surface of the water. But I think then it would look like the atmosphere is full of water too, when you're under water and look up.
Perhaps it would be possible make another shader that is used for a second plane which is also at the level of the water surface, just flipped upside down. Perhaps with another calculation with the z buffer it would be possible to calculate how much water and how much air is between the camera and the first opaque object or the sky.
@@juschu85 I just switched to unreal engine its way more beginner-friendly and you can make water with the depth and volume in 10-15min
@@juschu85 thank you though
@@ernestnovakhov I'm also thinking about trying out Unreal, just for other reasons. But this is the first time I hear someone say Unreal is more beginner friendly than Unity. Usually, it's the other way around. You shouldn't make the mistake, especially as a beginner, to make the conclusion any software is too complicated after you run into the first problem you can't solve right away, while it works fine in other software. In other cases, it might be the other way around. The question is not if Unreal or Unity is better or more beginner friendly. This is about choosing the right tool for the job. So the best idea would be to learn Unity AND Unreal.
The fact that it was much simpler in Unreal to achieve what you want, might mean that, under the hood without knowing, you're just throwing much more processing power on your game and call it a day. But that would be completely against the idea of the Universal Render Pipeline. This video is about doing it in the Universal Render Pipeline, which was formerly called Lightweight Render Pipeline. With your resources in mind, you want to fake as much as possible to reduce the requirements on the hardware. Unfortunately, that also means that, depending on what you do, you're breaking the illusion. In this case, you shouldn't put the camera under water. Fortunately, as a game developer, you have full control over what the user can do and what not (that's really a problem with VR, because as a developer, you're loosing direct control over player movement). This tutorial was made with the tech demo for the Universal Render Pipeline, which is a racing boat game. That's a game where you don't need the camera to be under water, so you just code the game in a way that the camera stays over the water all the time. This way you're saving resources (instead of just using a volume shader) but you make sure the user never breaks the illusion.
@@juschu85 it's honestly easier and I find that there are more tutorials to things I want to know in order to build my game , there isn't as much free available assets like with unity store but it'll have to do because in unity the simplest things are over complicated
Clear and concise, awesome explanations!
where did you get the waterblock on 30 seconds
Im stuck at the same place
Thanks, good tutorial. Had to convert the settings over to non-PBR graph, but was able to do some tweaking just to get the right setup. 👍
Bro where did he get the water textures........
google: water normal
Im still using unity 2018, and trying to use a tutorial that explains better for someone who is new and wants to get involved using unity. the version I'm using doesn't even have that shader pbr graph, nor do I understand how to get more subdivision. I also cant upgrade to the newest unity version cause vrchat is far behind on their unity version
my water shader is not blue at 3:30 or at any point of this video. how do I fix that
Can't put add on the new PBR shader replacement (lit) at 5:52.
I'm more interested in the blue smoke trailing the airplane at the beginning of the video, looked cool
unity particle system
@@brokenMikrophone yeah I've never been able to get that to work nicely. I'm guessing flip books or something
@@WesleyOverdijk I watched a video on how to make a waterfall withe particle system and from there it's trial and error.
@@brokenMikrophone oh cool. Got a link by any chance?
I remember when water shaders required an insane knowledge of physics and mathematics
*Sea of Thieves' water shader entered the chat*
Work smarter, not harder.
@@LightJockey best water in game ever
why i love unity, makes hard stuff so easy
Atomic Alex not easy
Not sure if i have something configured differently as I did change some steps, however when I reached the step where the combine node is used for displacing the vertices, the Green input does not appear to correspond with the Y direction in Unity. For me it was the Blue. Again I did some things differently for my shader, but thought I would share. One more thing, this probably depends on your mesh/scale, but .5 was way too high for my displacement value.
I had this exact problem! Was not displacing in the Z-axis. Switched to blue and that solved it. Thank you!
This was well done and is super helpful!! thank you!
*Great Tutorial..*
hii UGuruz Good to see you i follow your tutorials
realy helped lol.
he is using items that i do not have
Please post the link for the water bump textures
are they royalty free? are any bump textures royalty free? not exactly the best way to do a tutorial, I'm considering just making some myself
We Want More Shader Graph Tutorials PLEASEE!!!!
Amazing tutorial! Thank you
I need some help here..
I try to follow the tutorial but I first have the problem that I don't get the Depth option even thou I enabled the Depth and Opaque in the URP asset.
When I open the PBR shader I get the error: "The active master node is not compatible with the current render pipeline....". I did assign the UniversalRenderPipelineAsset to Project Settings > Quality > Rendering.
If I keep following the tutorial everything looks completely different than in the tutorial (Black like it is invisible). Can anyone help me out please? I can't find anything on Google about this.
same
did You find the solution?
Thank you so much. I had no idea how to do this, so thank you for this helpful tutorial
The new URP along with the new tutorials are just fantastics ! Thank you for that.
Can you provide a link for the example water texture at 5:56 in the video ? Thank you
Hey there - the textures for this video belong in github.com/Verasl/BoatAttack :)
@@unity Where exactly? (The folder "Features" doesn't exist and I can't find it in the old versions). thanks 🙏
@@zeus9834 did you find the normal map textures?? I also tried finding them but couldn't find anywhere. I need that normal map textures. Please help me 🙏
@@unity couldn't find that textures. Please help 🙏
this is really cool thank you!
Whenever I connect the split node to the Alpha Channel, my layer becomes invisible. Can someone help?
check the alpha value of the colours you use. When they are zero it becomes invisible
@@brokenMikrophone ty so much, weird tutorial for beginners tbh
Where can I get the plane with more subdivisions? Anyone?
Open every decent 3d(like blender) software able to export fbx. create a quad with your desidered subdivision and export it to fbx.
nah I got simpler, just put probuilder in package manager and create a plane using that tool, there are probuilder tutorials out there. Moreover, you just increase the amount of verteses on that plane and voila
Why don't I see universal pr settings in quality in project settings?
Бро, используй Shader -> URP -> Lit Shader Graph, это абсолютно тоже самое, но с немного отличающимся интерфейсом
@@drugsandaphrodisiacs попробую, спасибо
Okey i have question. Why my water shader is pink . At the start i greated it, its pink. I used the colors and textures but its sitll pink. Pls answer, i need to know.
you need to upgrade all your scene textures to universal render pipeline
its under edit i think
Fantastic tutorial! I learnt so much. :)
This video would be way more useful to new comers if you actually explained what each node was, and why you were doing it. like others have said this is more just a showcase of you quickly putting together a basic shader, not explaining what's going on and then saying if we want to learn more just look at a already complete shader, sure people may learn it eventually but making a 'tutorial' this way is kinda counter intuitive and leaves people with not much more understanding about shaders than before they viewed the video.
it would be nice if unity provided something that when through and explained some major concepts with shaders and nodes and showed examples of the types of things they could achieve with them, we would benefit much more with tutorials like that.
thank you for this awsome tutorial now i learned basic water shader and i can use for my survival game❤❤❤❤
There is no PBR Graph in my Create menu! Where is it???
In Unity 2020 it's moved to `Create > Shader > Universal Render Pipeline > Lit Shader Graph`
(Following the tutorial as a total noob)
*I like your funny words magic man!*
Hello this video was very good and im now trying it kinda cool!
Nice tutorial. Has anybody an idea how to get the "height of a wave"? For exampe that the balls in the water moves up and down depending on water height under it. Is it possible to e.g. update a collider with the changed mesh?
I am wondering too. Have you found an answer?
Thank you for making this video 🙏😁👍💯
Please make a tuturial creating Planar Reflection
This feels like math class all over again.
Hi, where i can find Universal RP Settings un Unity 2020.1.0f1?? Cant find this bar in this version of unity, so i cant turn depth texture on
Edit > Project Settings > Graphics, at the top where it says "Scriptable Render Pipeline Settings", Click on the URP asset that is added there, and it will highlight the asset somewhere in your project's folder, then click on that asset, and you'll see the settings.
Hello,Official, a great introduction and a great demo, but could your guys please share the doulbe normal textures(middle version)and noise as well, everyone need these but not the final dummy project...
If anyone else has the problem where the plane goes invisible after attaching the split node to the lerp node, but fixing the alpha in the shader graph doesn't work: you have to fix the alpha in the inspector, not the shader graph. for some reason, if you set the alpha inside the shader graph, it doesn't actually translate to the material in the scene. no idea why lol but that fixed it for me
How to do that?
@mun lait OMG U R A SAVIOUR
I CANNOT BELIEVE IT WAS THAT
@mun lait thnks brotha
Thank you
hey i'm new to unity and i'm using unity 2021.3.15f1 i cand find PBR graph
where can i find it
If you are using URP then use Lit Shader Graph. You won't find PBR in 2021.3.
i've done this exactly as the video ( had to use Lit shader though as PBR no longer available ), and on the last step, add the noise/time displacement asks to the vertices positions of the master node, messes up my mesh. Anyone else have this issue?
EDIT: it is something to do with the displacement value.
Wow! Amazing!
Please post more videos like this! (Shader graph)
More of this!!
Collision detection with the player
Pool style water also
Damn that seems pretty complex, I'm just starting out tho
Me too, I have no idea what I'm watching here.
@@zeramino as being a c++/java/c# programmer, i also felt that too and all because i have no experience using bolt or visual scripting. They do know that their community is full of programmers but doing this for artist is just dumb, c# is an okay language as it's not too nightmarish as c++ was.
@@graphitic5578 you can be the best programmer out there but this still is better if you want to do something quick. Programming shaders from scratch takes a lot longer
@@Rioni that is right but using visual scripting is an organizing mess and for coding is efficient because there's something called comments. But srsly im not explaining about youtube comments but like the comments feature in some programming languages.
@@graphitic5578 I know what comments are, I'm a student and I'm learning C#
I know what you mean but comments are not really necessary here. They are helpful and I would like to have some kind of comments but knowing what each node does and seeing the shader working can give you an idea.
Organizations of the nodes depended of you. It's just rearrange them so they are organised.
I cant get the depth tab on the right, any help?
so go to the water graph and in the top left hit "save asset" that fixed it for me. This tutorial is ass and doesn't explain anything.
@@muskydev thanks so much, I did feel it lacking some things. I was really new to unity at the time - still am. I plan on trying this again soon. thing I struggled with most was that water asset, do you know where I can find a good one?
How in the world do you learn this, how do you come to the realization of needing those boxes? is this a process of experimenting and testing? I'm just starting with Unity and shaders have always messed with my head.
I too would like to know
zeramino There lots of node tutorials for Blender which uses the same pbr based workflow as this, once you get your head around it, the basic concepts, you can just transfer the skills from one software to the other, Substance Designer is also the same, it’s just a bunch of math encapsulated in nodes
@@gower1973 thanks I have tried blender before and got relatively good at it, but shades always intimidated me to be honest, I'll look into it again!
After adding the strength property and clamp and multiplication nodes, the shader material just turns into a dark grey in the editor view, and off white in the game view. I don't know why the clamp and multiply nodes are messing this up.
same problem here
Where to get this mesh from??? It's all nice but how to get the asset primitives for it?
May i suggest going to package manager and importing ProBuilder. Then under tools you can Builderize selected objects which then allows you to subdivide them. OR use pro builder window to create a primitive, change to plane and set the vertices
@@TheBelrick thank you so much! It’s been 3 weeks but finally a kind person came along with a helpful advice.
@@adamodimattia hey you are very welcome. may you have a wonderful upcoming weekend.
This is exactly what I needed for my project, thank you!
What is better unity engine or unreal engine?
just start in either one, unity is more beginner friendly. JUST START
I found it very handy if you assign Vector2 nodes to the tiling input of each Tiling and Offset node of the respective Normal node, so that you can control the main and secondary Normal Tiling from the Inspector. You can similarly do so with Vector1 (or Float in newer versions) for the Normal Speed.
Over all excellent tutorial but as many mentioned, it needs to slow down a tiny bit and maybe give some links to the Normal Maps :)
A criminally underrated comment right here. For other newbies like me, create 2 floats for the X and Y using the "+" icon. That way the floats are public. And then assign the same X float to the X value of the Tiling and Offset node for both the first and second normal maps. And then apply the Y float you created to the Y input of both the Tiling and Offset nodes.
You can then tweak the numbers in the inspector
Unity: You need a plane with more subdivisions
*doesn't provide plane with more subdivisions or teach you how to make them
Unity: Are you still watching idiots?
Thank you....So good!!!