At the heart of any good Flash anaglyph engine would be a function that renders objects at the correct scale, and at the proper red/cyan offsets, based on their z-axis value (or how far they are away from the viewer). This experiment uses a simple formula to render an object in 3D at any given distance. Move the slider back and forth to render the egg closer or farther.
The units are in inches from your monitor surface. That is, if z = 3", that means it's supposed to appear that the egg is three inches deep into your monitor. A negative value means it is sticking out that many inches in front of your monitor.
The computation makes assumptions for factors I can't measure, and these assumptions are probably not all true. (It assumes your monitor resolution is 72 pixels per inch. It assumes your pupils are 2.5 inches apart. It assumes you are sitting 24 inches back from your monitor.) If the assumptions are untrue, your perceived depth will differ from the given depth proportionally. (To see just how much these factors would affect the calculations, see experiment 05.)
At the extreme negative range, ghost images appear. In a real game or animation, I would avoid these, but I wanted to test the extremes in this experiment.
Hi,
I’ve been banging my head against the wall trying to get this to work. I am really struggling getting the proper blend mode and color combination. Can you tell me how you’ve done this?
Thanks! Ryan
I would like to know that too! I can’t get farther than putting the blue layer on screen, would really like to know your settings/source code!
Could you please tell me how you did this? I could really use your help. I tried doing this by setting the blendmodes, but it just doesn’t work out. Do I have to do everything on a bitmap?
I hope you can help me.
Thanks in advance, Wouter