|
![](/i/fill.gif) |
> 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 ]
}
}
finish {
ambient 1
diffuse 0
specular 0
phong 0
}
} // end union
However, the transition between Black and White is not very homogeneous.
What do I do wrong?
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.
Thank you again.
Post a reply to this message
|
![](/i/fill.gif) |