Dad72 Posted June 7, 2017 Share Posted June 7, 2017 Hi, When using several camera, the water material is not displayed. http://www.babylonjs-playground.com/#1SLLOJ#292 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 7, 2017 Share Posted June 7, 2017 Ping @Luaacro Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 8, 2017 Share Posted June 8, 2017 Thanks for reporting ! I'll fix it tonight Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 9, 2017 Author Share Posted June 9, 2017 19 hours ago, Luaacro said: I'll fix it tonight Ok, but the bug seems always present. Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 9, 2017 Share Posted June 9, 2017 Because I did not found enough time. This evening sure ! I'll share de pull request with you Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 9, 2017 Author Share Posted June 9, 2017 Oh ok. Thanks Luaacro. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 9, 2017 Author Share Posted June 9, 2017 I try to do the PR and hope that's enough. I suppose yes. https://github.com/BabylonJS/Babylon.js/pull/2271 Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 10, 2017 Share Posted June 10, 2017 Hey, I see your PR right now Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 10, 2017 Author Share Posted June 10, 2017 PR closed, I tried. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 11, 2017 Share Posted June 11, 2017 I just found the problem! When a layer mask is set on the second camera, the internal render targets are empty. I need to find why Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 11, 2017 Share Posted June 11, 2017 Maybe @Deltakosh has an idea Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 11, 2017 Author Share Posted June 11, 2017 I doubted me that the problem was not that the multi-camera, as trying to change the cameras only, the problem was the same. I hope you find a solution. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 11, 2017 Share Posted June 11, 2017 Can you repro on a simple PG? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 11, 2017 Author Share Posted June 11, 2017 Yes I had made an opening of this http://www.babylonjs-playground.com/#1SLLOJ#294 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 12, 2017 Share Posted June 12, 2017 Fixed!!!! julien-moreau and Dad72 2 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 12, 2017 Author Share Posted June 12, 2017 Yes it works. For cons, I noticed a problem where water does not reflect the correct cloud sky as seen on the pictures below PG here: http://www.babylonjs-playground.com/#1SLLOJ#295 Results on the image that comes playground : (Left is error, right is the result normally) One can also see the results on the image that comes to my current project Thank you DK Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 12, 2017 Share Posted June 12, 2017 Pinging @Luaacro Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 12, 2017 Share Posted June 12, 2017 I'm on it! Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 12, 2017 Share Posted June 12, 2017 scene.activeCamera.layerMask is always "2". And in the demo, the water is in layerMask "1". Need to find why (@Deltakosh help granted xD) Edit: in scene.ts, when rendering the custom render targets, there is this line: "this.activeCamera = renderTarget.activeCamera || this.activeCamera;". Why scene.activeCamera is not the one with layerMask = 1 Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 12, 2017 Share Posted June 12, 2017 @Dad72 I just found the solution line 46 and 47. Because you use layer masks, you have to provide the active camera of the internal render tagets: http://www.babylonjs-playground.com/#1SLLOJ#300 Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 12, 2017 Author Share Posted June 12, 2017 Thanks Luaacro.is Perfect Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 12, 2017 Author Share Posted June 12, 2017 I do not know if this is normal, but maybe yes. When you have a large extended water with large terrain. refraction is considerably lower FPS of 80%. Is this normal? Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 13, 2017 Share Posted June 13, 2017 The problem with water is that we must render reflection and refraction. Then, in a simple scene you terrain is rendered 3 times for: - refraction - reflection - the normal render more the terrain is high quality more you need a GTX1080 ^^ Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 13, 2017 Author Share Posted June 13, 2017 I have a GTX 960 4GB (1080 is coming soon). it's a good graphics card the 960. Yet refraction underwater (with heightmap) gives me 5 to 12 FPS. I find it strange because I think my graphics card allows me to use very greedy games. and there just water, is very greedy in Babylon Is an optimization problem for water ? I think even a GTX 1080 would not be sufficient. This is not normal already with a GTX 960 that allows me to play to HD games with refraction, reflection and other ... Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 13, 2017 Share Posted June 13, 2017 can you try: - just create ground and don't create water marerial - create ground and water material but don't assign water material to ground (just to know if internet rtt are the problem) Then give me the FPS you have for both case ? Thanks ! It'll allow me to isolate the problem because I cannot reproduce here 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.