So I am making Rpg game on electronjs and I have mid-size scene with lot of obj. A I want to implement Frustum culling but I didn’t find anithig how to make it work, only what I found was camera.isInFrustum() so i tryed something like this on one door obj.: https://playground.babylonjs.com/#VZRN2V#12
it starts on 250line :
Quistions: Is the better way to do it? and how to make work setEnabled funcion in for loop with all exported obj. ?
@jerome So babylonjs have defaultly frustum culling. Only what I can do is change the strategy of culling.
am I right ?
sorry for stupid question but my english is not the best.
yep
The meshes to be rendered are selected by a culling process of which you can change the behavior.
Selecting a BoudingSphere based test will increase the perfs and reduce the accuracy (leading potentially to false positives = selection of meshes that won’t be visible anyway).
You can even use mesh.isInFrustum() for your own needs more over (say, to disable unselected meshes ? or any other goal)