Diorama effect?

Does anyone have a notion of how to do this sort of effect? It’s like a virtual diorama with the screen being the front of the box.

http://www.ohgizmo.com/2010/02/28/upcoming-dsiware-title-features-3d-interactive-diorama/

It’s the camera set up that I’m not quite figuring out…

Unless I miss an important part, its actually pretty easy:

Cam Rotation basing on Accelerometer with the regular down being the “Null direction”

The complicated thing is the scene setup to look nice, give a nice effect of depth and setting up the camera zoom etc for this too to look like our human view

It could be achieved with the Accelerometer, but my guess is that it may be doing some face tracking using the front facing camera of the Dsi.

Well it would work much better that way.

for fun found this
http://mrdoob.com/lab/webcam/face_driven_3d/

on the DSi its indeed likely the cam as there is no accelerometer. But on the iphone you would use the Accelerometer due to the lack of front facing cam

Both camera and accelerometer have pros and cons for this type of effect.

Camera - Backfacing camera could theoretically work. You just have to make sure to instruct your users not to cover it when they hold their phone. Also, camera isn’t really supported by Unity right now.

Accelerometer - there are some detection issues that get somewhat hard to explain. As an example, hold your phone so the screen is facing you and the edge with the volume buttons is parallel to the ground. Now rotate the phone back and forth to bring the home button closer or farther from yourself while keeping the volume parallel to the ground. This is the sort of motion that will be required to get the tilting effect seen in the above video. However, this motion will return extremely little, if any delta on the accelerometer due to gravity only pulling in one direction. Now, if you hold your phone so that the apple logo is facing the ground and do that same exact motion, it would work great.

I meant more the setup of the camera in the scene to get the effect of a diorama.

its a matter of choosing the right position and right zoom factor and potentially using the orbit camera with a point in the middle of the diorama

I would just parent the camera to an empty game object in the middle of the scene and rotate that.

Mach Dice uses the accelerometer to change the camera position to give a floating 3D feel to the display.

http://www.machwerx.com/apps/machdice/