Augmented Reality, 3D, Web cam, Silverlight 5 beta and you.


First, check out this video, SLARToolkit - Silverlight 5 3D Augmented Reality Demo from Rene Schulte and then we'll chat...

Yeah, I know this is two toolkits in a row, but did you see how cool that was? Given how the Silverlight 5 beta just shipped, how cool that was, how could I not mention this project?

Silverlight 5 3D + SLARToolkit Augmented Reality = Win!

It's almost been a year since I wrote a sample for my open source Silverlight Augmented Reality Toolkit - SLARToolkit. The release of the new Silverlight 5 hardware accelerated 3D API was a nice occasion to finally make a new one.

In my last blog post I wrote a summary of all the Silverlight 5 beta features and some notes about the new low-level, XNA 3D API.

This post provides the new demo for SLARToolkit which leverages this fast GPU-based rendering to draw some nice effects with 60 frames per second. You can try the live sample if you have the Silverlight 5 beta installed or watch a video instead.


How it works

This sample uses the webcam video stream which is used to fill a Rectangle shape, the video stream is also constantly captured and fed to the SLARToolkit BitmapMarkerDetector to detect the markers. The detection result contains a transformation matrix for each found marker which is then used to transform the 3D objects and the TextBoxes.

A couple of vertex and pixel shaders are used to get the desired effects. Techniques like Phong shading, Bump mapping and Refraction mapping (glass) were implemented. The snapshots from the webcam are passed as a texture to the refraction pixel shader to simulate the glass effect.

See the source code if you're interested in the nitty-gritty details. Please note that I wrote an introduction to Pixel Shaders for Coding4Fun a while ago.


Source? Yep, of course...

SLARToolkit - Silverlight Augmented Reality Toolkit


SLARToolkit is a flexible Augmented Reality library for Silverlight with the aim to make real time Augmented Reality applications with Silverlight as easy and fast as possible. It can be used with the Webcam API that was introduced in Silverlight 4 or with any other CaptureSource or a WriteableBitmap. SLARTookit is based on the established NyARToolkit and ARToolkit. SLARToolkit uses a dual license model and could be used for open or closed source applications under certain conditions. See the License page for details.



Here's a snap from the last check-in;


The solutions loaded fine for me and executed just fine for me (thought I only played with the non-SL5 items as I don't have the SL5 beta on this machine).

Here's a snap of one of the solutions


So if you're looking for something fun and cool to play with for the week, what's cooler that augmented reality? Smiley

The Discussion

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.