POV-Ray : Newsgroups : povray.advanced-users : Camera scaling and focal_blur? Server Time
22 Dec 2024 06:43:03 EST (-0500)
  Camera scaling and focal_blur? (Message 1 to 10 of 28)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Mike Horvath
Subject: Camera scaling and focal_blur?
Date: 10 Feb 2018 19:46:41
Message: <5a7f9271$1@news.povray.org>
What effect does scaling a camera have on focal_blur?

I have two cameras, and they should both produce the same result. But 
they don't.



// focal blur camera
camera {
   location  <0,0,-5>
   look_at   <0,0,0>
   right     x*image_width/image_height
   up y
   aperture 1.0           // [0...N] larger is narrower depth of field 
(blurrier)
   blur_samples 10        // number of rays per pixel for sampling
   focal_point <0,0,0>    // point that is in focus <X,Y,Z>
   confidence 0.95        // [0...<1] when to move on while sampling 
(smaller is less accurate)
   variance 1/200         // [0...1] how precise to calculate (smaller 
is more accurate)
   scale 2
}

/*
// focal blur camera
camera {
   location  <0,0,-10>
   look_at   <0,0,0>
   right     x*image_width/image_height
   up y
   aperture 1.0           // [0...N] larger is narrower depth of field 
(blurrier)
   blur_samples 10        // number of rays per pixel for sampling
   focal_point <0,0,0>    // point that is in focus <X,Y,Z>
   confidence 0.95        // [0...<1] when to move on while sampling 
(smaller is less accurate)
   variance 1/200         // [0...1] how precise to calculate (smaller 
is more accurate)
}
*/


Post a reply to this message

From: Mike Horvath
Subject: Re: Camera scaling and focal_blur?
Date: 10 Feb 2018 21:35:00
Message: <5a7fabd4$1@news.povray.org>
Also, what if I scale the camera before I add the focal_blur? I am 
having trouble with a scene in which the center never appears in focus 
like I want it to.

:(



On 2/10/2018 7:47 PM, Mike Horvath wrote:
> What effect does scaling a camera have on focal_blur?
> 
> I have two cameras, and they should both produce the same result. But 
> they don't.
> 
> 
> 
> // focal blur camera
> camera {
>    location  <0,0,-5>
>    look_at   <0,0,0>
>    right     x*image_width/image_height
>    up y
>    aperture 1.0           // [0...N] larger is narrower depth of field 
> (blurrier)
>    blur_samples 10        // number of rays per pixel for sampling
>    focal_point <0,0,0>    // point that is in focus <X,Y,Z>
>    confidence 0.95        // [0...<1] when to move on while sampling 
> (smaller is less accurate)
>    variance 1/200         // [0...1] how precise to calculate (smaller 
> is more accurate)
>    scale 2
> }
> 
> /*
> // focal blur camera
> camera {
>    location  <0,0,-10>
>    look_at   <0,0,0>
>    right     x*image_width/image_height
>    up y
>    aperture 1.0           // [0...N] larger is narrower depth of field 
> (blurrier)
>    blur_samples 10        // number of rays per pixel for sampling
>    focal_point <0,0,0>    // point that is in focus <X,Y,Z>
>    confidence 0.95        // [0...<1] when to move on while sampling 
> (smaller is less accurate)
>    variance 1/200         // [0...1] how precise to calculate (smaller 
> is more accurate)
> }
> */


Post a reply to this message

From: Mike Horvath
Subject: Re: Camera scaling and focal_blur?
Date: 10 Feb 2018 22:35:54
Message: <5a7fba1a$1@news.povray.org>
I've been reading this

https://en.wikipedia.org/wiki/Miniature_faking

and have been wondering how to achieve the effect in POV-Ray. Obviously, 
there is no true scale in POV-Ray, so there's no need to "fake" the 
effect. But I don't know how to construct the correct camera.

Any ideas?


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Camera scaling and focal_blur?
Date: 10 Feb 2018 23:32:25
Message: <5a7fc759$1@news.povray.org>
I still don't understand exactly what's happening, but I removed the 
scaling and just increased the numbers directly, and things are working 
out much better.


Mike


Post a reply to this message

From: William F Pokorny
Subject: Re: Camera scaling and focal_blur?
Date: 11 Feb 2018 08:06:52
Message: <5a803fec$1@news.povray.org>
On 02/10/2018 10:36 PM, Mike Horvath wrote:
> I've been reading this
> 
> https://en.wikipedia.org/wiki/Miniature_faking
> 
> and have been wondering how to achieve the effect in POV-Ray. Obviously, 
> there is no true scale in POV-Ray, so there's no need to "fake" the 
> effect. But I don't know how to construct the correct camera.
> 
> Any ideas?
> 

See:

http://news.povray.org/povray.binaries.images/thread/%3C57e14051%241%40news.povray.org%3E/

for a technique using a not yet adopted parser change which allowed 
image_maps to be used directly in density {} blocks.

Mention it because though our documentation

http://wiki.povray.org/content/Reference:User_Defined_Pattern

doesn't yet disclose it, the new-ish 3.7.1/3.8 pigment { user_defined { 
} } capability was implemented by Christoph in a way so it works for 
density blocks too. Of course only the R,G,B functions do anything where 
used with density {}.

This means it should be possible to implement the tilt shift technique 
in the first reference by building up functions which grab the r,g,b 
channels via #declare Fn... = function { pigment { image_map {...} } } 
and using those functions in two density { user_defined { } } blocks in 
a density_map. It's a more awkward means than using the image_maps 
directly in the density blocks, but it should work.

The technique uses media blending between two densities. One blurred via 
turbulence and one not.

Bill P.


Post a reply to this message

From: clipka
Subject: Re: Camera scaling and focal_blur?
Date: 11 Feb 2018 10:14:41
Message: <5a805de1$1@news.povray.org>
Am 11.02.2018 um 04:36 schrieb Mike Horvath:
> I've been reading this
> 
> https://en.wikipedia.org/wiki/Miniature_faking
> 
> and have been wondering how to achieve the effect in POV-Ray. Obviously,
> there is no true scale in POV-Ray, so there's no need to "fake" the
> effect. But I don't know how to construct the correct camera.
> 
> Any ideas?

Yep: Crank up the focal blur `aperture` setting like mad.


Post a reply to this message

From: Kenneth
Subject: Re: Camera scaling and focal_blur?
Date: 11 Feb 2018 19:00:00
Message: <web.5a80d8243abb6b9ea47873e10@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

>
> ..for a technique using a not yet adopted parser change which allowed
> image_maps to be used directly in density {} blocks.
>
That is *definitely* an interesting and useful idea (as is your current
workaround.) Any idea if this image_map thing is going to be included in a newer
v3.8.x alpha or beta?


Post a reply to this message

From: Mike Horvath
Subject: Re: Camera scaling and focal_blur?
Date: 11 Feb 2018 22:08:11
Message: <5a81051b$1@news.povray.org>
On 2/11/2018 10:14 AM, clipka wrote:
> Am 11.02.2018 um 04:36 schrieb Mike Horvath:
>> I've been reading this
>>
>> https://en.wikipedia.org/wiki/Miniature_faking
>>
>> and have been wondering how to achieve the effect in POV-Ray. Obviously,
>> there is no true scale in POV-Ray, so there's no need to "fake" the
>> effect. But I don't know how to construct the correct camera.
>>
>> Any ideas?
> 
> Yep: Crank up the focal blur `aperture` setting like mad.
> 

The problems I was having involved scaling/transforming the camera. Once 
I stopped doing that, things started working properly. I don't really 
understand why, but I will post some test scenes in the other forum.


Mike


Post a reply to this message

From: Kenneth
Subject: Re: Camera scaling and focal_blur?
Date: 11 Feb 2018 22:40:00
Message: <web.5a810c7d3abb6b9ea47873e10@news.povray.org>
Mike Horvath <mik### [at] gmailcom> wrote:
> I still don't understand exactly what's happening, but I removed the
> scaling and just increased the numbers directly, and things are working
> out much better.

I've never tried *scaling* a camera before, but it's an interesting idea.

Using your 'scale 2' camera, what it looks like is that the focal_blur's
focal_point of <0,0,0> (the focal 'plane')is actually shifting to <0,0,-5>. In
other words, it's keeping the same original 5-unit distance from the CAMERA--
not scaling to 2*5 = 10-units. That's what I see from a simple test, anyway.


Post a reply to this message

From: Mike Horvath
Subject: Re: Camera scaling and focal_blur?
Date: 11 Feb 2018 22:46:22
Message: <5a810e0e@news.povray.org>
On 2/11/2018 10:39 PM, Kenneth wrote:
> Mike Horvath <mik### [at] gmailcom> wrote:
>> I still don't understand exactly what's happening, but I removed the
>> scaling and just increased the numbers directly, and things are working
>> out much better.
> 
> I've never tried *scaling* a camera before, but it's an interesting idea.
> 
> Using your 'scale 2' camera, what it looks like is that the focal_blur's
> focal_point of <0,0,0> (the focal 'plane')is actually shifting to <0,0,-5>. In
> other words, it's keeping the same original 5-unit distance from the CAMERA--
> not scaling to 2*5 = 10-units. That's what I see from a simple test, anyway.
> 
> 
> 
> 

I posted my scene in p.t.s-f. Could you take a look at that?

Thanks.


Mike


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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