通过对camera的focal_point 和 aperture的设置,调整相机的聚焦和画面的模糊程序
1:模糊处理效果
camera {
location <0.0, 1.0, -10.0>
look_at <0.0, 1.0, 0.0>
focal_point < 1, 1, -6> // 设置相机的聚焦点
// aperture 0.05 // 基本上所有的物体都很清楚
// aperture 0.4 // 比较模糊
aperture 1.5 // 非常模糊
// blur_samples 4 // fewer samples, faster to render
blur_samples 20 / / more samples, higher quality image
}
不同的aperture,对应不同的模糊程度,值越大越模糊
2:将camera聚焦到不同的对象上
camera {
location <0.0, 1.0, -10.0>
look_at <0.0, 1.0, 0.0>
// focal_point <-6, 1, 30> // blue cylinder in focus
// focal_point < 0, 1, 0> // green box in focus
focal_point < 1, 1, -6> // pink sphere in focus
aperture 0.4 // a nice compromise
aperture 1.5 // much blurring
// blur_samples 4 // fewer samples, faster to render
blur_samples 20 // more samples, higher quality image
}