Dev:Source/Architecture/External Engine Interface

提供: wiki
移動先: 案内検索

General API for external engines

Overview

The main goal of this is making a clean API for embedding external Game/Render Engine. Make able to use blender as general game/interactive environment application developer tool with custom or existing open source engines. The usual developing method is making models with a modeler and than build level or environment with custom program. Blender Game Engine still enable for us to join model and environment building, but the game engine has limited features and blender's main mission is to be a modeler not a game engine (I mean the programmer power is concentrating on modeler/renderer feature implementations ). Also there are several open source graphics/game engines, what are often suffers lack of level editor tools. This project wants to enable engine developers to use blender as a general real-time editor.

Todo

  • Think out requirements
    • real-time view
    • custom GUI panels
  • move current GE into a plugin
  • implementations:
    • ogre/bullet engine plugin (compatible with current Blender GE)
    • crystal space plugin
  • coming implementations:
    • Utah State University's (not yet released) game engine - contact blendmaster1024 on blenderartsts
  • document the API

Design Plan

Introduction

The main goal of this project is to allow embedding external rendering or full game engines. This also will provide an interface to binary plugins add custom components to User Interface. This feature will have python binding too. This allows more convenient tool creation, and can be used a richer UI component library then current python Draw module.

ex.: With this, current python tool scripts (Exporters, Edit/Object/etc mode tool scripts) may place they UI permanently somewhere into Buttons Window.

From external engine's view this feature is crucial if we want to edit it's objects properties. ex.: Particle System Editor Panel for Ogre3D embedded in blender allows edit real-time showing the result in External Game Engine Window (new feature).

Also an another new feature will be added. Plugins can define new Object Types extending some custom Properties the core object types. Plugins can provide an editor UI for the new object types. There will be a feature add in Outliner Window too. If an object is recognized new type, and there is an editor belongs to it, then the editors icon is shown same as current object types . All new feature will be wrapped by Python API. All binary plugins will be recognized, load and registered blender initialization. Python scripts parsing and registering will not change.

A New Space type will be added: External Engine View. This will show the engine real-time view.

(Current game engine will be moved into a plugin.)

(The Logic panel will be moved into a subtab under Plugins tab.)

New Plugin tab will be added to place plugins their own UI stuff it's subtab here. (placed at Logic panel's current place.)

Components:

  • Blender General Plugin API
  • External Engine Window (SpaceType)
  • User Interface Extension API


Blender General Plugin API


Introduction

This will handle the binary plugins. Provides same API for binary plugins than Python API for scripts.

Features

Provides consistent binary plugin API with Python Bindings. Plugin types:

  • External Renderer Plugin (no real-time, it is for external ray-tracers)
  • External Engine Plugin
  • (Texture Plugin, Sequencer Plugin maybe if needed)

Provided Interfaces:

  • general(always required): Plugin info, version, implemented interfaces.
  • UI extender: can create it's own subtab under Plugins tab with its widgets
  • External Engine:

can implement more feature, but not all necessary features: 3d view syncron mode, game mode asyncron, syncron game mode. Comment: in syncron mode, when game is paused, models are shown syncronuosly during editing.

  • Object Type extender:

can extends standard object types with some predefined properties. ex: ParticleSystem type can be an extended Empty or Impostor type can be derived from Mesh

Detailed Description

todo: implementation info

might be handled in most parts by this plugin-proposal Requests/Plugin-System --Peter Schlaile 19:57, 25 January 2008 (CET)
Deliverables

External Engine Window (SpaceType)


Introduction

This is a new External Engine View space type. This embeds External Engine's view. Provides various functionality to engine plugins, but it's not necessary to plugin support all. For converting blender's internal data the new Render API will be used, because it is same task to provide data for real-time render or not real-time render. If it isn't possible than plugins have to convert blender data.

Features

  • show one object
  • show a full scene
  • run the (game)application
    • pause mode: in this mode the datas are syncronized to blender data.
Detailed Description
Deliverables

User Interface Extension API


Introduction

This will provide the UI extendability feature for plugins. Goal of this is providing persistent lifetime to tools. With this tool's UI will act as a normal built in UI components.

Tools can be shown in:

  • buttons view
  • they can create a new tab
  • integration into existing tabs
Features
Detailed Description
Deliverables