POV-Ray : Newsgroups : povray.general : "Shrinking" the ambient occlusion Server Time
28 Nov 2024 22:57:10 EST (-0500)
  "Shrinking" the ambient occlusion (Message 1 to 5 of 5)  
From: ZainAnak
Subject: "Shrinking" the ambient occlusion
Date: 17 Aug 2006 18:10:01
Message: <web.44e4e8aa3a1fecd1f74b7dbf0@news.povray.org>
Hey all.  I'm playing around with all the radiosity settings, and I'm
running into the problem where everything is looking very small scale.  For
example, a car on a street has this very wide GI shadowing happening beneath
it, which makes it look like a toy car.  I'm wondering which parameters I
can use to decrease the "spread", so to speak, of GI shadowing.  There is
an excellent description of what I'm talking about in this mental ray
tutorial:

(click to about the 8:00 mark):

http://www.williamkladis.com/tutorial01/tutorial01.html

Any ideas?  It seems to influence the sense of scale of the image
tremendously.

Thanks!
-ZA


Post a reply to this message

From: Mike Andrews
Subject: Re: "Shrinking" the ambient occlusion
Date: 18 Aug 2006 10:15:00
Message: <web.44e5ca411dc11509c717c9af0@news.povray.org>
Coments below ...

"ZainAnak" <nomail@nomail> wrote:
> Hey all.  I'm playing around with all the radiosity settings, and I'm
> running into the problem where everything is looking very small scale.  For
> example, a car on a street has this very wide GI shadowing happening beneath
> it, which makes it look like a toy car.  I'm wondering which parameters I
> can use to decrease the "spread", so to speak, of GI shadowing.  There is
> an excellent description of what I'm talking about in this mental ray
> tutorial:
>
> (click to about the 8:00 mark):
>
> http://www.williamkladis.com/tutorial01/tutorial01.html
>
> Any ideas?  It seems to influence the sense of scale of the image
> tremendously.

It looks like the 'spread' controls the radius of the sample-cone around the
surface normal. This effect could be achieved in MegaPov 1.2.1 by setting
user-defined sample directions (see section 2.7.3, and subsections below,
of the MegaPov documentation). A smaller cone of samples would give a
decreased 'spread'. I do not see that there is a way to do it in standard
PoV-Ray.

>
> Thanks!
> -ZA

Regards,

Mike Andrews.


Post a reply to this message

From: ZainAnak
Subject: Re: "Shrinking" the ambient occlusion
Date: 18 Aug 2006 12:55:00
Message: <web.44e5f0081dc11509f74b7dbf0@news.povray.org>
Interesting.  Since it lies within the user-defined directions section, does
this then mean I have to manually define the direction for every sample at
every point in my scene?  That doesn't seem right.  I would like Pov to
keep doing its own internal sample directions with its direction table, and
just vary their weight based on the cos(theta) described in 2.7.3.  Does
that seem possible?

-ZA


Post a reply to this message

From: Mike Andrews
Subject: Re: "Shrinking" the ambient occlusion
Date: 18 Aug 2006 13:20:00
Message: <web.44e5f6861dc11509c717c9af0@news.povray.org>
Comments below ...

"ZainAnak" <nomail@nomail> wrote:
> Interesting.  Since it lies within the user-defined directions section, does
> this then mean I have to manually define the direction for every sample at
> every point in my scene?  That doesn't seem right.  I would like Pov to
> keep doing its own internal sample directions with its direction table, and
> just vary their weight based on the cos(theta) described in 2.7.3.  Does
> that seem possible?
>
> -ZA

As it says in '2.7.3.2.2. user defined directions':

'The coordinate system for these sample ray directions is relative to the
surface at the sample position. The z-Axis points in normal direction. All
directions should be in the upper hemisphere (z coordinate >0).'

So, you define one set of samples based around the z-axis and the sample set
is rotated at every surface point so that the z-axis of the set is aligned
with the surface normal.

I haven't used the cos(theta) weighting option, but this would not let you
vary the spread - although using it would tend to give a similar effect as
tightening the spread a certain amount.

Hope this helps,

Mike Andrews.


Post a reply to this message

From: Mike Andrews
Subject: Re: "Shrinking" the ambient occlusion
Date: 18 Aug 2006 14:05:00
Message: <web.44e600e61dc11509c717c9af0@news.povray.org>
Comments below ...

"ZainAnak" <nomail@nomail> wrote:
> Interesting.  Since it lies within the user-defined directions section, does
> this then mean I have to manually define the direction for every sample at
> every point in my scene?  That doesn't seem right.  I would like Pov to
> keep doing its own internal sample directions with its direction table, and
> just vary their weight based on the cos(theta) described in 2.7.3.  Does
> that seem possible?
>
> -ZA

As an addendum to my previous post, I just had a go and came up with the
following radiosity block. It's probably not optimal for anything but you
might give it a go as a starting point.

Bye for now,

Mike Andrews.

// --- code starts ---
// --- MegaPov 1.2.1 only! ---
#version unofficial megapov 1.21;

#declare _Phi=(sqrt(5)-1)/2;

global_settings{
  radiosity {
    randomize on
    #declare Spread = 0.5;
    #declare maxS = 40;
    samples {
      maxS,
      #declare C = 0; #while (C < maxS)
        #declare F = sqrt(C/(maxS-1));
        #declare S = vrotate(x, _Phi*C*360*z)*F*Spread;
        <S.x, S.y, sqrt(1-S.x*S.x-S.y*S.y)> #if (C < maxS-1) , #end
      #declare C = C + 1; #end
    }
    pretrace_start 8/image_width
    pretrace_end   2/image_width
    count maxS
    nearest_count 20
    error_bound 0.1
    recursion_limit 3
    low_error_factor .02
    gray_threshold 0.0
    minimum_reuse 0.001
    brightness 1
    adc_bailout 0.001/2
    normal on
  }
 assumed_gamma 1
 max_trace_level 20
}

// --- code ends ---


Post a reply to this message

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