Augmented Reality, 3D, Web cam, Silverlight 5 beta and you.
- Posted: Apr 25, 2011 at 6:00AM
- 10,581 views
- 3 comments
Loading user information from Channel 9
Something went wrong getting user information from Channel 9
Loading user information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
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?
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.
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 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.
- Direct Support for Silverlight's CaptureSource
- Built-in support for Silverlight 5's hardware accelerated 3D API
- Flexible through a generic and a WriteableBitmap detector
- Multiple marker detection
- Simple black square markers
- Custom markers
- Real time performance
- Easy to use
- Documentation including a step by step Beginner's Guide
- Based on established algorithms and techniques
- Uses the Matrix3DEx library
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?