Is OpenGL capable of generating stereographs? I mean like those pictures that look nonsense at first, but if you force your eyes to look at a point behind the plane of the picture you will see a perfect 3D object. I made once a simple engine to generate such picture. It worked, but it was too simple to generate complex scenes. And so, I tried to use z-buffers in OpenGL, but they seem not to reflect the real depth of the points of the rendered objects. Any idea?
Stereographic images can be rendered only with special glasses, I mean the 3D effect can only be achieved with those glasses. And then we are not talking about those ‘nonsence’ pictures, but rather ‘real-looking’ 3D images with full colors and stuff.
And for depth values, they are normalized (0=near plane, 1=far plane). And this depth value is the Z-value the point get after projection matrix multiplication.
I think you missunderstood me. I didn’t mean holograms which needs lazer sources and semi-reflective mirrors and glasses. I really made stereograph pictures in software, but I’m just trying to use z-buffers to get a steregraph version of the image, just if wanted, as a furthur option, and it’s not my goal. Thank you anyway.
Originally posted by Bob:
[b]Stereographic images can be rendered only with special glasses, I mean the 3D effect can only be achieved with those glasses. And then we are not talking about those ‘nonsence’ pictures, but rather ‘real-looking’ 3D images with full colors and stuff.
And for depth values, they are normalized (0=near plane, 1=far plane). And this depth value is the Z-value the point get after projection matrix multiplication.[/b]
Holographic images? Heh, no no. I’m talking about glasses you wear infront of your eyes, and images rendered by your graphics boards and shown on your monitor as any other image.
The glasses you wear got some sort of ‘screens’, one for each eye, that either blocks the light, or letting the light pass. When one eye is looking at the screen the otherone doesn’t (because the screen is blocking the sight), and then they shift blocking/passing several times a second. So fast you can’t see it. Only one eye at any goven time is actually looking at the screen. Their shifts are synchronized with the monitors refreshrate, that shows two different pictures, one for each eye. Since they are synchronized, the left eye will only see one image, and the right eye will always see the other image. Now, if these two images is slightly different, the same scene, and almost the same point of view, but one of them is slightly moved to the left or right (depending in what image is supposed to go to which eye), you get a stereoeffect when your eyes recieves almost the same image where one of them is slightly to the left/right of the other one (as in the real world, because you don’t have your eyes at the same spot in yer face, do you? )
Well, maybe all this explanation was unnessecary, maybe you know how those nify red-blue glasses works you used several years ago? It’s the same, but here you get fully coloerd images instead.
These glasses are not too cheap, but some cheaper models are affordable by a poor student (shame I haven’t bought a pair yet)
Anyways, other than this, there is no way to get stereographic images in OpenGL.
Bob, I think you are misunderstanding what softland_gh wants. As I cannot find a proper way to explain what these images are, I though I’d give you a URL to check it:
You know, these are those images you watch for 5 minutes and then discover another hidden picture inside !
I think I saw a shareware program to generate such pictures some months ago…
Yepp, I know what he wants. But as I said (or at least meant to say) in my first post, those so called ‘nonsense images’ is not doable in OpenGL. I said that the only kind of stereo images doable in OpenGL is the ones you get with the glasses.
Yeh, that’s exactly what I meant Eric. It’s a picture that mix two other pictures containing the same object but seen fron two different perspectives that represent the left and the right eye. Bob, I don’t want OpenGL to generate these pictures. I only want to benefit from its z-buffer, because depth is the key to generate such pictures. I want to add it as a minor option to the set of components and classes I’m currently developing for use with Delphi for graphic generation.
[This message has been edited by softland_gh (edited 12-19-2000).]
I think parts are doable. The main problem is (at least for me) to get the depth data. In OGL you can render a scene, get the depth data from the z-buffer (don’t ask me how), generate a grayscale image out of it and pass this to an algorithm that renders the ‘magic eye’-image.
So the main problem is to get correct depth values.
I don’t know what mistakes I had done in the past that made me beleive depth components doesn’t reflect the real values of the depth. I expertised more with what Bob had said and found out that it’s really working. Thank you Bob . Now, I can generate stereographs (sometimes called stereograms) from depth components.
Mark, there’s no real need to generate a grayscale image. Once you obtain the z-buffer (through glReadPixels) you can generate stereograms. The algorithm is very easy to implement, but maybe difficult to find out.
If you do everything in one single program it’s ok. The grayscale image was thought to be the input for another program which only calculates the stereogram.
[This message has been edited by Marc (edited 12-20-2000).]
I understood you Marc, but since the algorithm is very simple there’s no need to use two different applications (one to generate grayscale contour and the other to generate the stereogram). Plus, I like integration.