Vousk-prod. Posted December 17, 2015 Share Posted December 17, 2015 Hi everyone, With DK we spotted a bug in the standardMaterial when materials are using combination of bump / reflexion / roughness. If a reflexionTexture (CubeTexture) is used, the roughness param is perfect to blur it.When a reflexionTexture and a bumpTexture are used together, everything is ok.But when we activate roughness on that combinaison of reflexion and bump - bang - awful artifacts appears. You can see that in this playground :http://www.babylonjs-playground.com/#1MYQJJ#71(comment / uncomment lines 43, 44) It's a bit tricky to debug because the shaders calculations seem correct. Could other eyes dive into it and help us spot the culprit function ? Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 17, 2015 Author Share Posted December 17, 2015 The more I observe this, the more I think it looks like the bump texture become too much sensitive to image compression artifacts when roughness is activated, making the speculars produced by reflexion covered with "too high value" spots. The bump texture used here is a png but if we check it deeply enough in photoshop, we can see a (very very) little bit of compression artifacts, and those area can correspond to the ugly dots in the PG. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 17, 2015 Share Posted December 17, 2015 i think replace bump map with normal map in this case not correct computed new normal . thats why you need normal map Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 17, 2015 Author Share Posted December 17, 2015 I don't get what you mean, the texture used for the bump is a normal map... Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 17, 2015 Author Share Posted December 17, 2015 Other strange fact, on the sphere, with no bump, only reflection texture and roughness :http://www.babylonjs-playground.com/#1MYQJJ#72 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 17, 2015 Share Posted December 17, 2015 These are seams.A known issue with WebGL as we cannot use GL_SEAMLESS Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 17, 2015 Author Share Posted December 17, 2015 You mean "seams" for the problem on the sphere ?Yes but why the higher the roughness value the harder those seams are visible ? If we totally disable roughness, no seams are visible at all. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 18, 2015 Share Posted December 18, 2015 create bump with normal map but not like your pic you can make from here and dont change any thing http://cpetry.github.io/NormalMap-Online/ http://185.88.152.218/pub/preview#23 vec3 newNrm = vec3(normalize(normal-(normalize( nrmTextureColor )*2.0-1.)*-0.5)); it work fine only reflect : http://185.88.152.218/pub/preview#10209 jerome and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
jerome Posted December 18, 2015 Share Posted December 18, 2015 impressive ! Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 18, 2015 Author Share Posted December 18, 2015 create bump with normal map but not like your pic you can make from here and dont change any thing http://cpetry.github.io/NormalMap-Online/ Thanks for the help but my pic is already a "real" normal map.In the bump slot of the first cube only - on the left -, the second cube uses a classical black and white pic as bump data, that was on purpose, to check if the bug is or not related to actual normal map information (but it seems not). I already know the online tool you mentionned, usually I use SSBumpGenerator (or sometimes the good old fellow CrazyBump) to generate my normal maps but this one is nice also (just a little lack of params to my taste).However, to check you proposal, I've switched my normal map in the PG with the default normal map created with this online tool.And the result is exactly the same :http://www.babylonjs-playground.com/#1MYQJJ#73 Here we can check the pic exported by the online tool and see that it has some noise in it (no problem, that's often required, many material simulations need some noise in the bump). We can then clearly see that this noise acts logically when no roughness, and acts strangely when roughness activated. To do more checks, I exported an other normal map with this tool, from a very clean starting pic and adjusting the blur/sharp param to avoid unwanted additional noise :http://www.babylonjs-playground.com/#1MYQJJ#74Same problem (in fact, we can even better see it, just go near the different sides of the cube and look at a sharp angle). The artifacts are not due to my previous normal pic used, it is related to the way the calculations are done when roughness is activated. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 18, 2015 Share Posted December 18, 2015 For the bump issue, this is one thing I cannot fix so far because I have no fraking idea what is the root cause Seams appears when glossiness is on because it forces the shader to use different mipmap levels which introduce the "connection" issue between cubemap faces Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 18, 2015 Author Share Posted December 18, 2015 Ok that make sense for the seams. Yep I know for the bump issue, that's why I've been calling for some assistance in the forum.(Come one boys !! DK has no clue, it is a unique occasion for someone to outperform god himself, don't miss that, it's the chance of a lifetime ! :lol: ) NasimiAsl 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.