POV-Ray : Newsgroups : povray.general : replacing texture with depth : replacing texture with depth Server Time
5 Aug 2024 04:19:53 EDT (-0400)
  replacing texture with depth  
From: David
Date: 6 Dec 2002 03:25:04
Message: <web.3df05dbfdb7a7ea83b35a1fc0@news.povray.org>
I have been searching for the best way to get detailed depth information out
of POV-Ray (besides editing the source code).  The following code works if
the Depth_Texture is applied to every object.  However, since child objects
do not inherit parent texture, how can I plop this texture onto everything?

/*---depth.ini---*/
Output_File_Type=P
Bits_Per_Color=16
Input_File_Name=depth.pov
/*---END---*/

/*---depth.pov---*/
#declare Depth_Texture = texture
{
  pigment
  {
    spherical
    scale 655.35 //depth resolution = 0.01 [units]
    phase 0
  }
  finish
  {
    ambient 1
    diffuse 0
    specular 0
    reflection 0
  }
  translate Camera_Origin
}

#declare World = union
{
  //many objects with textures . . .
}

object
{
  World
  texture{Depth_Texture} //does not replace child textures :(
}
/*---END---*/


Thanks,

David Diel

ddi### [at] mitedu


Post a reply to this message

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