mr_pinc Posted November 17, 2017 Share Posted November 17, 2017 When I animate the visibility property on a handful of meshes there appears to be a weird rendering error. As seen in the attached screenshots. When visibility is set to 1.0 everything renders fine. When set to 0.99 the z-ordering appears to get messed up. Any guidance on how to resolve this would be helpul.. Visibility set to 1.0 Visibility set to 0.99 Quote Link to comment Share on other sites More sharing options...
adam Posted November 17, 2017 Share Posted November 17, 2017 https://doc.babylonjs.com/resources/transparency_and_how_meshes_are_rendered Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 17, 2017 Share Posted November 17, 2017 Yep, this is because alpha turn off depth writing but you can see in the link shared by Adam that we have multiple options to help here like depth prepass or separateCullingPass Quote Link to comment Share on other sites More sharing options...
mr_pinc Posted November 17, 2017 Author Share Posted November 17, 2017 Ok I'll review those. Also interesting is that after upgrading to the latest beta, setting the opacity to 0.5 makes the whole material ultra - bright - while setting it to 0.99 like the previous examples does not yield the same depth sorting problems. Visibility set to 0.5 in the latest preview release (v3.1-beta-5) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 17, 2017 Share Posted November 17, 2017 We reworked and improve transparency lately so this is a good news Quote Link to comment Share on other sites More sharing options...
mr_pinc Posted November 17, 2017 Author Share Posted November 17, 2017 Well it's kinda good news. It shouldn't be that bright. At 0.5 visibility you should be able to see through it which the screen shot does not show. The attached screenshot demonstrates 0.5 visibility as it should look You can see through the mesh at 0.5 visibility on an alpha build of 3.1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 20, 2017 Share Posted November 20, 2017 If you think it is not accurate, I could use a little repro in the Playground as we are working on closing all open issues for 3.1 Quote Link to comment Share on other sites More sharing options...
mr_pinc Posted November 21, 2017 Author Share Posted November 21, 2017 Not sure if this nails the issue but here you can see a mesh with a PBR and visibility set to 0.25 is fully opaque. https://playground.babylonjs.com/#HBDNNA Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 21, 2017 Share Posted November 21, 2017 The PBR has to be set in blending mode for that: https://playground.babylonjs.com/#HBDNNA#1 Quote Link to comment Share on other sites More sharing options...
mr_pinc Posted November 22, 2017 Author Share Posted November 22, 2017 Ok setting the blending mode now does indeed fade the items as before but there still remains the issue initially described. I'll have to really dive into the meshes to see if I can adjust on my own. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 24, 2017 Share Posted November 24, 2017 the zprepass might help in your case: set needDepthPrePass on the mesh to true. Quote Link to comment Share on other sites More sharing options...
mr_pinc Posted November 25, 2017 Author Share Posted November 25, 2017 Tried that but still no luck. Once I get a couple hours I can really dive in. 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.