POV-Ray : Newsgroups : povray.advanced-users : depth map? : Re: depth map? Server Time
26 Apr 2024 03:21:57 EDT (-0400)
  Re: depth map?  
From: Chris B
Date: 12 May 2009 16:44:48
Message: <4a09dfc0@news.povray.org>
> "Marvin" <mto### [at] grfhr> wrote in message
>> Could you please give an example of a texture with grayscale gradient 
>> oriented
>> towards the camera?

.. but thinking about it, you're probably better off using an 'onion' 
pattern than a gradient pattern for this so that it fades to black as a 
function of distance from the camera rather than as a function of the 
distance from the plane the camera sits on. Note you should scale in all 3 
dimensions and you no longer need to reorient the pigment.


  pigment {
    onion color_map {
      [0 color rgb 1]
      [1 color rgb 0]
    }
    scale vlength(Camera_Location-Camera_Lookat)
    translate Camera_Location
  }


Regards,
Chris B


Post a reply to this message

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