-
-
Notifications
You must be signed in to change notification settings - Fork 185
Release notes version 0.36
You can see what Blender developers did in blender release notes:
https://wiki.blender.org/wiki/Reference/Release_Notes from 3.0 to 3.6!
Instance Collections (which replaced groups), can now be converted during bge runtime.
Previously, convertBlenderObject() was only used to convert single Objects into GameObjects at runtime.
But in some case, it can be interesting to convert several objects at the the time in order to recreate relationships between them (to import complete rigged characters, to import a raggdoll made with several objects, or more generally to import several objects with some relations...)
Then convertBlenderObject was adapted to support Instance Collections conversion.
This patch does 2 things:
-
When we append a cube which has an action actuator, then convert the cube with convertBlenderObject, the action is registered in logic manager and can be played without doing anything on user side.
-
It adds an API to register a bpy.types.Action in the logic manager. Like that we can append only an action and play it. A counterpart is added to unregister the Action from the logic manager. It doesn't free the Action itself but you need to unregister the action from the logic manager before freeing it with bpy.data.actions.remove(Action, do_unlink=True). parenthesis: convertBlenderObject and derived methods counterpart is endObject. libLoad had a libFree counterpart which was unregistring loaded actions. So we added this counterpart for Actions only.
It allows for example to composite the main render pass with a full soft shadows pass or to display each frame a fully antialiased render.
If we set samples to 16 for example, the scene (COMBINED pass or other passes like SHADOWS, MIST, AO...) will be rendered 16 times in 1 frame (just for ImageRender) so the performances cost is very high.
See render_passes (v3d.shading.render_pass) documentation in API.
It was only available for ImageRender previously.
This adds code to duplicate completely a gameobject with its data.
Limitation:
- It concerns only the object and not it's potential children for now to simplify.
- As there is an existing bug when creating softbody with scale not applied, I didn't took into account scale when spawning a softbody (only position and orientation (not ori.scaled(scale))
2 test files:
Update LOD physics shape in the same time than render shape
It is possible to use the VR inspection addon to enter into the VR mode in the game engine
There are a very good non-free templates to reduce the difficulty of entry that VR may have. They are here: https://www.patreon.com/upbge_vr
Disclaimer: The template's author is not associated to UPBGE Team in any form. We point to his template because they are really good.
Now it is possible to use almost every compositor nodes in the game engine. You have to activate it this way:
To note that the specific SMAA antialiasing option was removed as it was added SMAA in realtime compositor
Additionally, refactor world & material code. Now, the 3 nodetrees are evaluated under the NodeTree code.
Current gaming mouses use to have 4 or even 6 buttons normally. Now, we add to support for these buttons. Support is added for logic bricks and python. Buttons 6 & 7 can need external configuration as they are positions for programmable buttons.
The grease pencil action animation can be done animating timeoffset modifier frame parameter.
This way we can capture high resolutions from Camera under Windows.
Additionally a fallback format is introduced. With this change whether the format introduced is not compatible with the camera specs then UPBGE captures in the default camera format avoiding black screens.
The object must have a physics controller for the friction to be applied, otherwise the friction value will be returned as 0.0.
Using convertBlenderAction(bpy.types.Action)
libLoad had an option to load actions. When libFree was called, the actions loaded were unregistered from logic manager.
Then an API to unregister actions from logic manager is added.
It doesn't free the Action itself. To totally delete the action, bpy.data.actions.remove(Action, do_unlink=True) has to be called after the action has been unregistered from the logic manager.
With recent custom bge loop refactor, it was not possible anymore to set evaluated scene render options before ImageRender pass.
It can be interesting to set these options:
- It is better to use evaluated scene before when we set the render options because the depsgraph is not notified to do an extra draw pass for no reason.
- We might want to set background transparent or disable post processing effects before ImageRender pass.
To make this possible again, pre_draw callbacks are implemented and inserted after BKE_scene_graph_update_tagged and before the image render bge draw loop.
Side note:
ImageRender often requires to hide some objects before the ImageRender pass. I think that for performances, it would be better to use ob_eval.hide_viewport = True than to use kxob.visible = False because KX_GameObject::SetVisible is using depsgraph which can be a bit slow. Furthermore, there if ob_eval visibility state is changed, it is just during ImageRender pass, there should be no need to restore visibility after bge.tex.refresh() contrarly to if we use kxob.visible
Additionally, little improvements to Vibration actuator and vibration actuator API.
Example of use for new API:
import bge
joysticks = bge.logic.joysticks
for joy in joysticks:
if joy is not None:
if joy.hasVibration is True:
joy.strengthLeft = 0.9
joy.strengthRight = 0.1
joy.duration = 2000 # 2 seconds
joy.startVibration()