Skip to content

Release notes version 0.36

Leopold A-C edited this page Jul 10, 2023 · 20 revisions

true

General New Features

Most of new features comes from Blender development itself.

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!

Convert DupliGroups/Instance collections at bge runtime.

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.

BGUI library added to python modules folder

The BGUI library has been reworked to be OpenGL agnostic. Now it is totally based in blf, gpu, bge and bpy modules. If you want to see the modifications done from original BGUI library check this repository: https://github.com/lordloki/bgui We included the BGUI module in the modules folder similar to other specific modules as 'gpu_extras', etc. Only to remark that the video widget because we didn't find a way to refactor it yet.

These are 3 examples that work perfectly: https://github.com/UPBGE/upbge/files/8693534/examples.zip

image

Easy Online addon included

Now you can do multiplayer games easier!!

image

You can see a video about how to use it here: https://www.youtube.com/watch?v=5Asubrvm6Z0 and here: https://www.youtube.com/watch?v=RnAEyy0DtGQ

Enable support of SoftBody volumes when we uncheck Shape Match

Added the ability to play NLA tracks with Action actuator

Added the possibility to convert actions at runtime

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.

Remove hardcoded limit for objects linked in logic bricks editor

Allow antialiasing for ImageRender if nothing is moving

Allow full rendered passes in ImageRender (high perf cost)

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.

Added number of render passes per frame option

It was only available for ImageRender previously.

image

Added an option for AddObject to duplicate object data

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:

AddSoftBody.zip dup_mat.zip

Added an option to update LOD physics

Update LOD physics shape in the same time than render shape

image

Allow hidden lodlevels to be evaluated by depsgraph

Added experimental support for openXR

It is possible to use the VR inspection addon to enter into the VR mode in the game engine

image

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.

Allow activity culling for all object types (except cam)

Blender realtime compositor in viewport works in game engine now

Now it is possible to use almost every compositor nodes in the game engine. You have to activate it this way:

image

To note that the specific SMAA antialiasing option was removed as it was added SMAA in realtime compositor

Option for Show Profile and Debug Properties in bigger size for High Dpi Screens

image

Added geometry nodes action animation

Additionally, refactor world & material code. Now, the 3 nodetrees are evaluated under the NodeTree code.

Added a "Soft Shadow Override" per light switch

image

4 extra buttons added for Mouse

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.

Support for Grease Pencil modifiers animation added

The grease pencil action animation can be done animating timeoffset modifier frame parameter.

Use the up-to-date dshow format instead of death vfwcap format for camera capture

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.

New video play and video capture component template

image

Logic Nodes addon new features

Logic Trees are now applied as Python Components, not as Logic Bricks anymore. If you encounter any issues with different behavior, try removing and re-applying your trees. They also use an external python module now which can be installed/updated in the addon preferences.

VR Input Nodes

Added nodes to retrieve data about the current VR/XR Session like Headset Position, Orientation or Controller Position, Buttons and Aim.

UI Nodes

A new system was written from scratch to build UI systems using nodes. This system supports various Widget types like different Layouts, Buttons, Labels, Images etc.

Networking Nodes

A set of simple Nodes has been added to build local network systems and send/receive data from one client to another. There's an option to serialize and rebuild data.

Spawn Pool Node

A simple node to manage object spawning within specific parameters. There are some predefined behaviors now: Static, Simple Bullet and Physical Bullet. More behaviors will be added in the future.

Content Loader Nodes

These nodes allow loading of file data like shaders, meshes and textures from an empty scene. This makes it possible to easily implement loading bars and even display what is currently being loaded before switching to the main scene without the application freezing.

Additional Features:

  • Simple GLSL Filter Nodes
  • Custom Attribute access via Property nodes
  • On-Screen Message printing
  • Access to every Logic Nodes feature through python

New Python API features

Added KX_GameObject API to get/set friction at runtime

The object must have a physics controller for the friction to be applied, otherwise the friction value will be returned as 0.0.

Added code to convert appended actions during runtime

Using convertBlenderAction(bpy.types.Action)

Added a conterpart to convertBlenderAction

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.

Added ImageRender pre/post_draw callbacks

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

Added joystick vibration API to SCA_PythonJoystick

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()

Character maximum slope python functions recovered

uplogic Module

The uplogic module is the groundwork for logic nodes. It is designed to be used via python as well, so everything that works in nodes is also doable with just python. This module also contains various convenience-functions and wrappers. Some of the more interesting features are:

Easy Sound management

from uplogic.audio import Sound3D

Sound3D(speaker=game_obj, filepath='path/to/file.mp3', volume=1.5, occlusion=True)

for example will play a sound at the position of game_obj and will have occluding behavior (sound will be dampened by objects)

Easy Networking support

To establish a connection between two computers, just execute this code on the corresponding machines:

from uplogic.network import Server

server = Server(ip='192.169.0.10')
from uplogic.network import Client

client = Client(server='192.169.0.10')
client.connect()

From there you can communicate with the send callback: client.send(msg) To handle messages as a recepient, you can overwrite the on_msg callback on a client or server:

def on_msg(server, msg):
    print(msg)

server.on_msg = on_msg

Easy Animation management

Similar to Sound, there's a way to easily define an Action and modify its attributes while it's running:

from uplogic.animation import Action

action = Action(game_object=game_obj, action_name='idle', start_frame=0, end_frame=50)

if action.frame > 25:
    action.speed = 0.2
else:
    action.speed = 1.0

Currently this system does not support layer priorities, so it is strongly encouraged to use layers and the layer weight attribute.

UI module

Uplogic has its own UI module which is quite heavily inspired by the python kiwy project. To create a UI, simply instantiate your widgets and add them to a canvas or another widget:

from uplogic.ui import Canvas, Button

def on_press(button, widget):
    print('Button has been pressed')

canvas = Canvas()
button = Button(bg_color=(0, 0, 0, 0.5), hover_color=(1, 1, 1, 0.5), text='ButtonText')
button.on_press = on_press

Property and Attribute access decorators

When defining a Python Component or Object Extention, you can use these decorators to work with properties defined on the game object instead of attributes on the python object:

import bge
from collections import OrderedDict
from uplogic.decorators import game_props


@game_props('health', 'timer')
class Component(bge.types.KX_PythonComponent):
    args = OrderedDict([])

    def start(self, args):
        print(self.health)  # This will print the same as self.object['health']
        self.health = 0  # This will set self.object['health'] to 0
Clone this wiki locally