|
![](/i/fill.gif) |
Am 23.04.2012 21:54, schrieb sic2:
>> If all you want is a depth map, a much easier, faster and qualitatively
>> superior approach is to simply use a corresponding texture.
>>
>> Comment out any textures already applied to your objects (or use an
>> "#if...#end" construct). Place all your objects into a single union, and
>> equip that one with a texture having an "emission 1 ambient 0 diffuse 0
>> specular 0 phong 0" finish (in POV-Ray 3.6, use "ambient 1" instead of
>> "emission 1 ambient 0"), and a gradient or planar pigment fading from
>> white (near the camera) to black (far away from the camera).
>
>
> This is what I got:
>
> union {
> sphere {
> <-2, 0, -6>, 0.5
> }
>
> box {
> <-1, -2, -5>,< 1, 2, 3>
> rotate<0, -20, 0>
> }
> pigment {
> gradient x
> pigment_map {
> [ -10 White]
> [ 100 Black ]
> }
> }
The value range for any pattern is always 0..1, so you'll need to use
pigment_map {
[0.0 White]
[1.0 Black]
}
For the gradient to cover the proper range, scale (and possibly
translate) the pigment, as in
pigment {
gradient x
pigment_map {...}
scale <110,1,1>
translate -10*x
}
> Also do you know if it's possible to create a gray map of just depth Z lets say
> (or from depth Z_1 to Z_2) ? I need an answer for the second question for post
> processing the image later.
I don't really understand what you mean. Maybe it would help if you
described what you are ultimately trying to achieve with all of this.
Post a reply to this message
|
![](/i/fill.gif) |