Camera Focal Distance
marble
Posts: 7,500
I load each new scene with a default camera and most of the time that is the only camera I use. So I tend to move it around a lot. The thing is that in the viewport, as I get closer to my subject, the scene gets dark and I know that this is because the focal distance of the camera changes with movement. So I end up with a very short focal distance and I have to go to that parameter and reset it back to default.
Is there any way to prevent the changing FD? I expect to change it when using DOF but not when DOF is switched off.
Comments
The scene gets dark when you approach closely because the ehadlamp is providing the light and it is slightly offset from the camera. Headlamp settings control this, though I wouldn't recommend using the headlamp at all.
I never use the headlamp - I have it set to Never in the Render Settings.You can try yourself - set the FD to something small and zoom in to a subject. The scene gets dark. The smaller the distance the darker.
This test is using only an HDR in the Environment - no headlamp, no spots, etc. The test is me setting the FD intentionally but that focal distance changes with camera movement as I said in the OP. I would rather it stay at the default setting which is 450.
For a small Focal Distance you have to be closer to the object than for a larger (zoomed) value, so I still say it's the light parented to the Camera - if you aren't using the headlamp do you have Pre Lights turned off, which uses a pseudo-headlamp instead of trying to emulate the lights in the scene? Sorry, that was Focal Length not Focal Distance. Still, the question about Preview Lights on/off may be worth answering.
The focal distance is tied to the camera focal item function. I'm sure that's not the right name for it, but I'm talking about the box icon beneath the magnifying glass and above the circle arrow. Whne you select an item from your scene and click this icon to make it fill the screen the focal distance sets to make the selected item in focus. After doing this, the selected item will stay in focus as you move the camera around for a while, but will eventually fall out of focus. It's a pretty cool feature that can really help with getting focal distance right sometimes.
I've noticed things getting darker when I get really close to some items in some scenes and have always assumed it's because of the headlamp offset. Remember even if you're not using the headlamp, The preview lights in OpenGL viewer use that headlamp to light the scene. Check it out by changing the brightness of your headlamp or adjusting the headlamp offset.
Well now I am learning something. I most definitely have the headlamp turned off - it annoys me that it defaults to On so I set my render settings to "Never" and use that setup as my default load scene. But I also always switch on the preview lights (CTRL-L or labeled "Scene Lights") if that's what I think it is. Otherwise it is difficult to see things in the scenes (most of my scenes are inside). I occasionally use the box icon you mention to bring my subject in front of the camera - I did not know that this was linked to the camera focal distance setting (but that makes sense).
But the FD changes whenever I move the camera back and forth - I can see that with a simple observation moving the camera around the viewport. My question was - how to prevent this. Incidentally, I don't use DAZ Lights (other than a single spotlight sometimes) to light a scene - I rely heavily on HDRi lights in the Environment pane. Even my indoor scenes have walls and ceilings removed to allow me to use HDRi lights. So these are not recognised as lights by OpenGL and that's why my viewport is dark.
So are we saying that the "Scene Lights" (CTRL-L) are actually the camera headlamp?
Preview Lights (on by default) is trying to show the lights in the scene (if any). When you press ctrl L the first time you are turning the Preview [the] Lights fucntion off, enabling a headlamp-like light instead.
Focal Distance changes to accomodate the camera's focal point, which I think is the world centre if nothing is framed or pointed at; I don't think there is a way to stop it.
Yeah, the preview lights (scene lights) on or off thing has confused me before. All I can say is that I use the CTRL-L function to make my scene visible because, without it, it is totally dark as I don't use photometric lights other than the occasional spotlight later in the scene construction. Whether that means I'm turning on the scene lights (which makes sense to me) or off (as you say) doesn't really matter. What is further confusing me now is that you tell me that the light I am seeing to make my viewport visible is the headlamp whereas I know for certain that I have that turned off.
If you move the camera close to the figure using the magnifier icon, the one above the square icon with dot, in the Viewport then that will change the Focal Distance and it will go darker. Use the slider in the General section under the Camera Tab to move it nearer which doesn't affect the Focal Distance and the figure stays bright.
I use the mouse wheel to move closer or back because I don't have the camera selected.
So what are you moving backwards and forwards with the mouse wheel if not the camera? I am on a laptop so no wheel :)
Yes, I am moving the camera but it is not selected. To do it your way I would need to select the camera, go to the paramteres pane and use the XYZ translations to move it. That seems like a PITA to me when I can just use the mouse wheel while I have my subject (or anything) selected in the scene. I guess on a laptop you would move your finger on the trackpad to zoom in an out?
As far as I can tell if you keep the figure or whatever object selected while moving the camera around with the cube and scrolling in and out with the mouse wheel the focal distance will stay more or less locked on what you have selected. I hope that makes sense, it's a long sentence and I'm not going to fix the grammar. It seems to drift a bit if I move it around a lot.
Ok - so that is exactly how I work in the viewport. I use the mouse wheel for closer or further and the cube for changing the view angle. I use the little icon with the four arrows to pan up/down/left/right. As you can see in the two screen shots attached, the focal distance changes when I scroll in or out with the mouse wheel. When you say locked - do you mean that it doesn't change or that it changes according to the distance from the subject (it is clearly the latter).
The behavior you are describing is exactly what I mean. The object stays locked in focus while you move the camera around.
So that's part of the confusion I'm having. I thought that focal distance is only important if I have DOF turned on. If not, I thought that the viewport is a bit like a point-and-shoot camera where everything is in focus, near or far.
But the Focal Distance is effectively measuring how close the camera is to the selected object, if it gets small then you are very close and my previous explanation (it's the offset of the non-rendering, pseudo headlamp) applies.
Right - that's finally beginning to sink in now that I understand that what is lighting my viewport is effectively a headlamp and not some general ambient light (which is what I mistakenly imagined it to be). I thought that the only headlamp was the one in the camera settings which can be switched off.
Nevertheless, if I reset the focal distance to default (450), no matter how close the camera is to the subject, I am able to view it in the light, not dark. So the question remains - is there a way to fix the focal distance?
Use the lock on the focal distance slider and lock your focal distance that should work.
Doh! Why on earth didn't that occur to me? It does work, of course.
By the way, I notice that I don't have the problem of close-up darkness when I use the Perspective View (which I often do for close-up work). So I wonder why that is. The Perspective View doesn't have any camera adjustment dials and it doesn't have anything in the scene heirarchy that can be selected so I can't see whether the focal distance is changing.
The Perspective View isn't a camera so there are no adjustments for it. It is just a screen view that can be moved or zoomed in and out which you can then use to create a camera of the view in the screen.
Right, so that would explain it. I thought it was just another camera with no adjustments but it doesn't actually pretend to be a camera at all and it is very useful because of that.
Actually, Perspective View does have a lot of the properties that cameras have - but you need a script to access them (or a proxy object created by a script).