Archive for the ‘Silverlight’ Category

Going Microsoft all the way

During this last week we painted ourselves blue and donned our Microsoft caps. Just so you get the gist; we launched a Silverlight 3 project, we created an open source Silverlight component (that will thoroughly rock your socks ;) ), we hosted a besug event and went to Remix09 (we even ended up on the big screen during the keynote! – we still don’t know how that happened).

logo_td_ms

mslogo-1

Familie meerdijk

Our first Silverlight 3 project and a massive hit to boot. The project was headed by These Days Amsterdam for Microsoft Netherlands. They wanted to show the public how Office can be useful in day-to-day situations so we gave them “Familie Meerdijk”. The average
Dutch family who live their lives and bump into problems on the way. And whaddaya know… Office offers to solve them!

To be very honest… I myself am a huge Office 2007 fan, can’t and won’t live without it. Is this shameless promotion? Maybe… but I just love it that much!

The “Familie Meerdijk” project uses a lot of 3D animations so it was a real adventure to make this work, you can read more about how we got alpha channel in WMV video’s to work.

Maybe you should just head on over to Familie Meerdijk yourself to see it all in action.

SISTR

SISTR is a Silverlight component we made together with our partner Ventigrate. It’s a sIFR replacement that allows you to use rich typo graphics in your websites. Just an alpha version for now but we’re actively working on putting out a more stable release. More info about this project (+ examples, download, …) can be found on http://www.sistr.it

Arturo Toledo @ These Days

Last Monday Arturo Toledo, Product Manager at Microsoft for the UX Platform & Tools, visited the These Days offices for a session with the Belgian
Silverlight user group. The session was about Sketchflow (Expression Blend), a very cool tool that allows you to easily create wireframes using Microsoft’s Expression Blend. This way we had some upclose quality time with Arturo and damn, I for one, am now a totally brainwashed Sketchflow lover :) It was very nice to see what Sketchflow was all about and have some face2face moments with Arturo.

Some pictures of the event:

_DNF8156 _DNF8182 _DNF8179
_DNF8180 _DNF8171 _DNF8169
_DNF8166 _DNF8162 _DNF8163

Remix 2009

Last Tuesday Microsoft also organised the Remix 2009 event. We attended the event with four These Days people. What all the agencies have been saying for a while now has been re-confirmed by Microsoft; UX is a super important (if not the most important) aspect of your project… That’s why we, at These Days, also spend a lot of time and effort on getting this right. Big props for our four UX experts! (Who are now also planning on giving Sketchflow a try! :-) )

But of course we not only enjoyed the UX tracks, the developer tracks were also very inspirational.

The highlight of the day, for us, was the keynote though. It was nice to see which direction Microsoft is planning to go in the future and to hear about other companies’ usage of Microsoft technologies and even see some demos.

And just to scare everybody away I was also on the big screen in one of the movies.

IMG_0627

Some more pictures from the Remix can be found here.

Guest blogpost: Silverlight 3 and pixel shaders

Guest blog post by Stefan Van Camp from Ventigrate.

While I was working on at project here at These Days I ran into an opportunity to use one of the new Silverlight 3 features, custom built pixel shaders! The specific reason why we needed pixel shaders was because These Days wanted to use Alpha Channel encoded video with Silverlight. Of course, since Windows Media Video (.wmv) does not support alpha channels, the media stream used in the project would need to use pixel shader in order to filter out a predefined color.

It soon became clear to me that there was no simple answer to the question “Which pixel shader will give the best result?”. Some people claimed the Synergy effect provided the best results, other people referred to the shader from the WPF effects library, some even wrote their own shader… After having tried a couple of different methods I wasn’t completely pleased with any of the results they gave me. And therefore, since I had nowhere else to turn, I solicited Microsoft for help via Katrien De Graeve – Microsoft developer evangelist.

Microsoft’s explanation for the poor performance of the pixel shaders was that the shader’s calculations were based on the RGB values of the color that needed to be filtered out. They suggested using the HSV values of the color. This technique proved to be a significant improvement over the other shaders, but it still was not perfect. Green lines on the sides were still showing and wherever the video had a motion blur effect, the background color wasn’t filtered out.

Obviously, the first part of an acceptable solution was removing the motion blur effect from the movies (which were rendered 3D animations with effects from After Effects). Once we had a new render of the movie, we retested with the new HSV shader Microsoft had delivered and immediately noticed the decrease in green matte. Now we had only the green around the subject edges to worry about.

Because pixel shaders perform their ’shading’ by calculating a given color value to another value pixel by pixel, I got the idea of increasing the number of pixels that the movie would feed to the shader as a logical consequence. Since Expression Encoder didn’t seem to provide any means of increasing the amount of pixels in the form of changing a “dpi” property or something, I decided to encode the source movie at twice the dimensions of it’s original size. In my test case my movie was 856×806 big, I encoded it at 1600×1432 to make at least the width of the movie a nice round number. When I used this movie in my Silverlight project using the original dimensions of the movie (otherwise encoding to increase the scale had no point), the results were more than satisfying. The green contours where almost all gone, only people who actually knew to look for green edges would occasionally be able to spot one. Taken into account that most people don’t hug their screens and look at the movie over and over again, this technique proved to deliver a satisfying result that can actively be used in Silverlight applications using the correct shader.

I am, however, aware that at a certain point in the future, some bright mind will think up a shader that’s absolutely perfect. But since mathematics and creating shaders aren’t really my cup of tea, I will leave that to someone else. In the meantime, I believe we’ve come up with an acceptable temporary solution which will satisfy most of your clients.

One remark though: exaggerating the dimensions will have a negative impact on the playback performance in Silverlight. Depending on your system’s specifications you will run into performance issues sooner or later. The best method to find the correct dimensions for your target audience is trial and error I’m afraid. Make sure to test your application on a less competent machine.

On a side note, I would like to point out one bug I encountered while applying these shader effects to the media elements. Most of the time there will be a thin line surrounding the element. I don’t know whether this is caused by a bug in the shader or if the effect has an adverse reaction on the media element. In any case, you can work around this problem by simply setting the clip property of the media element to remove those ugly lines.

Resources: