From comp.graphics.raytracing Sat Nov 5 19:58:16 1994 Path: uniol!mpifr-bonn.mpg.de!news.rhrz.uni-bonn.de!urmel.informatik.rwth-aachen.de!newsserver.rrzn.uni-hannover.de!ikarus.rz.tu-clausthal.de!helios.rz.tu-clausthal.de!incp From: incp@helios.rz.tu-clausthal.de (Christian Perle) Newsgroups: comp.graphics.raytracing Subject: Re: Z-depth rendering in POV? Date: 2 Nov 1994 19:16:17 GMT Organization: Rechenzentrum der TU Clausthal Lines: 64 Message-ID: <398oi1$haq@ikarus.rz.tu-clausthal.de> References: <394919$a8r@Tut.MsState.Edu> NNTP-Posting-Host: helios.rz.tu-clausthal.de X-Newsreader: TIN [version 1.2 RZ-TUC PL2] Robert M. Stevens (rms1@Isis.MsState.Edu) wrote: : Has anyone come up with a Z-depth rendering addition to POV? : What I need is to generate a scene and determine the depths : for generating a random dot sterogram. I am sure that POV : calculates this along the way, but I haven't had the time to : try and hack on it. :-O : Mark Stevens : rms1@ra.msstate.edu This is something I have done some months ago. You can replace the rather boring objects with your own. Just make sure that your object is positioned in the gradient z area (z=0 .. 2). -----cut-here------------------------------------------ // Z-depth scene with POV-Ray #include "colors.inc" camera { location <0, 0, -9> direction <0, 0, 1.5> look_at <0, 0, 2.5> } union { // four boring objects sphere { <2, 1, 1>, 1 } cone { <-3, 0, 4>, 0 <-2, -2, 3>, 1 } sphere { <0, -.5, 1.6>, .5 scale <2, 1, 2> } box { <-1, -.5, -.5>, <1, .5, .5> rotate <20, 30, 0> translate <-1, 1.5, 1.08> } // gradient for z-depth pigment { // white-black gradient gradient z translate -10*z color_map { [0 color White] [1 color Black] } scale 2 } finish { ambient 1 diffuse 0 } // no light_source! } --------cut-here----------------------------------- bye, Chris -- +----------------------------------+--------------------------------------+ | Christian Perle | So, if you feel a little glum | | Schulstr. 13 | to Hergest Ridge you should come | | 38678 Clausthal-Zellerfeld +---------------------Mike-Oldfield----+ | Germany | ComputerGuitarKitesBicyclesBeerPizza | +----------------------------------+--------------------------------------+