BlackMojito Posted January 8, 2018 Share Posted January 8, 2018 Hi Guys, I need to render very large architecture models. But in one certain frame, most of the objects in the scene are not visible. It seems that Occlusion Query can help a lot on such models. Because I have no experience on it. Could you please tell me if it is a good choice? Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 8, 2018 Share Posted January 8, 2018 Hello, unfortunately occlusion queries are only available on webgl2 If you don't have a lot of meshes, you can just let Babylon.js deals with it as we have a complete frustum culling in place. If you know which objects are not visible you can also manually call mesh.setEnabled(false) in 3.2, we will introduce the notion of Containers that can be used to turn on/off large number of meshes Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted January 9, 2018 Author Share Posted January 9, 2018 6 hours ago, Deltakosh said: Hello, unfortunately occlusion queries are only available on webgl2 If you don't have a lot of meshes, you can just let Babylon.js deals with it as we have a complete frustum culling in place. If you know which objects are not visible you can also manually call mesh.setEnabled(false) in 3.2, we will introduce the notion of Containers that can be used to turn on/off large number of meshes That's interesting. What is the millstone for 3.2? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 9, 2018 Share Posted January 9, 2018 early june: https://github.com/BabylonJS/Babylon.js/milestones Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted February 2, 2018 Author Share Posted February 2, 2018 On 2018/1/10 at 2:53 AM, Deltakosh said: early june: https://github.com/BabylonJS/Babylon.js/milestones Hi @Deltakosh, is the container available now in alpha7? Quote Link to comment Share on other sites More sharing options...
Guest Posted February 2, 2018 Share Posted February 2, 2018 yes boss! Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted February 4, 2018 Author Share Posted February 4, 2018 On 2018/2/3 at 3:17 AM, Deltakosh said: yes boss! So cool! Could you please tell me where I can find related code? Or would you mind give me some simple sample code, please? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted February 5, 2018 Share Posted February 5, 2018 On 1/8/2018 at 5:26 PM, Deltakosh said: Hello, unfortunately occlusion queries are only available on webgl2 If you don't have a lot of meshes, you can just let Babylon.js deals with it as we have a complete frustum culling in place. If you know which objects are not visible you can also manually call mesh.setEnabled(false) in 3.2, we will introduce the notion of Containers that can be used to turn on/off large number of meshes I want to comment on this topic before I forgot about it. Can I ask how this might be implemented? A "Container" referenced in a Mesh, or Mesh in a "Container" dictionary? This can very good for large scenes from Blender. The Layer construct within Blender can support up to 20 "Containers". The "Only selected Layers" boolean property could be replaced with a dropdown of: All Layers Selected Layers only Layers as containers (or whatever they are called) This could lead to the building really big sets from a single .blend for all the static structures meshes without all the javascript code to control things. I must admit that .ktx compressed textures have been a big disappointment, but when they are also mixed into the workflow along with the hidden "Force baking" checkbox, things could really scale up. .ktx only really shines with 4K textures. A 4k textures (with minmaps) only takes up 5mb gpu ram. Without compression 4k takes up 65 mb ram. A work flow which exports containers might work like: For each Layer, manually select all <A> meshes, and merge <ctrl-J> Click 'Force Baking' on each merged mesh & set size to 4K. Export, remembering not to save .blend, so further edits possible. Run batch script to generate compressed formats required. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted February 5, 2018 Share Posted February 5, 2018 On second thought, If you are going to all the meshes of each layer, then each mesh is equivalent to a "Container". So you would not need containers for this workflow, but would still be useful for non-merged meshes. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 6, 2018 Share Posted February 6, 2018 Here is the container doc: http://doc.babylonjs.com/how_to/how_to_use_assetcontainer A container is a virtual group that can add / remove meshes in one call. Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted February 7, 2018 Author Share Posted February 7, 2018 4 hours ago, Deltakosh said: Here is the container doc: http://doc.babylonjs.com/how_to/how_to_use_assetcontainer A container is a virtual group that can add / remove meshes in one call. Thanks! It is really useful for me to implement progressive rendering when the model is too big. I will read the source code too. GameMonetize 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.