SvenFrankson Posted April 23, 2018 Share Posted April 23, 2018 Hi everyone, Help please ? I've spent quite a time stuck on a rendering issue and might need some inputs... I'm facing some issue when trying to render scenes in some cases. The issue looks like this : (the mesh is supposed to be smooth, triangles should not be seen) Any hint on what could cause this behaviour ? Here's what I've already found. - Here's the minimal scene I have with this problem : http://svenfrankson.github.io/test.babylon (how do I link it to the playground ?) - There's a ReflectionProbe and a ShadowGenerator in the scene, several Lights too. - If I set receiveShadows = false on the mesh, problem is solved. (but I'd like to keep receiveShadows = true) - Switching between PBRMaterial and StandardMaterial does not seem to change anything. I'd say at some point the geometry get broken, but I don't even understand how it would cause it to display like this (normals inverted on one axis ? or out of some range ?) If you have any idea, please enlighten me ! Thanks for your help ! Have a nice day ! Quote Link to comment Share on other sites More sharing options...
Sebavan Posted April 23, 2018 Share Posted April 23, 2018 This could be a weird shadow Acnea (really weird I agree)' Could you host a repro somewhere so that I can troubleshoot ? SvenFrankson 1 Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted April 25, 2018 Author Share Posted April 25, 2018 Hi, thanks for the input Sebavan It took me a while, because I don't know how to include a fully serialized scene in a Playground (the scene I linked with my question), and did not knew what was causing the problem so I could not isolate it in a playground... But, by eventually stripping the scene file of all it's components, I'm pretty sure I found it. Something (in my case, a "pop" animation at mesh instantiation) made the mesh scaling somehow different of (1, 1, 1) - yet, close to-, which causes the odd rendering. Here's a repro : http://playground.babylonjs.com/#SF5KIL My guess is it's a bug, maybe when normals are recomputed upon scaling ? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 25, 2018 Share Posted April 25, 2018 Hi SF! I did some goofing around... https://www.babylonjs-playground.com/#10MM3T#6 Lots of bad links to textures, so far... but.... there it is... in the playground, sucked-in from your SvenFrankson.github.io folder. FUN! I'm not real experienced at loading things, so I hacked cameras and lights a bit. I used a goofy scaleTo function... to ani-scale each of the 10 imported mesh nodes... 12 times larger. I don't see any tessellating problems, so far. Your issue is very interesting... curious. Needs investigatin'. (Wingnut slips-on his Sherlock Holmes costume, and lights his pipe, with a facial expression of deep contemplation) Quote Link to comment Share on other sites More sharing options...
Sebavan Posted April 25, 2018 Share Posted April 25, 2018 @SvenFrankson Could you send me a screen cap of what you are seeing in your repro ? Could you also send me what version, browser, os you are using ? I reproduce locally on any of my devices. Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted April 26, 2018 Author Share Posted April 26, 2018 Thanks a lot Wingnut, I had never used AppendScene, seems like it did the trick ! You're the best Textures are broken in this sample but it's not a problem, I create this scene by stripping parts of a larger one, hence the missing textures. The missing textures are about materials shown in the original scene but not linked to this cup, so they may as well go to 404 error On your playground, I have the same issue as when I open the scene in a Sandbox (see first picture I linked where triangles appears oddly) : it's perfectly failing and displaying the bug ^^ Well done ! @Sebavan I'm using a MacBook Pro mid-2015, OS X El Capitan 10.11.6, running Google Chrome Version 65.0.3325.181 I checked on Mozilla Firefox, the mesh is displayed well, on both Wingnut's playground and my repro. On the playground I linked, I see this While not exactly similar (I see no triangles here), this odd display is also caused by the scaling value, so I guess the causes are the same. Again, thank you both ! Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 26, 2018 Share Posted April 26, 2018 Thanks for the report (and for the nice words), SF. The PG was made by someone else... Nutiler, I believe. I just tweaked it a bit. Somewhere on the forum... is info about the differences between Append vs. Load, but I can't remember what they are. I suppose someone should try to upgrade it to AssetsManager... and then you'd have a sweet PG model loader tool. This is the first time I ever tried loading from a github.io URL. Good to see that it is possible. Your .babylon file might be the first ever, loaded-into PG from a URL like that. I don't see that rendering problem in any of these PG's ... using my non-Edge IE or my FF 52 ESR. No triangles issue, no "pumpkin ridges" issue, like seen above. hmm. I don't have Google Chrome, but I suppose I could install it, for testing purposes. Let's see what Sebavan discovers with his tests, and listen for more comments. I think I am going to do some web searches... see if I can discover anyone else having this same problem with webGL renders. I'll report findings if some are found. Scaling-related. hmm. *scratch scratch*. Sven, if you revert to older versions of BJS, any changes? (thx) Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 26, 2018 Share Posted April 26, 2018 If it was an OBJ id say: BABYLON.OBJFileLoader.OPTIMIZE_WITH_UV = true; Is there a similar setting for the asset manager? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted April 26, 2018 Share Posted April 26, 2018 thanks for the platform we ll look into it asap with @Deltakosh or mainly him cause i have a poor connection until sunday ? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 26, 2018 Share Posted April 26, 2018 @SvenFrankson does it work with chrome 66? It seems linked to the non uniform scaling: https://github.com/BabylonJS/Babylon.js/blob/master/src/Shaders/default.vertex.fx#L130 As an alternative we can think about a Boolean to turn off this support but it is clearly a bug in Chrome Wingnut 1 Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted April 27, 2018 Author Share Posted April 27, 2018 @Deltakosh I just upgraded to Chrome 66, same result, still buggy. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 27, 2018 Share Posted April 27, 2018 Do you mind opening a bug at Chrome bug database. As a workaround I can offer this: I can add a Math.IgnoreNonUniformScaling Boolean that could turn off the feature (or you can make sure your scaling is always uniform) Quote Link to comment Share on other sites More sharing options...
Guest Posted April 30, 2018 Share Posted April 30, 2018 This works fine for us with MacOS High Sierra 10.13.4 and Chrome Version 66.0.3359.139 (Official Build) (64-bit) We ll continue to look into the issue but you might try to update your drivers. Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted May 2, 2018 Author Share Posted May 2, 2018 Thanks @Deltakosh, I'm running OS X El Capitan Version 10.11.6, updated a few seconds ago, still having issues with the sphere. As far as I'm concerned, no need for a fix with a boolean, odd scaling where mostly due to rounding errors on matrix decomposing, making sure scaling is uniform is easily done. I'll check with Chrome bug database as well Edit : Here it is in Chrome bug database : https://bugs.chromium.org/p/chromium/issues/detail?id=846715 Quote Link to comment Share on other sites More sharing options...
Guest Posted May 2, 2018 Share Posted May 2, 2018 Much appreciated! 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.