Some questions about Batching/Visibility and Procedurally generated triangles

This questions arise because I’m not too familar with the internals of the engine atm.

Regarding dynamic batching:

  1. The current PlayCanvas has dynamic batching in place, which i assume applies batching to all similar models within the hierachy in any hierachical arrangement, right? I’d assume this dynamic batching works by applying the individual transforms for the given batched dynamic meshes before sending it to the renderer via a custom transform vertex shader, right? Does it also works for Skins? I noticed in scene/batching.js, there is code for Skin batching it seems. If i use Dynamic batching but do not animate/move the models, does the engine still recalculate the transforms per instance every frame or is skips doing it because it’s not marked as dirty?

Regarding visbility and dynamic batching:
2. If I set an batched model’s visible property to be off (ie. via the enabled property), is the batched instance removed from draw call/batch processing list? Or only the visual aspect is only hidden? For my current implementation that I use for http://fl.corge.net/c/xuse (for an old engine in Flash Stage3D), i actually have custom culler implemenetations that can skip processing meshes whose visible property is set to off as well, and it also doesn’t get send to the draw call list.

Also, if i do batching with PlayCanvas’ BatchGroup, it seems there’s no getting around having to always create 1 entity (in the scene graph) per clone?

Can/should I script a completely new custom component similar to Model, but with it’s own internal batching mechanism outside of the prescribed BatchGroup manager system?


  1. I’m also looking into possibly porting over my Chunked Quad Tree Terrain LOD system (with current PlayCanvas’ raycasting/physics/culling queries to integrate over the quadtree structure i have) into PlayCanvas, but need some general advice if this is actually possible. Like, how do i get the rendering/physics engine to cull/raycast over my quadtree structure instead? It also draws from front to back order (easily done due to quad tree traversal), but how do I determine the draw orderof terrain chunks to the renderer?