Balder License – changes

A lot of effort has been put into the Balder project, and with the recent work on moving Balder onto multiple platforms and not only Silverlight. I’ve decided its time to change the license a bit.

For anyone using Balder today with Silverlight on the Web/Desktop, there are no changes – with the exception of one thing. If you’re developing a commercial library or package that can be conceived as a competitor to Balder – then you need a commercial license. Other than that, no changes.

The intention of the license change is to start getting commercial opportunities from all the work being put in and to finance the further development of the project. From being something I did a few hours a week, its slowly becoming a project that could easily take my entire attention and then some. And developers need food on the table as well. 🙂

Anyways, the license I’m proposing is as follows. The price-model for the additional platforms that are being added, has not yet been decided. If you have any input on the license itself, please leave a comment, drop me an email or start a discussion on the Codeplex site for Balder.

Balder License v1.0.

This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.


Balder is developed by Einar Ingebrigtsen, DoLittle Studios

Balder uses NInject; http://ninject.org/ – its license, Apache License v2.0 : http://github.com/ninject/ninject/blob/master/LICENSE.txt

Copyright © 2007 – 2010, Einar Ingebrigtsen, DoLittle Studios.

1. Definitions

The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the same meaning here as under U.S. copyright law.

A “contribution” is the original software, or any additions or changes to the software.

A “contributor” is any person that distributes its contribution under this license.

“Licensed patents” are a contributor’s patent claims that read directly on its contribution.

Commercial software is defined as software that directly or indirectly generates revenue for the person(s) or company using Balder.

2. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

3. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any contributors’ name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.

(C) Commercial software in the form of software libraries that directly or indirectly could be conceived as competitor of Balder, must refer to the commercial section of this license.

(D) Only the Silverlight version targeting Silverlight for the Web and Desktop are granted a royalty-free license and can be used freely in any commercial, open source, closed source, academic version.

(E) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

(F) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

(G) The software is licensed “as-is.” You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

4. Commercial, closed source, open source and academic

(A) The Silverlight version of Balder, targeting the Silverlight platform used on the Web and the desktop is the only version that is free to use. Other versions, such as Windows Phone 7, iPhone/iPad (iOS), XNA for Windows, XNA for Windows, XNA in general, Android and WPF needs a commercial license.

Commercial libraries that is based partly or fully on Balder and is sold commercially, must obtain a commercial license.

Commercial license(s) can be obtained from DoLittle Studios; license@dolittle.com.

(B) Academic and Open Source

Academic and other Open Source projects may use Balder free of charge as long as the license is included during distribution, if any – as stated in Section 3 – F.

(C) Any closed source projects were the source code is not enclosed during distribution may use Balder freely on any of its supported platforms as long as it complies with paragraph A.


Balder is out

Its only been 2 weeks since the last release, but a new release of Balder is ready.
It can be found here.

Here are the highlights :

  • Major breaking changes in namespace : Balder.Core.* is now Balder.*, Balder.Silverlight.Animation is now Balder.Animation.
  • Brought everything down from 2 DLLs to 1 DLL – Balder.dll, it contains everything
  • Swapped to the latest version of NInject – internally a lot of changes had to be done
  • Introducing Windows Phone 7 support in WP7 Silverlight Application with Hardware Accelarated graphics
  • Skybox support – property on Game and Viewport
  • Started working on iOS (iPhone/iPad) version
  • Started working on Xna version
  • Started working on Desktop version
  • One step closer to desig-time support, not quite there yet – hang in there
  • Shading support for textured models (both flat and gourd)
  • Lighting has been fixed a lot for OmniLight – takes into account the light color and the material information, still some work ahead on this subject though.
  • Some bug fixes in ASE loader + tests
  • Cleaned up some samples in SampleBrowser
  • Introduced IMap interface for Maps instead of tying everything to Image for DiffuseMap and ReflectionMap on Material. One can now implement any map types – but dimensions must be power of 2.

3D, Balder, Silverlight

Balder on Windows Phone 7

After a couple of days of work – actually more like a couple of hours over a couple of days (sneaking away during vacation to feed my computer abstinence), I’ve managed to port Balder to Windows Phone 7, a couple of quirks needed to be fixed – like this one.

For now it uses the same software rendering engine as the Silverlight one. Needless to say, its not exactly the most optimal solution, but at least it proves that most of the code runs across both Silverlight and Windows Phone 7 without doing much to it.

The next goal is now to implement a fully hardware accelerated version of Balder for Windows Phone 7, using Xna.

Wish me luck. 🙂



Dynamically discovering assemblies and types on Windows Phone 7

The last few days I’ve been busy porting Balder to other platforms, amongst those; Windows Phone 7 Series. There are some nuances between the different platforms Balder will support, one of these for Windows Phone 7 was that the Load() method does not exist on an AssemblyPart from the deployment object.

Balder has a discover architecture were it discovers different types from the loaded assemblies, in the Silverlight version I could simply go and get all the AssemblyParts and get it as a resource stream and load them to get the actual Assembly instance. Since the Load() method didn’t exist I had to to look elsewhere.
Fortunately, the Assembly class in the Windows Phone 7 version of .net has an overload for the Load() method that takes a string. According to the MSDN documentation it needs to take a fully qualified assemblyname, that turned out to be difficult to acquire. But, it turns out that its sufficient to pass it the short name – this can be derived from the DLL name found in the AssemblyParts property called Source.

From the TypeDiscoverer code in Balder :

private void CollectTypes()
if( null != Deployment.Current )
var parts = Deployment.Current.Parts;
foreach (var part in parts)
var assemblyName = part.Source.Replace(“.dll”, string.Empty);
var assembly = Assembly.Load(assemblyName);
var types = assembly.GetTypes();

3D, Balder

Balder post release – What now??

After quite a hectic 2010, a lot of work at my daytime job at Bouvet, taking on freelance work with projects utilizing Balder and maintaining Balder itself – I finally managed to get a new binary release out the door. Feels like a ton has been lifted off my shoulders.

You might be asking yourself, when is the next release – christmas time? What will it contain?
Lets start with the first one, when. I can’t exactly promise an exact time for that. But what I’ve been working on lately is a build server that will aid me in getting binaries out the door faster.

I’ve put together a dual core Atom based machine (to the left), that will be my continuous integration and nightly build server. Its running Hudson, a Java based continuous integration server software together with a NAnt build script. The purpose of it is to build continuously to get stuff out the door, but also assure that I’m not breaking anything while I’m developing new stuff. This means that I will commit myself to be a lot better at writing unit tests. Balder has a somewhat 20% test-coverage to date, and the last month I’ve broken a few of those tests, mostly due to architectural decisions that has rendered the tests unusable. So one of the things I will be working quite a lot on, is getting the existing tests up and running again, and also getting the coverage up to a decent level (80% +). Some parts of the engine is plain simple not testable, nor should it be testable. Such as drawing pixels on the screen, just doesn’t make sense to try even to test it. Making that code testable would make performance drop a lot, plus its pretty much impossible to do it.

The build will be dropping new binaries to my DropBox account, and I’m working on a simple Build Viewer in Silverlight that one will be able to use to pick up new stuff from there.

There is a few other reasons I want to have this system in place. If one takes a look at the Balder site up on Codeplex, you’ll notice a promise of not only Silverlight as the supported platform. Balder has since day one been written in a manner that would allow for more platforms, I just haven’t gotten around to actually implement anyone else. I had a Windows Forms version once, but dropped it. Now, on the other hand, I’ve been preparing to scale out to the following platforms :

  • Windows Phone 7 Series
  • iPhone
  • iPad
  • Xna – targetting Windows + XBox (Windows Phone 7, partially)

Also, there are quite a few elements in the Core library that needs tender, love and care. As for the Silverlight specifics, I really want to see the following in there soon :

  • Shaded textures (Flat + Gouraud)
  • Multitexturing
  • Bumpmapping
  • Managed “pixel/vertex-shaders”
  • Blend – Design time support
I haven’t decided were to start off yet, but I will be monitoring the “Issue Tracker” up on Codeplex and working actively with that to be my guide, so please cast your votes.

I’ve started the work on the shaded texturemapping, and it looks kinda cool (see the color difference at the bottom) :

Also worth mentioning, I’ll be focusing my energy also on getting documentation up to a decent level – I’ve included a lot of Xml documentation tags in the code, but have also started work on layout out samples in the help file. In order for people to start learning Balder, I’m also planning a few tutorials and some video tutorials as well.

One could say that I will not get bored with the above tasklist, I have enough to do – better start working. 🙂


.net, 3D, Balder

Balder out

I promised a release last month, but I had to do surgery and got a bit sidetracked with feeling sorry for myself being in pain. Anyhow, all is good and finally got the release out the door.

Its been almost 6 months since the last release. So this better be good. 🙂

The following are as complete a list I could compile of whats new and improved, btw. you’ll find the new release here. A new version of the SampleBrowser can be found here.

Performance improvements

  • Scanline renderers has improved quite a bit
  • Lighting calculations
  • NodesControl
  • Startup improvements
  • Content caching – loading the same content twice will only clone existing in cache
  • Color class – conversion plus operations are rewritten, introduced ColorAsFloats
  • Dependency properties now represented as Property with caching in it


  • World matrix + general matrix fixups
  • NodesControl fixed, one can now nest these, plus a massive performance improvement during databinding using the ItemsSource.
  • Mouse events actually working – had quite a few bugs with this, they are pixel perfect
  • PivotPoint fixed – working recursively
  • Completely rewritten rendering pipeline for stability, expandability and performance
  • Memory leaks in mouse event handling
  • Fixed Asset handling system – had a few bugs in it. Still has to revisit this.
  • Parsing of ASE files now use invariant culture all over the place. Had a couple of places it didn’t.

New features

  • Manipulation events on objects, implemented using mouse events.
  • They contain more detailed information about the object being manipulated, such as material information. Also, the events are not like the mouse events, they actually contain delta information about the manipulation occuring.
  • Tooltips, there is a property on all objects called Tooltip, you can create tooltips as you please, as you’d do with the TooltipService in Silverlight for other objects. The TooltipService will not work, hence the specialized property for it.
  • DirectionalLight – basic directional lighting
  • ViewLight – lighting that is “attached” to the camera/view
  • ArbitraryHeightMap – heightmap that can have its corners placed arbitrarily
  • SmoothingGroups implemented
  • New ASE parser – supporting multiple objects, world matrix. Also a lot faster.
  • Ring – geometry type
  • Started implementation of a ChamferBox – very basic at this point
  • Passive Rendering, will draw in wireframe during interaction and flip to full rendering when interaction has stopped. When no interaction, it will not render, Balder goes idle.
  • Pausing – for pausing everything.
  • Grabbing a frame from the Display can now be done
  • Container for renderable nodes – has its own world coordinate system that can be manipulated, lights can’t be placed in this container.
  • BubbledEvent system for events that needs to bubble up in the hierarchy
  • Messenger system for decoupling and stability
  • IGeometryDetailLevel – basically only used for Passive rendering at this point
  • Geometry artifacts such as Face, Vertex and so forth are now classes and has been generalized. Its now up to the implementing platform to create specialized versions of them.
  • Removed MEF and introduced a specialized TypeDiscoverer instead.

Development environment

  • Changed to Visual Studio 2010
  • Build server up and running with a more complete Balder.build file for continuous integration

Breaking changes

  • IGeometryContext does no longer hold the geometry data directly, introduced something called IGeometryDetailLevel. One can get the full detail level, which is the default (and only for now), by calling the method GetDetailLevel() on the IGeometryContext. In addition, any Geometry has a property called FullDetailLevel for convenience.
  • Mouse events has been specialized – they are named the same as one is used to from Silverlight, but the MouseEventArgs has been “duplicated” in Balder.Core.Input. The reason for this is that the Silverlight class for this is sealed and does not have a public constructor, and the mouse event handling needs to handled in a special manner in Balder. Also, the events are now bubbled as well through the geometry hierarchy.