Made with Blend4Web

Geometry Instancing

Geometry instancing, a common CG technique, allows Blend4Web to render multiple object copies in just one draw call, which significantly reduces memory footprint and improves overall performance, especially on mobile devices where memory is scarce.

Instancing is typically used for placing vast foliage such as trees, bushes and grass. In the demo below the amount of video memory occupied by geometry decreased by almost 80 times (from 160 Mb to 2.1 Mb) after this technique was applied!

Hardware-accelerated instancing in WebGL 1.0 is provided by the ANGLE_instanced_arrays extension which is widely present across desktop and mobile platforms. This functionality is also included in the core of WebGL 2.0 specification written against OpenGL ES 3.0 standard. Blend4Web enables geometry instancing automatically on supported systems and falls back to non-instanced rendering in the rare case when this API is not available.

The source files for this example are present in both Community Edition and PRO distributions.