How do I get good and accurate depth of field?

 

I tried more than once the known methods, but the result was not satisfactory.


   huseen

 
Profile Image
TwentyStudios
  -  

What do you mean by “accurate”? No one will be anble to help you if you don’t give a more detailed explanation of what your issue is. Are you using tracked cameras with a focus encoder and have you calibrated the focus range? 

For the record, we’re using depth of field a lot with UE5/Aximmetry and it looks great. 

 
Profile Image
huseen
  -  

Thanks for the reply

I don't use a tracker I use  

VirtualCam_Unreal_3-Cam_A-B-C

 
Profile Image
TwentyStudios
  -  

Can you show an example of how it’s “not accurate”? Are you having trouble adjusting the depth of field or are you not happy with how it’s rendered? You understand that depth of field is rendered by Unreal, right? Aximmetry isn’t involved in how the depth of field is rendered and it’s rendered exactly the same as in standard Unreal. 

 
Profile Image
Eifert@Aximmetry
  -  

Hi

Could your issue be that the depth of field affects the virtual world and not the billboard?

Warmest regards,

 
Profile Image
huseen
  -  

First, the text is not affected by the depth of field.

Second, in order to achieve this level of depth of field, the BILLBOARD  image will also be affected.

.How do I get good and accurate depth of field?

 
Profile Image
Eifert@Aximmetry
  -  

Hi Huseen,

If you are using Aximmetry version 2024.3.0 or newer, then the Billboard should not be affected by the depth of field. If it still does, it might be because you modified the material of the billboard or have special settings in Unreal Engine.

If you are using Aximmetry with a version earlier than 2024.3.0, the console variable r.Translucency.AutoBeforeDOF influences when the focus distance affects the billboard and other translucent objects. The default value is set to 0.5. By assigning a value of 1, translucent objects will remain unaffected by focus. Therefore, set this variable to 1 to turn off focus effects on the billboard.

Regarding the text, it is likely that the text's material is set to the After DOF Translucency Pass:

Warmest regards,

 
Profile Image
huseen
  -  

The text problem was solved after I changed it to  before dof .

The Billboard problem remains .

Any suggestion? 

How do I get good and accurate depth of field?

.



 
Profile Image
huseen
  -  

I noticed that when I move the Billboard away, the image improves a little, but this solution is not correct because I need to adjust it every time I change the camera.

 
Profile Image
Eifert@Aximmetry
  -  

Hi Huseen,

To remove the depth of field from the Billboard:

If you are using Aximmetry version 2024.3.0 or newer, then the Billboard should not be affected by the depth of field. If it still does, it might be because you modified the material of the billboard or have special settings in Unreal Engine.

If you are using Aximmetry with a version earlier than 2024.3.0, the console variable r.Translucency.AutoBeforeDOF influences when the focus distance affects the billboard and other translucent objects. The default value is set to 0.5. By assigning a value of 1, translucent objects will remain unaffected by focus. Therefore, set r.Translucency.AutoBeforeDOF to 1 to turn off focus effects on the billboard. More on console variables here: https://dev.epicgames.com/documentation/en-us/unreal-engine/console-variables-editor?application_version=5.4

Warmest regards,

 
Profile Image
TwentyStudios
  -  

@Huseen: The Unreal camera models the depth of field of real camera. The reason that the billboard is out of focus is that you’re not following the basic principles of how to have a sharp foreground and a blurred background. You have the virtual camera set to a very wide field of view which means that everything will be on a similar focal plane. Move the virtual camera further back and zoom in to get the roughly the same field of view. Set the focus on the billboard plane and you will get the physically correct amount of depth of field based on a F2.8 exposure. If you want a more blurry background, move the camera further back and zoom in more. 

 
Profile Image
huseen
  -  

@Eifert:Same result even after the change


.How do I get good and accurate depth of field?

 
Profile Image
huseen
  -  

@TwentyStudios: In the live studio, changing the camera this way is not practical.

 
Profile Image
TwentyStudios
  -  

@huseen: How is it not practical? You wouldn’t make the adjustments live but when you set your virtual camera positions. That’s how we use it in live productions daily. 

Anyway, I think you might need to set that console command to 0 and not 1. If that doesn’t work, try executing the console command on EventBeginPlay from the level blueprint instead. Not that this won’t give you accurate depth of field like you asked for,  since the foreground would actually be out of focus in a real camera as well with your current camera position and lens parameters, but it does give you more freedom on how you set the background blur. 

 
Profile Image
huseen
  -  

@TwentyStudios: Yes, this is the correct way.


How do I get good and accurate depth of field?.

 
Profile Image
huseen
  -  

The problem with this method is that when the camera moves away, the blur will affect the entire Studio , so it is only used in fixed cameras, or there is a way to stop the billboard from being affected by the Depth of field .How do I get good and accurate depth of field?

.

 
Profile Image
TwentyStudios
  -  
You already have the method for not having the billboard affected by the depth of field, right? 
Since you’re using virtual camera moves, you would just adjust the focus for each zoom level and camera position in the camera path editor to keep the billboard in focus. If you’re using tracked cameras you would just map the focus encoder values in the camera calibrator software. I honestly don’t understand what the issue is here. We use shallow depth of field with moving virtual cameras all the time. 
 
Profile Image
huseen
  -  

ok  it's work .

Thanks everyone

;