Yesterday I was working on adding your previous caustics shader (for the post processing underwater one) on Unity and was having a hard time on one final step, so I went to bed to try again today and I just received the notification of a this new video haha Gold content as always, Ben!
This is awesome, thank you so much!! At 19:02: This "stretching" is exactly what real caustics do though and it is dependent on the angle of the sun shining into the water.
In my case, I created it this way originally because it was what the art director wanted. "Hey, why aren't there any caustics over here on this side of the underwater cliff? And no, I don't want to change the direction of the sun to get them there." So it's more of an esthetic thing rather than trying to simulate the way caustics actually work.
@@BenCloward Art directors, am I right? 🙄😄 I found out that when I put your material on a light function with a directional light, I get that shadows (no caustics in dark places, just like in real water) and the light direction / rotation can just be matched that of the sun. Also, because it's light, it gets "multiplied" with the ground and objects and looks real nice. Only problem, I can't seem to figure out how to only start the caustics from a specific depth - because it is a directional light, the whole world is now full of caustics 😆. And also I couldn't figure out light attenuation with this. Guess it needs some more work.. If you know something about that, I would be really happy. If I figure out something, I let you know.
Thank you so much Ben!!! I have a small request: I did a Borderlands Comic book style global shader for black outlines in the world, but I do not know how to control their visibility based on distance from the camera (meaning probably thickness than visibility, but sort of the same). Is there any videos you've done about this? You've mentioned that it is controllable as such in your old Comic style PP video, but I do not think you've covered it? Thank you!!!
Interesting. Not sure I prefer this over the more subtle light leaks that already existed in the previous tutorial, but it's an interesting learning experience. Keep up the good work.
When using URP, the Sample Buffer node set to NormalWorldSpace returns black? I have also enabled SSAO to trigger the depth normal prepass which comes before the DBuffer one.
Yes, the SampleBuffer node doesn't work correctly in URP. It's an HDRP node. In my next video, I show a different method for getting the world space normals that works better.
I asked for this last week, I didn't think much of it since then which made this video quite the gift for me today, thanks Ben! I hope you can teach us more and more of this cursed wizardry that is shader graph =] Also, can we get a tutorial on Surface Gradient Bump Mapping? That would help me with some procedural shaders I've been making.
why is your foam only visible if it's projected in front of the stones or whatever intersecting the surface? the foam just disappears when the object underneath curves out of visibility.
This technique is using the different between the distance to the water surface and the distance to the surface behind it to determine where to place the foam. It's nice because it automatically applies foam, but it does have the downside you pointed out. You could also just paint a mask texture to control where you want the foam to go, but that's a bit more work. So it depends on if you want an automatic solution with a few drawbacks (the one I show in this video) or if you want to use a bit more manaul labor and to make something without the drawbacks.
Hi Ben,Do you maybe know if there is a way in unity HDRP to caustic(decal ) reduces the intensity depending on the shadows from the scene?For example,if i have some rock with shadow i want to decrease caustic intesity where is the shadow of rock or some shadow caster object.
I know how to create a custom code node in Unity's URP for accessing the shadow mask, so I could do it there, but I don't yet know how to do that in HDRP. It could be that it's not possible because the shadows are calculated after the decal pass. Not sure.
@@BenClowardCould you post code for URP, to see how to access and sample an shadow map,i guess shadow map is atlas? I will try to buffer the shadow map from the previous frame and use in curent frame in HDRP.
but... why? why did you removes vertical leaks and did this terrible triplanar? Take a look on real caustic - it is leaking.. cause it is projected.. by sun. ))
Tend to agree😅 I think maybe reducing the intensity as a normal converges on the x or z planes would've looked better. Also, as well as the UV warping, multiplying instead of adding the scrolling caustics might help to disguise the fact they're just 2 linearly scrolling textures a bit better.☺️
@@BenCloward I sed triplanar caustic its sucks, not your tutorial. Your tutorial its good and cover a lot of trouble places. I like it. But im sure with your knowledge you can du amazing caustic. For example.. caustic have more intense warping with deep. You can generate 2-3 types of texture with bigger warping and blend by height. )
Always a treat to get these videos
This series is excellent. Thanks, Ben!
Yesterday I was working on adding your previous caustics shader (for the post processing underwater one) on Unity and was having a hard time on one final step, so I went to bed to try again today and I just received the notification of a this new video haha
Gold content as always, Ben!
This is awesome, thank you so much!!
At 19:02: This "stretching" is exactly what real caustics do though and it is dependent on the angle of the sun shining into the water.
In my case, I created it this way originally because it was what the art director wanted. "Hey, why aren't there any caustics over here on this side of the underwater cliff? And no, I don't want to change the direction of the sun to get them there." So it's more of an esthetic thing rather than trying to simulate the way caustics actually work.
@@BenCloward Art directors, am I right? 🙄😄
I found out that when I put your material on a light function with a directional light, I get that shadows (no caustics in dark places, just like in real water) and the light direction / rotation can just be matched that of the sun. Also, because it's light, it gets "multiplied" with the ground and objects and looks real nice.
Only problem, I can't seem to figure out how to only start the caustics from a specific depth - because it is a directional light, the whole world is now full of caustics 😆. And also I couldn't figure out light attenuation with this. Guess it needs some more work.. If you know something about that, I would be really happy. If I figure out something, I let you know.
Thank you so much Ben!!!
I have a small request: I did a Borderlands Comic book style global shader for black outlines in the world, but I do not know how to control their visibility based on distance from the camera (meaning probably thickness than visibility, but sort of the same).
Is there any videos you've done about this? You've mentioned that it is controllable as such in your old Comic style PP video, but I do not think you've covered it?
Thank you!!!
Interesting. Not sure I prefer this over the more subtle light leaks that already existed in the previous tutorial, but it's an interesting learning experience. Keep up the good work.
Hi Loving your tutorials and beavering away enjoying exploring materials in Unreal, is there a way of changing the caustic texture to say, cell noise?
When using URP, the Sample Buffer node set to NormalWorldSpace returns black?
I have also enabled SSAO to trigger the depth normal prepass which comes before the DBuffer one.
I think I'm having the same issue, so the projection is always oriented to X plane. Can't find a workaround 🤔
Yes, the SampleBuffer node doesn't work correctly in URP. It's an HDRP node. In my next video, I show a different method for getting the world space normals that works better.
Why does the normal vector Node return the projectors direction instead of the surface normal? I could never understand this.
There is no normal on a decal because there is no geometry/mesh - so what the Normal Vector node should provide is a bit ambiguous.
Thank you very much!!!
Amazing!
And about the water shader you use in Unreal example?
If you're asking how I made it, take a look at episodes 36-40.
I asked for this last week, I didn't think much of it since then which made this video quite the gift for me today, thanks Ben!
I hope you can teach us more and more of this cursed wizardry that is shader graph =]
Also, can we get a tutorial on Surface Gradient Bump Mapping? That would help me with some procedural shaders I've been making.
Glad I could help! Sometimes people's requests line up really nicely with the direction I'm going and it works out really nicely like this.
why is your foam only visible if it's projected in front of the stones or whatever intersecting the surface? the foam just disappears when the object underneath curves out of visibility.
This technique is using the different between the distance to the water surface and the distance to the surface behind it to determine where to place the foam. It's nice because it automatically applies foam, but it does have the downside you pointed out. You could also just paint a mask texture to control where you want the foam to go, but that's a bit more work. So it depends on if you want an automatic solution with a few drawbacks (the one I show in this video) or if you want to use a bit more manaul labor and to make something without the drawbacks.
@@BenCloward ok, I understand, there's no automatic solution for what I am talking about.
rendering pipeline?
Hi Ben,Do you maybe know if there is a way in unity HDRP to caustic(decal ) reduces the intensity depending on the shadows from the scene?For example,if i have some rock with shadow i want to decrease caustic intesity where is the shadow of rock or some shadow caster object.
I know how to create a custom code node in Unity's URP for accessing the shadow mask, so I could do it there, but I don't yet know how to do that in HDRP. It could be that it's not possible because the shadows are calculated after the decal pass. Not sure.
@@BenClowardCould you post code for URP, to see how to access and sample an shadow map,i guess shadow map is atlas? I will try to buffer the shadow map from the previous frame and use in curent frame in HDRP.
@@bojandronjic4658did you ever figure this out?
Uiii.. Thanks.. Lets watch it 😊
any way to mask out shadows on the shader level ? (for dynamic lighting) caustic never does that much in a shadowed area
Yes, know how to do that in Unity using custom code. I may show it next week.
@@BenCloward cool that's really interesting, I need that stuff for Unreal tho...
but... why? why did you removes vertical leaks and did this terrible triplanar? Take a look on real caustic - it is leaking.. cause it is projected.. by sun. ))
Ouch - thanks for the feedback. Sorry you don't like it. You make some good points. If I get some time, I'll experiment with what you're suggesting.
@@BenCloward I preferred the triplanar too lol
Tend to agree😅 I think maybe reducing the intensity as a normal converges on the x or z planes would've looked better.
Also, as well as the UV warping, multiplying instead of adding the scrolling caustics might help to disguise the fact they're just 2 linearly scrolling textures a bit better.☺️
@@BenCloward I sed triplanar caustic its sucks, not your tutorial. Your tutorial its good and cover a lot of trouble places. I like it. But im sure with your knowledge you can du amazing caustic. For example.. caustic have more intense warping with deep. You can generate 2-3 types of texture with bigger warping and blend by height. )