POV-Ray : Newsgroups : povray.advanced-users : Obtaining Depth-map using POVRay 3.7 Server Time
23 Dec 2024 08:17:57 EST (-0500)
  Obtaining Depth-map using POVRay 3.7 (Message 1 to 4 of 4)  
From: handos
Subject: Obtaining Depth-map using POVRay 3.7
Date: 4 Jul 2011 12:35:00
Message: <web.4e11eb5c15d43740d7ae32040@news.povray.org>
Hi everyone,

I have been using POVRay and Megapov for rendering images and obtaining depth
maps using Megapov's post-processing tool available here at
http://megapov.inetart.net/manual-1.2.1/global_settings.html#post_processing.
I'm rendering the publicly available office room scene from Jaime's website
http://www.ignorancia.org/en/index.php?page=The_office.

However, my main problem is that it takes almost 2.5 hours to render the scene
using POVRay 3.6. I'm having to use MegaPOV for only depth and MegaPOV is not
available linked with POVRay 3.7 which is parallelisable (where my scene is
rendered in couple of minutes). I would like to use the benefits of POVRay 3.7
but I don't know how difficult is it to obtain depth map using POVRay 3.7. If
anyone has ever tried obtaining depth maps using POVRay 3.7 for such complicated
scenes like this, I'd be very grateful to have your feedback and suggestions on
that!

Kind Regards,
Ankur Handa


Post a reply to this message

From: Roman Reiner
Subject: Re: Obtaining Depth-map using POVRay 3.7
Date: 4 Jul 2011 17:10:01
Message: <web.4e122b4b325bf6c840005e750@news.povray.org>
Try something like

#declare depthMapTexture = texture {
  pigment {
    spherical
    color_map {
      [0.0 rgb 0]
      [DISTANCE_NEAR/DISTANCE_FAR rgb 0]
      [1.0 rgb 1]
    }
    scale DISTANCE_FAR
    translate CAMERA_POSITION
  }
  finish {
    ambient 1
  }
}

union {
  // the whole scene
  texture { depthMapTexture }
}

where DISTANCE_NEAR and DISTANCE_FAR specify the black and white points of the
depth map (minimum and maximum distance) and CAMERA_POSITION is, obviously, the
camera position.

Regards Roman



"handos" <han### [at] gmailcom> wrote:
> Hi everyone,
>
> I have been using POVRay and Megapov for rendering images and obtaining depth
> maps using Megapov's post-processing tool available here at
> http://megapov.inetart.net/manual-1.2.1/global_settings.html#post_processing.
> I'm rendering the publicly available office room scene from Jaime's website
> http://www.ignorancia.org/en/index.php?page=The_office.
>
> However, my main problem is that it takes almost 2.5 hours to render the scene
> using POVRay 3.6. I'm having to use MegaPOV for only depth and MegaPOV is not
> available linked with POVRay 3.7 which is parallelisable (where my scene is
> rendered in couple of minutes). I would like to use the benefits of POVRay 3.7
> but I don't know how difficult is it to obtain depth map using POVRay 3.7. If
> anyone has ever tried obtaining depth maps using POVRay 3.7 for such complicated
> scenes like this, I'd be very grateful to have your feedback and suggestions on
> that!
>
> Kind Regards,
> Ankur Handa


Post a reply to this message

From: Roman Reiner
Subject: Re: Obtaining Depth-map using POVRay 3.7
Date: 4 Jul 2011 17:30:01
Message: <web.4e122ff7325bf6c840005e750@news.povray.org>
Keep in mind though, that this approach does not work with reflected rays!

"Roman Reiner" <lim### [at] gmxde> wrote:
> Try something like
>
> #declare depthMapTexture = texture {
>   pigment {
>     spherical
>     color_map {
>       [0.0 rgb 0]
>       [DISTANCE_NEAR/DISTANCE_FAR rgb 0]
>       [1.0 rgb 1]
>     }
>     scale DISTANCE_FAR
>     translate CAMERA_POSITION
>   }
>   finish {
>     ambient 1
>   }
> }
>
> union {
>   // the whole scene
>   texture { depthMapTexture }
> }
>
> where DISTANCE_NEAR and DISTANCE_FAR specify the black and white points of the
> depth map (minimum and maximum distance) and CAMERA_POSITION is, obviously, the
> camera position.
>
> Regards Roman
>
>
>
> "handos" <han### [at] gmailcom> wrote:
> > Hi everyone,
> >
> > I have been using POVRay and Megapov for rendering images and obtaining depth
> > maps using Megapov's post-processing tool available here at
> > http://megapov.inetart.net/manual-1.2.1/global_settings.html#post_processing.
> > I'm rendering the publicly available office room scene from Jaime's website
> > http://www.ignorancia.org/en/index.php?page=The_office.
> >
> > However, my main problem is that it takes almost 2.5 hours to render the scene
> > using POVRay 3.6. I'm having to use MegaPOV for only depth and MegaPOV is not
> > available linked with POVRay 3.7 which is parallelisable (where my scene is
> > rendered in couple of minutes). I would like to use the benefits of POVRay 3.7
> > but I don't know how difficult is it to obtain depth map using POVRay 3.7. If
> > anyone has ever tried obtaining depth maps using POVRay 3.7 for such complicated
> > scenes like this, I'd be very grateful to have your feedback and suggestions on
> > that!
> >
> > Kind Regards,
> > Ankur Handa


Post a reply to this message

From: Alain
Subject: Re: Obtaining Depth-map using POVRay 3.7
Date: 5 Jul 2011 00:20:38
Message: <4e129116@news.povray.org>

> Hi everyone,
>
> I have been using POVRay and Megapov for rendering images and obtaining depth
> maps using Megapov's post-processing tool available here at
> http://megapov.inetart.net/manual-1.2.1/global_settings.html#post_processing.
> I'm rendering the publicly available office room scene from Jaime's website
> http://www.ignorancia.org/en/index.php?page=The_office.
>
> However, my main problem is that it takes almost 2.5 hours to render the scene
> using POVRay 3.6. I'm having to use MegaPOV for only depth and MegaPOV is not
> available linked with POVRay 3.7 which is parallelisable (where my scene is
> rendered in couple of minutes). I would like to use the benefits of POVRay 3.7
> but I don't know how difficult is it to obtain depth map using POVRay 3.7. If
> anyone has ever tried obtaining depth maps using POVRay 3.7 for such complicated
> scenes like this, I'd be very grateful to have your feedback and suggestions on
> that!
>
> Kind Regards,
> Ankur Handa
>
>

Faked focal blur ONLY work for first surfaces. If you have any 
transparence or reflection, it totaly breaks down.

You are probably beter using actual focal blur directly with POV-Ray 
3.7. On a single core computer, it's faster than 3.6 AND also support AA.
I almost never used focal blur in 3.6 because it was to slow.
I occasionaly use it now with 3.7.


Post a reply to this message

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