Ruby3D is an simple yet effective approach to generate 3D Images. With few lines of Ruby Code and using RMagick RubyGem all you need is one good 2D image and bingo you will it in 3D.
Anaglyph images are images with 3D effect when viewed with a 2 color red and cyan glasses.
- Place the script
ruby3d.rbin any folder e.g /home/Downloads - On linux given execute permissions
chmod u+x /home/Downloads/ruby3d.rb - Finally with a 2D Image at some file location run
./ruby3d.rb 9 /home/Downloads/demo.jpg - You have your 3D Image File ready in
/home/Downloads/3D_demo.jpg
- In this I am using only one 2D Image. If you already have two sterioscopic Images at hand modify the code to take two Image Inputs.
- While executing the code I pass the
shiftin generating sterioscopic Images as 9, feel free to pass any value for accurate results you need for your Image.
After processing with Ruby3D the 3D Image
-
Take two pictures along a straight line with some distance. Unlike the case of making lenticular prints, the precision requirement of making anaglyph is not very tight. You can take your pictures by moving the camera on a flat surface. Try to use a rigid ruler to guide the camera when you move the camera from left to right. The distance between the first picture on the left and the second picture on the right should be about 2.5 inch (or 65mm).
-
Open both pictures into Photoshop. Paste left picture over right picture so the left picture is on top of the right picture. On the Left Picture Layer in Layer Style dialog,un-tick the B and G check boxes under Advanced blending. Viola you are done!