Water System for the High Definition Render Pipeline

i only had a quick look into the new water using alpha 16 and have been enjoying it. thanks @auzaiffe .
nevertheless i came across some issues which haven’t been mentioned here so far.

double fogging
looks like the water suffers from double fogging noticeable at the shore line or any intersection between scene geo and the water surface. the refracted parts already contain fog /which gets applied in the “OpaqueAlmosphericScattering” pass). but “void WaterDeferredLighting()” simply adds fog for the water surface on top: finalColor = finalColor * (1 - volOpacity) + volColor;

motion vectors
at least foam would greatly benefit from motion vectors as it may end just in a blurry mess.
might be a good point to add some advanced motion vector support to HDRP like motion vectors from texture animations (scrolling and flip books) :slight_smile:

additional color pyramid passes
not sure about this one but i wonder why HDRP calculates an additional color pyramid right before the water. water does not use/support blurred refractions as far as i can say - so do we need these extra passes?

tessellation
tessellation looks like it could need some more love. triangle size in the distance just looks insane. and on the closer parts the generated triangles are not evenly distributed - as if the tessellator used an even tess factor?


water rendering volume component ui bug
ah, tricky: although “additional properties” → “all visible” is active “max tessellation factor” does not show up. i have to manually enable “show additional properties” in the component to get access to “max tessellation factor” - which is set to 10 by default :frowning:
if i set it to 9 i get rid of these thin triangles stripes shown above. and i can also adjust tess fading to some more reasonable/performant values.

11 Likes

“max displacement” here is a tricky param in shader graph as how should an unexperienced user should know about it?
after all i would prefer a unified approach for all water surfaces like “Continuous LOD Morphing Geo-MipMap” as proposed by arm, used by naughty dog, unreal or crest.
i am not sure how one would otherwise create a lake that goes into a river that goes into the ocean.

3 Likes

does not look as if there is any underwater rendering at all…

1 Like

That would really help a lot with particle system/VFX systems as well :slight_smile:
Currently, I have to use this asset for this feature: TFlow | Particles/Effects | Unity Asset Store

3 Likes

I am having really big problems getting underwater to be useful in any case at all, so I am assuming that it is WIP. Also the tess as you pointed out, is a bit microtriangle hell.

3 Likes

https://www.youtube.com/watch?v=tnCJ4se-ZyI

5 Likes

might be a misunderstanding :slight_smile: from what i can see TFlow calculates motion vectors to better blend between the frames of the flip book. although these kind of motion vectors mots likely would be needed as input they are only 50% of the final solution: i was talking about 2nd 50% - the screen space motion vectors HDRP renders to drive motion blur, taa and dlss. these currently are rendered for camera motion, animations and vertex displacement - but not for texture animations. so white water using a simple scrolling texture will look blurry.

in case of the water motion vectors from the vertex displacement might be just fine. however this would need the water system to ping pong the simulation between 2 sets of render textures so when it comes to render out the motion vectors you have access to both: the current simulation and the simulation of the previous frame to calculate the delta.

2 Likes

might be a dumb question, but how do you actually create an infinite ocean?
using a camera with near clipping: 0.015 and far clipping: 12000 i have to raise “Grid Size” in the “Water Rendering” volume component to at least 1000 to get some kind of infinite ocean - at least if the camera is about the ocean height. from higher altitudes there still will be a gap between horizon and ocean and grid size would have to be even higher.
rising the grid size however reduces the vertex density of the ocean surface which may result in poor visuals.
am i missing something here?

2 Likes

Yeah, you are right, they actually bake the motion blur directly into the flipbook to get around the limitations you mentioned.

I’m aware it’s a tough thing to ask, but could the water guys please work together with the terrain tool / shader guys? There’s no information about what the upcoming terrain shader graph changes are supposed to do.

Example: All that water is nice, but the terrain needs wetness as well. I painted the texture with smoothness changes here to show what I mean:


Especially required below the water and at the shorelines.

I have Microsplat for that which is awesome and does everything I need in that regard, but a Unity solution would be nice as well.

Another just for emphasis of the importance of the effect:

7 Likes

Had to make a video, I really like the result :slight_smile:

15 Likes

It probably is not so difficult. I remember ages back, there was a custom shader pack for mentalRay called Lume Tools. There was such a shader there.

If this could be done more than 10 years ago offline, I think it is possible to create a smart shader like that, OR at least create some nice blend Shader based on height, to offer this option without having to paint the edge with a different material.

https://help.autodesk.com/cloudhelp/2016/ENU/mental-ray-docs/mr_docs/tutorials/lume/Wet.html

https://download.autodesk.com/global/docs/softimage2013/en_us/userguide/index.html?url=files/mentalray_Wet.htm,topicNumber=d30e726565

1 Like

well i remember they did said that the waterline rendering are removed temporarily due some alignment issue with the surface, i guess they also removed previous underwater rendering. . .

You need a volume with water rendering for it to show up, and to also tick underwater on the ocean itself. Sometimes the water will show anyway, sometimes not. It’s early in dev I guess.

hmm… I’m on Unity 2022.2.0a17.2573. This code not working. searchResult.height is always 0.0 and targetSurface.FindWaterSurfaceHeight() returns false every time.

By any chance did you enable the CPU simulation on the HDRP asset and on your water surface script ?

8235057--1076421--upload_2022-6-27_11-8-6.png

8235057--1076424--upload_2022-6-27_11-8-26.png

is this a built in tools or custom tools?
wait, hol up is that even the same water system

I think it’s a preview of what’s next for this tool.
I might be wrong though…

The owner of the video is auzaiffe So I assume it’s this water system.

oh that’s his channel, i see. Alright then that was the missing information that i’m looking for. Thanks