POV-Ray : Newsgroups : povray.general : Storing depth - normal map Server Time
25 Dec 2024 20:30:22 EST (-0500)
  Storing depth - normal map (Message 1 to 5 of 5)  
From: Mark B
Subject: Storing depth - normal map
Date: 1 Jun 2016 07:05:00
Message: <web.574ec0a7d014539ed975ba360@news.povray.org>
Hello,

I would like to store the scene depth values (and if possible the normal vector
values as well) for every pixel. How can this be achieved using Pov ray 3.7? I
have found no such examples online.

Thank you in advance,
Mark


Post a reply to this message

From: William F Pokorny
Subject: Re: Storing depth - normal map
Date: 1 Jun 2016 08:02:15
Message: <574ecec7$1@news.povray.org>
On 06/01/2016 07:01 AM, Mark B wrote:
>
> Hello,
>
> I would like to store the scene depth values (and if possible the normal vector
> values as well) for every pixel. How can this be achieved using Pov ray 3.7? I
> have found no such examples online.
>
> Thank you in advance,
> Mark
>
>

At : http://www.povray.org/search/
search for "depth map"

There have been some patches & methods over the years. To do it in 
POV-Ray's screen distribution language (SDL), suppose setting up 
something with trace() in the way you wish to measure depth would be one 
possible way.

Bill P.


Post a reply to this message

From: clipka
Subject: Re: Storing depth - normal map
Date: 1 Jun 2016 08:08:12
Message: <574ed02c@news.povray.org>
Am 01.06.2016 um 13:01 schrieb Mark B:

> I would like to store the scene depth values (and if possible the normal vector
> values as well) for every pixel. How can this be achieved using Pov ray 3.7? I
> have found no such examples online.

POV-Ray 3.7 does not have any native mechanism to obtain depth
information, so you'll need to design your scene in such a way that the
colours in the image happen to depend on the distance to the camera.

The most straightforward way to achieve this is to disable the
individual textures of all the scene's objects, bundle those objects
into one big union, and assign a texture with a gradient or spherical
pattern to it, with an emission-only finish.

An alternative is to set all objects' textures to a plain white
emission-only texture, and flood the scene with an absorbing atmosphere.
Or set all objects' textures to a pitch black texture, and flood the
scene with an emissive atmosphere.


Post a reply to this message

From: William F Pokorny
Subject: Re: Storing depth - normal map
Date: 1 Jun 2016 08:31:36
Message: <574ed5a8$1@news.povray.org>
On 06/01/2016 08:02 AM, William F Pokorny wrote:
> On 06/01/2016 07:01 AM, Mark B wrote:
>
> At : http://www.povray.org/search/
> search for "depth map"
>
> There have been some patches & methods over the years. To do it in
> POV-Ray's screen distribution language (SDL), suppose setting up
> something with trace() in the way you wish to measure depth would be one
> possible way.
>
> Bill P.

... Make that "scene description language". Positive proof my already 
questionable mind is slipping further into the foggy abyss... :-)

Bill P.


Post a reply to this message

From: Alain
Subject: Re: Storing depth - normal map
Date: 1 Jun 2016 11:01:00
Message: <574ef8ac$1@news.povray.org>

>
> Hello,
>
> I would like to store the scene depth values (and if possible the normal vector
> values as well) for every pixel. How can this be achieved using Pov ray 3.7? I
> have found no such examples online.
>
> Thank you in advance,
> Mark
>
>

You can't have both at the same time.
For the depth, other have given some options.

For the normals, you should take a look at the aoi pattern.


Post a reply to this message

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