Honour has a post up titled: How Deep is Your Field in Second Life? She was having a problem getting the viewer’s Depth of Field (DoF) feature to work. She links to Ricco Saenz’s explanation of how to get it working: How to actually capture depth of field on your SL photos. But, not why it does what is does.
DoF is one thing I have found I cannot control in my RL S4’s camera, or have yet to learn how. It is a reason I still use my Sony digital camera for RL imaging. DoF is something I seldom use in Second Life™ because I prefer the control I have in Photoshop. But, I can imagine that some will find DoF more usable in the viewer than adding it in post production.
Ricco’s article is important for those taking hi-rez images with the viewer. He is explaining that what you see on the screen and what you get in the screen capture/photo at high resolution are not the same. I run into the same problem in preparing images for print and the web. It is a resolution/pixel count thing. Once you understand you can compensate and get the result you want.
There is a technical explanation for what is happening. My two images show my standard SL view (1688×968 window), the one I use for daily display in Second Life. The other (below) is a higher resolution 3000x1723px image that I might take for a higher quality image. You must enlarge them by clicking to see the comparison make sense. And even then your computer is going to try hide some of the problem making it difficult to see what is happening.
The trick is to get full size image displayed at ACTUAL size or 1-to-1 pixel. You can download the images Links: Image1, Image2 – the new click-zoom makes it hard to get to the full size image now) or get the full size image on screen in your browser. Just click the image links to get the full size image and then right-click and select save it to your computer or click and get it in your browser. In Windows you can double-click the downloaded images to open them in the Windows Photo Viewer. There is a button for actual size. At actual size, the DoF effect in both images is the same. But, you can see the same thing in your browser. When downloading, you can examine the images in more detail.
Notice the edge of the pyramid and the near tree over my left shoulder, the avatar’s left. The pyramid and tree are different sizes, but the blur is the same in both images. It is when you make the pyramid and tree the same size that you see what appears to be the blur from DoF changing or disappearing altogether. It didn’t. It is what you are doing to the image that makes it appear that way.
In the top image, you can easily see DoF in action. This image was captured from the SL Viewer using the default settings for DoF. Third party viewers have the controls for DoF where you can easily use them to adjust DoF and the amount of blur you see. In the SL Viewer you must go into the Debug Settings from the Advanced Menu (step-by-step is here: SL Wiki Depth of Field). The values you can change are:
- CameraAspectRatio – (Default 1.5) “Camera aspect ratio for DoF effect” — Set this to the aspect ratio of the camera you’re modelling. For example, a 35mm camera has an aspect ratio of 3:2 (1.5). Second Life will use this as a frame of reference for how field of view and focal length must be adjusted depending on window size.
- CameraFieldOfView – (Default 60.0) “Vertical camera field of view for DoF effect (in degrees)” — The default FoV for the camera you’re trying to simulate. Second Life will use this as a frame of reference for adjusting focal length as the in-world field of view changes.
- CameraFNumber – (Default 9.0) “Camera f-number value for DoF effect” This is a simulated f-stop as you’d see on a camera with and adjustable aperture. A typical 35mm lens might have a range of f/2 to f/22. The smaller the number, the wider the aperture. In general, a smaller f-number will result in a narrower depth of field. When trying to tune depth of field for a particular image, this is the number to modify.
- CameraFocalLength – (Default 50) “Camera focal length for DoF effect (in millimeters)” Different cameras have different focal lengths (the distance from the outer camera lens to the film). In general, a shorter focal length will result in a closer hyperfocal plane — that is, the subject distance at which the far focal plane approaches infinity. You should choose what kind of camera you’re modeling and set CameraFocalLength to the focal length of that camera and leave it. Adjusting field of view will lengthen or shorten the simulated focal length appropriately to simulate the use of a zoom lens. Learn more about hyperfocal distance.
- CameraFocusTransitionTime (Default 0.5 sec) – How many seconds it takes the camera to transition between focal distances.
What is Happening?
If you use GIMP or Photoshop, you are aware that many image tools work on a range of pixels. Pixels are arranged in rows and columns, like a chessboard. When we use a blur factor of one the target pixel is mixed with the eight surrounding pixels (green). The blur process is repeated for every pixel in the image. If we set the blur factor two then the 9 pixel’s surrounding 18 pixels (red-pink) are added into the mix and so on as we increase the blur factor. The same thing is happening in the Viewer’s DoF process.
At high or low rez the DoF feature is blurring the same number of pixels. If one blurs a 100×100 pixels (100×100=10,000) that is about 0.6% of the total image (1688×968=1,633,984). In the hi-rez image that 100 pixels goes down to about 0.19% of the image (3000×1723=5,169,000), effectively cutting the blur by over a third.
When you look at an image on your computer it figures out how to display it on the screen. In the Windows Photo Viewer the Actual Size/Fit to Window button is telling the computer how you want the image pixels fitted to your screen. The Actual Size means to give every pixel in the image a screen pixel, 1 to 1. This often means the entire image will NOT fit on the screen. When the computer is told to fit it on the screen, the computer does some math and figures out how many pixels to average together and assign to a pixel on your screen.
As the image is shrunk to fit on the screen, it is literally SHARPENING the image. This means the blur added to make the image look as you wanted is being removed.
What Do We Do?
The challenge is in knowing what will be done with the final image. If the image is going to the web or otherwise intended for use on a computer, the image can be lower resolution, fewer pixels. If it going to be printed in a magazine or other paper media a much higher resolution image must be used.
Knowing the final use tells us whether to over blur the image we are seeing or go for a WYSIWYG.
Also, knowing how we are going to handle the image post-production tells us what we need to do. Taking a hi-rez 3,000+px wide image with the viewer and then turning it into a 600-800 pixel wide image for the web means we will be applying a large amount of sharpening by downsizing the image. We will definitely need to over blur the image. Taking 3,000px down to 600px is a reduction factor of 5 times.
While there is a way to mathematically figure out what is needed, my experience is professional graphic artists seldom bother with the math as it is difficult to include all the factors. They experiment. In time their experience guides them.
Realizing what is happening with the image process allows a person to plan how to get the result they want. Big image to small: over blur. Small image to small image: do WYSIWYG.