waterMaterial sphere bottom view

hello,i’m trying to make a water sphere ,
but when the camera is below the horizontal line, the sphere can’t reflect the environment, how can I handle it, thank you

Ping @julien-moreau

hello, julien-moreau, i have another question. sometimes waterMaterial of the model must flow in the Z direction in the scene. forgive me, the direction of the model design is z, I can’t change it. ,how should I handle it ,thanks very much.

Hi @xiao_hu!
For the first problem, this is due to the clip plane which is set by the water material to save performances on it renders the reflection and refraction render targets. Your sample can’t work today. But I can add a fix to enable/disable clip plane so it’ll work.

1 Like

For the second question, are you talking about the wind direction?
If yes, you can refer to this playground (https://www.babylonjs-playground.com/#1SLLOJ#18) to customize the wind direction.

The water material has been design mostly to be used on grounds or planes. Maybe find the wind direction values will require you multiple tests ^^

yes,enable/disable clip plane, it’s what I need ,thank you.

yes, the wind direction,
I tried to let the water in the water pipe flow in the Z-axis direction, but the wind direction is only xy.
seek advice, water in the picture, is there a suitable way to render it,
can particles achieve this effect?
sorry, my english is not good.:disappointed_relieved:

Adding the option for clip plane :slight_smile:
Can you share a minimal playground so I can try to find a solution with wind direction ?

The better solution would be to work with a flow map (if it’s the real name ^^)

Thé flow map being a new feature for the water material

waterPipe.zip (155.6 KB)
i wrote the GLB loading code, but I couldn’t find the place to upload the model.

named “liquid life” or “water path” :star_struck::star_struck:u%3D1586746041%2C1332586480%26fm%3D15%26gp%3D0

hi, @julien-moreau I have to trouble you again.:sweat_smile: water material must be addToRenderList by skybox, but I need scene background transparent ,attached to HTML 5, can it be achieved? thanks in advance.

I think I am having a similar affect I want to achieve here, but am unsure how to go about it. I just switched from ThreeJS, and am having trouble getting a similar water affect as what they have in their water example three.js webgl - shaders - ocean. I think perhaps they are using the lights in the scene to create the highlights I am looking for. This way, a skybox wouldn’t be needed, and you could still see the water movement when nothing is added to the render list.

Can I achieve this with the latest build, or would that perhaps be a feature in the future?

Hello @julien-moreau,

I tried to enable/disable clip plane but I still don’t have reflection on the bottom.

But my main problem is when the camera rotation is beyond a certain angle, all the mesh clips to become black, what can cause this problem?

Thanks a lot for your feedback !

Hey @Yoco !
Unfortunately this is intended as it is by design. In fact, the water material is using 2 render targets (one for reflections and one for refactions). In that case, water can’t really be rendered on a sphere as it’ll require 360° reflections (typically using reflection probes). Basically, this water material should be used only to render water on planes

I’m planning to redo the water material for the version 5.0.0 of Babylon.JS and it would be cool if it can use reflection probes in case the water is applied on something that require 360° reflections.

1 Like

Hello! @ julien-moreau
How can i show the water flow in the pipe with water material or any other method? Thanks very much!

Hi @LBJ !
I’m not sure to understand the questions, do you mean flow like this? Water flow shader | IceFall Games If yes it is not possible right now but it can be added in future :slight_smile: