User:Digini/Blade3D

Blade3D is a product currently in development that incorporates a 3D game engine and visual design environment. The product is aimed at hobbyist and professional game developers as well as educators. Blade3D is of particular interest to those wishing to utilize Microsoft XNA since it is layered heavily on this framework enabling content built with the application to run with little modification on Windows and the Xbox 360 game console.

Three different versions of the software are in development to cater for commercial users, hobbyist game developers and the academic sector. All three versions share the same platform and only differ in price and licensing terms.

Extensible object model
The Blade3D runtime engine and IDE are layered upon a flexible object model. This object model is interesting in that it utilizes a dynamic, nominative type system that supports concepts such as multiple inheritance, dynamic type creation and modification as well as many kinds of object change notifications. The benefit of this object model is that it abstracts the implementation of all the various subsystems so that all communication between objects in the system are isolated and capable of being intercepted. This facilitates many customization and extensibility scenarios as well as advanced uses such as distributed objects.

Direct manipulation interface
The design environment in Blade3D features a direct manipulation interface whereby all object properties are continuously updated in real time. Changes made to objects via property editors are instantly propagated through to the scene designer and vice-versa. Additionally the product provides full undo/redo allowing users to work iteratively and non-destructively without distracting compile/link cycles.

Visual logic diagrams
Although the application supports more traditional ways to add game logic, such as C# based scripting and integration with other .NET Framework programming languages, there is an additional feature that Blade3D supports called the Visual Logic Diagram. This is represented as a dataflow diagram superimposed on the 3D scene that may be edited in real time. Instead of writing code, a graphical programming language allows users to quickly add behavior anywhere in the system while the system is running. This is accomplished by dragging objects onto the design surface, adding "operators" and then connecting the blocks together. This system holds promise for a couple of reasons in that it is approachable for novice users and also because it is possible to optimize the dataflow graphs to be run in parallel on multi-core processors although at the time of writing the product does not yet take advantage of this optimization.

Dynamic material system
The rendering engine in Blade3D is based around GPU based shaders and is one of few game development systems currently available that has an integrated syntax-colored editor for the HLSL shading language. The editor is tightly coupled with the object model and material system such that changes made to shaders are immediately propagated to materials and so through to objects in the scene. This provides many benefits to end-users because in many existing game engines changes to shaders required an intrusive compilation step or possibly even rebuilding the entire application if materials were tightly coupled to the shader using a statically compiled language.

Script system
Digini chose to integrate a dialect of C# as the integrated scripting language. This makes sense because Blade3D is written in managed code and integrates most easily with other managed .NET languages. The application provides a built in editor for the language that features syntax-coloring and statement autocompletion functionality. No script debugging support is currently available at the time of writing other than simple console output tracing.

Community integration
Blade3D is one of the first software applications to tightly integrate an online community into the core of a desktop application. From entirely within the development environment users of the product may post snapshots to the community website, share projects or assets with other Blade3D community members and even enter bugs into an online database. Additionally the help system in Blade3D is internet based and can be updated dynamically by Digini and members of the community. The help system integrates reference documentation, samples and assets as well as tutorial videos that are streamed to the client machine.

Model import
Blade3D provides support for importing animated models from many different source formats including DirectX (.x) DarkBasic (.dbo) GameStudio A4,A5,A6 (.mdl) Poser/BioVision (.bvh), BlitzBasic (.b3d), Quake2 (.md2), HalfLife (.mdl), Half Life (.smd), HalfLife2 (.smd), MilkShape (.ms3d), WaveFront (.obj) and 3DS

Skeletal animation
The animation system in Blade3D is based on skeletal animation and makes use of the Visual Logic Diagrams system to allow baked animation data to be complemented with procedural content. Using the graphical system users can try out unusual animation graphs that interact with the physics, materials, sound and script systems. The final vertex skinning is done in a vertex shader on the GPU.

Physics
Blade3D is a managed .NET application and games built with the package are designed to work with minimal change on both the Windows and Xbox 360 platforms. This has its drawbacks however in that many mature game software libraries that are written in C and C++ cannot be used. One of the main consequences is that mature physics libraries such as Havok and PhysX cannot be utilized easily in Blade3D since they are currently unable to run on the Xbox 360. The Digini development team chose to write their own dynamics simulation engine and at the current time of writing it is still rather rough compared to an off-the-shelf solution. However the physics support in Blade3D does support rigid bodies and provides a generalized collision detection mechanism for both rigid bodies and particles that is useful. It is expected that the physics system will be reconsidered at a future date.

Particle systems
The particle system support in Blade3D is fairly comprehensive although unusual in that particle systems are built using the Visual Logic Diagram system mentioned above. The design is heavily influenced by the work of David K. McAllister in his Particle System API. Specifically particle systems in Blade3D have the notion of Geometric Primitives that can be used as emitters, colliders and for controlling many of the properties of the particle groups. Arbitrary numbers of operators can be connected together to form elaborate systems that integrate input from any object in the object model.

Post-processing effects
As standard the engine provides a suite of post-processing effects such as Bloom, Sepia, Radial and Gaussian blur etc. These effects are GPU based and can be easily extended by adding new shaders to the system or editing the existing system provided shaders.

Terrain
The terrain engine is currently heightmap based and uses a quadtree to provide level of detail support. A special terrain shader is provided that allows texture detail blending between a base texture and a number of detail textures. This works by making use of another texture called a material map which controls the placement and blending of the detail textures.