Thursday 12 February 2009

Photosynth in (Moon|Silver)light

Scott, Scott and Tim were among the first to blog about today's big news - Miguel de Icaza's announcement that Moonlight 1.0 is live! It's a pretty impressive achievement, which I hope to write more about once I have installed and played with it myself.

However, hidden in Miguel's post was something else I thought was just as cool -- Barack Obama's inauguration Photosynth The Moment was shown in Moonlight (not just on Photosynth)... wha!?

I thought this was a massive 'discovery'. Photosynth previously had a custom viewer install that only ran on Windows... and now it's on Linux?!

Turns out ScottGu did 'announce' this, back in January (don't know how I missed it)
CNN and MSNBC are both launching Photosynth viewers that will ... combine pictures ... to create an interactive Photosynth experience of the event using Silverlight’s built-in DeepZoom feature to deliver an amazing 3D viewing of it.
Check out the difference between the plug-in version (view synth):


and the Silverlight version (view synth and object tag):

Very similar - all the Silverlight version is missing is the 'control point cloud' that you see holding down Ctrl in the embedded viewer.

Turns out the CNN version hosts Photosynth.xap with the following assemblies -- including Kit3D!

Here's how the HTML looks to host it. It's fairly trivial to extract the .DZC filename from a Photosynth.net page and embed it in Silverlight.

In Photosynth.net HTML source
Find the var _collectionInfo JSON object and extract the
"Url":"http://mslabs-328.vo.llnwd.net/d6/photosynth/M6/collections/89/49/43/894943c7-0a67-477f-9607-1eb1ee62eab1.dzc"

In a new Silverlight host page paste the DZC in the initParams
<param name="initParams" value="autoplay=true,dzcPath=http://mslabs-328.vo.llnwd.net/d6/photosynth/M6/collections/89/49/43/894943c7-0a67-477f-9607-1eb1ee62eab1.dzc"/>

So if you are playing around with Moonlight 1.0 it's fairly trivial to access the thousands of existing Photosynths (unfortunately I think you'll still need Windows to create one).


Finally, unless Microsoft releases something 'official' I doubt it's allowed to redistribute Photosynth.xap to display your own synths (especially for commercial purposes). Interestingly, the Photosynth site still says Like the viewing experience, the "synther" only runs on PCs (XP and Vista) :-).


P.S. I expected a Silverlight synth viewer sooner; writing back in August 2008
given the shared heritage with the Silverlight 2.0 MultiScaleImage control I wouldn't be surprised to see a Photosynth 'viewer' in RTM version of Silverlight 2.0 (or certainly a future version after that).

EDIT: I had previously wondered how the Photosynth data was stored, since each Photosynth is opened via a .DZC file (see above). I guess Fiddler would have answered the question - a JSON file is downloaded based on the DZC location: dzcUrl.Replace(".dzc", ".synth_files/0.json"). A summary of the JSON for that synth is shown here (thanks to JSON Viewer).

I guess it's all this data that was harvested for the pointcloud explorer built by these guys, in Python!

5 comments:

  1. hi great article. i just want to know. can i hide the controls at the top right. is there any api or option to control the Microsoft logo and control placements.

    Thanks
    Raj

    ReplyDelete
  2. Why would you want to remove the Microsoft logo? They wrote it!

    There's no API (that I know of) - the Silverlight viewer is purely for Microsoft (and licensed partners like CNN I guess) to enable Mac/Moonlight access to Photosynth.

    From memory Photosynth is now part of the Virtual Earth team, so any API that comes out is likely to be part of that (I *guess*)...

    ReplyDelete
  3. Nice!!!
    Just linked to you about this here!
    http://isontech.blogspot.com/2009/04/cool-technique-to-use-photosynth-as-3d.html
    Best Regards,
    Mans

    ReplyDelete
  4. Craig, the Photosynth viewer would only be viewable in Moonlight 2, not Moonlight 1, unless you know something I don't in this case. (entirely plausible)

    In any case, I've got Moonlight 1.0.1 and all I'm getting is Silverlight install screens.

    I see that it's possible to download all the latest source of the Moonlight 2 pre Alpha bits and compile them yourself but I'm not even skilled enough to be a Linux newbie to begin to know how to go about that. It seems a shame that someone hasn't created an automated system to generate a nightly build of the Moonlight 2 plugin (each day overwriting all previous copies of the plugin) for public testing.

    ReplyDelete
  5. Nate, you're correct Photosynth requires the CoreCLR which is only in Silverlight (and Moonlight) *2.0*. You can see in the screenshot on Miguel's blog (above) this picture of Photosynth running in Moonlight back in January - but yes it is an early 2.0 build. Sorry if I gave the impression it was otherwise - it is all a bit confused with the *1.0* RTW happening at the same time.

    The Moonlight Roadmap shows a beta of 2.0 is due 'any day now' and it should be released in September.

    ReplyDelete

Note: only a member of this blog may post a comment.