[DIY] Auto-Stereo with Parallax Barriers

Tutorials on how to create your own rigs, pics, movies, and everything that has to do with S-3D at home!
Post Reply
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by cybereality »

Glasses-Free 3D Gaming for $5
(DIY Autostereoscopic LCD Monitor Mod Using Parallax Barriers)

[youtube]http://www.youtube.com/watch?v=D8CHvX6WkbY[/youtube]

In this tutorial I'm going to show you how you can convert your regular LCD monitor into a glasses-free (auto-stereoscopic) 3D display. To do this we are going to use what are called Parallax Barriers. This is the same technique used on the Nintendo 3DS. Please make sure to watch the video above so you have an idea of what we are doing here. I also quickly explain what a Parallax Barrier is and how it works. Basically what it does is selective block certain pixels from one eye or the other. So with properly authored content, we are able to deliver one image to the left eye, and a different image to the right eye. This concept is actually not anything new, it had been discovered over 100 years ago. However it is just recently being applied to commercial products. In the next year years I think there will be a lot of development in this space. Specifically with portable devices like the Nintendo 3DS. But you don't have to wait for companies to bring this technology to the home. You can start gaming in stereoscopic 3D, glasses-free, today and you can do it for less than $5. Well, technically, you do need a certain amount of supplies and tools in order to complete the project. But the actual parallax barrier itself and the ink you use to print it will only cost a couple of bucks. Ok, so here is what you need:

Requirements:
- An LCD computer monitor 24" or less.
- An injet or laser printer capable of at least 1200 dpi.
- A box of transparency film.
- An X-Acto knife.
- A stainless steel ruler.
- Transparent tape.
- An image manipulation application.
- The iZ3D driver.


Monitor
Obviously you need a monitor in order to mod it. Any LCD computer monitor can work, although it should be 24" or less. Although there is no technical reason a larger size wouldn't work with a parallax barrier, the problem is finding transparency film in that size and having access to a large-format printer (which are prohibitively expensive). Practically speaking, you are better off sticking to 24" or less, as that means standard Super B sized transparencies can be used. Larger sizes are possible using transparency film rolls, however this gets expensive real fast.

Printer

To complete this project, I used an Epson WorkForce 1100 color injet printer. It can handle up to 5760 x 1440 dpi. The other printer I have is the Samsung ML-1630 mono laser printer. The Samsung can handle up to 1200 x 600 dpi. Although I was able to make good progress testing things on this Samsung printer, the accuracy was not good enough get the quality I wanted. So make sure you have a decent printer if you want to attempt this. Although the supplies are pretty cheap, so its not a big loss to try it even if you don't have the best printer. Keep in mind that the Epson printer I got is very reasonably priced, I got it for $130, which was the cheapest I could fine a quality injet printer that could handle wide-format. Since it can print wide-format (13" x 19") that means I can completely cover a 22" widescreen monitor with one single sheet. If your printer only supports 8.5" x 11" you can still do it, however you will have to attach multiple sheets together to fill the screen. I have tested this, and you can still play games like this, although clearly the wide-format is a better option. Keep in mind that the barrier pattern is just printed in solid black, so a monochrome printer is fine.

Transparency Film
For the transparency film I used Sparco brand sheets (they make ones special for injet and laser printers) which cost about $20 for a box of 50. Specifically the models 01853 for laser and 01854 for injet, both are 8.5" x 11". For the final barrier I used Inkpress injet transparency film, ITF131920, which is 13" x 19" (Super B). It cost around $60 for a box of 20. Other brands should also work, just make sure you get the right kind for your printer.

X-Acto Knife
You can find these for around $10 at any hardware or art supply shop. It is used to cut the transparency film so it will fit on the monitor (or to get a nice clean edge if you are attaching multiple sheets).

Stainless Steel Ruler
Used to get a straight cut when using the X-Acto knife. You will want to get a large one, I used a 16" with cork backing. You can find them for around $5.

Transparency Tape
I used some transparent tape to mount the barrier sheet onto the monitor. This is the glossy kind that is completely clear not the foggy matte finish you usually find. This can be pruchased for around $3.

Image Manipulation Application
For this project I used Photoshop, and that will be what I use to explain the process. Alternatives, like GIMP, should also work but I will not be providing instructions for this. This program is used to create the parallax barrier pattern itself, so you will need to be able to define your own custom patterns. We will also use it to print the
pattern.

IZ3D Driver
This is what is actually going to make the games into 3D. The iZ3D driver is a commercially available 3rd party driver that hooks into DirectX and converts any off-the-shelf game into stereoscopic 3D. It is compatible with Windows XP, Vista or 7 (32-bit or 64-bit) and will work with both AMD and Nvidia graphics cards. Although not every single PC game is supported, there are probably close to 200 games that will work with it (some to better effect than others). We will be using the "Interleaved" mode in the "Vertical" setting. The driver itself cost around $40, although there is a 30-day free trial so you can test it out first.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THE PROCESS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


Parallax Barrier
The parallax barrier itself is a pretty simple concept, and you should understand how it works from watching my video. Its basically just a bunch of straight lines. The difficult part is finding the exact width for the barrier line that is going to coincide with your monitor. This alignment must be extremely accurate, to the micrometre (1/1000 of a millimetre). If there is any inaccuracy all you will get is a muddied, discolored double-image with no 3D effect. So the crux of this project is just finding this magic number. Pretty much all monitors will have their dot pitch listed in the spec sheet, so this gets us into the ballpark right off the bat. However there are other factors that effect the sizing of the barrier, such as the thickness of the glass on the screen, the thickness of the transparnecy film, your interpupillary distance (IPD; the distance between your eyes), and the distance you are sitting from the monitor (although this can be easy changed). I'm sure someone smarter than me could have come up with some formula to take into account all these values. However, at the end of the day, its all about what you percieve with your own eyes. So I developed this project mainly based on a trial and error method. There is, however, some math involved but it should be easy to follow.

Pixels Per Barrier (PPB)
The the puzzle you need to figure out is how many pixels are the width of each barrier. This is dependent on the DPI of your printer. You always want to be printing at the maximum DPI your printer can handle. Keep in mind that many printers have different horizontal and vertical DPI resolutions. So you may be limited by the lesser of the resolutions. I recommend having at least 1200dpi, although it may be possible at lower resolutions but I think the quality would suffer. This PPB scale is just something I made up, I don't think you will find anything on Google about it. Say your printer did 1200dpi. If you used a 100ppb resolution, then there would be 6 opaque barriers per inch (plus 6 transparent spaces the same size as the barriers). Unfortunately, the barriers must be a lot smaller than that, and more precise. They need to match up exactly to the width of a single pixel on the monitor (actually less than that, since you have to take perspective into account). So this is the magic number we are looking for.

Dot Pitch
The first thing you need to do is find the dot pitch of your monitor. This will be in millimetres. For example, the monitor I used for this is the Zalman Trimon ZM-M220W, which has a dot pitch of 0.282 mm. Yes, that is actually a 3D monitor, but I was *NOT* using the 3D functionality for this project. So what we need to do is convert this dot pitch into a pixel-per-barrier value. Since printers use dpi (dots-per-inch) we need to convert millimetres into inches. This is pretty simple to do. We just need to figure out how width a pixel is in inches. You can simply type this into Google:

"0.282 mm in inches" [without quotes]

Which Google tells me equals: 0.0111023622 inches

You can also do the conversion yourself, by multipling the dot pitch by 0.0393700787. That will give you the width of each pixel in inches. Now to get the pixels-per-barrier we need to multiply that by the dots-per-inch of the printer. I am going to use the value of 1440dpi, since that is what my Epson does.

dot-pitch(in inches) x dpi = ppb
0.0111023622 x 1440 = 15.987401568


So that means I have an estimated ppb of 15.987401568. Note the actual value should be smaller than this, since the barrier is in front of the panel and we need to take perspective into account. The problem now is that there is no printer (certainly not on the consumer market) that can printer with that kind of accuracy. I mean, it seems really close to 16 pixels, but thats not good enough. Although at this point you should print out a barrier of 16px (or whatever the closed integer is) just to see where your at.

Creating the pattern
This is actually the easy part. Just fire up your favorite image editor. I will be using Photoshop although other programs, like GIMP, should work as well. Since we are starting with a 16px barrier, we need a pattern that is 32px wide (and 1px high). This is because the pattern has to loop: one 16px opaque line and one 16px transparent line. We will be using solid black and white to do this. You can do this as follows:

1) Click "File" -> "New"
2) Set the following options:
Width: 32px (or double whatever your ballpark ppb is),
Height: 1px
Resolution: 72 ppi
Color Mode: Grayscale 8-bit
Background Contents: White
3) Press "M" to select the Rectangular Marquee Tool.
4) Press "Control"+"R" so show the rulers. Then right-click the ruler and select "Pixels".
5) Select a 16px x 1px area on the left side of the image.
6) Press "Alt"+"Delete" to fill it with black.
7) Press "Control"+"D" to deselect the area.
8) Click "Image" -> "Define Pattern...".
9) Name it something sensible like "16px barrier".


Here is the parallax barrier pattern I used for my Zalman Trimon ZM-M220W 22" monitor. I may be compatible with other 22" 1680x1050 monitors, I don't know.
ZM-M220W_Parallax_Barrier_Pattern.png
Create the barrier
This is even easier. We just need to create a blank document an fill it with the pattern. You can do this as follows:

1) Click File -> New
2) Set the following options:
Width: 8.5 inches
Height: 11 inches
Resolution: 1440 ppi (must be the maximum dpi of your printer)
Color Mode: Grayscale 8-bit
Background Contents: White
3) Double-click the locked background layer and hit "Enter" to make it a new layer.
4) Click the "fx" button on the bottom of the layer window (or click "Layer" -> "Layer Style").
5) Hit the "Pattern Overlay" button.
6) Click the pattern thumbnail, then scroll down to the pattern you just created (if you hover over it for a second it will tell you the name).
7) Click OK.


Printing the barrier
1) Click "File" -> "Print".
2) Under "Position" choose "Center Image".
3) Under "Scaled Print Size" make sure "Scale to Fit Media" is Unchecked (also make sure it says 1440 ppi).
4) Click "Page Setup".
5) Make sure your printer is set on the highest possible settings. The full dpi, best photo mode, black & white grayscale ink, choose presentation or glossy photo paper, disable high speed printing. These settings are printer specific, so yours may be different. Just make sure you put everything on max. After you are done, click "OK".
6) Click "Print" in the lower right corner of the window.


Aligning the barrier
Now we need to align the barrier on the screen. This part can be tricky. The most important thing is that the barrier lines are parallel to the columns of pixels. If the barrier is rotated at all, then it will not work (you will see rainbow colors). Vertical alignment is not really important, since the barriers are straight vertical lines. Horizontal alignment is more important, but not as much as the rotation. This is because you can shift your head from left to right in order to obtain a optimum angle. However you should try to get it as close as you can to the perfect alignment. To do this you will need to use my alignment helper image:
Alignment_Test_Image.png
You can open this image in Photoshop, but remember to click "View" -> "Actual Pixels" because it will *NOT* work if you scale the image at all. The parallax barrier is based on blocking pixels. If you scale the pixels at all it destroys the effect. You can press "F" three times to go fullscreen and then press "Tab" to remove the tool windows. If you still have the rulers on, press "Control"+"R" and hide them. Now you should have the alignment image front and center on the screen. At this point you want to place it on the screen and press against it so it sits flush with the glass. You want to test with one eye at a time. So close one eye (lets say the left eye) and then try to adjust for the right image with your right eye. The right alignment image should appear as a white background with the word "RIGHT" in black text. It is unlikely this will happen on your first try. Even with a perfect barrier, you are not going to get solid white and solid black, as there is always some bleeding of light on a sub-pixel level. However you can reduce the cross-talk to acceptable levels (as shown in my images/videos). Try experimenting with moving your face closer and further from the screen, this will effect how the pattern behaves. What you will probably be seeing is a series of colored bands, which cycle through a set of colors (black/red/yellow/white/cyan/blue). This is a result of the RGB sub-pixel elements being selectively masked. The order of the colors will tell you if the parallax barrier is too big or too small. For example, if you are testing for the right eye (white background) focus on an area on the screen that has something close to white. Now you will see it turn into another color. If it started to turn cyan to the right of the white area, that means the barrier is too big. That is because it is obscuring the red sub-pixel element, leaving only green and blue (which make cyan). If on the right of the white strip it turns yellow, then that means the barrier is too small. You can see my sub-pixel ghosting guide image below:
Sub-pixel-Ghosting-Guide.jpg
This is going to make it easier to know if you are working in the right direction when testing different barriers. Keep in mind that it is not just what is printed on the paper that effects the results. Your viewing distance from the screen makes a big difference. I had the best results from sitting really close to the monitor. Also, the distance from the barrier to the screen makes a difference. You can try adding in black transparency sheets to increase the distance, or you could flip the sheet so the printed side is facing the monitor (this is what I did and I got good results like this).

Interpolation
So I can pretty much guarentee that first pattern didn't look too good. That is because it needs to be very precise, and just rounding to the nearest whole number is not going to cut it. And since we are working with a fixed print resolution (meaning not using any scaling) we need to do the interpolation manually. Technically you are able to print documents at a higher resolution than the specs of the printer. However, this gets automatically downscaled and it seems that it loses some accuracy. Plus, without the hard numbers, you don't really know how this is being processed so it makes troubleshooting much more difficult. So we must interpolate the pixels ourselves. Basically what this means is making it so that not all barriers/spacing are the same width. For example, if we wanted to use a ppb of 14.5, we could have on opaque line at 15px and then a spacer at 14px. So the average ppb would be 14.5. Or if we had 7 lines of 15px and then 1 line of 14px, the average ppb would be 14.875. So you can see how we can attain much higher virtual resolutions than what can be physically printed, while still maintaining total accuracy. Keep in mind that we only want to be alternating between two different values. There is no benefit from using all sorts of random numbers. You just use the two whole numbers closest to the original ppb estimate based on the dot pitch. In my case that value was 15.987401568, so the two pixel widths I used were 16px (mostly) with a 15px one stuck in there sparingly. You want to start with something simple, for example 5 lines at 16px and then 1 line at 15px. However you can take this method as far as you need to go. For example, you can have a base pattern of 16px, with a 15px line stuck in every 10 lines (or rather 9 16px lines and 1 15px line since the pattern always has to be even). Then you can create another pattern based on this one, where it repeats that pattern 5 times, but then remove just the last pixel. This will make it just a tad bit smaller. Photoshop will sometimes "optimize" the pattern and try to break it down to a smalled pattern. So if you are creating complex patterns like this, maybe sure to insert a few random "black" pixels that are not totally black. This will force Photoshop to recognize it as one unique pattern. Hopefully you will not have to go this far if you have a decent printer. With the 1440 dpi on the Epson I have I did not have to get fancy with the interpolation like this. So if you are using a comparable printer you might be alright. But its good to know what tools you have at your disposal to fine-tune the pattern. Make sure that you have a system for testing different ppb sizes and that you document everything (it helps to right the pattern used on the sheet itself so you can go back and compare). Using a binary search technique can also be helpful. For example, start by testing a straight 16px barrier, and then also a 15px barrier. In my case the 16px was too big and the 15px too small. Now test a 15.5px barrier (by using a pattern with 1 16px line and 1 15px space). Was 15.5px too big or too small. If it was too big, then you know the real value is between 15.0 and 15.5. If it was too small, then the number id between 15.5 and 16.0. You can quickly eliminate a large number of possibilities by testing like this. It still requires a lot of trial and error, but if you document things well you will always be getting closer to where you need to be. This is probably the most complex part of this whole process, espeically since you can only artifically increase the resolution up to a certain point. For example, if all you have is a 300 dpi class printer, then no amount of tweaking will give satisfactory results.

3D Driver
In order to play the games in 3D you need a 3D driver. For this we will be using the iZ3D driver, which can be obtained at: http://www.iz3d.com/driver" onclick="window.open(this.href);return false; . This driver works on Windows Xp, Vista or 7 and on AMD or Nvidia GPUs. You want to use the "Interleaved" mode in the "Vertical" option. When you install the driver, be sure to do the full installation so you can choose the "Interleaved" mode. There is also a "Vertical (Optimized)" option which adds anti-aliasing into the mix. This reduces the jaggie effect you get due to interleaving, but results in a worse 3D experience. Feel free to test it out though, maybe you will prefer the smooth look (I think it just looks blurry). Make sure to set the "swap eyes" hotkey to something easy to remember. You will likely have to use this feature a lot when testing. Keep in mind that not every single PC game will work with this driver, but many do. Some games will work, but require some reduction of settings. Other games have visually anomlies that cannot be fixed, and this are probably not worth playing. But a good majority of popular titles are supported. If you are not familar with stereo 3d gaming, or stereo 3d in general, then if may be a good idea to download the iz3D driver an test it out before you attempt to do this parallax barrier project. The configuration of games can be difficult for a newcomer and you don't want to be troubleshooting the software while you are trying to build the parallax barrier. The 3D experience is very much about having proper content, so if you do not know how to tweak the settings you are not going to get an enjoyable experience. That said, most games will default to acceptable settings. But to really get the in depth experience, you need practice working with the driver. So I would suggest getting a pair of cheap red/cyan anglyph glasses and testing the free iz3d anaglyph mode first. The Pro-Ana glasses are the ones I use and they are pretty good. You can get them for under $10. If thats too much money for you, I will even send you some paper ones for free. Just hit me up on PM.

Limitations
Ok, so this here parallax barrier does produce a 3D effect and it does it pretty cheaply. But you can't get something for nothing. It is not without its limitations. The biggest drawback is that it automatically cuts the resolution in half (as I guess you've figured out after reading this tutorial). So the picture quality is not as detailed or crisp as with a full resolution image. The barrier also makes the picture appear a bit grainy. It still looks good enough to play a game, but its clearly not as great as you would want it to be. This is mainly a result of printing the pattern with a consumer level printer. Commercial quality parallax barrier displays (like Nintendo 3DS) would not have this problem. But beyond the picture quality there is one major issue with this mod. Once you do it to the monitor, it can *ONLY* be used to play 3D games. Browsing the web or navigating Windows is nearly impossible because you cannot read text through the lines. So I would only really do this mod on a spare monitor, or I would purchase a separate secondary monitor just for use in 3D. It is not possible to have this done on your primary monitor. I guess if you were an enterprising modder, you could mount the parallax barrier on a thin sheet of plexiglass and then build some sort of rail that the unit could slide into. This would make it possible to easily take on or off, although building such apparatus is outside the scope of what I was trying to do. Feel free to experiement if you wish.

Other Thoughts
I know implied this project would be easy, but it certainly takes some time and dedication. I think its ultimately a lot easier than people would expect it to be. Most technology these days is almost at a black magic level, where only a few elite engineers even understand the internal workings of it. So it is great to have something like parallax barriers, which anybody and understand and implement themselves. However, this was not an easy project for me personally. I have spent nearly 3 years in research and development on this project (although it was put on hiatus several times, I was not working the whole time). It was the recent commercial interest in parallax barriers that gave me the motivation to finish it, though. It seems like there are a string of glasses-free portable devices coming out in the near future and I think this will be a growing market. Not just with the Nintendo 3DS, but also glasses-free 3D smartphones and tablets. There are already a couple of digital 3D cameras with glasses-free displays, like the Fujifilm W3. And this technology is only going to improve. So while it may not be the ultimate 360 degrees holgraphic projection I know people want, its what we have today and its pretty cool for what it is.

If you guys have any questions or comments, please feel free to post in this thread or you can hit me up on PM if you please (although I would rather you post publicly so it can benefit the community). If you have any suggestions on how to improve the quality of this device or have any other suggestions, please post them as well. Thanks for reading.

// cybereality
You do not have the required permissions to view the files attached to this post.
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by cybereality »

Full quality 1080P 3D images of the setup as shown in the video.
Save to your computer and rename to *.jps to view with your stereo 3D rig.

You can also free-view with cross-eye, if you do not have 3D hardware.

Please note that these images were taken with a 2D camera, by simply taking one picture and then shifting the camera and taking another (on a tripod). So they suffer from alignment and distortion issues that make some of the shots difficult to view. This is a result of the imperfect method I used to take the images, and does not reflect the quality of the actual screen in person. The YouTube3D videos (in the post below) were taken with a dual-camera rig, so the results are far more accurate to what the 3D experience actually looks like.
Glasses-Free-3D_01.jpg
Glasses-Free-3D_02.jpg
Glasses-Free-3D_03.jpg
Glasses-Free-3D_04.jpg
Glasses-Free-3D_05.jpg
Glasses-Free-3D_06.jpg
Glasses-Free-3D_07.jpg
Glasses-Free-3D_08.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by cybereality on Mon Jan 24, 2011 10:17 pm, edited 1 time in total.
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by cybereality »

YouTube3D slideshow of the images shown in the video:

[youtube]http://www.youtube.com/watch?v=W0mextPnN-o[/youtube]
Please click the title of the video to go to YouTube3D and choose your 3D viewing method.



YouTube3D Video of me playing UT2004 with this setup:

[youtube]http://www.youtube.com/watch?v=NuoGMBv7pl0[/youtube]
Please click the title of the video to go to YouTube3D and choose your 3D viewing method.
Last edited by cybereality on Mon Jan 24, 2011 8:28 am, edited 1 time in total.
User avatar
Okta
Golden Eyed Wiseman! (or woman!)
Posts: 1515
Joined: Tue Feb 12, 2008 5:22 am

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by Okta »

Very nice Cyber, and those pictures in the video were much higher quality than i was expecting. Do you happen to own an eeepc by any chance? It would be cool to make one for those (cause i have a 7 and 10 inch one :) because they are so common and easy size to print for. Would make a cool portable 3d player.
"I did not chip in ten grand to seed a first investment round to build value for a Facebook acquisition."
Notch on the FaceDisgrace buyout.
Galo
One Eyed Hopeful
Posts: 4
Joined: Thu Jan 20, 2011 6:41 am

Release: Parallax Barrier Calculator 0.2 by Galo

Post by Galo »

Amazing work cyber!

I'm also was working on an aplication based on the information posted on this thread that is capable of estimate the "best" barrier and space size, taking into account several factors, and then save the pattern to a png file. It simulates the setup given as an input and then calculates by bruteforce the best config accordingly to that setup. The estimation optimizes the ghosting and correctness of the parallax barriers. However it makes some asumptions in order to keep things simple: it asumes that the parallax barriers are all of the same size and centered on the screen. The space between them are also of equal size. The calculated pattern have H. Resolution/2 + 1 barriers. Additionally, the viewer is assumed to be in a centered position with respect to the LCD.

I was unable to test the results by myself since I do not have transparency films :oops:

However, I hope that someone can test it and post the results.

Here is a screenshot:
Image

Pixel Pitch (mm): It is the pixel size of the LCD
H. Resolution (Pixels): The horizontal res of the LCD.
V. Resolution (Pixels): The vertical res of the LCD (required in order to save the pattern)
Focus Distance (mm): The distance between you and the lcd
Distance Between Eyes (mm): The distance between your eyes.
Distance between the Parallax Barriers and the LCD (mm): self explained
Precision (recomended: 1500): this is a key factor in order to get accurate results. It represents the amount of simulated light that each pixel produce. Higher values will give better results but it will also require more computing time. With this value, the computation may take a few minutes in order to complete (four to ten minutes depending of your CPU).
DPI printer requiered for exact precision: It is the estimated printer dpi required to exactly match the precision. It is only for reference, since the actual DPI will depend of your printer.

Here is the result dialog:
Image

Size Barrier (mm): it is the estimated Barrier size in mm.
Space between Barriers (mm): it is the estimated space between the barriers.
Print size (mm X mm): it is the size of the printed pattern. Once you have saved the file, you need to tell your printed that "prints" the pattern in this size on the paper. Also, gives you the minimun paper size required.
Selected DPI for the saved pattern: Needs to be set to the actual DPI of your printer.

The program is a java aplication and then you need the JRE to run it. You can found it here:
http://www.oracle.com/technetwork/java/ ... index.html

Update:
A new version is available. This fix the memory and dpi issue of the saved pattern. Now it will work on any JRE (32 and 64 bits) without consuming your RAM :lol: . Also, some other bug are fixed. I think that it is perfectly usable now, the only remaining thing is test the results :roll:
Parallax Bariers Calculator.zip
Also, here is the pattern obtained with the default settings, that corresponds to the LG W2353S model, i.e., my monitor.
http://rapidshare.com/files/444498026/pattern.png

Regards,

Galo
You do not have the required permissions to view the files attached to this post.
Last edited by Galo on Tue Jan 25, 2011 12:22 pm, edited 4 times in total.
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by cybereality »

@Galo: Interesting work. I will have to test out your program and compare it to my trial and error based results. I actually started doing something similar to this at first, although I was using Javascript to code a script inside Photoshop. While this did add some flexibility, the process was very intensive, consuming large amounts of RAM and CPU processes. Many times it would crash my computer, even with only 600dpi patterns (this was on my old computer, but still). So I abandoned the method since it was time consuming and crashed the computer too frequently. Maybe there is some way to optimize this somehow, like rendering on the GPU maybe. I don't know, I will look into it.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by Fredz »

Very nice article and video Cybereality, congrats !

Concerning the brightness loss, ghosting, moiré pattern and horizontal resolution loss, did you try to slant your parallax barrier to reduce these problems ?

I know the iZ3D or other drivers should not be able to support slanted interlacing for now, but you could still try on specially crafted stereo images to do some tests.

It's been used quite commonly with lenticular screens, so I guess the benefits could also be the same for parallax barriers technologies since they do approximately the same thing.
User avatar
Guig2000
Binocular Vision CONFIRMED!
Posts: 257
Joined: Wed Nov 25, 2009 9:47 am
Location: Bordeaux, France

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by Guig2000 »

It could be interesting to try with a checkerboard pattern I think.
Image
User avatar
Johnny-Mnemonic
Binocular Vision CONFIRMED!
Posts: 261
Joined: Sun Aug 24, 2008 5:52 am
Location: Zurich area, Switzerland
Contact:

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by Johnny-Mnemonic »

Guig2000 wrote:It could be interesting to try with a checkerboard pattern I think.
Since printer resolution is different vertically and horizontally, it would be harder to print such pattern correctly.
Oculus Rift, Vuzix Wrap 920 AR!, Vuzix VR920, Liquid Image MRG 2.2, Razer Hydra, P5 Glove, Microsoft Kinect, TrackIR5, 2 x Hillcrest Labs Freespace tracker, Fujifilm finepix real 3d w3, GeForce 9800GT 1Gb, GeForce GT 430 1Gb, DELL XPS 17 l702x with GeForce 555 GT 3Gb, and good-old VFX1 setup
Galo
One Eyed Hopeful
Posts: 4
Joined: Thu Jan 20, 2011 6:41 am

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by Galo »

cybereality wrote:@Galo: Interesting work. I will have to test out your program and compare it to my trial and error based results. I actually started doing something similar to this at first, although I was using Javascript to code a script inside Photoshop. While this did add some flexibility, the process was very intensive, consuming large amounts of RAM and CPU processes. Many times it would crash my computer, even with only 600dpi patterns (this was on my old computer, but still). So I abandoned the method since it was time consuming and crashed the computer too frequently. Maybe there is some way to optimize this somehow, like rendering on the GPU maybe. I don't know, I will look into it.
Hey Ciber! I have made some fixes in the optimization problem. Now it only consider feasible solutions reducing the search space so the computing time and the results are improved, since in the previous versions it may happen that the best result correspond to a non feasible solution (and thus, totally useless). You should realize that this program in fact simulates the enviroment given in the setup and then search for the best solution. The drawback "red colored" that I mentioned in the post it is related to the save process (like you mentioned) of the pattern. Hovewer, one can take the values given by the algorithm and then employ another software (like Photoshop) to actually print the pattern.

EDIT: I have made more fixes... Now I don't have any memory issues. See above for more details.
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by cybereality »

@Fredz: Well brightness loss is actually less than with the Zalman solution. Even though resolution is halved (like Zalman) you are not wearing polarized glasses. So colors are brighter and more accurate (but not by much). Ghosting can be reduced by using the monitor in portrait orientation and increasing the duty cycle and/or adding additional barriers. However this causes a massive reduction in image brightness and overall quality so it is not worth it. However in some tests I did get extremely low ghosting, so it is possible. The moire pattern is actually caused by the camera taking the picture. I did not see anything like that in real life. There was, however, a grainy-ness to the image, but it looks more random than moire. Horizontal resolution loss is inevitable with a solution like this, but its not so bad (especially since my "real" 3d solution is also interleaved its not that big a difference). I did read some white-papers that suggested using diagonal barriers, and the concept seemed interesting. However that would not work with the iz3D driver, and thus be useless for gaming. However I do have plans to continue this project for a custom application (for example, done in OGRE) and in that case I could experiment with diagonal. I guess I could test in Photoshop first, but its not a priority at the moment. However, I still don't quite understand how that helps the situation much. At the end of the day, you are ultimately blocking individual pixels (or sub-pixels) so that comes along with the same problems. Would be interested if you had a link that clearly explained the benefits.

@Guig2000: I did actually try with a checkerboard pattern and the results were so bad I did not bother taking any pictures. My printer can certainly handle it, it does 5760x1440dpi, and I used 1440dpi for the barrier in the video. Alignment was a nightmare, though. It had to be placed on the screen absolutely perfectly which was extremely difficult. Also, ghosting was horrible. Its possible that the pixels on my monitor are not exactly square (even though the spec sheet claimed it was). Because if I use the same barrier from the video, but it portrait mode, it does not look as good (more ghosting). The other major issue is that now the viewing angle is literally a single point in 3D space. You cannot move your head left, right, up, down, forward or back not even by an inch. Although at that point it did sort of work. So if I tried really hard I could probably get checkerboard to work. I mean, I did see some 3D effect (with heavy ghosting). The advantage is that the resolution did appear much better. Not full-res by any means, but it was somewhere in-between. Might try again if I have time.

@Johnny-Mnemonic: Yes, the pattern would have to be optimized in both axis, but I think its possible.

@Galo: Very cool man. I have downloaded your program, but I am very busy this week. I'll let you know how it compares to the results I got.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by Fredz »

cybereality wrote:@Fredz: Well brightness loss is actually less than with the Zalman solution. Even though resolution is halved (like Zalman) you are not wearing polarized glasses. So colors are brighter and more accurate (but not by much).
Ah yes, I incorrectly said that a slanted disposition would enhance brightness, but it's not the case. In fact it will even it out on the whole screen because the black space between subpixels won't be visible only in vertical lines but dispatched equally on the surface of the screen.
cybereality wrote:Ghosting can be reduced by using the monitor in portrait orientation and increasing the duty cycle and/or adding additional barriers. However this causes a massive reduction in image brightness and overall quality so it is not worth it. However in some tests I did get extremely low ghosting, so it is possible.
You can try the technique used in this paper to reduce ghosting :
http://www.evl.uic.edu/files/pdf/Kooima-VR07.pdf" onclick="window.open(this.href);return false;
Basically they use a 3/4 opaque duty cycle and use an interleaving composed of 4 bands : left eye, black guard band, right eye, black guard band. This should effectively reduce the ghosting even if it also lowers brightness, but if they've chosen this method I guess it's because it still gives a better depth perception in the end and that the compromise is more interesting.
cybereality wrote:The moire pattern is actually caused by the camera taking the picture. I did not see anything like that in real life. There was, however, a grainy-ness to the image, but it looks more random than moire.
I can't really tell without actually seeing your screen, but I'd say the grainy-ness you see could be a moiré. Moiré artefacts can take several different forms, with parallax barriers they often produce visible vertical lines. That's one of the reason why many autostereoscopic displays now use slanted parallax barriers instead of vertical ones.
cybereality wrote:Horizontal resolution loss is inevitable with a solution like this, but its not so bad (especially since my "real" 3d solution is also interleaved its not that big a difference).
The slanted setup can also reduce this by mitigating the disparity in both horizontal and vertical resolution instead of only halving the horizontal resolution. That's the second goal besides reduction of the moiré that was pursued by Douglas Winnek when he invented the slanted technique.
cybereality wrote:I did read some white-papers that suggested using diagonal barriers, and the concept seemed interesting. However that would not work with the iz3D driver, and thus be useless for gaming.
Yes, I'm not aware of any driver supporting that at this time, but with the recent video posted about iPont supporting slanted barriers with YouTube 3D the interest may grow. And the implementation is quite straightforward so it wouldn't be very difficult to add it to a stereo driver.
cybereality wrote:However I do have plans to continue this project for a custom application (for example, done in OGRE) and in that case I could experiment with diagonal. I guess I could test in Photoshop first, but its not a priority at the moment.
If you want to try to implement this technique, have a look at this paper that gives a good description of the algorithm (for lenticular screens but easily adaptable to parallax barriers I think) :
http://iss.bu.edu/jkonrad/Publications/ ... A_1999.pdf" onclick="window.open(this.href);return false;
cybereality wrote:However, I still don't quite understand how that helps the situation much. At the end of the day, you are ultimately blocking individual pixels (or sub-pixels) so that comes along with the same problems. Would be interested if you had a link that clearly explained the benefits
There are several benefits to slanted parallax barrier, as I said it reduces the moiré because black spaces between subpixels appear on the whole screen instead of only in vertical lines (picket fence effect).

They also enhance the perceived resolution by distributing it on both horizontal and vertical resolution instead of only the horizontal one.

Another advantage is that you don't need a printer with an exact multiple of the dpi of your screen since by turning your sheet you can make the bars coincide with the pixels.

You are even not forced to make the bars coincide when working with subpixels, you only have to add an offset to your algorithm so it always produces an adequate rendering.

There is also the image flipping effect which causes a noticeable transition between the viewing zones, which is overcomed with slanted installation by producing a smooth transition between views.

In this document it's apparently said that the acuity is better (x1.4) when using sub-pixel-scale line screens instead of pixel-scale ones (ie. the width of a band is less than a pixel), but I'm not sure I understood the text correctly (§4.2 in the last and previous page) :
http://www.evl.uic.edu/files/pdf/Kooima-VR07.pdf" onclick="window.open(this.href);return false;

Also if you've got a webcam you could even add support for eye tracking in order to always be in the sweet spot, I guess you should be able to use FreeTrack to do this.
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by cybereality »

Thanks for the links. I will take a look at those when I get a chance.
AntiCatalyst
Cross Eyed!
Posts: 168
Joined: Tue Jan 25, 2011 7:53 pm
Location: Sweden

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by AntiCatalyst »

it should be possible to devise a simple forrmula for making perfect parallax barriers, using only 4 variables(viewing distance, screen width, horizontal resolution and eye width).

this would then scale to any screen from any viewing distance.
i tried to, but it got really complex, and i never got it "solved".

anyway, i found that the distance between screen and barrier cannot be customly defined, you have to calculate this based on your variables to get pixel-perfect separation.
Image
"This is great!"
User avatar
wuhlei
Binocular Vision CONFIRMED!
Posts: 287
Joined: Tue Dec 18, 2007 4:23 am
Contact:

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by wuhlei »

I'd rather just buy the sheets. Is any one selling them?
Albert Einstein
"The true sign of intelligence is not knowledge but imagination."
User avatar
Likay
Petrif-Eyed
Posts: 2913
Joined: Sat Apr 07, 2007 4:34 pm
Location: Sweden

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by Likay »

I think you need to do them yourself. They need to match the display with less than a half pixel difference. Maybe different displays follows strict fabricationrules aboutaverage distance between pixels but practically i don't think so.
Mb: Asus P5W DH Deluxe
Cpu: C2D E6600
Gb: Nvidia 7900GT + 8800GTX
3D:100" passive projector polarized setup + 22" IZ3D
Image
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by cybereality »

wuhlei wrote:I'd rather just buy the sheets. Is any one selling them?
I would sell them myself, except every monitor is slightly different. I would need a template for each specific model. I was thinking maybe we could all choose a good cheap 1080P display and use that as a base model. So I would buy that screen and perfect the pattern on it, then I could send people the working pattern. Obvious you need to buy the monitor yourself. The monitors I was looking at would be around 23" 1080P and cost around $150.
User avatar
wuhlei
Binocular Vision CONFIRMED!
Posts: 287
Joined: Tue Dec 18, 2007 4:23 am
Contact:

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by wuhlei »

That would be cool, I was thinking about getting the monitor you posted. Will the pattern work for any of the monitors resolution or will I have to use the max resolution? Unless kinkos or w/e will print it for me and I know exactly what I need I'd rather buy from some one else then make it, because of the cost of the printer, ink and paper.

I swear monitors tech is changing a lot of a sudden and 3d monitors like zalman is just too expensive. Plus interlaced 1600 x 1200 I might as well get emagin. I think as soon as 3DS comes out a lot of new 3d solutions will come out too.
Albert Einstein
"The true sign of intelligence is not knowledge but imagination."
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by cybereality »

The pattern only works at a 1:1 pixel mapping. Each barrier blocks a single column of pixels and the display must be run at its native resolution. There can be no scaling of any kind. Kinko's will not be of much help, I already went down that road. Their printers (at least the ones by me) could only do 600dpi. We need at least 1200dpi for this project. Even if they had the proper printers, it would be really annoying having to go back and forth to Kinko's every time you want to test a pattern. It could easily take 20 or 30 attempts to find the right pattern, you really need to be doing it yourself.
AntiCatalyst
Cross Eyed!
Posts: 168
Joined: Tue Jan 25, 2011 7:53 pm
Location: Sweden

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by AntiCatalyst »

Galo;
very good job on the app!

But for it to make a perfect barrier every single time, the application would have to calculate the correct barrier-to-screen distance automagically from the other values, and then use that number for the final calculation. Otherwise, you'd get ghosting simply because the calculated "best config" had the wrong barrier distance specified.

i made a formula for that, but it was really rough and ugly so i binned it ;) I probably did it the wrong way round or something. Essentially, it calculated the intersection of two imaginary "eye lines" for two neighboring pixels sharing the same "barrier hole". (it really clears up when you draw it out and draw lines to each eye) It should be possible to devise a simple formula for the actual barrier, too.

oh, and i forgot to say this, but cybereality, you are like a god to me :D
Just the idea of anyone being able to make a 3d monitor on-the-cheap at home is mindblowing. and to top it off, it's glasses-free! how about that!




edit; well, i feel stupid now, it WAS quite simple! :D
Image

where d is the actual barrier-to-lcd distance, P is pixel pitch, V is viewing distance and S is eye separation.

here is a google calc based on my 17" screen with 80cm viewing distance.
now if i could only make a similar one for the actual parallax barrier.. hmm ;)



edit 2; I solved the other one too. I'm on fire tonight :)
Image
W is the entire width of the parallax barrier and R is horizontal resolution, the others are the same as above.
using these equations will provide a perfect barrier, in theory free from any type of ghosting or subpixel leaking!

To print it, you could simply make a photoshop document at your screen's resolution PLUS ONE horizontal pixel, and then create a black/white/black/white/black interlace pattern at 1 pixel intervals(first and last columns should be black if you haven't messed up). When you go to print it you just paste the calculated barrier width as the print size.

here is, again, a google calc based on my 17" monitor(which is, btw, quite precisely 337mm wide!). i should probably look into making a batch file or something so anyone can use it :P i'm not a programmer though so if someone could write something up(if it's even possible) that would be just great! :)


anyway, cybereality, do you think it's possible to print it like this? i mean, the printer should be able to scale it to its DPI, right?(assuming it's high enough)

(Lots of edits to try to de-clutter the entire post) :lol:
Last edited by AntiCatalyst on Sat Jan 29, 2011 12:31 am, edited 9 times in total.
Image
"This is great!"
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by Fredz »

cybereality wrote:The pattern only works at a 1:1 pixel mapping. Each barrier blocks a single column of pixels and the display must be run at its native resolution. There can be no scaling of any kind. Kinko's will not be of much help, I already went down that road. Their printers (at least the ones by me) could only do 600dpi. We need at least 1200dpi for this project.
As I said, if you used slanted parallax barriers you wouldn't need to have a perfect match and wouldn't be limited to a high DPI printer. I guess it should also correct the color leaking from subpixels you experienced when not in portrait mode.

Unfortunately there doesn't seem to exist stereo 3D drivers for that, but viewing photos or playing videos should still be possible though. You'd just need to convert them to the correct format or write a script to do it on the fly.
User avatar
wuhlei
Binocular Vision CONFIRMED!
Posts: 287
Joined: Tue Dec 18, 2007 4:23 am
Contact:

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by wuhlei »

cybereality wrote:The pattern only works at a 1:1 pixel mapping. Each barrier blocks a single column of pixels and the display must be run at its native resolution. There can be no scaling of any kind. Kinko's will not be of much help, I already went down that road. Their printers (at least the ones by me) could only do 600dpi. We need at least 1200dpi for this project. Even if they had the proper printers, it would be really annoying having to go back and forth to Kinko's every time you want to test a pattern. It could easily take 20 or 30 attempts to find the right pattern, you really need to be doing it yourself.
That's what I was afraid of, and I'll bet even if you can get down right the quality is lost when looking at the sides of the screen because the angle would shore more then a pixle?

Grrr If they sell touch screen addons for monitors on ebay it should be no problem to make a polarized screen cover replacement. A 100$ mod to make any screen IZ3D polarized would be great.

Fredz wrote:
cybereality wrote:The pattern only works at a 1:1 pixel mapping. Each barrier blocks a single column of pixels and the display must be run at its native resolution. There can be no scaling of any kind. Kinko's will not be of much help, I already went down that road. Their printers (at least the ones by me) could only do 600dpi. We need at least 1200dpi for this project.
As I said, if you used slanted parallax barriers you wouldn't need to have a perfect match and wouldn't be limited to a high DPI printer. I guess it should also correct the color leaking from subpixels you experienced when not in portrait mode.

Unfortunately there doesn't seem to exist stereo 3D drivers for that, but viewing photos or playing videos should still be possible though. You'd just need to convert them to the correct format or write a script to do it on the fly.
Cool, what do you mean slanted and is there a downside to this compared to the other way? Maybe you could talk IZ3D to supporting it? lol
Last edited by wuhlei on Fri Jan 28, 2011 2:31 am, edited 2 times in total.
Albert Einstein
"The true sign of intelligence is not knowledge but imagination."
AntiCatalyst
Cross Eyed!
Posts: 168
Joined: Tue Jan 25, 2011 7:53 pm
Location: Sweden

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by AntiCatalyst »

Fredz, that's not going to work for a DIY project. You'd have to design a pixel-perfect "staircase" in order to not cover any subpixels up or leak them to the wrong eye. And, you'd have to design the vertical just as carefully as the horizontal.

on top of that, there are no programs that support it, so you'd have to write your own from the ground up.
if you'd be willing to go that far, writing your own drivers and filters could solve the "staircase problem" and let you use straight lines, IF you could write them to be subpixel-aware. but then you'd have color shifting instead because you messed with the subpixels! bad boy! :P
Image
"This is great!"
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by Fredz »

wuhlei wrote:Cool, what do you mean slanted and is there a downside to this compared to the other way?
Slanted just means that the barrier is placed with an angle in respect to the vertical.

Example with a parallax barrier (rightmost image) :

Image

Example with a lenticular screen :

Image
dagbro wrote:Fredz, that's not going to work for a DIY project. You'd have to design a pixel-perfect "staircase" in order to not cover any subpixels up or leak them to the wrong eye. And, you'd have to design the vertical just as carefully as the horizontal.
By slanted I didn't meant "staircased", it's been shown in the paper about Dynallax that the staircased solution is not as good as the slanted one because it does need very precise registration which is not really practicable.

With the slanted technique you don't need an accurate registration, you just need to find the angle that minimizes moiré and then adapt your code accordingly.

The problem with color leaking is already present in vertical barriers with an horizontal RGB subpixels arrangement as Cybereality already said, you can correct this with slanted barriers by doing sub-pixel interlacing. Using a slanted lenticular screen (3DeeSlide) on my iPhone (vertical RGB subpixels in landscape mode), I only saw extremly minor color leakages. My code works at the pixel level, I didn't implement subpixel rendering yet. You can see screenshots and videos that demonstrate this in the corresponding topic.
dagbro wrote:on top of that, there are no programs that support it, so you'd have to write your own from the ground up.
Yes, that's the downside. But the code is extremely simple to write, it only takes six lines in my image conversion app. The subpixel version should be equally simple and should require 2 or 3 more lines of code at most.
dagbro wrote:if you'd be willing to go that far, writing your own drivers and filters could solve the "staircase problem" and let you use straight lines, IF you could write them to be subpixel-aware. but then you'd have color shifting instead because you messed with the subpixels! bad boy! :P
As I said you can correct the color leaking by taking subpixels into account, I wouldn't be surprised that this solution leaks less than a vertical barrier with a screen using an horizontal RGB subpixels arrangement.
wuhlei wrote:Maybe you could talk IZ3D to supporting it? lol
I guess someone could ask them to add support for this, but I'm not sure they'd invest time in it if they can't have a return on investement. It doesn't cost anything to ask anyway...
AntiCatalyst
Cross Eyed!
Posts: 168
Joined: Tue Jan 25, 2011 7:53 pm
Location: Sweden

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by AntiCatalyst »

a perfect vertical barrier shouldn't leak at all, and is supported by lots of software ;) so i guess it's just a matter of choosing what you want to spend your time with, printing the barrier or adjusting your software to match your desired angle.
Image
"This is great!"
User avatar
wuhlei
Binocular Vision CONFIRMED!
Posts: 287
Joined: Tue Dec 18, 2007 4:23 am
Contact:

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by wuhlei »

dagbro wrote:a perfect vertical barrier shouldn't leak at all, and is supported by lots of software ;) so i guess it's just a matter of choosing what you want to spend your time with, printing the barrier or adjusting your software to match your desired angle.
there is no perfect vertical barrier unless the barriers at the side of the screen are a different position, angle and width then the ones in the center. This is much worse then wearing 3D Glasses, I would rather use prism glasses and not drive my self crazy.
Albert Einstein
"The true sign of intelligence is not knowledge but imagination."
AntiCatalyst
Cross Eyed!
Posts: 168
Joined: Tue Jan 25, 2011 7:53 pm
Location: Sweden

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by AntiCatalyst »

wuhlei wrote:
dagbro wrote:a perfect vertical barrier shouldn't leak at all, and is supported by lots of software ;) so i guess it's just a matter of choosing what you want to spend your time with, printing the barrier or adjusting your software to match your desired angle.
there is no perfect vertical barrier unless the barriers at the side of the screen are a different position, angle and width then the ones in the center. This is much worse then wearing 3D Glasses, I would rather use prism glasses and not drive my self crazy.
since the screen is flat, the pixel pitch is fixed and our eyes are parallel to the screen surface, a perfect vertical barrier does exist and has a fixed line width+line distance across the entire plane. You just have to get your calculations right.

i do realize there's no such thing as a perfect printer, but nonetheless, with enough DPI it's very possible.
a 1200dpi printer has a dot pitch of 0.0212mm. this is more than four times smaller than the SUBpixel pitch of my screen.




on a totally different topic, there should be an infinite number of working 3d hotspots with this tech. The only problem is that you have to keep your eyes in the exact "plane" that you calculated the barrier for.. in other words, you could move your head sideways until you get to another hotspot, but you can't turn your head to look at the screen :roll:

EDIT; hmm, i think i had that one wrong.. you really SHOULD turn your head towards the screen for perfect representation.
Last edited by AntiCatalyst on Sat Jan 29, 2011 8:42 am, edited 1 time in total.
Image
"This is great!"
Shadow
One Eyed Hopeful
Posts: 4
Joined: Tue Jun 01, 2010 3:00 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by Shadow »

Hey Ciber!
Very nice work you did there! ;)

I got one question (Sorry for my english I'm from Germany :D):
I want to build your no-glasses 3D Technique but there is one Problem, i don't know where to find the Transparency Film you used.
Can anybody give me a tip where i can find this Transparency Film in Germany or how its named here? :D
It would be so awesome to play Games in 3D without glasses! :woot

Shadow
User avatar
wuhlei
Binocular Vision CONFIRMED!
Posts: 287
Joined: Tue Dec 18, 2007 4:23 am
Contact:

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by wuhlei »

dagbro wrote: since the screen is flat, the pixel pitch is fixed and our eyes are parallel to the screen surface, a perfect vertical barrier does exist and has a fixed line width+line distance across the entire plane. You just have to get your calculations right.

i do realize there's no such thing as a perfect printer, but nonetheless, with enough DPI it's very possible.
a 1200dpi printer has a dot pitch of 0.0212mm. this is more than four times smaller than the SUBpixel pitch of my screen.

on a totally different topic, there should be an infinite number of working 3d hotspots with this tech. The only problem is that you have to keep your eyes in the exact "plane" that you calculated the barrier for.. in other words, you could move your head sideways until you get to another hotspot, but you can't turn your head to look at the screen :roll:
Not true sorry, this would be great for the center of the screen but the lines on the side of the monitor needs a different width and position. It seems like no matter what there is going to be quality loss. Instead of getting a new monitor, buying a printer and all that I just got an IZ3D monitor on sale at ebay for 200$
Albert Einstein
"The true sign of intelligence is not knowledge but imagination."
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by cybereality »

@dagbro: Ok, thanks for those equations. I will take a look at the math when I get a chance (crazy week for me here).

@Fredz: Well personally I find the vertical barrier to give acceptable results, and I am not sure how much benefit this slanted design would give. I will accept that it can be better, but how much better? Better enough to just throw out all the software support the current solution has? I mean, right now the parallax barrier works for 3D gaming with the iz3D driver, videos and images with the Stereoscopic Player, online videos with YouTube3D, online photos with Phereo, etc. I'm not really looking to toss that out the window.

@Shadow: You can search for "Transparency Film" on eBay and there should a bunch of sellers that ship internationally. Just make sure to buy the correct one for your printer (ie injet or laser). You have to be careful because not all transparency film is designed to be printed on with printers. Make sure it says either inkjet or laser.

@wuhlei: Well, I know I said the mod costs $5 but it does end up getting more expensive. Technically the final parallax barrier, the ink to print it, and the tape to mount it, do indeed cost under $5. However if you include all the tools and supplies needed (ie a printer, the transparency film used for testing, etc.) and a new monitor just for this purpose, then it can get expensive. I have easily dropped a few hundred dollars or more to complete this project. And the quality is admittedly not up to par with commercial solutions. So if you want the best quality experience, then certainly buy a real 3D monitor like Nvidia 3D Vision or even IZ3D (although there might even be less ghosting with my DIY solution than iz3D). I was thinking maybe people already had decent printers and would only need to buy the transparency film, which is only like $10 for standard 8.5" x 11". And people might also have spare monitors they could use (or maybe they don't mind having to mount and un-mount the barrier every time). In that case it would be pretty cheap.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by Fredz »

wuhlei wrote:Not true sorry, this would be great for the center of the screen but the lines on the side of the monitor needs a different width and position. It seems like no matter what there is going to be quality loss.
No, he's right, even if it seems counter-intuitive the spacing will be right as long as your eyes are parallel to the screen surface, even when looking at a giant screen with an infinite width. See this pic :

Image
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by Fredz »

cybereality wrote:@Fredz: Well personally I find the vertical barrier to give acceptable results, and I am not sure how much benefit this slanted design would give. I will accept that it can be better, but how much better? Better enough to just throw out all the software support the current solution has? I mean, right now the parallax barrier works for 3D gaming with the iz3D driver, videos and images with the Stereoscopic Player, online videos with YouTube3D, online photos with Phereo, etc. I'm not really looking to toss that out the window.
I don't know either how much benefit this solution would give, but an improved perceived resolution and image quality sound like valuable additions.

I think there should be a reason why most high-end 3D TVs (Philips 3D-LCD and Tridelity ) and virtual reality solutions (Dynallax, successor of CAVE) use this solution instead of the vertical parallax barrier technique.

You won't be able to play 3D games (until someone implements that in a stereo driver), but you can still play movie by using a simple AVISynth script (like I did for the 3DeeSlide). Converting photos or writing a photo viewer should be equally simple.

Since you've got the equipment (printer and LCD monitor) and seem to like experimenting, I thought you'd like to have a try at this technique.
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by cybereality »

Fredz wrote: Since you've got the equipment (printer and LCD monitor) and seem to like experimenting, I thought you'd like to have a try at this technique.
Well yeah, I do like experimenting, so this is something else to try. I will certainly give it a closer look at some point and see if it can work out. I was just pointing out that we lose a whole lot of software support (namely everything) by going down this road. So the results would have to be a great deal better than they currently are in order to justify the cost. But seeing as many other researchers seem to swear by this method, it certainly deserves a closer look.
AntiCatalyst
Cross Eyed!
Posts: 168
Joined: Tue Jan 25, 2011 7:53 pm
Location: Sweden

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by AntiCatalyst »

cybereality;
If you're busy or something, i could calculate it for you.
just tell me your pixel pitch, horizontal resolution, eye width and preferred viewing distance.

you should probably triple-check that the pitch is correct though, because that's probably the most critical factor. multiplying the pixel pitch with your horiz-res would give you the theoretical LCD panel width in mm. then just measure the actual panel width and compare the two. this is because i've noticed some sites supply rounded-down pixel pitches for my monitor(0.264 rounded to 0.26).. we need to use the exact pitch for my equations to work.

well you know what they say; measure twice, print once :D



edit:
Since the d-value is mostly theoretical anyways, i decided to combine the two formulas, and noticed that viewing distance literally fell out of the equation! This means you can use the same printed barrier for any viewing distance, you increase the distance by moving the barrier a mm or so away from the screen.





here is the new formula:
Image
again, W=total barrier-sheet width, R=horizontal resolution, S=eye separation and P=pixel pitch.
GoogleCalc

You could change the (R+1) in the equation to (R+X) if you want to use X 3d hotspots, otherwise you'd see the first pixel column(s) with both eyes when not in the center one. Note that your photoshop document would also have to be R+X pixels wide for the barrier to work then.

Who's up for converting their TV? :D A 42" LCD should be easier to convert than a computer screen(printing difficulties aside), since the pixels are so much larger.
and the multiple streams would really work if you had all the seats parallel to the screen(most people do have the couch parallel to the TV, anyways).
Your local graphics/PR shop should be able to print it, if they can provide the needed accuracy.


Plasmas COULD work, too, if the viewing distance and/or pixel pitch is large enough to allow the barrier to be in front of the glass rather than IN it.
haha, maybe i'm getting ahead of myself here, but i see a future where everyone here has got DIY-converted TVs :mrgreen:




This shorter one defines B, which is a single barrier width(and the distance between two adjacent barriers, they're the same)
Image
as you can see, it's the same except that it doesn't have the R+1.
not sure there's any use for it though :P it's just very slightly smaller than the pixel pitch(0.2629 something vs 0.264 on my screen)
Image
"This is great!"
OuHiroshi
One Eyed Hopeful
Posts: 19
Joined: Wed Jan 26, 2011 9:23 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by OuHiroshi »

Do you think the top LCD on the IZ3D monitor could act as the parallax barrier for the bottom LCD? Maybe even have a webcam to track head movement to shift the barrier on the fly for better view angle. But I bet the pixel/barrier width won't match :(
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by cybereality »

OuHiroshi wrote:Do you think the top LCD on the IZ3D monitor could act as the parallax barrier for the bottom LCD?
I am not sure the iz3D panel can go completely opaque. I believe it is designed to act as a polarizing filter.
AntiCatalyst
Cross Eyed!
Posts: 168
Joined: Tue Jan 25, 2011 7:53 pm
Location: Sweden

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by AntiCatalyst »

i have an idea on resolving the ghosting issues you're having.

Theoretically, there should be NO ghosting at all when you're in the hotspot, so it might be the printer leaving a "fuzzy" edge instead of a straight one. this fits with it printing a higher resolution in one direction than the other. Have you ever studied your barriers through a loupe? Regular binoculars turned the wrong way can often be used as a make-shift loupe on very close ranges if you dont have one

if i'm correct, all you'd need is wider barriers! This would, however, shift the image towards green, since you're effectively blocking off more of the red and blue subpixels. So, to combat that you just lower the intensity of the green channel(either in the monitor settings or in the driver). In effect, you'd sacrifice some brightness for decreased ghosting.

the barrier-to-spacing ratio in the image you print could be 3:2 or 4:3(so there's 4 black pixel columns followed by 3 white and so on) or something. Just make sure you still get the same distance between barriers on the printed sheet! 2:1 would btw theoretically only leave one color visible, but i doubt that's the case in the real world.



you could also try printing it rotated 90 degrees, if you haven't already.
maybe that would fit the DPI better.
Last edited by AntiCatalyst on Mon Jan 31, 2011 8:37 pm, edited 1 time in total.
Image
"This is great!"
dreamingawake
Two Eyed Hopeful
Posts: 61
Joined: Wed Feb 04, 2009 9:58 am

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by dreamingawake »

wow. this is incredible work. great job!
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by cybereality »

AntiCatalyst wrote:i have an idea on resolving the ghosting issues you're having.
The suggestions you make have been tried and I believe I even posted some experimental shots some pages back in this thread. Basically I can only increase the duty cycle (ie increase the width of the barriers) with the monitor in portrait orientation. If I do this in landscape mode it causes horrible distortion of the color due to sub-pixel masking. Ghosting is reduced, yes, but the color is completely killed. In that case anaglyph would be preferable. Portrait mode is still a possibility (colors are fine, just brightness is lost) but most games will not run with this format and even if they do you can only use about 30% of the screen when playing them. So that kinda kills the whole point of this project for me personally. So I have come to the conclusion that it will only work with uniform barrier to spacing. And I don't have a loupe, but looking at the barrier with my bare eyes, it looks pretty straight to me. You can also look at those 1080P shots I posted, the lines look straight. I don't think thats the issue. You are right, though, theoretically there should be no ghosting at all. But it seems this is very difficult in practice. The biggest problem is that light bleeds from behind the barrier lines. This is most apparent when viewing my black/white ghosting test image. The black side is nowhere close to black, its more of a redish/blue dark gray color. The white side is tinted yellow/cyan but it is much closer to white perceptually. But what I believe is happening is that light is escaping from off angles (ie not the two angles that will meet your eyes perfectly and match with the pattern). The light can, and does, emanate from potentially infinite different angles within the visible range. Some of those angles are not what we intend, and are what I am referring to as bleeding. This is sort of like ambient light, its not necessarily a straight line to your eye, but you can see it. I had some success by attempting to collimate the light using multiple parallax barriers overlaid onto each other. This forces the light to emanate more perpendicular from the screen (and discards the ones at extreme angles, the ones I believe are bleeding). This did reduce ghosting, but also decreased brightness and significantly dropped the overall picture quality. I felt the current solution in the video was superior to this, even with more ghosting. But maybe there is something else that could be done.
AntiCatalyst
Cross Eyed!
Posts: 168
Joined: Tue Jan 25, 2011 7:53 pm
Location: Sweden

Re: [DIY] Auto-Stereo with Parallax Barriers

Post by AntiCatalyst »

Okay, sorry, haven't read the entire thread :|

using two overlaid but distanced-apart barriers you should(in theory, as always) see a yellow/cyan color shift towards the left/right side of the screen, is that the loss of PQ you mean? With three identical barriers spaced equally apart, the center of the screen would be unchanged, and both the sides would have a green tint. If you want to overlay barriers, you should only put them print-to-print, since the lines from each eye only cross in one(for each viewing distance) fixed distance from the screen. This only becomes clear once you draw it out on paper.

Using wider barriers would probably be better since the entire image would be uniform(green yes, but uniform :D). Maybe you made the barriers TOO wide? just a little bit might work! The green color shift is totally expected in any case, and you should be able to correct it by pulling down green in your graphics control panel.

By doing that though, you'll lose more brightness "per eliminated ghost" compared to using the same wider barriers in portrait mode, but the difference is you could actually use it for something. If you have two prints of your current type barriers(you probably do :D), you could make a simple variable-width barrier for testing purpouses by putting them print-to-print and offsetting them veeery slightly. If it's the "fuzzy edge" problem you should see an improvement in ghosting. otherwise, if light is bending away from the straight line or something, apparent ghosting might actually be worse :D Maybe the printer heats up the plastic behind the dots, making it melt and form a lens?

There could also be light bouncing off the surface of the barriers, and then again on the screen surface before going out through the barrier spaces(ambient light like you said). Do you have a matte or shiny screen surface? i'm thinking it would be worse on a shiny one. (Subpixel ghosting should be worse with wider barriers in this case too)

Anyway, i'm sorry i don't have a printer, otherwise i would have actually tried everything myself before posting all my "theories".. :(
Image
"This is great!"
Post Reply

Return to “Do it Yourself!”