Planetside Software Forums

General => Terragen Discussion => Topic started by: raymoh on January 12, 2021, 11:33:08 AM

Title: Depth of Field
Post by: raymoh on January 12, 2021, 11:33:08 AM
I think I'm a little slow on the uptake at the moment: How do I manage to get the depth of field on the background so that the foreground is out of focus.
All the settings I've tried (DOF) only result in a blurry background...
(Terragen 4.5.56,Mac)
Title: Re: Depth of Field
Post by: Dune on January 12, 2021, 11:39:43 AM
Change the distance to further away, and increase the aperture for more blur.
Title: Re: Depth of Field
Post by: KlausK on January 12, 2021, 07:20:38 PM
hi, a small example how I get there.
Gathered Project including obj in the *.rar archive.
Rather extreme camera values for  distance and aperture for demonstration.
Hope that helps.

CHeers, Klaus

ps: pic 1 standard renderer / pic 2 path tracer / all other settings / values identical
Title: Re: Depth of Field
Post by: raymoh on January 13, 2021, 01:05:09 PM
Thank you very much. I was irritated yesterday by the depth of field display in the preview ("orange" coloring). In the meantime I have found suitable settings for me.
Title: Re: Depth of Field
Post by: Tangled-Universe on January 13, 2021, 06:48:31 PM
Below only works if you work in real world scale:
If you press 'View' in the top menu and then click '3D Preview Location' then you can read the distance from camera in that window when pointing your mouse to the part of the terrain you want to have in focus.
In the blur tab of your camera you enter this distance from camera value.
From there it's a matter of knowing some photographical principles, like long focal lengths with large apertures have narrow depth of field the closer to the camera. That kind of stuff.
An intermediate focal length lens like 35mm does not offer narrow depth of field unless you are very close to the camera and have a large aperture, like f/1.4.

The sample Klaus supplied shows nicely how you can make it work when not using world scale values.
It also demonstrates that aperture values in the camera node come at a price.
I managed to shave off 25% render-time by setting aperture to 25mm (f/1.4 equivalent). This creates a smaller circle of confusion which takes less sampling.
However, since the scene was not real-world scale the depth of field effect disappeared.