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:
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
A full render with refraction of a sphere and a IOR to 1.33 gives:
See also: BL_Texture.ior and BL_Texture.refractionRatio.
The user is now allowed to change the material of a mesh material slot using a python function. The python function is:
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:
See also: KX_VertexProxy.colors.
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:
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:
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.
The dimensions of a font or text object is now readable from the python API thanks to:
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:
Same for the vertices in a polygon:
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:
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_setup now accept as first argument the current
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)
hdr is one of the value:
See also: ImageRender and ImageMirror.
Implement directional light SSS
Now sun lights and hemi lights are supported by materials using SSS.
- 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)