A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'High Definition Render Pipeline' started by auzaiffe, Nov 26, 2021.
How to use it?
I must upgrade Unity? (i have 2021.3.16f1)
Enable SSR on Transparent (to get SSR on water surface)
Have a large Reflection Probe Blend Distance
Hi, is there any specific changelogs for the water system so we can seen when certain features get added, thanks!
There's no "water specific changelog" but you can look in the release notes of alpha and search for "HDRP", usually all the new / fixed / changed are logged there.
Is there a way to disable rendering reflection probes on water?
I found a way to disable reflection probes rendering on water. I created a very small box volume around the camera and set screen space reflections ray miss and last bounce to sky. I guess water is rendered to a quad direct in front of the camera?
Edit: Ah, that just disabled ssr rendering reflection probes everywhere
I have a question about this water system. I am building an open world game which has exterior locations divided into grids which are switched between near and LOD versions, depending on where the player is. One feature will be that each grid will have it's own water plane, and each plane can be at a different height compared to neighbouring grids.
My concern is when two or more adjacent grids have their water planes at the same height. To account for this, each water plane would need to be synchronised in some way such that waves would smoothly transition between planes without creating seams on the edge of each grid. Is this something that this water system supports or will support?
• SSR on/off for Transparent looks exactly the same on the water
• Even with a high blend distance (20 along Z) you can clearly see the transition
You are probably missing the SSR on transparent Default Frame settings (it's off by default), this might explain why it's not showing anything.
I'll investigate if something can be done on this to improve but I'm not sure.
Yes this was actually the case! I now have screen space reflections on the water, but still, the water is way brighter where it is affected by the light probes.
Love your water system. Any chance we can get the option to set a uv offset, script based at runtime ? I would need that for my open world / origin reset based game. Thank you!
Can you expand a bit on what you mean by UV offset exactly and what is the end goal of that to be sure I understand correctly.
Is the goal to be able to have a deterministic water and to be able to "sync it" by setting an offset?
Heya, thank you for responding!
My procedural world is quite large, and to avoid exeeding floating point limits when I move around in the world I have to reset every single object back towards 0 within a certain threshold.
The environment shaders (like terrain, water, etc) naturally react to this origin reset as casual world movement and render based on the new world position, which is, in this case, undesired.
The solution for this problem is to set the negative origin reset value (e.g. +/- 1000 units) as position offset in each affected shader. (e.g. in my terrain shader via UV for all the heightmaps and textures). Maybe there is a better way to solve this, but it works quite well for me for now.
do you plan to add support for planar reflections or any type of reflections
@chap-unity Water feature seems to be broken in 2022.2.4, or some setting is causing this.
keeps giving this error:
"Compute shader (WaterLighting): Property (_CameraDepthTexture) at kernel index (1) is not set
UnityEngine.GUIUtility processEvent (int,intptr,bool&) "
Bug report with more info, video & project: IN-30670
@PutridEx wait 2022.4??
Yes, I just realized why this might be happening, I have reflection lighting multiplier set to 0 in indirect lighting controller.
I know this can mess up ocean visuals, but is it expected to not render at all, not sure, so I'll leave it for them to decide
edit: Oh.. I know what you mean now :-
There seems to be an issue with SSR algorithm PBR Accumulation & water system:
Thanks for the report, we'll have a look.
For this one, it's expected that they look the same on water surface. It's because PBR Accumulation algorithm fallbacks to regular Approximation on transparent objects. (see documentation on PBR Accumulation)
Okay, I had a quick look and it has something to do with the "Dynamic Render Pass Culling" in the Miscellaneous section (bottom) of the HDRP Global Settings. If you have checked this and do not have Decal checked in the HDRP asset you get the errors, so while this is getting fixed, either check Decals in your HDRP asset or Uncheck Dynamic Render Pass Culling !
Thanks for the report.
Quite the sneaky bug
I remember enabling render pass culling, I always do, and disabling decals for faster builds.
Reactions can happen where you never expect them
I also investigated why the discrepancy on this one and it comes from the limitation that SSR on Transparent objects won't reflect sky, so if you have sky on a reflection probe, it's going to be impossible to blend correctly. Given that water is a very special transparent, we'll see if we can do something about it.
Thanks for the feedback, wasn't on our radar !
Well the thing is that ssr completely disappears on the water surface if set to accumulation (so no fallback is visible/falls back to reflection probes)
So, I noticed the feature highlight post for Unity 2023.1 beta mentions a Water Line – and the change log also mentions "improved water line detection" in a couple places, but I can not for the life of me figure out how to enable it or get it to work.
Am I missing something? I'm on Unity 2023.1.0b1 and I see all the other water-related features mentioned in that post (Water Deformer, Water Excluder, Foam Generator, etc) and they all work great, but I just do not see the water line.
Am I misunderstanding?
Is there any way to set the time of the water? Im making a multiplayer game so syncing the waves is important. Thanks for any answers
Hey, I think it's the wording that's not clear. It's not a component like Water deformer, excluder, foam generator, it's just something that is activated with Underwater rendering. So to be able to see the water line (when the camera cross the water surface), you just need to enable Underwater in the Water surface component and that's it. (Just remember to add a collider if it's a non infinite surface for it to work correctly).
Right now, it's not really possible you are right but it's track on our roadmap as a "bug". So you can follow the fixing process of it here !
Hopefully, this won't take long
I thought of that, but I did set it up with underwater enabled and moved the camera up and down just to see, and all I saw was a harsh, sharp line that kind of just looks like the surface of the water clipping. Is that what the water line is supposed to be? I assumed it would look like a smooth, blurry line or something so the transition between above water and under water would be less harsh.
Yes, we have to draw the line somewhere, That will be up to users to do the rest depending on the artistic direction of their game.
Basically, we provide the tools to be able to retrieve this water line mask in the Shader Graph so that, by using a full screen custom pass for exemple, anyone is able to do what they want with it.
Here's an exemple:
And, as a bonus, this will most probably end up in a sample so that anyone can have a starting point to see how to achieve easily this kind of thing.
EDIT: the node (HD Sample Buffer node) will be available starting from
2023.1.0b7+ and 2023.2.0a4+
OH, I SEE!
Perfect, thank you so much for clarifying!
Thanks for the reply
Don't mean to rush, but is there any date on this? I'd love to use this for my school project due in April but if waves can't be synced anytime soon, we'll have to go back to our old shader. Again thanks!
Or, is there any way I can do it myself?
"retrieve this water line mask in the Shader Graph"
Which node provides this data? I see there are multiple under Utility/HDRP/Water but hard to tell without documentation
Hi! will we be getting water splashes for objects falling in water or bullets shooting into water by any chance? or maybe a vfx graph integration so the we could use vfx graph's as water splashes?
@chap-unity is the Deformer only a static deformer? any plan to add simulation/ accumulation to the deformer just like how foam generator work especially for the bow deformer?
Refraction seems to have limited distance, any way to remove the distance limit?
Also any news about exposing underwater ior refraction
Hey, sadly we can't commit to a date. Water do now supports timeline (meaning it's deterministic if you scrub the timeline) but I'm not sure it will help with with your multiplayer issue. Best you can do is follow the advancement of the bug report.
It's not shipped yet, there's still a few things that needs improvement about the texture resolution output (you can see banding in the screenshot above if you look closely). Technically, it should be inside the HD Sample Buffer node in shader graph, a new option will be added in the enum. (for 2023.1 and 23.2)
Nothing out of the box is planned yet. The coming improvement about transparency sorting will help with VFX that's for sure but for the rest, you can already alter normals with decals (that affects transparent) and also, if you want to make a rain effect or interactions with water, you can create a new material in the water surface inspector and and edit this shader graph.
As for the VFX inetgration yet, (like for creating breaking waves particle.. etc), it's also under consideration but still vague as to how this is going to be taken care of !
For the distance, I would bet it's a setup issue, I had a quick look on a clean project can't really manage to repro so If you have a proper repro to send, I will have a second look.
For the second part, it was never about exposing underwater IOR but just to be able to disable it and fallback on other method in addition to the color buffer, it's still on track and close to be ready, we're trying to get performance right.
Had a deeper look on this one as well, and I think it all boils down to the projection of the reflection probe. By default reflection probe volume is a box and the checkbox "use influence volume as proxy volume" is checked so that means by default we are using box projection.
If you uncheck that box, you will get the infinite projection and (I'll let you be the judge of that) but my bet is that it will fix the blending issue between the sky coming from SSR, sky coming from probe and Sky coming from the sky map ! Let me know if it helps.
Uhm ... The checkbox for useInfluenceVolumeAsProxyVolume is already unchecked in my setup.
While indeed the blending is better with having it disabled, the area affected by the Reflection Probe is clearly brighter. Currently I placed the probes in a way, that it looks like "shallow water" near the coast... but yeah....
i get that distance limit when setting the distant wind speed to 0
This is on new clean project
Okay, thanks for the precision, got it.
Indeed, I really don't believe it's expected and we don't have any good reason why it's behaving like that.
The workaround is that, it's doesn't seem to happen with River and Pool water surface type.
I logged a bug, you'll be able to follow it here.
True, for pool and river seems fine. Only happened on Ocean, Lake Surface Type
Can I get some pointers on the "Water Mask"? I'm confused on how to setup a texture properly that suppresses the waves at shoreline. Can I get some more detail on this?
is water refraction depth doesn't get distorted by the water normal? there's a harsh line on the refraction.
Also what is this instanced quad? do we need to manually supply the instanced quad mesh?
You can use the red, green and blue channels to attenuate each of the three bands of the simulation.
To setup the texture, you have to apply it on your surface and then set the debug mode to Water Mask in the Miscellaneous section.
That way you can have a visual feedback to adjust the scaling and offset of your mask
I am not sure of your setup, is the sphere completely underwater here ? But in general refraction depth is estimated from the screenspace information and is impossible to get right when there are depth discontinuities like that. You can adjust the maximum distance parameter in the Appearance > Refraction section of your surface to limit the problem
For Geometry Type:
Quad will always draw a 256x256 mesh. If you have a very large surface, this might result in poor vertex density
Instanced Quads will adaptively draw a varying amount of quads depending on your distance to the surface to maintain a balance between vertex density and performance
For ocean, Infinite is the same as instanced quads except that it covers and infinite surface
You can switch the shading mode to wireframe in the scene view to check the difference
it's fully underwater, Maximum distance are maxed.
So in this case you should reduce the maximum distance to hint the system that the refraction happens on a small distance
Looks like targetPosition now targetPositionWS and startPosition now startPositionWS.
What about FindWaterSurfaceHeight? Is it unsupported and removed?
UPD: Ok, I found ProjectPointOnWaterSurface.