Archive for the ‘lively’ tag
Viewer: Meet XBAP.
So, I’ve discovered XBAP. It’s a little secret technology that Microsoft developed as a way of running WPF applications in a browser, and I do have to say it’s very useful and handy.
An XBAP is a full blown application running on the .NET platform. It can access everything .NET can access within a security sandbox – including the Direct3D API. The sandbox is a little bit annoying but quite understandable – and most awesomely – it runs under Firefox fine, I’ve been using Firefox to debug.
Why not Silverlight?
When Silverlight was first released – I was quite intriguided. Not only do you get C# and a .NET environment, maybe we could do a version of OpenViewer running in Silverlight? We’ll after careful examination – Silverlight is capable of neither decent network access, nor any hardware 3D rendering capabilities. (I do have to question someone investing all this time in a “Flash Killer” and neglecting to add 3D capabilities. But I digress…). So the idea’s been dormant ever since I discovered this.
A few days ago, after my friend Tish Shute mentioned a MS developer talking about tighter integration between Direct3D and WPF the other day, I dug up in my head this thing I’d heard of once before called an XBAP – it’s basically a WPF Application, but hosted inside your browser, and in the last year since I checked it out, XBAP has improved a lot.
For one, it worked inside my Firefox browser painlessly without me apparently having to install anything (.NET had already put the appropriate plugins in place). It also just-so-happens to support hardware 3D rendering, direct network access (Hi libsecondlife libomv!), and a few other shiny things as long as the application sticks in it’s sandbox.
OpenViewer – meet Lively.
One of the things I really do dig about Google’s lively client is just how seamless it integrates in your browser. It’s not a full blown 3D world no, but I think Google got one thing right: Make it as easy to get instant gratification as humanely possible.
I think this is one lesson that the OpenViewer project might be able to take onboard – and XBAP might be an easy way to get there (at least for Windows clients)
The drawbacks (and there’s some reasonable ones)
Nothings perfect, and unfortunately this isn’t a perfect solution either. There’s some problems that wont be completely easy to solve, and some aren’t solvable in the current form.
First is the security sandbox – unless the user downloads and installs the WPF application (then hosts the installed copy) you get no local storage meaning no cache or access to the local harddisk (including uploads). Big catch.
Second big catch – it’s Windows only. Looks like Vista at that. While it may run on Firefox under Vista, this wont be a foolproof solution for Mac or Linux users, at the moment, Mono lacks a complete WPF implementation which means it might be a while before they get it (and even then it would be in standalone mode rather than in-browser)
Third catch – Performance doesn’t seem highly optimal when rendering complex 3D scenes. This one I think may come largely from the experiments I have been doing using a lot of brute-force methods, I expect this one to be somewhat capable of workarounds.
Toying as a viewer
Right now, I’m in the early early stages of getting a viewer up and running as an XBAP – text-only we can do no problems, getting 3D in adds a degree of complexity since we still cant use libprimrender due to LL licensing issues. I’ll be using the OpenSim Meshmeriser library instead here for the moment, although accurate rendering would be great.
I expect to post some screenshots in the next few days as I get this to a reasonable level – if you are lucky, I might even publish the XBAP file so you can play around with it. Source will be forthcoming after I’m happy enough with it.
It’ll go under a different name to OpenViewer – mainly because of the non-portable problem. I’m using the name internally XBAPViewer right now, but I’ll think of something better before it’s released.

