POV-Ray : Newsgroups : povray.bugreports : sphere slicing problem : Re: sphere slicing problem Server Time
23 Jun 2024 06:58:02 EDT (-0400)
  Re: sphere slicing problem  
From: William F Pokorny
Date: 4 Nov 2019 08:23:31
Message: <5dc02653$1@news.povray.org>
On 11/3/19 1:31 PM, jr wrote:
> hi,
> William F Pokorny <ano### [at] anonymousorg> wrote:
> yes, 'df3util' can import PNG, either as grayscale or _one_ of RGBA, so I don't
> see/use colours at that stage.  :-(  still, I'd like to understand better the
> way you outlined in the previous post, ie using a third cam to post-process the
> two perspective cams slices (iiuc).

What I had in mind was to create two pigments which are planar image 
maps of say sliceDown00.png and sliceUp00.png, respectively. Call these 
PigDown and PigUp. (You might need to rotate/scale to align with the 
final orthographic camera - max_extent() can grab the input image x,y 

Wrap these two pigments in functions (only way they'll get used):

#declare FnDown = function { pigment { PigDown } }
#declare FnUp = function { pigment { PigUp } }

Use these in the use_defined the PigmentMaxUpDownPerspective I mentioned 
previously and use that texture with ambient 1 or emission 1 (diffuse 0 
use no lights) to texture a plane. Place this plane in front of an 
orthographic camera and render to get your real sample taking the max 
r,g,b values for each pixel from the down, up slices. This third render 
is your slice00 sample. Here we are using POV-Ray as an image processing 
tool. Something at which it's very good - if not as fast as dedicated 
image processing tools.

FYI. There might be typos in my SDL, I didn't set up a small scene as I 
often do.

Bill P.

Post a reply to this message

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