I’m working on a simple water effect on a plane. I’m using the built-in Water Material. Every examples are made using big ground objects. However, I’m working with a little plane object and modifiying waterMaterial.waveHeight does not produces the expected effect. Instead of adding waved to my plane, it becomes weirdly stretched, as shown in this example (playground). (see lines 43, 44, 45)
I don’t know if it’s a bug or if I’m using the water material wrong. Any help would be much appreciated !
Hi,
You had some inappropriate values in there.
A zero bump height means you got no waves anymore.
The value for wave height should be set between 0.001 and 0.5 approx.
Generally for a calm lake a value around 0.1 is fine.
So, something like this, may be?:
How to get actual waves here ? It looks really flat and I’d like to actually see some waves, like in the demo example (at the mesh border you clearly see relief on water). I cannot achieve this effect in my example.
As for the watermaterial with its bump effect, wave lenght and height you can put higher values to get more waves (or higher and longer waves), as you can see here: https://playground.babylonjs.com/#EFZP88#2
The demo example actually doesn’t use a plane but a mesh (or you could do a heightmap). Obviously the mesh is not flat and adds to the waves effect
2a) The undersea level ground is also a mesh or a heightmap, again this will change how your water looks.
Edit: Note that you were speaking about a small water surface. Generally a small water surface does not have that many high waves (a matter of physics, obviously
The demo example actually doesn’t use a plane but a mesh (or you could do a heightmap). Obviously the mesh is not flat and adds to the waves effect
The shader used to Water Material does not move any vertex ? If so, I have my answer.
Edit: Note that you were speaking about a small water surface. Generally a small water surface does not have that many high waves (a matter of physics, obviously
Yeah of course, but let’s say I’m in a particular case
Sure, it’s all there on GitHub but now that they moved everything, I’m not sure to be able to point you straight at it. Give a minute, I can try call in the people who did this material. They’ll sure know…cc @julien-moreau