Skip to content
tristan edited this page Sep 19, 2018 · 1 revision

true

Cube map refraction

The cube map was supporting only reflection in 0.1.0, now they are supporting refraction too. To control the refraction two option were added in the UI:

true

Ratio is the amount refraction is mixed with reflection, with 0.0 there's only reflection and with 1.0 only refraction. IOR is the Index Of Refection used to compute refraction.

From the python API these same option are exposed in BL_Texture:

BL_Texture.ior
BL_Texture.refractionRatio

A full render with refraction of a sphere and a IOR to 1.33 gives:

true

See also: BL_Texture.ior and BL_Texture.refractionRatio.

Material switch

The user is now allowed to change the material of a mesh material slot using a python function. The python function is:

KX_MeshProxy.replaceMaterial(index, material)

Where index is the material slot index and material the instance of KX_BlenderMaterial to use in the material slot.

See also: KX_MeshProxy.replaceMaterial

Multiple color layers per vertex

Previously only one color was stored in a vertex, now all the layers can be stored. Materials and nodes can now use these layers without issues. In the python side, the class KX_VertexProxy as a new attribute:

KX_VertexProxy.colors

See also: KX_VertexProxy.colors.

Rolling friction

The user is now able to set the rolling friction of an object, this friction is used for rounded shapes having only one collision point. The rolling friction is set in the UI under Material->Physics:

true

Physics suspend

The objects are now able to suspend totally their physics to optimize the physics simulation. Tow function were added in KX_GameObject to suspend and restore physics:

KX_GameObject.suspendPhysics()
KX_GameObject.restorePhysics()

In the same way the object physics actuator now has two more mode to suspend and disable physics.

See also: KX_GameObject.suspendPhysics and KX_GameObject.restorePhysics.

Text dimensions

The dimensions of a font or text object is now readable from the python API thanks to:

KX_FontObject.dimensions

The value returned is a 2D vector of the text dimensions including all the texts and the object scale.

See also: KX_FontObject.dimensions.

Python polygon and vertex access

The polygon can now be accessed through:

KX_MeshProxy.polygons[x]

Same for the vertices in a polygon:

KX_PolyProxy.vertices

See also: KX_MeshProxy.polygons and KX_PolyProxy.vertices.

World exposure and range

The world exposure and range is now able to be changed dynamically from python using the attributes:

KX_WorldInfo.exposure
KX_WorldInfo.range

See also: KX_WorldInfo.exposure and KX_WorldInfo.range.

Camera in scene callbacks

To know what is the current used camera when a scene callbacks is called, the callbacks KX_Scene.pre_draw and KX_Scene.pre_draw_setup now accept as first argument the current KX_Camera.

ImageRender and ImageMirror HDR

HDR was implemented since the version 0.1.0, but ImageRender and ImageMirror wasn't able to use it. This is solved by adding and argument named hdr in the constructor of the both classes:

ImageMirror(scene, observer, mirror, material=0, width, height, samples, hdr)
ImageRender(scene, camera, width, height, samples, hdr)

The hdr is one of the value:

bge.render.HDR_NONE
bge.render.HDR_HALF_FLOAT
bge.render.HDR_FULL_FLOAT

See also: ImageRender and ImageMirror.

Implement directional light SSS

Now sun lights and hemi lights are supported by materials using SSS.

Bugs fixed

  • Fix normal update of BGE skin deformer. (see #c1012ab)
  • Fix VAO VBO state (see #0a4ae9c, 051dc49, beb9189)
  • Fix VAO forbidden for animated meshes. (see #07d93e6)
  • Forbid setParent to an object in an inactive layer (see #a616424)
  • Fix global dict freed in blenderplayer after Py_Finalize. (see #0980316)
Clone this wiki locally