General performance info & guidelines

Nov 4, 2010 at 1:51 PM

I'm just wondering, what sort of performance can I expect out of Balder? How much does it use hardware acceleration (if any)?

And what would be the general "do" and "don't" guidelines for optimal performance? I mean Balder-specific ones - obviously, the less stuff you need to render, the faster it is etc.

Nov 4, 2010 at 7:41 PM

It all depends on what you want to do. 

Everything in Balder is software - there is no hardware acceleration, except for on the Windows Phone 7 version, which uses the hardware for rendering.

In general, everything has its cost. The most costly however is number of visible triangles/faces in a scene. Balder has frustum clipping and other clipping that optimizes things runtime, so it does not need to render more than you're actually seeing.

Secondly, lighting is costly. So, having several light sources is something you should consider not doing. Instead, you should look into adding static lighting in the 3D model before exporting it from your 3D modelling software.

The amount of objects can also play a role. The rendering pipeline in Balder is hierarchical - meaning that you can have a child within a child within a child and so forth, completely recursively. For every level in the hierarchy, it will combine matrices and also do clipping and such, all this is overhead you need to be aware of. This overhead is something that will be optimized, as its now using today foreach() to walk the children, causing the GetEnumerator() to be called - which again causes a new object to be created and garbage collection hitting every frame. So this will be better over time, when optimized.

If you have a lot of objects - and they are in fact the same, only properties such as rotation, scale or position changes - you should look into InstancingNodes and use its binding capabilities. It will render faster than the regular pipeline, since it has an optimized internal pipeline for these kind of scenarios.

Worth mentioning is also the usage of multiple textures - this has a performance impact of course, as well as bi-linear filtering. So be careful about how you define your materials.


Hope this helps.  

Nov 5, 2010 at 7:08 AM

I see. Thanks for the explanation!