Im in HDRP 2023.1.16f1 and i’m duplicating instanced river quads to create river flow…
However, seems the next one I duplicate has stopped rendering, almost like there’s a hard cap of a certain number of water objects? does anyone know if I have perhaps done something to limit it without knowing?
Simply using less of them with flowmaps doesn’t really address the issue of a cap when you have a BUNCH of rivers over a massive area…
also wouldn’t work to just use a single massive quad as the terrain increases / decreases in height at points
unless i can keep copy / pasting these i might be stuck…other than using a single massive quad for an ocean and having no rivers whatsoever, and doing the rivers via shader wouldn’t look the same at all…
hey, so, the water system hasn’t been designed to be used like this.
The way to do it would be to have ONE river here (or a few tops if you want really different simulation).
If there’s some water where you don’t want it, you can use excluders or deformers to lower the water below the terrain.
If your terrain increase / decrease in height, you can use deformers to alter the height of the river itself.
Same with agitation / ripples / foam can be toned down using special maps in the water component.
If you have A LOT of “river space”, you can use a custom mesh and split it in multiple meshes for better culling.
You can download the Water sample using the package manager and see some example of how that could be done.
Lastly, don’t forget to read documentation, it can help tremendously when you don’t know what feature you can use !
thanks for the clarification, someone in the Discord mentioned excluders and deformers, apparently the reason they never popped up is because I’m in 2022LTS and the excluders and such aren’t in that version that I know of, at least I can’t find them when I search for component. Also explains why I couldn’t tile the ripples, 2023 seems to have a deform tiling option. Also in package manager which package are the samples under? I can’t see the samples under the High Definition RP samples section.
I’m not entirely sure how I would do a custom mesh for all the rivers to be honest, I’m using terrain tools to paint the height…
I just dived into the sample scene to watch it in action, and I’m wondering what the best approach to my situation would be, I’m planning to have a ton of rivers, so it would probably be best to have a single quad for rivers in the world and deform until all the rivers are the correct height then exclude the remainder, but this may present a problem with river flow unless i can somehow make a single flowmap of the entire world, personally I would LOVE a feature to be able to paint flow to the quad to alter its direction during play.
my other option is to pool quads and un-pool them when the camera is close, having the deformers already in place im assuming they will work automatically, and i could probably easily do flowmaps per-river. but this would present a problem if i ever wish to do an extreme zoom-out if several rivers are in view at once…
Any idea which if either would be best? or is there another solution I haven’t explored?
You are completely right indeed.
In 2022 LTS, water system is in its primitive form to be able to address the more complex scenarios. This includes foam generation, deformers, excluders to name a few.
The samples starts to be available with 2023 as well so it’s completely expected that you can’t find them in 2022 yet.
It just doesn’t make sense to backport them since the goal was to show non-intuitive / complex setup with those new features.
As for your main question, it’s honestly hard to answers without an overview of how many rivers you’ll have, how large your terrain is, and how different you want your rivers.
But out of my mind, If all your rivers are roughly the same in terme of simulation, I believe your best bet is to have one super large river using the instancedQuads mode (to ensure there’s enough vertices everywhere) below your terrain and then use deformers to hide / show the river where you want it. That way, you’ll pay the price of only ONE simulation but for as many rivers as you like.
This technique does not require modeling tools, only texturing for deformers water mask and currents, so it’s a bit simpler.
I know I would love to have artists tool to paint rivers, current and tone down specific band of the simulation directly in Unity (like terrain system) but it’s not there yet :). For currents, I can suggest using krita, it’s really simple to use and does exactly what we want for currents.