UPBGEĀ Documentation



Mesh batching

The mesh batching is a render technique consisting in merging multiple different meshes into an unique one and render it. It allows to render faster a big number of meshes using the same material. The only limits is that the objects must be static.

The merge operations are made only from python through the new class KX_BatchGroup. This class is constructed by the user and shared between game objects, so the constructor must take objects owner:

batchGroup = bge.types.KX_BatchGroup(["Cube", "Plane"])

This line create a batch group and merge into it the mesh of the objects "Cube" and "Plane". After this, other objects coule be merged thanks to:

And split with:

The batch group can also be destructed:

Every object merged in the batch group are contained into:

And each merged object can access the batch group:


Camera frustum debug draw

An option to draw the camera frustum pyramid or cone in game engine is added under Camera -> Display -> Frustum. This option draw the frustum volume with light gray plane outside, dark gray inside and orange lines for volume edges. The frustum volume is depending of the current viewport dimensions because it represents the camera frustum as if it was used with the current viewport. So the embedded player which is able to use a different viewport (in case of default camera) than the one used by camera objects can fake the frustum volume.



Vibration actuator update

The vibration actuator can now allow the user set a different strength for the left motor than the right motor (if the game controller support it). These values are named in UI Strength Low Frequency and Strength High Frequency.


The same values are exposed in the python API of the SCA_VibrationActuator:

In the second part the python API offers attributes to detect vibration support or vibration running:

And allow the user to start or stop manually the vibration thanks to:

See also: SCA_VibrationActuator.

Filter mipmapping render texture

The user is now able to sample the render texture with a quick blur effect using mipmapping levels. First, the mipmaps generation must be enable by setting to True the KX_2DFilter attribute:
KX_2DFilter.mipmap = True

After this the shader can now set an lod bias or an lod level, for example:
uniform sampler2D bgl_RenderedTexture;

void main()
float level = 2.0; // mipmap level
gl_FragColor = textureLod(bgl_RenderedTexture, gl_TexCoord[0].st, level);


See also: KX_2DFilter.mipmap

Clean up and refactors
- Cleanup BL_ArmatureObject.[h/cpp]. (see d5e4433)
- Cleanup [EXP_/]ListValue.[h/cpp]. (see 6e7bb11)
- Remove useless code from Expression/ part. (see 9602bf1)
- Clean up headers in Expression/ part. (see 005ec40)
- Remove unused class CHashedPtr. (see 7e224f5)
- Clean up Expression/intern/ part. (see f1ebc2e)
- Refactor debug shape render. (see 735abb8)
- Use CListValue instead of SG_DList in BL_ArmatureObject. (see 3cd6c7c)
- Merge SG_IObject and SG_Spatial in SG_Node. (see 71c0ffa)
- Implement nodal render system. (see 4be59a3)
- Remove use of void * in python attributes callbacks. (see 6173a6a)
- Send RAS_CameraData for override camera settings in KX_KetsjiEngine. (see 783d801)
- Move camera projection computation in KX_KetsjiEngine::GetCameraProjection. (see b5ddf47)
- Add full support of inverse before GLSL 140 in shaders. (see 81d0d04)

Bugs fixed
- Fix alpha blending settings for geometry instancing and batching. (see 09f88ce)
- Fix parallax mapping backface render. (see 3721f98)
- Fix global dict double decref and sub modules incref. (see d13c519)
- Fix material name check without name. (see f9edafb)
- Fix call to AddObjectDebugProperties without blender object. (see 90d8620)
- Fix normal transformation in batching and in KX_MeshProxy.transform. (see 5b9e154)
- Add all libraries path for python component import. (see 520d6bf)
- Fix include from blenderplayer python main loop script. (see 8d36a66)