POV-Ray : Newsgroups : povray.advanced-users : depth values / hit times : Re: depth values / hit times Server Time
28 Jul 2024 18:12:17 EDT (-0400)
  Re: depth values / hit times  
From: Mark Weyer
Date: 22 Apr 2004 05:03:39
Message: <40878A9A.60200@informatik.uni-freiburg.de>
> This won't work. What you're actually describing is a method to find how
> many surfaces in the line through a given pixel are, not the depth value.

You are right. I misunderstood the question.

> texture{
> pigment{spherical color_map{[0 rgb ][1 rgb 1]} scale Max_Distance translate
> Camera_Location}
> finish{ambient 1 diffuse 0}
> }

This assumes perspective projection. For orthogonal projection the gradient
pattern might be more suitable than the spherical pattern. That would be:

pigment {
   gradient Camera_Direction*Max_Distance
   colour_map {[0 rgb 0] [1 rgb 1]}}
   translate Camera_Location
}

(assuming a normalized Camera_Direction) and the rest as you said.


-- 
merge{#local i=-11;#while(i<11)#local
i=i+.1;sphere{<i*(i*i*(.05-i*i*(4e-7*i*i+3e-4))-3)10*sin(i)30>.5}#end
pigment{rgbt 1}interior{media{emission x}}hollow}//  Mark Weyer


Post a reply to this message

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