POV-Ray : Newsgroups : povray.binaries.images : WIP: Sterograms of a cube! : Re: Sterograms of a cube! Server Time
14 Aug 2024 07:16:36 EDT (-0400)
  Re: Sterograms of a cube!  
From: master of psico
Date: 7 Jan 2003 12:21:50
Message: <3E1B0CA8.5070209@psico.ch>
hi

hughes, b. wrote:
 > "Ben T. Scheele" <sch### [at] tcumnedu> wrote in message
 > news:3e18e1e6@news.povray.org...
 >>    That's cool.  How are those kinds of images different from
 >>the kind you'd see in those stereo-opticon devices from a while back?
 >>    Also, I found a program that allows you to create magic eye type
 >>images if you have a texture file and a 3D image rendered as a depth 
 >>map.
 >>Does anyone know how to render a scene that way?  I attached a sample 
 >>of the input and output.  The program is called Sisgen.

i don't know the devices mentioned. - do they use one or two images?
what are they doing, anyway?

sisgen is for "Single Image Stereogram GENnerator", right?

 > The difference is probably in just that the effect is done by
 > repetition of an identical object which is shifted a little from
 > each other. In the case of the cubes they are rotated, a lone
 > pair of them would be like a stereo-optic photo.

the difference from what?

anyway, to get the same results as with sisgen, or most "magic
eye"-pictures, only a few additions have to be made to the perl
code i have posted: you would have to replace the call to "rand()"
with something that picks the next color value from your texture
instead. - this could be a little tricky however, because this
texture can not just be "shifted" or "rotated" as in the cube
example. the current color actually depends on the depth map and
some additional parameters like the eye distance...

if you look at one of these magic-eye pictures, you will see
that the texture is getting more distorted towards one side of
the image. this is because of the way the algorithm works.

from the perspective of creating stereoscopic pictures, this
of course is a completely different story than just showing
the same object from two different angles...

if anyone is insterested, i'll post another piece of perl
code which is able to use "textures" to create SI[D]S.
i'm thinking of doing it with ascii first, so you could
maybe use your name as a texture.. ;)

- in any case, this has been done before, too, so you can probably
find the solution on google as well. ;)

 > You can see a somewhat 3D plus 2D effect in any repeated pattern,
 > such as wallpaper, without there being any shifts.

hmm... i don't quite get what you mean here. - you really mean
you see 3D effects when looking at your wall and crossing your
eyes? :)

 > The way you'd do a depth map in POV-Ray 3.5 is by applying a universal
 > pigment gradient to the scene objects that goes from rgb 1 to rgb 0
 > with only ambient 1 finish and no light sources. The orientation being
 > aligned with the camera. It has been done before. In fact, MegaPOV 0.7
 > has a feature to make it a little easier except you still need to know
 > the nearest and farthest points of the scene objects. In 3.5 there is
 > min_extent and max_extent to find a measure of a unioned scene by
 > extracting one of the axes, unfortunately it isn't accurate for
 > complex objects and you'd still have to do some orientation to the
 > camera.
 >
 > Rune Johannsen has a tutorial on this
 > http://runevision.com/graphics/stereo/depthmap/depthmap.asp

thanks! i knew there must be some simple way to do it!
and this sounds *brilliantly* simple!! :)


g.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.