meteoritool Posted December 6, 2018 Share Posted December 6, 2018 Hello everyone, I have a strange problem with waterMaterial in my scene, its hard to reproduce it in a playground so here are images : The problem is that the reflection part of the water becomes suddenly opaque. The ground becomes no more visible at some frontier (along x axis on this image). I made a video to make it more clear, focus on the transparency of the water : babylonjs.webm I don't know how to fix this ? Any idea ? Quote Link to comment Share on other sites More sharing options...
Guest Posted December 7, 2018 Share Posted December 7, 2018 It is by default When you look at a water pond from a certain low angle reflection is replaced by refraction I think you can turn that off with waterMaterial.fresnelSeparate = false Quote Link to comment Share on other sites More sharing options...
meteoritool Posted December 10, 2018 Author Share Posted December 10, 2018 @Deltakosh Thx for looking at it I've tried to set waterMaterial.fresnelSeparate to false but I can't notice a difference ? I could notice that the more the camera is high, the more the "limit" seems to move away... Somehow I need the camera to stay at low altitude in my scene ? It's hard to describe so I set up a page to display wheat I mean : https://www.orbis-somnium.com/production/zBugs/181210/indexWaterProblem.html If you just move back and forth, you'll notice it Is there a way to fix this ? Or what's the right way to handle water ? Any advice is welcome ^=^ Quote Link to comment Share on other sites More sharing options...
Guest Posted December 10, 2018 Share Posted December 10, 2018 This is the expected physical way Quote Link to comment Share on other sites More sharing options...
meteoritool Posted December 13, 2018 Author Share Posted December 13, 2018 Hello again @Deltakosh If I may insist one last time, I finally came across the "problem". In the official demo from the water doc, the water mesh is created with BABYLON.Mesh.CreateGround() ans is perfectly correct : https://www.babylonjs-playground.com/#1SLLOJ#19 But if the water mesh is created with BABYLON.Mesh.CreatePlane() it's different : https://www.babylonjs-playground.com/#1SLLOJ#549 I accidentally noticed that, thus my problem is solved ! But I still wonder why the result is not the same ? Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 13, 2018 Share Posted December 13, 2018 Bien vue ? meteoritool 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted December 13, 2018 Share Posted December 13, 2018 Oh gotcha!! This is because the ground has more vertices and thus interpolation is far more precise! Good catch meteoritool 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.