Klaas Posted March 14, 2018 Share Posted March 14, 2018 Hello! I discovered, what i call a bug, with instances and frustum culling. When the original mesh got submeshes the submesh culling of the instances relate to the position of the original mesh. This results in disappearing instances (submeshes) when the original mesh leaves the frustum. My quick hack was BABYLON.SubMesh.prototype.isInFrustum = function (frustumPlanes) { if( this._mesh._isAllwaysInFrustum )return true; var boundingInfo = this.getBoundingInfo(); if (!boundingInfo) { return false; } return boundingInfo.isInFrustum(frustumPlanes); }; //then setting orginalMesh._isAllwaysInFrustum = true; I think the current behaviour is not intended. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 14, 2018 Share Posted March 14, 2018 Can you repro in the PG? because this demo for instances (ahaha!) does not seem to have the bug: http://www.babylonjs.com/demos/instances/ Quote Link to comment Share on other sites More sharing options...
Klaas Posted March 14, 2018 Author Share Posted March 14, 2018 Hi! i have to admit you are right. That doesnt seem to be the problem in my scene. But the code fixed the problem !?!?! I've tried to reproduce the problem in PG, but it doesnt show up. Now im more convinced the problems lies in the LOD and multimat system. But ... look here http://test.pixotron.net/submeshbug/submeshbug.html when you turn around an navigate the materials get pretty mixed up. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 15, 2018 Share Posted March 15, 2018 Sure thing..but if you still consider it is a bjs bug, you need to provide a clean repro in the PG My motto: "Free fixes for repro" 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.