News

Twitter.png
 Twitter / BalderEngine News Feed 
Sunday, October 23, 2011  |  From Twitter / BalderEngine

BalderEngine: Curious about whats going on with Balder - new post explaining history and current state of affairs : http://t.co/4hfXgYAy

Thursday, October 20, 2011  |  From Twitter / BalderEngine

BalderEngine: @md_oppenheimer @rschu Thanks.

Wednesday, October 19, 2011  |  From Twitter / BalderEngine

BalderEngine: From another angle : http://t.co/TA4TU8lR

Wednesday, October 19, 2011  |  From Twitter / BalderEngine

BalderEngine: Working on software rendering fallback scenarios for Balder. Software based deferred per pixel light. http://t.co/gzlMm1tZ

Tuesday, August 09, 2011  |  From Twitter / BalderEngine

BalderEngine: Sneakpreview of whats coming in #Balder #3D #Silverlight http://t.co/7Qmxzhb

Monday, July 04, 2011  |  From Twitter / BalderEngine

BalderEngine: Modelling the Real World with Silverlight 5 3D and #Balder : http://t.co/6DSJYah

Wednesday, April 13, 2011  |  From Twitter / BalderEngine

BalderEngine: Balder source code with Silverlight 5 HW accelerated 3D pushed to the Codeplex repository. #Silverlight #3D

Wednesday, April 13, 2011  |  From Twitter / BalderEngine

BalderEngine: Balder - Silverlight 5 Hardware 3D support out now : http://t.co/5pxnCAx

Sunday, February 20, 2011  |  From Twitter / BalderEngine

BalderEngine: @runegri Thanks for the heads up on the URL.

Sunday, February 20, 2011  |  From Twitter / BalderEngine

BalderEngine: @runegri Third time is a charm : http://t.co/SjrYIRc

 Twitter / BalderEngine News Feed 
myself_mvp.jpg
 Einar Ingebrigtsen - Balder News Feed 
Saturday, January 21, 2012  |  From Einar Ingebrigtsen - Balder

As I briefly mentioned earlier I am endeavoring on a project which is going to demand a lot from me physically, but also from a technical perspective. I have a lot of things on my plate, during daytime I'm 100% engaged with work at clients, nighttime is the time I have to squeeze in a lot of activities into. For one, I have two kids that needs my attention - and I have a golden rule of engaging with them from the time I get back from work till they're in bed. This leaves some 2-4 hours left per day to do all the things I do. I therefor have to be smart with my time and make the most of it. Adding things into the schedule is hard and if I add something, it in general must have a synergy with something already in my schedule. In my schedule I have a couple of open-source projects that I focus a lot of my energy on; BalderBifrost and Forseti, so pretty much anything I put in must relate to these in some fashion. Geekrider arose concretely from this need of synergy. I need to focus more on physical exercise and brought in Geekrider with the synergy of pushing forward development on the open-source projects I'm involved in forward. Balder will hopefully serve the purpose of 3D visualization and bringing forward the a few features that I want to have in that project. As a general web platform, I could have gone for anything already out there, but I wanted to push forward features in Bifrost, I therefor decided to build the site from scratch on top of it and also push into the cloud by hosting it on AppHarbor. Since the site will become very JavaScript intensive, and I pretty much get allergic reactions when I don't write tests or BDD style specifications for my code, the last project also will get some love; Forseti. The reasoning behind the project is that most test runners out there has so many moving parts in the form of dependencies to get up and running and they're also very focused on running things in a browser. Forseti is aiming towards something very different, a headless runner for JavaScript tests based on Env.js not using by default any browsers to execute the tests/specs.


One of the goals for Bifrost is to make it easier for developers to create rich web based applications, promoting good software development practices. Today, the RIA space is rapidly changing and for the most part moving away from plugin technologies such as Flash or Silverlight and focusing more on the open standards found in HTML, CSS and JavaScript/EcmaScript.


From a fronted development perspective, Bifrost is taking on this latter part. Traditionally one would compose the resulting web page that is handed over to the client on the server. Multiple solutions exist out there for doing so, and specifically in the .net space, ASP.net and its derivatives are the most popular ones. Rendering, as this is often referred to, adds an extra load onto the server - not only is the server responsible for dealing with the request from the user, wether it is getting data or performing an action, but it also has to transform the result into something the client can show. On top of all this, it has to deal with security. This pattern is a very proven pattern, but in my opinion not the pattern we want to be doing moving forward, and therefor Bifrost will focus on a different pattern. Sure, Bifrost will not only be compatible, but also support out of the box the traditional route - but for now in an opinionated fashion by only supporting ASP.net MVC. The technique that Bifrost will be focusing in on is the Single Page Applications, were you basically hand over the "rendering" to the client and let the client compose the page by swapping in and out elements at runtime. This is in fact nothing new, ever since AJAX became the big thing, we've pretty much been doing this - but only for parts at a time and even letting parts of our page be swapped out for new versions being rendered by the server dynamically.


Bifrost will have a composition technique that is based on, as most things in the framework, conventions. The focus will be on Features and one can point to a feature simply by adding a <div/> tag and give it the attribute data-feature="[name of feature]". Based on the configurable convention, Bifrost will find the necessary files representing the feature. Looking at the page from Geekrider as it is at the time of writing this post, we'll have the following.


NewImage


So, back on track. Now that we have this, what is the next logical step?  Up till now, Bifrost has been very server side rendering focused, sporting an extension for ASP.net MVC and taking advantage of that stack. That is about to change, or should I say, the fact that it has been the only way to use Bifrost is about to change. A set of REST endpoints will be exposed from Bifrost, enabling any client to interact with the framework. From a Web developer perspective, this is not good enough, we're therefor working on bringing in a JavaScript library that will just nicely integrate with all this.


In addition to the goals summarized thus far, I've also got another goal for me personally; I want to become more productive with tools other than what I'm used to. I recently bought a MacBook Air, an impressive piece of hardware - but it doesn't sport the same specs as my MacBook Pro or my iMac, I've therefor decided not to put any virtualization software on it to run Windows. This means I have to start using other tools than Microsofts Visual Studio for my development. For .net development, I'm for now using MonoDevelop and for general HTML, JavaScript and CSS development, I'm using TextMate. My long term goal is to be using TextMate for everything.


Summarizing, Geekrider will be the proof of concept for features added to Balder and Bifrost - driving forward with new thoughts and ideas. I will try to blog about the progress as much as my schedule can permit.


This post was brought to you by


PartyPoker


 

Sunday, October 23, 2011  |  From Einar Ingebrigtsen - Balder

In 2007 I started something called Balder, a 3D engine for the Web using Silverlight. Back then with Silverlight 1.1 Alpha and later 2.0, there really weren't that many options to make it especially feature rich, nor fast. My first goal when I started this whole thing was basically to achieve 3D rendering on the Web across multiple platforms (Windows + Mac, later Moonlight on Linux) and have a declarative programming model for 3D. This is still the motivation for Balder; to be cross-platform on the Web and be declarative in its nature. I've never had the idea of being a 3D engine to compete with the big engines out there that are both free and commercial, this has been partly a research project for me to learn Silverlight properly from the ground up and also maintain a foot within the graphics programming industry which I still hold dear. Even though my day to day job is something completely different these days, I've always had side projects that kept me somewhat close to what was happening in the games industry that I left behind some 10 years ago.


Back in 2007 with SL1.1 and 2.0, you basically had to either built on top of the built in primitives, which were super slow or you had to do magic like create yourself a realtime PNG encoder and draw pixels manually with code and then hand over the generated PNG to an Image control inside Silverlight.


With Silverlight 3 came along the WriteableBitmap that enabled to skip the PNG step and Balder started to pick up performance and features were a lot easier to create. This story continued through for Silverlight 4 and Balder has received many a make over of both its rendering pipeline, but also internal architecture while I've learnt more and more in-depth of how to do things in the best way inside Silverlight. With the announcement of Silverlight 5 came a long a low level interface for drawing 3D utilizing the GPU sitting inside your graphics adapter. Finally Balder could shine with great performance and still maintain its declarative, Silverlighty way of doing things.


For SL5, that was the gold-plated story - the reality is quite different. Balder needed yet another architectural make-over in order to achieve hardware rendering with Silverlight. The main problem being that rendering now had to be done on a specific rendering event that sits on a completely different thread than the regular UI thread inside Silverlight. This poses quite a few problems when Balder is built to be declarative and have all the binding capabilities that Silverlight offers.


Most of the architectural change has been done - but far from being finished. There are still some holes that needs to be filled internally in Balder that has to do with code-smell basically. At one point in time, development of Balder went forward too fast - and code-quality was during this period suppressed in favor of number of features per day that could be implemented. I know, I'm not proud, but it was the reality for the period that things needed to get done and they needed to be done fast. Another aspect of Balder development has been the lack of being able to properly test things with unit tests all the way. Quite a few times I've tried to do the effort to retrofit tests without succeeding all the way. Silverlight is basically too hard to test if you want to be lightweight with your tests. Sure, there are things out there that mock out the runtime and you can make most of your code so that you don't have dependencies to the Silverlight runtime and just run the tests on the desktop framework. I've done all the techniques out there but never been happy with the flow. This is an ongoing things.


Are we there yet?
Phew.. So, were are we at?  Balder has a default branch which is still on the SL4 level where I left off over a year ago and there is a parallel branch for the SL5 parts and all the refactorings and changes that had to be done to bring Balder to SL5. There are some bugs and quirks in it and development is not going as fast as I would have hoped. There are a few reasons for that, one is the lack of tests and not a good story for retro fitting them. I've started doing it with MSpec and writing in a specification way instead, made it a lot easier but there is still a lot of work to be done there. The second reason things are going slow is that Microsoft has yet to come up with a good cross platform story for the 3D bits, in fact, thus far there is none - it only works on Windows for now. I've been probing them to get an answer, but haven't gotten one yet. To be honest, it has for a while halted my motivation for moving forward at the same pace, until last week when I had a breakthrough in rendering that increases performance quite a bit and also the quality for software rendering, which will then prove as the fallback solution for Mac.


Deferred software rendering


In addition the latest versions of the most used browsers on Mac supports WebGL, which is something that can be used directly from Silverlight as well. After getting the software rendering fallback done, I'll start looking at the WebGL approach as a second fallback scenario for those browsers that supports it.


Another aspect of the SL5 codebase is that Microsoft changed security from the beta released at Mix to the version released at Build which lead to in-browser shaders not being allowed to do loops. Balder supported 5 light sources with the pixel shaders I wrote for the Beta version, but can only do one with the latest version of SL5. In order to fully support an arbitrary number of lights I'll have to move over to deferred rendering and that has quite a few implications on how Balder works as well. But a job I've started and will make it the default rendering method across the board for now.


But all that being said, there are some critical issues that needs to be solved - they are issues that really makes it hard for me as a developer to get the velocity I want, so I will be going back and forth researching and bringing back the code quality I want to feel comfortable.


 


So, what about the tag-line of Balder and devices?
A couple of years ago I saw the opportunity to bring Balder onto more devices and started optimizing the code-base and extension points to be able to bring to things like the Windows Phone 7, iOS, Android and others. This is something I'd still love to do, but will not focus on it for quite a while. There is still too much work on the Silverlight side to justify focusing on devices just yet. There is a version of Balder for WP 7, but not for the latest Mango and to be honest, WP7 is in fact the hardest of these devices to get any proper rendering on since one is not allowed to write shaders for that device.


 


Conclusion
As you might understand, Balder is still active - not just at the same pace as before, hoping to pick this up a little bit moving forward. There are some code-rot that needs fixing, increase of code quality and things like that holding back development a bit, but also technical challenges with the platform. Since I'm relentless with the cross-platform part and am not willing to budge on it, I will focus my energy on getting that working and hopefully working good. If this was a commercial product, I would probably not go to the lengths I am to get the cross-platform parts working, but one has to remember that my original motivation for going down the road of creating Balder in the first place was based upon cross-platform - take that out and personally I will lose the biggest motivation I've had with the project.


I've established a Trello board were people can see what I'm focusing on these days for Balder.


 




Sunday, October 23, 2011  |  From Einar Ingebrigtsen - Balder

In 2007 I started something called Balder, a 3D engine for the Web using Silverlight. Back then with Silverlight 1.1 Alpha and later 2.0, there really weren't that many options to make it especially feature rich, nor fast. My first goal when I started this whole thing was basically to achieve 3D rendering on the Web across multiple platforms (Windows + Mac, later Moonlight on Linux) and have a declarative programming model for 3D. This is still the motivation for Balder; to be cross-platform on the Web and be declarative in its nature. I've never had the idea of being a 3D engine to compete with the big engines out there that are both free and commercial, this has been partly a research project for me to learn Silverlight properly from the ground up and also maintain a foot within the graphics programming industry which I still hold dear. Even though my day to day job is something completely different these days, I've always had side projects that kept me somewhat close to what was happening in the games industry that I left behind some 10 years ago.


Back in 2007 with SL1.1 and 2.0, you basically had to either built on top of the built in primitives, which were super slow or you had to do magic like create yourself a realtime PNG encoder and draw pixels manually with code and then hand over the generated PNG to an Image control inside Silverlight.


With Silverlight 3 came along the WriteableBitmap that enabled to skip the PNG step and Balder started to pick up performance and features were a lot easier to create. This story continued through for Silverlight 4 and Balder has received many a make over of both its rendering pipeline, but also internal architecture while I've learnt more and more in-depth of how to do things in the best way inside Silverlight. With the announcement of Silverlight 5 came a long a low level interface for drawing 3D utilizing the GPU sitting inside your graphics adapter. Finally Balder could shine with great performance and still maintain its declarative, Silverlighty way of doing things.


For SL5, that was the gold-plated story - the reality is quite different. Balder needed yet another architectural make-over in order to achieve hardware rendering with Silverlight. The main problem being that rendering now had to be done on a specific rendering event that sits on a completely different thread than the regular UI thread inside Silverlight. This poses quite a few problems when Balder is built to be declarative and have all the binding capabilities that Silverlight offers.


Most of the architectural change has been done - but far from being finished. There are still some holes that needs to be filled internally in Balder that has to do with code-smell basically. At one point in time, development of Balder went forward too fast - and code-quality was during this period suppressed in favor of number of features per day that could be implemented. I know, I'm not proud, but it was the reality for the period that things needed to get done and they needed to be done fast. Another aspect of Balder development has been the lack of being able to properly test things with unit tests all the way. Quite a few times I've tried to do the effort to retrofit tests without succeeding all the way. Silverlight is basically too hard to test if you want to be lightweight with your tests. Sure, there are things out there that mock out the runtime and you can make most of your code so that you don't have dependencies to the Silverlight runtime and just run the tests on the desktop framework. I've done all the techniques out there but never been happy with the flow. This is an ongoing things.


Are we there yet?
Phew.. So, were are we at?  Balder has a default branch which is still on the SL4 level where I left off over a year ago and there is a parallel branch for the SL5 parts and all the refactorings and changes that had to be done to bring Balder to SL5. There are some bugs and quirks in it and development is not going as fast as I would have hoped. There are a few reasons for that, one is the lack of tests and not a good story for retro fitting them. I've started doing it with MSpec and writing in a specification way instead, made it a lot easier but there is still a lot of work to be done there. The second reason things are going slow is that Microsoft has yet to come up with a good cross platform story for the 3D bits, in fact, thus far there is none - it only works on Windows for now. I've been probing them to get an answer, but haven't gotten one yet. To be honest, it has for a while halted my motivation for moving forward at the same pace, until last week when I had a breakthrough in rendering that increases performance quite a bit and also the quality for software rendering, which will then prove as the fallback solution for Mac.


Deferred software rendering


In addition the latest versions of the most used browsers on Mac supports WebGL, which is something that can be used directly from Silverlight as well. After getting the software rendering fallback done, I'll start looking at the WebGL approach as a second fallback scenario for those browsers that supports it.


Another aspect of the SL5 codebase is that Microsoft changed security from the beta released at Mix to the version released at Build which lead to in-browser shaders not being allowed to do loops. Balder supported 5 light sources with the pixel shaders I wrote for the Beta version, but can only do one with the latest version of SL5. In order to fully support an arbitrary number of lights I'll have to move over to deferred rendering and that has quite a few implications on how Balder works as well. But a job I've started and will make it the default rendering method across the board for now.


But all that being said, there are some critical issues that needs to be solved - they are issues that really makes it hard for me as a developer to get the velocity I want, so I will be going back and forth researching and bringing back the code quality I want to feel comfortable.


 


So, what about the tag-line of Balder and devices?
A couple of years ago I saw the opportunity to bring Balder onto more devices and started optimizing the code-base and extension points to be able to bring to things like the Windows Phone 7, iOS, Android and others. This is something I'd still love to do, but will not focus on it for quite a while. There is still too much work on the Silverlight side to justify focusing on devices just yet. There is a version of Balder for WP 7, but not for the latest Mango and to be honest, WP7 is in fact the hardest of these devices to get any proper rendering on since one is not allowed to write shaders for that device.


 


Conclusion
As you might understand, Balder is still active - not just at the same pace as before, hoping to pick this up a little bit moving forward. There are some code-rot that needs fixing, increase of code quality and things like that holding back development a bit, but also technical challenges with the platform. Since I'm relentless with the cross-platform part and am not willing to budge on it, I will focus my energy on getting that working and hopefully working good. If this was a commercial product, I would probably not go to the lengths I am to get the cross-platform parts working, but one has to remember that my original motivation for going down the road of creating Balder in the first place was based upon cross-platform - take that out and personally I will lose the biggest motivation I've had with the project.


I've established a Trello board were people can see what I'm focusing on these days for Balder.


 




Wednesday, August 18, 2010  |  From Einar Ingebrigtsen - Balder

Today the Balder project was lucky enough to get a donation from NDepend. Yet another tool that will be used to improve the code quality of Balder.

Thanks a lot to the people at NDepend for the donation.


Wednesday, August 18, 2010  |  From Einar Ingebrigtsen - Balder

Its been a hectic week - but finally most of the pieces are falling into place for the next release. There is only a couple of minor features I want to add before calling it a release. Meanwhile, I've updated the samplebrowser and released it as a sneak peak. I've replaced the Material Picker sample with a Material Editor were you can actually edit all the properties of the materials and also the lights added to the scene.

Here's a screenshot of how it can look like when configured with all features enabled:


If you're having trouble with the SampleBrowser on Safari or Chrome on the Mac, this is something I'm investigating. I've tested it with all browsers on Windows and Mac, but these two had some issues when textures were involved on my machine. Will look into it more carefully before releasing the next version. The odd thing though, it worked with the samplebrowser compiled as debug.


Wednesday, August 18, 2010  |  From Einar Ingebrigtsen - Balder

Today the Balder project was lucky enough to get a donation from NDepend. Yet another tool that will be used to improve the code quality of Balder.

Thanks a lot to the people at NDepend for the donation.


Wednesday, August 18, 2010  |  From Einar Ingebrigtsen - Balder

Its been a hectic week - but finally most of the pieces are falling into place for the next release. There is only a couple of minor features I want to add before calling it a release. Meanwhile, I've updated the samplebrowser and released it as a sneak peak. I've replaced the Material Picker sample with a Material Editor were you can actually edit all the properties of the materials and also the lights added to the scene.

Here's a screenshot of how it can look like when configured with all features enabled:


If you're having trouble with the SampleBrowser on Safari or Chrome on the Mac, this is something I'm investigating. I've tested it with all browsers on Windows and Mac, but these two had some issues when textures were involved on my machine. Will look into it more carefully before releasing the next version. The odd thing though, it worked with the samplebrowser compiled as debug.


Sunday, August 15, 2010  |  From Einar Ingebrigtsen - Balder

Hopefully I'm not forgetting anything (probably am) - but below is a clarification of what features Balder has.


Coordinate system

Balder uses a left-handed coordinate system - currently there is no way to change this, but there are plans for opening up for any coordinate system.

Nodes

  • Interaction - one can enable interaction on any nodes and they can be interactively manipulated during runtime
  • Position coordinates
  • Rotation coordinates, in angles for each axis
  • Scale coordinates
  • Hierarchical rendering of nodes

Scene

  • A Scene contains objects, any Balder object implementing the interface INode; Lights, geometries, sprites

Viewport

  • Defines a clipping area on the screen, coordinate relative to its container

View

  • Camera
    • Position
    • Target
    • Field Of View

Sprites

  • Flat image based objects that exist in 3D space - they are rendered along with other 3D content and positioned and scaled correct according to their 3D space position.

Geometries

  • Box - simple box with dimensions
  • Cylinder - top and bottom dimensions can be specified independently
  • Ring - inner and outer circle dimensions can be specified independently
  • ChamferBox - simple box with a chamfer segment
  • HeightMap - a plane that consist of a set of vertices (points) that can be manipulated by its height
  • ArbitraryHeightMap - a derivative of HeightMap, but its plane is arbitrary
  • Mesh - a complex mesh which can be loaded from a file

Other objects

  • Container - not renderable itself, but can contain any Node in it - hierarchically

Assets

All data loaded from disk or elsewhere is known as Assets. There are Asset loaders for file types, you can even create your own Asset loaders quite easily. For Silverlight, there exist today a limitation which only allows loading of assets found in the XAP file - meaning that any asset added to the project must be a Resource in the XAP file. This is being worked on and will in a future release be more flexible.

  • ASE file - supports 90% of the Autodesk Ascii Scene Export format for 3D objects
  • Experimental support for Demoniak3D format
  • JPEG, PNG for Images

Assets are cached in a content manager, which means that if you load the same asset twice, it will clone the first one.

Lighting

  • OmniLight - non directional light, emits light in all directions
  • DirectionalLight - emits light in a specific direction, without any starting point or ending point
  • ViewLight - view dependent light that will always emit from the view and into the Scene

Rendering

  • Z buffered rendering
  • Flat shaded - single color faces
  • Gouraud shaded - color can be specific on each corner of a triangle
  • TextureMapping - perspective corrected, gouraud shaded.
  • Lines
  • Passive rendering mode - renders only when there are changes
  • Bilinear filtering
  • Face-culling - do not render faces/triangles facing away, can be controlled via Materials
  • Frustum-culling - objects not inside view will not be rendered - increases performance a lot

Materials

  • Diffuse color
  • Diffuse map
  • Ambient color
  • Specular color
  • Reflection map
  • Opacity for the different maps can be specified

Imaging

  • Supports PNG and JPEG
  • For textures, you must use images with dimensions being power of 2 (2,4,8,16,32,64,128,256,512,1024 and so on)

Input

  • For Silverlight; mouse events are supported (MouseEnter, MouseLeave, MouseMove, MouseLeftButtonDown, MouseLeftButtonUp)
  • Manipulation events for all Nodes to make it easier to interact with objects

Debug visualization

  • Bounding information
  • Show vertices

Statistics

  • Rendering timing
  • Amount of faces being rendered
  • Amount of objects being rendered

Execution

  • Actor system with statemachine for actors in the scene
  • Game - base class for any game

Silverlight / Windows Phone 7 specifics

  • Full XAML support - you can declaratively do everything that Balder can do in XAML
  • Specific CoordinateAnimation that can be used in storyboards for animating properties on Nodes
  • NodesControl / NodesStack - databindable controls that be bound to any source with NodeTemplate to specify its representation on screen. Similar to ItemsControl found in Silverlight.


Saturday, August 14, 2010  |  From Einar Ingebrigtsen - Balder

I've been working lately on a demo that is for gaming a lot more realistic than the spinning teapot or box that one sees in the sample browser for Balder. A friend of mine Peter Rosenlund, an excellent graphics artist, gave me a 3D model of a city that I can use for that (thanks a lot!!).

In the 3D model, he had applied static lighting manually in 3DSMAX by painting the Vertex colors - a feature I had not implemented in Balder. After a few hours yesterday and this morning, I got it all up and running and I must say it looks kinda nice.

Balder, rendering city without vertex colors applied:

Balder, rendering same city with the vertex colors applied:


Tuesday, August 10, 2010  |  From Einar Ingebrigtsen - Balder

Things are moving fast these days with Balder and I am closing in on the next release already. Keeping up with my target pace.

At this point these are the things already done or is in progress for the next release:

  • New Skybox, utilizing built in Silverlight perspective projection, which can be hardware accelerated
  • Perspective correct texture mapping - previous version had only affine texture mapping
  • Bilinear filtering for texture mapping
  • Performance boost for the entire rendering pipeline
  • Better, faster and more accurate lighting
  • Subpixel rendering
  • Vertex-shader like functionality for SIlverlight
  • Multiple "Games" in one page
  • Multiple textures during rendering
  • Semitransparent / alpha-channel support for texture mapping
  • Introducing a control for no-game centric applications; Content3D
  • A lot of bugfixing


Thursday, July 15, 2010  |  From Einar Ingebrigtsen - Balder

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. :)


Thursday, July 08, 2010  |  From Einar Ingebrigtsen - Balder


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


Bugfixes :

- 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 - 0.8.8.6 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.


Friday, May 21, 2010  |  From Einar Ingebrigtsen - Balder

Today Balder is licensed under the Microsoft Permissive License.

I am preparing these days to introduce more platforms, specifically the iPhone, iPad and Windows Phone 7 Series, but want to do a review of the license for the project. I would really love some feedback on this subject, as I have really not landed anything.

My thoughts for now is as follows: Change to a triple-licensing model.
Keep the existing Microsoft Permissive License for the Silverlight version, and not change it at all. Introduce 2 other licenses for the new platforms being added, one commercial license and one open source license. For the open source license for the new platform additions I have been pondering about GPL.

As for the commercial license, I also want to look at pricing, which is also a subject I have yet to decide on. My initial thoughts has been to have a per platform license and a discounted bundle price for all platforms. In addition I've been considering a per developer license, and discounts for 5 developers and a enterprise license for unlimited number of developers. I am not sure what price range to have for this, so feedback for this would be great as well. The numbers I've been toying around with is $200 for a bundle license with 3 platforms in addition to the free Silverlight version (iPhone, iPad, Windows Phone 7) per developer.

Also worth mentioning, in addition to the above mentioned platforms, Xna and OpenGL will get focus as well, and also looking into implementing a hardware accelerated Silverlight version utilizing WebGL for those browsers supporting WebGL. Another thing is added focus on cross platform work for making sure Balder runs on Moonlight.

 

If you feel you have input on the subjects above, please go here and enter the discussion. 

Wednesday, May 12, 2010  |  From Einar Ingebrigtsen - Balder

Its been some 4 months since the last official binary drop of Balder and its just about time to get a new version out. The reason for the "hold up" is that I've been quite busy with working 2 jobs; my daytime job and Balder related freelance work at night. Combining that with having a family of 2 kids and a wife, there simply hasn't been any time left get binaries out there. 

But, as part of the work that I've been doing freelance, Balder has gotten a lot of improvements. Among these are the following : 

- Further optimizations in the rendering pipeline

- Rewritten NodesControl, speed up and more capable

- General cleanups

- More Xml comments for documentation purposes

- Retrofitted some unittests

- Mouse events working properly

- Tooltip for Nodes

- Arbitrary Heightmap - corners of heightmap can be placed anywhere

- New AseLoader with more support than before (Smoothings groups, more objects, more material details, colors++)

- Rewritten AssetLoader system

- Fixed bugs with primitives

- More samples in SampleBrowser

- Visual Studio 2010 solution + project files

- Optimized lighting

- Added ViewLight - lighting relative to view, basically directional lighting

- Passive Rendering, making the rendering halt unless properties are changed on any object in the scene

- Content caching for faster startups

- A lot of code cleanups for decoupling the platform even more

- Material detection for mouse events 

 

And a whole bunch of other improvements.

The only thing left before a release can be done is to tie together some lose ends and fix a couple of bugs - then its ready for deployment. I'll be sure to post about all the new features and how they can be used in a post when the release is ready.

The next iteration will focus more on increasing code quality, more cleanups, get more documentation up and running, continuous integration server up and running and things that will improve further development on the project. 

Wednesday, April 14, 2010  |  From Einar Ingebrigtsen - Balder

Its been the most hectic couple of months I've ever had since February. 

I've had a few Silverlight courses, been out in the field at all kinda customers, traveling across Norway, doing talks at user groups and at the same time doing some moonlighting for a U.S. based company - and during this time, working hard on Balder and getting more and more features in it, optimizing it and fixing bugs. It has come at a price though, me not being able to post any blogposts and pretty much be passive on Twitter, Facebook and Messenger. My family will be surprised to see me soon, I guess. :) 

Balder is coming a long nicely and I'll be posting a bit about the new features and changes when I get some more time. Soon there will be a new official release, and I'm working on getting together a continuous integration server that will also do nightly builds and push them automatically to Codeplex. Just have to decide which platform I want to run it on - Mac or Windows. 

So until then, have patience with my blog - I'll return and put out quite a few articles I have running around in my brain. 

Thursday, February 25, 2010  |  From Einar Ingebrigtsen - Balder

After just 4 hours of dedicated optimizations with the aid of the EQATEC profiler for Silverlight - I managed to speed up the rendering pipeline of Balder quite dramatically. The profiler has a great comparison feature - simple and straight to the point. It shows that the rendering pipeline for Balder got optimized at an average og 2.28 times. (RenderingManagerRender) : 

 

Wednesday, February 24, 2010  |  From Einar Ingebrigtsen - Balder


One of the things that has been missing in the Silverlight development story is a proper profiler that is simple to use and does not require you to hack the registry or do complex command line hacks to get it working. The Danish company called EQATEC has been making profilers for a while for the compact framework, but now they have implemented a Silverlight version that I must say I'm really impressed with. EQATEC has donated a professional license to the Balder project and I have already started using it, and my findings are very interesting. I've found more bottlenecks the last 24 hours than I have during the entire course of the project without a profiler. So I'm expecting Balder to get even more speedier in the near future.



If you want to have a look at how the profiler works, Channel 9 has a great video on it here.




 


Tuesday, January 12, 2010  |  From Einar Ingebrigtsen - Balder

Balder is rapidly moving from being a proof of concept for rotating a box in 3D as it was in early 2007 to becoming a quality library that can be used for gaming and line of business applications. Thanks to all that has shown interest in the project by using it, writing books about it, creating your own demos and posting it, and last but not least companies like Sapient - that took a leap of faith and went with Balder for visualization on a Silverlight project they are doing for a client they have.

A little more than a month ago, I came to an agreement with Sapient on helping them out using Balder on a non-disclosed client project. The Balder project itself is not affected by it, licensing or ownership wise. But it is affected in a rather positive way, it gives me the extra motivation to keep adding features and at a much faster rate than before. Although it might seem "quiet" on the outside, seeing thats there been more than 4 weeks since a release - its very hectic from where I'm sitting. I'm at high speed and turning out code as fast as I can. I will try to get a release out now and then, and hopefully we'll see one out in a short time span. More on the upcoming release in another post. Stay tuned.

Sunday, January 10, 2010  |  From Einar Ingebrigtsen - Balder

Recently I've been working on a small Silverlight project at a client and at the same time I've been working on implementing a SampleBrowser for Balder on my spare time, both these applications are using the MVVM paradigm and all that comes with it. One of the things that has really been bugging me is the INotifyPropertyChanged interface, a key interface for making the View observe changes on objects. Not only do you have to implement the same thing over and over again (the notification bit), but also the PropertyChanged event takes an argument that holds the property being changed as a literal. Although, the literal bit can be solved quite easily with some Lambda Expression magic, like I've blogged about in the past. But your still left with writing the same boring notification code over and over again.

I got really inspired by Jonas Follesoes post about how he solved the ever lasting challenge of INotifyPropertyChanged using Castles DynamicProxy to generate a proxy and automatically handle most of it. I read it and automatically started thinking about how I could remove the last bits and make the objects needed notification totally ignorant of the fact they should notify any changes. The Castle approach described by Jonas is very clean and I love working with Aspects like that, but it is pretty much impossible to get it to 100% automatically generate everything. The reason for this is that in the Silverlight runtime, you are not allowed for security reasons to invoke delegates on another type other than your own through reflection. Another issue I had that I could never figure out, was how to tie it in with an IoC container. I couldn't find a way in Castles solution to actually get the proxy type and not the instance, this of course is quite possibly possible, but I couldn't find it at all.

I started earlier today with the idea I could generate the proxy from scratch myself. The idea is to create a new proxy type that derives from the type you want to automatically notify its changes by overriding your properties. The properties you want to automatically notify must be virtual and implement a setter. The weaved version will override these properties and actually forward both the get and the set method of the properties to your type, so you can still do more complex stuff in your property methods. The result is a specialized object weaver for handling INotifyPropertyChanged. The code is too much to include in this post, but you'll find the implementation here and the unit tests here, also it support a couple of attributes - much like Jonas' solution for ignoring and adding other properties it should notify as well. Take a look at the entire namespace for all files needed. Also worth mentioning is that if you define your constructor to have arguments, it will implement a constructor on the proxy that is exactly the same and forward any arguments when instantiated. That way in a typical ViewModel scenario were you have dependencies to typically services, these will be injected when creating an instance of the proxy through an IoC Container.

Using it is very simple, create a class:

public class ViewModel
{    
    public virtual string SomeString { get; set; }  
}

 

Getting the proxy type:

var proxyType = NotifyingObjectWeaver.GetProxyType<ViewModel>();

Once you have the type you can bind it in your IoC container or simply use the Activator type and create an instance of it. 

 

Tuesday, December 29, 2009  |  From Einar Ingebrigtsen - Balder

2010 is just a couple of days away, I thought I'd do a recap of 2009 and what has happened in my little world. :) 

Back in August 2008 Balder was at a proof of concept stage and I had close to abandoned the project, I had so many things I wanted to do which resulted in not doing anything. Along came a couple of emails from Clinton Rocksmith who found the project interesting and wanted to know how he could contribute. I was really surprised, I never imagined anyone actually looking at the project. Timing was a bit off, I had just signed a contract with a new company and never got around to prioritize Balder, other projects always came in the way. Again, a couple of months later the project was at a stand still and I was getting again to a point of almost abandoning it completely. In the beginning of 2009 though, I got contacted by Gastón Hillar who also found the project interesting and wanted to include a couple of samples in his upcoming book. This spun me completely of my axis. I worked closely with Gastón in providing him the best possible solution and bring Balder to a new level. For me this was a true turning point for Balder and I quickly decided to put all other projects on a complete halt and focus my energy on Balder. The result was that we managed to get Balder to an API level that felt a lot better, performance was increased with several hundred percent and the codebase quality was increased dramatically with retrofitting unit tests for critical parts. 

The project was all of a sudden going somewhere, it was time to look for other developers to join in. A good friend of mine; Petri Wilhelmsen joined the project and has contributed a bit and will commit more time next year to the project. Another friend of mine; Raymond Holmboe has been contributing some on and off since I started the project back in the days and will be committing more time next year as well to the project. 

The ultimate result from all of this is that there has been quite a few commercial interests in the project, everything from companies wanting to buy the project as a whole to companies wanting to utilize it professionally. This is something I can disclose more information on later next year. One thing is certain though, Balder will stay open source and free to use.

Also this year, I was suggested as a Silverlight MVP and was eventually moved from Xna to Silverlight. Thanks to Justin Angel for recognizing me and suggesting the move, its a true honor. 

Although I had a very nice job at Objectware, the distance of 125 KM to work one way was to big. Even though I didn't commute everyday, it got to be a strain on my family when I had to go early in the morning and wasn't back till late and most nights after the kids had gone to bed. So I started sniffing the market to see if there was opportunities closer to home. I ended up at a company called Bouvet, and don't regret my decision. Bouvet has in my opinion the right focus for consultants, and it just feels right. Happy to be onboard.

Professionally I've had the opportunity to work full time on a Enterprise Silverlight project, I've worked on two Microsoft Surface projects, some WPF projects and finally ended up spending the last 3-4 months of the year working on an ASP.net MVC project with some Silverlight content.  

Its also been a very busy year when it comes to speaking engagements, I've been part of Microsoft Norways MSDN Live tour, been speaking at NNUG a couple of times, Game Camp, did a Silverlight course. 

2009 has truly been an exciting year, busy, but very exciting. With the release of Silverlight 3 this summer and the beta version of Silverlight 4, I'm at a point were I really can't wait to get out of bed in the morning and just find the keyboard and start hacking away. It has never been more fun to be a developer, a lot is happening these days, not only in the Microsoft arena, but in general. I can't wait to see what 2010 brings.

 

Happy new year everyone, looking forward to participate next year. Thanks to everyone who has made 2009 so much fun and exciting, especially I'd like to thank my wife and kids, who has really been patient with me and supported me along the way. 

 

 

 Einar Ingebrigtsen - Balder News Feed 

Last edited Oct 22, 2009 at 6:48 PM by adept, version 2

Comments

No comments yet.