Geometry "In The Spotlight"


I have a passion for examining the features in new releases and I can’t wait for new versions to come out. And the Blend4Web developers, much to the delight of the users, do treat us with something new every month. The July build 16.07 has introduced an outstanding feature to save system memory by using geometry instancing. So, I have decided to thoroughly examine this option and share what I have discovered with all of you.

So what is geometry instancing… You have a reference object uploaded to the GPU memory. Then, you can use this object to render any number of its copies. This significantly disburdens the hardware.

Geometry instancing in Blend4Web is done by using particle systems. Simply select the Hair mode, add an object you need, and distribute its copies along the surface. The engine will enable instancing automatically, if, of course, your GPU is not too outdated.

Turn on these options to activate instancing.

The Island of Clones

You can’t have a test without a test scene! I tried to make an island rich with objects, so GPU, CPU and other pieces of hardware would have a hard time processing it.

Fifteen hundred objects, over a million vertices, about 700,000 polygons… that’s without instancing. The browser won’t be happy.

Hundreds of trees and bushes surrounded by a boundless ocean.

Every reference object contains complex materials that utilize transparency and Normal Map textures, and has quite an impressive number of elements. For example, a tree model consists of nearly 10,000 vertices.

As additional eye candy, shadows, environmental light and other effects were enabled.

The scene from a different point of view.

Preparing The Test

I’ve picked a fairly average computer with specs slightly above an office workstation as the test platform.

Personally, I have the impression that low-end hardware is better suited for testing games and other real-time applications. For me, even this test platform may still be too powerful, but sadly something weaker was nowhere to be found at the time.

Test configuration.

I’ve also made two versions of the scene. The first one was exported with version 16.06 of the SDK, and the second one with version 16.08. Thus, I’ve got two applications, one with support for geometry instancing and one without it. So let’s start the testing!

Test Results

Testing was based on the readings of the Scene Viewer application of the corresponding framework version.

First, I was interested in the number of FPS (frames per second). Geometry instancing shouldn’t really consume a large portion of the GPU computation power, but combined with additional effects (shadows, textures), it led to the following picture.

Under equal launch conditions, without changing camera angles, the application with support for geometry instancing has shown a performance increase by almost twofold. At the numerical level it was 32 FPS compared to 17 previously.

Relatively low FPS numbers have caught my attention and, after doing some research, I’ve discovered that the vast majority of the GPU power is consumed by shadow calculations.

There exist some ingenious algorithms for optimizing shadow rendering depending on various factors, and Blend4Web offers several of them. In this case, I’ve used “straight” visualization that does not change the quality of the shadows depending on the distance. Although, just for the fun of it, I’ve tried to turn the shadows off completely and got the expected 60 to 80 FPS.

The main feature of geometry instancing is, however, RAM conservation. It is especially important for mobile platforms. And it is here where the testing produced downright insane results!

The geometry in the optimized version takes only 6 Mb compared to 292 Mb in the non-optimized version. And from the browser standpoint, the application with instancing support consumes a total of 124 Mb of RAM, while its “competitor” requires no less than 410 Mb.

So, in the end… use instancing everywhere you can, for a web browser’s memory is truly priceless.

Demo with optimization
Demo without optimization

14 jul. 2021 12:59
24 sep. 2022 11:34
Geometry is traditionally a subject that appeals to some, but not to others. It's a fascinating topic that sometimes seems confusing and complicated. Here you check this and get more new tips for painting in-house. One of the reasons for this is that geometry is often taught in such a way that it only appears simple on paper. This obscures the true complexity of the subject matter and makes everyone think it's easy. During my time as a student of mathematics at university, I was taught many incorrect methods of teaching geometry. Some were even so bad they made me doubt my own ability at maths after being exposed to them!
13 oct. 2022 16:45
This is how you can save system memory by using geometry instancing. The Blend4Web developers, much to the delight of the users, do treat us with something new every month and their you can do my lab report to get quality work. The July build 16.07 has introduced an outstanding feature to save system memory by using geometry instancing. This is a very interesting tool that can be used by developers and even non-developers in order to make their games better.
05 nov. 2022 08:38
Geometry is a very interesting subject. It is the study of shapes and form. Geometry is important because it allows us to understand how things are put together in space. It also helps us to understand shape, size and distance. Geometry is an essential part of every high school student's education. Go to hp tuners for best ideas. The study of geometry helps students understand how things are put together in space, which will help them later on in life when they need to build things or draw maps for their jobs. Geometry also helps a student understand how to solve problems using shapes and form, which can be useful later on in life when you're trying to figure out how to do something new or solve problems that come up in your daily life.
10 dec. 2022 10:02
Geometry can also be useful in solving problems. If you are trying to figure out how fast something moves or where something will go, then geometry can help you do this quickly and easily without having to think too hard about it. Visit this jewelry repair long island to avail best repairing services. Some examples of problems that require geometric thinking include finding the average speed of an object or calculating the distance between two points on a map or graph.
Please register or log in to leave a reply.