Water - rivers - Heightmap

Hello all. I’m hoping there’s a genius or three out there.

After struggling with UE’s broken water system I finally bit the bullet and purchased a water system (WaterlinePRO). It’s great, but I only found out AFTER purchase that it has no current coding to serve as a river. Lakes and oceans, yes, but rivers… nope.

Undaunted (and refusing to tell my wife I spent $100 on something that doesn’t fit my needs LOL) I have been trying to make it work. It has TONS of customization when it comes to the water color and effects, and as you can see here it looks pretty good.

Except for where it doesn’t…

It doesn’t slope. It works on a flat plane only. I would LOVE to get it to work with splines but I am not experienced enough with UE to even fathom if this is possible. I would imagine it is, as I have seen splines used for a multitude of things, but moving rivers?

I reached out to the creator of the program and although he has assured me that there is no immediate plans on a river function but do hope to have them in the future (X_X) I may be able to “get something river like by modifying the infinite watersim actor’s water surface material in order to have flowmaps, but those will need to be made externally as well.”

This is gobbldygook to me. Is there an adult to help me with this?

Cheers in advance!

Hey there @RLK_III! Here’s a resource on flowmaps and applying them in Unreal! Hopefully the wife will be proud when she hears you’re not only adept at level design but also VFX and tech art! Which by the end of this journey, you very well may be. Combining the flowmaps for the material and making the master actor a spline based setup, you can likely adapt what they have to your needs!

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

1 Like

Thanks mate! I’ll check it out :3

1 Like

No worries! Let me know if it works out! Also here’s some resources on making the spline/mesh portion of the river if you wanted to use landscape splines (which may still be susceptible to the height issue but that is yet untested) or if you wanted to make them via custom splines you could do that instead! It would have a bit more effort and custom sculpting though.

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

Thanks for that too!

Side question - is there any way to cool down the shaders on water?

image

I’m running VTs (hence why my landscape is in the green) but not affecting the water.

Alternatively, do I get it where I want it then turn it all off so it’s not sucking up memory as once packaged it should be fine?

Depends on how that plugin handles it’s materials really, if it’s got a bunch of logic for fluid sim, you can cut it completely out of the material unless you intend to use it. Flow maps aren’t extremely expensive, but they do bump complexity a bit.

Yes once you get everything how you’d like it, you can disable it in the viewport as not to deal with it while working on the rest, but I would recommend a test build and stress test with some gameplay before continuing just to see where the baseline performance is at.

1 Like

Thanks for this. I have a LOT of research to do LOL

Side question: do you know what this weird fog is and how to get rid of it? It’s not the heightfog…

I wouldn’t worry too much about shader complexity unless you’re getting bottlenecked graphically. Shader complexity is measured a bit deceptively, in that you can have it glowing in the high complexity area with a ton of adds that cost very little, or you could have a couple of square root and sine operations and it will be nice and green on the complexity chart, but cost effectively more cycles.

Here’s an old chart with relative cycle costs

Shader function cycles costs
abs 		0
acos 		52+ *
Add		4
all 		16
any 		12
asin 		52+ --
atan 		60+ *
atan2 		64+ *
ceil 		4
clamp 		8
clip 		0
cos 		20 *
cosh 		40 --
cross 		20
ddx 		16+
ddy 		16+
degrees 	4
distance 	8
dot 		4
exp 		20
exp2 		16
floor 		4
fmod 		24
frac 		4
fwidth 		20+
isfinite 		0
isinf 		12
isnan 		0
ldexp 		4
length 		16+ *
lerp 		4+
log 		12
log2 		8
log10 		12
max 		4
min 		4
mul 		4
pow 		28
radians 	4
reflect 		4
refract
round 		4
rsqrt 		16 *
saturate 	0-4
sign 		12+
sin 		20 *
sinh 		44 --
smoothstep 	20+
sqrt 		16 *
step 		16
tan 		56 --
tanh 		64 --

As for your fog issue, it looks like volumetric fog is applying or some form of post processing, but you’d already checked both. So it’s possible it could be some function of your lighting or scatter. How does it look from a player perspective? Does it disappear when dropping to medium scalability?

Hmmm. No. However, it DOES disappear when I remove the sky atmosphere.

Well, at leave I’ve narrowed it down… now to try and figure it out LOL

As always, thanks.

1 Like