May 4th, 2014
OTHER Scene Engine
The OTHER Scene Engine is a 3D graphics engine for iOS and Android that I created for the OTHER media.
The project had to meet the following requirements, mostly due to platform constraints.
- Written in C11 with an object-oriented approach (Not C++!)
- Low memory consumption
- Fast real-time rendering with shaders
- Compatible with Objective-C and JNI bindings
- GLES 2.0 with vertex and fragment shader support
The most interesting item is the object-oriented paradigm in C, a language that does not have object-oriented language features at all. C had to be used as using C++ would require changing and carefully stepping around existing code-base for applications that have already been written in Objective-C.
Scene engines operate by managing the scene with a scene-graph, which is a tree of 3D objects built with a child:parent model. The idea is that large sections of the tree can be modified, affecting all the children of that section in real-time on the scene.
The features of the engine were developed as they were needed, as such there was a lot of communication involved with defining the features and how they were to be used with the engine.
- Spheres with optional automatic level-of-detail mesh generation
- Axis-aligned billboarded ropes
- Animation system with different animation types and support for custom animations
- Multiple scene-cameras
- Support for off-screen rendering (Useful for post-processing effects)
- .obj model loading
The off-screen rendering meant we could draw a scene to a texture and wrap that texture around another object, in real-time. The screenshot above shows a level-of-detail sphere with a render-target of the Soldier from Team Fortress 2 wrapped around it, this particular scene is fully-animated, with the sphere and the Soldier spinning to demonstrate the render-target feature.
ECB Live iPad
The first commercial use of the OTHER Scene Engine is ECB Live for iPad. I worked very closely with my colleagues to implement a 3D interface for demonstrating a live representation of the data that the app uses. It is available for iPad on the App Store!
The 3D scene for this app includes full camera animation, user-interaction, animated ropes, objects, screen co-ordinate projection and all sorts of absolutely beautiful features, it really is an incredible app to use and demonstrates the full talent of the OTHER media and that quality never comes second with their apps.
The first use of this engine was to create awesome looking planets, inspired very much by the Wonders of the Universe app, also by the OTHER media.
And of course, feel free to ask me questions!