Blender Behavioural Simulation

Blender Behavioural Simulation

powered by OpenSteer


Introduction

OpenSteer is a C++ library to help construct steering behaviours for autonomous characters in games and animation (from OpenSteer website). Blender is the free open source 3D content creation suite, available for all major operating systems under the GNU General Public License (from Blender website). Imagine the possibilities of both combined. BBS started as a simulation tool for a very specific situation of a research project at the Technical University of Eindhoven but has since than evolved into a more general design tool.

Real-time

By combining Blender and OpenSteer, both modelling and simulation can take place simultaneously in real-time. This means that the actors in the simulation respond to your modelling decisions while you model! Furthermore, the position and rotation of the actors are stored using Blenders flexible IPO keys. Thus, simulation runs can be manually edited, played back and saved to disk.

Demonstration video

License

The modifications to OpenSteer are licensed under the MIT-license. The Python scripts are licensed under the GNU General Public License v2 or higher.

Downloads (version 20090511)

The OpenSteer Daemon has been verified to compile and run under Ubuntu Linux. However, only a windows binary is provided here.

Installation

On Windows

Move opensteerd.exe to the directory where you want it to reside or compile it yourself, preferably with Microsoft Visual Studio.

On Linux

Compile OpenSteer Daemon using the provided Makefile in opensteerd/linux/, the binary will be located at opensteerd/linux/objs_optimized/opensteerd.elf

Both

Move the Python scripts (opensteerd.py and bbs_gui.py) to your Blender scripts directory (i.e. C:\Program Files\blender\.blender\scripts or ~/.blender/scripts). The script is accessible in Blender from Scripts > Animation > BBS.

Usage

Some basic Blender skills are required, like knowing how to add and edit meshes and curves. I will not explain how to do that, but there are excellent tutorials available on the web.
BBS uses the TimeLine functionality in Blender since this is the only way to retain editing functionality while animating. However, (afaik) there is now way to control this functionality by script. Therefore, a TimeLine area has to be visible when using BBS. The buttons on the TimeLine area have to be used to start, pause and stop a simulation or play one back.
Blender Python Screenshot

opensteerd path:

Provide the path where the OpenSteer Daemon resides.

Run Daemon:

Start the OpenSteer Daemon and make Blender connect to it.

Blender Python Screenshot

Terminate Daemon:

Terminates the Daemon. After terminating the Daemon the simulation can't be continued, but can be played back.

Mode:

Whether to base actor locations on the OpenSteer Daemon or the previously recorded IPO keys.

# Actors:

The number of actors in the simulation. Note that this can be changed even in middle of a simulation.

Path:

The path which the actors follow. This should be a Blender Curve Object with only Polyline knots. This can also be changed in the middle of a simulation. You can type in the name of the object or press A to use the active object. When you change the path before starting the simulation, you are advised to reset the plugin once before starting the simulation. Or else the actors will all start at an (arbitrary) default path and have to move to the selected path.

Obstacle:

A Blender Mesh the actors try to avoid.
A section is computed at the Z=1 plane. The OpenSteer obstacles are based only on that section.
You can type in the name of the object or press A to use the active object. Enter and leave editmode once on the obstacle to send the obstacles to the Daemon.

Reset Plugin

Resets the plugin and moves all actors somewhere close to the path.

Native Render

Switches to the internal OpenGL representation of OpenSteer. This breaks the connection with Blender and is probably only useful for debugging behaviours of the actors.

Notes

Suggestions

Please let me know your comments, suggestions and questions: omaskrijn.

If the above has been useful to you in some way, please consider adding your local architecture highlight to Archikey.com.