Believe it or not, 3D has a long, even sordid, history on the web.
Ten years ago, I remember playing around with VRML and watching in amazement at a banner ad for that contained an entire scene yet only was 6k big.</NOSTALGIA>
Of all the things done to make Silverlight more WPF-ish, the one thing that didn't make the cut in version 2 was 3D support.
There are many technical reasons for this, not the least of which is keeping the runtime size manageable.
Given the potentially cool RIAs that could be built with 3D, I would imagine we will see it added in the future.
However, there are a few clever folks out there that are bringing 3D to Silverlight today.
Robby Ingebretsen, whose site NerdPlusArt.com is a great example of a 3D RIA, goes over a few of the ways to "cheat" and add 3D support to Silverlight 2.
Here's a summary:
Real 3D
I really should put "real" in quotes since until holographic projectors become commonplace, we're stuck with rendering a three dimensional spaces onto a 2 dimensional surface.
With the fine print out of the way, let's go over some options for creating 3D spaces like you could with WPF, Adobe Atmosphere or in SecondLife.
You can change camera angles, perspectives, etc and the scene is rendered.
An extreme example of real 3D are first person shooter video games.
There's only one model of that bad guy and as you run around the camera's position changes and the scene updates accordingly.
It's processor intensive, but worth it if you need that kind of dynamic environment.
Both of these open source projects on CodePlex create a 3D rendering engine in Silverlight.
- Kit3D
- Balder
Pseudo-3D
Pseudo-3D is a time honored practice in the Flash world that Swift3D really took the initiative in simplifying the process.
Basically, the approach is to render every frame of a 3D animation out into discrete frames. [ Silverlight example | Flash Sample 1 | Flash Sample 2 | Flash Sample 3 ]
The upside is that it's simple and quite effective.
The downsides are that the animations are "canned" and file sizes can get unruly.
There's no dynamically generating animations with this method, so you'll have to plan out what you intend to show very carefully.
If done properly, your users will have no idea all your animations are not done in real time.
The Aston Martin Silverlight demo from the MIX08 keynote was just such an example of this method.
Other Tricks
The lack of a "real 3D" rendering never stopped old school video game developers.
The 1983 vintage arcade classic "Star Wars" didn't need a fancy GPU to provide the illusion of 3D neither did Moon Patrol.
Inspiration trumps limitation
As Robby says in his post, "let’s not wait for official platform support to start building some sweet 3D."
If the video game developers of the 80's could do what they did back then with the tools they had, we can certainly "overachieve" with the tools we have today to make the future happen a little sooner.
[found via Andrew Duthie]