views:

484

answers:

4

I have a lot of images taken from a 360 camera which I would like to be able to display in Silverlight 3. They are NOT regular panorama images. The camera which took the image actually creates a distorted jpeg that becomes undistorted once wrapped around a sphere as a texture. I have desktop software that will allow viewing of the image (not just side-to-side, but straight up, down, etc.) and I need to try to get the same functionality in Silverlight. It is very similar to Google StreetView.

What I think I need is to create a sphere, wrap the jpeg on the sphere as a texture, then put the "camera" inside the sphere. I doubt this is possible in Silverlight, but perhaps there is a way to simulate this?

So far, Google searches aren't bringing anything up. Can anyone point me in the right direction to figure out how to do this? Are there any existing projects that do this?

An example of a typical image is here.

+1  A: 

These might help you out (probably not). They are 3d engines for silverlight, but they will probably wrap the image outside of the sphere instead of inside, which is probably what you need.

Kit3D http://www.codeplex.com/Kit3D

Balder http://www.codeplex.com/Balder

Another, possibly more promising option, would be to use javascript. So far you've probably researched how to do this in Silverlight, but you might do some similar searching for using javascript for this. There may be an option out there already, and since Silverlight can interopt with Javascript, you might be in luck.

NotDan
A: 

You might want to try cropping a window from the image and display it. if the user want to go right, move the window right and crop. if the user wants to go left, move the window left and crop. to zoom out, expand the window, to zoom in make the window smaller. if you move the frame far right then stitch the image data from the left side.

You might need to modify the image to eliminate the distortion, this shouldn't be too hard and depends on the camera lens focal length.

Don't try mapping the image to a sphere, it is much harder.

Gilad
Actually modifying the image sounds pretty hard, unless you know of an easy way to do it. This image was actually generated by several cameras stitched together.
Phil
You don't really need to crop but copy a window from an image to another image source. Think of it as having a small frame with your image as a background. All you need to do is move the background in a wanted direction.
Gilad
+1  A: 

Your gonna have to map the texture to a sphere then, like you said. But afaik silverlight 3 doesn't support hardware accelerated 3d.

So your options are:

Hope this helps

tm1rbrt
A: 

Hi Phil,

Did you get this solved? By any chance, have you posted a project on RAC about this?

Please let me know, Thanks.

OpCoder
Been doing some Googling, have we? lol. I have a guy on RAC working on it but he hasn't finished yet. Have you made any progress on it?
Phil