POV-Ray : Newsgroups : povray.binaries.images : Ambient Occlusion with MegaPov Server Time
4 Nov 2024 20:14:37 EST (-0500)
  Ambient Occlusion with MegaPov (Message 1 to 1 of 1)  
From: Ondrej
Subject: Ambient Occlusion with MegaPov
Date: 28 Apr 2007 19:00:02
Message: <web.4633d10d938cf7ddcec290e90@news.povray.org>
Here is fixed sample:

Here is modified above script with result:



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

#declare _Phi=(sqrt(10)-1)/1;


#macro TGP_ISO_CAMERA(_c_pos,_c_target,_c_fov)
camera
{
  orthographic
  up <0,1,0>
  right -x*image_width/image_height
  location _c_pos
  angle _c_fov
  look_at _c_target
}
#end


global_settings{
  radiosity {
    randomize on
    #declare Spread = 0.9;
    #declare maxS = 20;
    samples {
      maxS,
      #declare C = 0; #while (C < maxS)
        #declare F = sqrt(C/(maxS-1));
        #declare S = vrotate(x, _Phi*C*360*z)*F*Spread;
        0.01*<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.5
    recursion_limit 6
    low_error_factor .02
    gray_threshold 0.0
    minimum_reuse 0.005
    brightness 1
    adc_bailout 0.001/2
    normal on
  }
 assumed_gamma -0.8
 max_trace_level 10
}


TGP_ISO_CAMERA(<0,300,0>,<0,0,0,>,65)

sphere
{
   <0,0,0> 50
   pigment {rgb 0.5}



}

plane { y 0 pigment {rgb 0.5}}

sphere
{
   <0,0,0> 50
   pigment {rgb 0.5}
   translate x*100

}

sphere
{
   <0,0,0> 50
   pigment {rgb 0.5}
   translate x*-100

}

// --- code ends ---


Post a reply to this message


Attachments:
Download 'ao_test.png' (11 KB)

Preview of image 'ao_test.png'
ao_test.png


 

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