|
![](/i/fill.gif) |
sirhenjo nous apporta ses lumieres en ce 2007/11/15 08:55:
> I am wondering if it's possible to render a depth and/or normal map using
> povray, instead of a regular scene render.
>
> The depth map can be generated by measuring the depth from a reference plane
> (bounding box for example) and cast rays to the surface of the objects.
>
> Is this possible?
> I know there are other platforms that can do this, just wondering if POV-Ray can
> be setup to generate such maps.
>
>
For the depth map:
1 - remove all textures and pigments.
2 - bind everything but the camera in one union.
3 - apply a gradient pattern to your big union scaled to it's depth. Have the
gradient perpendicular to the camera axis.
4 - remove all light_source and use ambient 1 diffuse 0.
For the normal map:
Do the same, but replace the gradient by a slope pattern.
Both are easier with a camera on an axis looking as the origin, but you can have
the camera set at any possible location.
--
Alain
-------------------------------------------------
You know you've been raytracing too long when your idea of a complete computer
is a fast CPU, lots of RAM, and a means of running POVray.
Aaron Gage a.k.a Slartibartfast
Post a reply to this message
|
![](/i/fill.gif) |