POV-Ray : Newsgroups : povray.advanced-users : depth values / hit times : depth values / hit times Server Time
28 Jul 2024 18:22:55 EDT (-0400)
  depth values / hit times  
From: Mike Williams
Date: 23 Apr 2004 02:18:01
Message: <stKX1AAeQLiAFwdI@econym.demon.co.uk>
Wasn't it Chris Johnson who wrote:
>An alternative to these solutions is to modify the pov-ray source to do
>this. The distance a ray has travelled is returned already by the
>ray-tracing function, so its a very simple modification to set the pixel
>output to this.

This was incorporated in a previous version of MegaPOV, but (as far as I
know) hasn't yet been incorporated in to the current version of MegaPOV
that's based on POV 3.5. In versions of MegaPOV above 0.3 and below 1.0,
you just add a post_process global setting like

global_settings {
  post_process { depth {50, 100} }
}

The two parameters control the depth corresponding to fully white and
the distance from there to the depth for fully black. (In the above
example: points 50 units or less from the camera are white, points 150
or more units away are black and points between 50 and 150 units away
are shades of grey).

It's odd that this feature didn't make it into MegaPOV 1.0, since it did
seem to be quite popular, particularly among people interested in "Magic
Eye" type autostereograms.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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