Page 1 of 1
Choppy Surface water
Posted: Wed Nov 09, 2016 7:09 pm
by LordGarth
Hello all
I am trying to make a pond in a town. I try using heightmap to lower the land and just lowering the level with brushes to - 1 and -2.
Either way I get choppy water with the water looking like mountain peaks going up and down instead of a smooth flat pond effect.
Anyone else have this problem.
LordGarth
Re: Choppy Surface water
Posted: Wed Nov 09, 2016 7:34 pm
by zimberzimber
Height map and and water surface interact poorly together.
What you can do is place a 'beach_ocean', disable its 'bottom' component, change the models offset to fit your needs, and change the material to 'water_surface_calm'.
Result:
There's just one issue with this though - If you have any other places that go lower then the oceans line, it will be visible there.
There are a few ways to work around this:
1) Place the ocean object so it won't hit any other 'holes' you might add.
2) Add floor triggers to areas where you would stop/start seeing the pond that will enable/disable the model component.
3) Create a new object that uses a floor model (dungeon floor or whatever), have it use the 'water_surface_calm' as a material, and change the models offset through in-game scripts. (like the example with the ocean object) (Make sure all the objects are facing the same direction in a cluster)
Re: Choppy Surface water
Posted: Wed Nov 09, 2016 7:52 pm
by LordGarth
Will try thankyou
I am not sure how they made the water so calm in LOG 2 around those buildings in the second or third area where you see the lindworm for the first time.
LordGarth
Re: Choppy Surface water
Posted: Wed Nov 09, 2016 8:25 pm
by Isaac
zimberzimber wrote:There's just one issue with this though - If you have any other places that go lower then the oceans line, it will be visible there.
It is possible to disable/enable the model, and so with careful map layout [and scripting] it means that (for instance) a staircase leading down need not appear to be flooded when standing within sight of it.
Re: Choppy Surface water
Posted: Wed Nov 09, 2016 8:29 pm
by minmay
zimberzimber wrote:1) Place the ocean object so it won't hit any other 'holes' you might add.
2) Add floor triggers to areas where you would stop/start seeing the pond that will enable/disable the model component.
3) Create a new object that uses a floor model (dungeon floor or whatever), have it use the 'water_surface_calm' as a material, and change the models offset through in-game scripts. (like the example with the ocean object) (Make sure all the objects are facing the same direction in a cluster)
These are really obtuse workarounds that will degrade performance or not work properly. It's much easier to just change the waveAmplitude parameter of the shader. You can adjust it to get precisely the wave height you want.
Re: Choppy Surface water
Posted: Wed Nov 09, 2016 8:35 pm
by zimberzimber
minmay wrote:zimberzimber wrote:1) Place the ocean object so it won't hit any other 'holes' you might add.
2) Add floor triggers to areas where you would stop/start seeing the pond that will enable/disable the model component.
3) Create a new object that uses a floor model (dungeon floor or whatever), have it use the 'water_surface_calm' as a material, and change the models offset through in-game scripts. (like the example with the ocean object) (Make sure all the objects are facing the same direction in a cluster)
These are really obtuse workarounds that will degrade performance or not work properly. It's much easier to just change the waveAmplitude parameter of the shader. You can adjust it to get precisely the wave height you want.
Wouldn't that change the wave amplitude for everything that uses 'water_surface_calm'?
And correct me if I'm wrong, but water mesh is bound to a specific area. (which isn't a problem unless you plan on having multiple water spots at different heights)
Re: Choppy Surface water
Posted: Wed Nov 09, 2016 8:46 pm
by Isaac
minmay wrote:zimberzimber wrote:1) Place the ocean object so it won't hit any other 'holes' you might add.
2) Add floor triggers to areas where you would stop/start seeing the pond that will enable/disable the model component.
3) Create a new object that uses a floor model (dungeon floor or whatever), have it use the 'water_surface_calm' as a material, and change the models offset through in-game scripts. (like the example with the ocean object) (Make sure all the objects are facing the same direction in a cluster)
These are really obtuse workarounds that will degrade performance or not work properly. It's much easier to just change the waveAmplitude parameter of the shader. You can adjust it to get precisely the wave height you want.
I am shocked that I missed #2 in that list; (and basically repeated it).
Do you know of a way to *fix* the wave deformation seen above a hightmap-lowered underwater tile?
Like as seen here:

Re: Choppy Surface water
Posted: Wed Nov 09, 2016 8:57 pm
by zimberzimber
Other than what minmay suggested, nothing I know about.
Re: Choppy Surface water
Posted: Thu Nov 10, 2016 4:39 am
by minmay
Isaac wrote:Do you know of a way to *fix* the wave deformation seen above a hightmap-lowered underwater tile?
Like as seen here:

This will happen whenever you have a water mesh that is not coplanar with the world X and Z axes. It's just how the vertex deformation code works. Using non-planar water meshes doesn't really make sense in the first place because the reflection plane is...a plane.
As far as I know, WaterSurfaceMeshComponent will never construct a nonplanar mesh. I've tried all combinations of heightmap values, noise, and heightmapMaterial presence, and never gotten a nonplanar mesh from WaterSurfaceMeshComponent.