POV-Ray : Newsgroups : povray.general : What to do with the pixel in the middle Server Time
29 Mar 2024 08:36:41 EDT (-0400)
  What to do with the pixel in the middle (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Tor Olav Kristensen
Subject: Re: What to do with the pixel in the middle
Date: 2 Feb 2019 15:20:01
Message: <web.5c55fae0738ba468c143b2b0@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> ingo <ing### [at] tagpovrayorg> wrote:
> > in news:5c54fe9a$1@news.povray.org clipka wrote:
> >
> > > think about it
> >
> > The back pixel in the middle makes sense,
>
> To achieve this you can make the camera look another way when u equals zero,
> e.g. like this:
>
> direction {
>     function {
>         select(
>             u,
>             D1L_X_Fn(u*image_width/AspectU + 0.25, v),
>             0,
>             D1R_X_Fn(u*image_width/AspectU - 0.25, v)
>        )
>     }
>     function {
>         select(
>             u,
>             D1L_Y_Fn(u + 0.25, v),
>             1,
>             D1R_Y_Fn(u - 0.25, v)
>         )
>     }
>     function {
>         select(
>             u,
>             D1L_Z_Fn(u + 0.25, v),
>             0,
>             D1R_Z_Fn(u - 0.25, v)
>         )
>     }
> }
>
> - and then place something small with a black pigment, no_shadow and
> no_reflection close to the camera in that direction (e.g. right above the
> camera).

The position for the camera when u is zero is pLocationL.
I suggest that you change it to pLocation by doing this:

#local <LocationX, LocationY, LocationZ> = pLocation;

location {
    function { select(u, LocationXL, LocationX, LocationXR) }
    function { select(u, LocationYL, LocationY, LocationYR) }
    function { select(u, LocationZL, LocationZ, LocationZR) }
}

--
Tor Olav
http://subcube.com


Post a reply to this message

From: ingo
Subject: Re: What to do with the pixel in the middle
Date: 3 Feb 2019 03:50:19
Message: <XnsA9EB64163539Aseed7@news.povray.org>
in news:web.5c55e1be738ba468c143b2b0@news.povray.org Tor Olav
Kristensen wrote: 

> To achieve this you can make the camera look another way when u
> equals zero, e.g. like this:

Tor Olav,

There's a simpler way, when the result of all three direction functions is 
zero you get a black pixel (that can be made transparant with the +ua 
command).

ingo


Post a reply to this message

From: ingo
Subject: Re: What to do with the pixel in the middle
Date: 3 Feb 2019 04:13:27
Message: <XnsA9EB6802D2337seed7@news.povray.org>
in news:web.5c55f204738ba468c143b2b0@news.povray.org Tor Olav
Kristensen wrote: 

> Note that vDirection_1, vRight_1 and vUp_1 are calculated in your
> udcLookAtTransform macro, but not used for anything. 

During development I use your whole code and ignore parts of it. Once a 
camera settles down the unused bits can be removed indeed.
 
> [...] Therefore you do not need to create two different
> direction function sets for them. You can create a common set based
> on the initial pLocation and pLookAt positions. 
> 

Yes, the other way around, look_at transform first and then the "split".

ingo


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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