How to turn a plane into a little lake via water material?

I have this blue color plane that is on top of another plane that I want to make into a lake. Probably using the water material via code as seen in the example playground from the documentation is the way to go but how do I actually use it on my blue plane ?

This the first person view in the live version right now :

These things must be waves or something so clearly I haven’t used the material correctly in the following code

1 Like

I’m no expert but I found a little playground for you:

Also, here is the documentation:

In your code, you have water = new WaterMaterial("water", scene);.
I think you are missing the BABYLON part,
so water = new BABYLON.WaterMaterial("water", scene);

also, there is a waterbump texture. called waterbump.png

and, if you want skybox reflection, just repeat your line water.addToRenderList(ground); but change ground to skybox.

1 Like

It doesn’t need that part with the way imported it apparently.

Well the playground link I’ve included is a similar to the one you suggested !

I saw the documentation but I thought I was missing something after I saw the result is messed up.

Thought someone would have done something similar already and might have a tip or two !

Thanks for the reply I will look into it more :slight_smile:

1 Like

No problem. My pg link is an update more to yours #19 for you, #20 for me.
I can always (try to) help by looking at the docs.:upside_down_face:

btw your game looks neat

Naaah it’s nothing special just trying to learn what I can do and everything seems so hard from good code structure to how I handle the asset pipeline.

But I need to complete it. At least I found so many good low poly assets from who is an awesome dude creating awesome art for free !

Ah. Thanks for the tip. Animations and all?

Some of the weapons and enemies are animated by the creator, I have no skills in 3D designing,animating all that so I was fortunate for the enemy part.

1 Like

pikachu%20oh cool

Forgot to update. It turns out I had messed the order of the skybox’s creation so it wasn’t actually passed in the addtorenderList function. Also my skybox is not that much reflect in the water but it’s clearly there. I have tried with the TropicalSunyOne from the Playround’s repo and it was looking far better.

So I guess it depends on the colors and whatnot of the skybox.

1 Like

Looks pretty good! So you made the skybox after the water? Glad it works! :slight_smile: