|
![](/i/fill.gif) |
Don Barron wrote:
>Does anyone know how to simulate the vignetting that was present in old
>camera lenses - a loss of brightness towards the edge of the field, say
>according to a cosine law?
>/* Simulating vignetting in the camera lens.
Just a comment... it's vignetting in the lens design and fabrication
which early lenses
had, to reduce the serious image aberrations from the primitive lenses of
the time.
..the cos^4 effect is something else, but all the same...
thanks to SLIME for the suggestion of a textured microscopic sphere
enclosing the
camera. This is his pov file but with a while loop inside
the pigment color_map and a similar color_map applied to his object
sphere. Nice one...
*/
#declare A=67; // angle
#declare R=<10,0,0>; // orientation
#declare L=<0,0,-5>; // location
#declare V=A; // variable, degrees? probably still not true to the real
world(?)
camera {location 0 look_at z angle 1.3*A rotate R translate L }
sphere { 0,1 pigment { cylindrical color_map { #declare Rho = 0;
#while (Rho <=1)
#declare TRho =
pow(cos(pi/2*Rho),4);
[ Rho color rgb 0
transmit TRho]
#debug concat("
",str(TRho,9,3),"\n")
#declare Rho = Rho +
0.1;
#end
}
frequency -1 rotate 90*x
}
finish{ ambient 0 diffuse 0 }
scale 0.0001
rotate R translate L
}
sphere { 0,1 pigment { cylindrical color_map { #declare Rho = 0; #declare
Steps = 12;
#while (Rho <=1)
#declare TRho =
pow(cos(pi/2*Rho),1);
[ Rho color rgb 0
transmit TRho]
#declare Rho = Rho +
1/Steps;
#end
}
frequency -1 rotate 90*x
}
finish{ ambient 0 diffuse 0 }
rotate y*15 rotate -x*25
}
sky_sphere { pigment { gradient y color_map { [0 rgb <0.7,0.8,0.9>]
[1 rgb <0.2,0.5,0.8>]
}
}
}
light_source { <-30, 30, -30>,1 }
plane { y,-1 pigment {color rgb 1} }
Post a reply to this message
|
![](/i/fill.gif) |