POV-Ray : Newsgroups : povray.general : Defining new materials in a way similar to RenderMan ... : Re: Defining new materials in a way similar to RenderMan ... Server Time
31 Jul 2024 06:12:09 EDT (-0400)
  Re: Defining new materials in a way similar to RenderMan ...  
From: Tim Attwood
Date: 24 Aug 2007 20:21:42
Message: <46cf7616$1@news.povray.org>
In general Warp is correct, the tricks done with procedural textures in
packages like RenderMan translate poorly to POV.

> As an example, I could use such a language to generate a scene depth map 
> by
> painting the surfaces with their distance from the camera ...

This particular example is very doable in POV though.
You can place all your objects in a single union and then
texture it with a spherical pattern pigment centered on the camera.
If you are using an orthographic camera you can use a gradient
instead. Here's a minimal example scene.

global_settings {
  assumed_gamma 1.0
  hf_gray_16 on
}
#declare CLOC = <0.0, 0.5, -4.0>;
camera {
  location  CLOC
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}
union { // scene
   plane {y, -1}
   sphere {0.0, 1}
   pigment {
      spherical
      color_map {
         [0 rgb 0]
         [1 rgb 1]
      }
      scale 15
      translate CLOC
   }
   finish {ambient 1}
}


Post a reply to this message

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