New water properties

You can now customize the way water looks with new properties in Terrain object:

[Property] Color3 Terrain.WaterColor
[Property] float Terrain.WaterTransparency

Water color affects the shade of the water.
Water transparency affects the amount of transparency you get from the water on highest quality level.

Both values also affect under-water fog - the idea is that if you’re underwater the transparency affects how far you can see, and the color is the color of fog.

[Property] float Terrain.WaterWaveSize
[Property] float Terrain.WaterWaveSpeed

Water wave size affects the size and length of the geometrical waves. Water wave speed affects the speed at which the geometrical waves “move”, as well as the speed at which the textured micro-waves move.

Currently both parameters only affect the visuals since we don’t have water flow simulation any more.

All properties above only work with smooth terrain.

Behavior demo for color/transparency: https://youtu.be/MMVH_syBZ3c
Behavior demo for size/speed: https://youtu.be/MSUwL98WFc0

In addition to the above, under-water fog is disabled when you edit terrain in Studio to make it easier to build underwater. We’ll also ship an update to editing tools next week that will make it even easier to build underwater!

If you find any issues feel free to post them here or create separate threads in Bugs forum!

56 Likes

“Now” as in, right now or once some flags are turned after iWait?

1 Like

Right now. The properties are currently not changing the look on mobile but since they are only visual this should not be a big issue.

Also, on mobile we currently don’t simulate water reflection/refraction so the transparency would only affect the under-water fog.

WOO! I can now cover my games with flowing toothpaste!


WaterColor is going to be my favorite feature. :smiley:

17 Likes

Uh. Please use responsibly.

38 Likes

These are awesome, I thought the WaterWaveSize being maxed out at 1 was going to be a serious limitation, but I actually think that’s not really a big problem now that I’m playing around with it.

Wow.


I love how setting the transparency to 0 makes it look almost neon. Really cool looking at night.

6 Likes

“Y’argh maties, it be a rough day on the red sea.”
blob.png

Personally, it is a limitation if you want a really rough appearance for some pirate game. I would personally prefer a limitation of 10 or even 5 myself, but I want it more for appearance than physics.

15 Likes

Is there any chance you’ll have transparency for all quality levels? This is the only remaining factor there is that keeps me from using the terrain water for my game, as I don’t want some people not having the ability to see objects through the water while others can.

I don’t even care about refraction/reflection, as long as transparency can be constant.

I noticed these properties in studio yesterday and was sad to see they didn’t seem to work.
Seeing this post filled me with joy! I can’t wait to play around with these settings when I get home.

1 Like

Awesome update to water. Can you please add Underwater Fog Transparency? I’d also really love to see “WaterWaveSize” not capped at 1, maybe 10?

1 Like

Updated the post with a notice that replication does not work. I’m working on fixing this but it’s a bit too risky to do it and we’re close to a code freeze so I’m not sure if it gets shipped this year or not.

Someone on the regular forums suggested we be able to find the tip of the wave for boat bobbing and like, but currently the waves don’t affect the returned result of a raycast. Would it be possible to make it so raycasting would return the exact location it intersected the wave instead of just where it intersected the voxel?

I personally think raycasting results should be purely restricted to intersections with the actual collision boxes of objects, otherwise this will create inconsistencies with physics and raycasting against other types of objects. Of course if they are implementing that the physics of the water follows the rendered waves, then that wouldn’t be an issue anymore.

@zeuxcg Maybe we could get a different function that gives the current phase of the water so we can calculate the height ourselves (or as property of Terrain), if you are not implementing the physics for the rendered waves soon/ever? Then you would also be able to get rid of the cap of 1 on the wave size so we can use it at our own risk for situations where we either completely don’t care about proper water physics or where we are simulating the physics ourselves. (Custom physics for boats and swimming and whatnot)

3 Likes

Actually, what would be good is a option to make the rays check for the rendered triangles. Would be useful for meshes, CSG and terrain. I really want to make a bobbing ship.

1 Like

@zeuxcg If we make the wavesize + speed to 0 and 0, would that reduce any possible lag?

1 Like

I can’t wait to play with this stuff :stuck_out_tongue:

It most probably won’t reduce lag.

Certainly using this in my games!

2 Likes

No.