Spain
Joined: May 9, 2012
Post Count: 154
Status:
Offline
Stereoscopic 3D test
Hello.
I've recently bought a 3D monitor (with stereoscopic polarized passive glasses) and I'm making some tests on it, with movies, pictures, and 3D applications and games.
Among these tests I thought of testing Sweet Home 3D too. I did it in two ways:
realtime 3D view for a virtual walk
stereoscopic 3D picture render
The first one is achieved by using TriDef 3D Ignition software, and configuring SH3D to work with Direct3D instead OpenGL, since TriDef works with Direct3D only. TriDef is mainly intended for games, having profiles for many of them, but can also be used with other games or applications by using one of the built-in profiles for other games or using a generic profile. I used a generic profile for SH3D and It looks fine, although there is some weird effect with glass on windows or doors, which are displayed with a kind of inner frame around, although may be it can be fixed with another profile instead general.
As for the stereoscopic render, it's pretty simple: you just render two separate images, one for the left eye and one for the right eye. Then you only need to join it some way to create the 3D composition, depending on what viewing method or device you'll use to view the final 3D image. For this testing I decided to create a Youtube 3D video with the static 3D image, so every one will be able to select the viewing method best suited for him/her from the list of Youtube's supported methods, as odd/even rows (I use this one for my monitor) or red/cyan glasses, for example. I rendered this image with a resolution of 640x480 for it doesn't take too much time to render, but I guest the effect would be great with a bigger resolution. I used the "Example7" sample house provided in the gallery section of the web, leaving the default field on that file of 63 degrees and with a separation between the eyes of 6.5 cm. Note: for some reason when I see the video with interlaced rows method I see the image correctly while if I use the red/cyan glasses method then I have to use the option to swap left and right eyes, so you may or not need to use that option, just test.
Some "technical" details for the rendering. First I generated the left eye view, then I go to the virtual visitor configuration to edit the point of view and leave everything the same except for X and Y coordinates. To calculate the right eye coordinates we need to have two things in mind about rotation and coordinates system on SH3D:
for the rotation 0 degrees means the virtual visitor is looking at the bottom of the screen, and increase the degrees means rotate clockwise
for the coordinates system, X and Y coordinates increases to the left and to the right respectively, so the positive quadrant is on the lower right respect to the 0,0 point
So with all this, if we call E to the separation between the eyes, D to the degrees and XL, YL, XR, YR to the X and Y coordinates of left and right eyes, we can get the right eye location with:
XR = XL - cos ( D ) * E YR = YL - sin ( D ) * E
That's all folks. :)
---------------------------------------- If a long walk every day were healthy, mailmen would be immortal.
2D preview (sorry for the width, the forum bbcode doesn't seems to be able of resizing):
---------------------------------------- If a long walk every day were healthy, mailmen would be immortal.
France
Joined: Nov 7, 2005
Post Count: 9423
Status:
Offline
Re: Stereoscopic 3D test
Very impressive. I tried it with some red-blue glasses of mine, and even if they are cheap glasses, it worked very well, much better than in a plug-in I started to program some time ago, when I discovered the anaglyphcanvas3d.AnaglyphCanvas3D class available in the Anaglyph Canvas3D project.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator