Choppy Surface water

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Choppy Surface water

Post 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
Dungeon Master and DOOM will live forever.
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Choppy Surface water

Post 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:
SpoilerShow
Image
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)
My asset pack [v1.10]
Features a bit of everything! :D
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: Choppy Surface water

Post 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
Dungeon Master and DOOM will live forever.
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Choppy Surface water

Post 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.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Choppy Surface water

Post 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.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Choppy Surface water

Post 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)
My asset pack [v1.10]
Features a bit of everything! :D
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Choppy Surface water

Post 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:
Image
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Choppy Surface water

Post by zimberzimber »

Other than what minmay suggested, nothing I know about.
My asset pack [v1.10]
Features a bit of everything! :D
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Choppy Surface water

Post 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:
Image
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.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Post Reply