Control camera focus in UE

 

Hey All, is there a way to control my camera focus in Aximmetry using the Unreal Engine? Do I need to edit the camera blueprint in Unreal to do so? Thanks :)

   gaffer-tape

 
Profile Image
gaffer-tape
  -  

Is this the correct approach to control the focus in Aximmetry? Unfortunately, the Scalar has no effect - what am I missing? 


 
Profile Image
Aximmetry
  -  

Hi!

You can find the solution for Aximmetry 2020.5.0 and later in the other comments of this thread.

You could have done the following before Focus was implemented in Aximmetry 2020.5.0:

Note that your problem has nothing to do with Aximmetry: you could substitute the “Get Aximmetry Scalar” node with any other scalar value. Generally, we are not able to provide support regarding the Unreal Engine, so please use the Unreal Engine Forums if you have such a question. However, this is a very common question and the answer might be useful to others as well, so here you go:  

Yes, you can control the camera focus in Aximmetry. You are missing two things here:

  1. The exec pin on the “SET” node is not connected so these nodes will not be executed. To change  the focus distance smoothly, you have to update it every frame. This can be achieved by connecting the “Event Tick” node like so:


  2. The “SET” node operates on a specific Cine Camera Component, so you have to connect one to the “Target” pin. If you are editing the Aximmetry_Camera blueprint, you can get a reference to the Cine Camera Component using the “Get Cine Camera Component” node.


Alternatively, if you want to do this in another blueprint (for example the level blueprint) you have to get a reference to the Aximmetry_Camera actor by dragging it into your blueprint from the world outliner panel and connecting it to the “Target” pin of the “Get Cine Camera Component” node.

Your solution is fine for setting the focus distance but be careful: you are creating a whole new CameraFocusSettings structure here which will overwrite any settings you might set earlier, either by blueprint or in the Details panel of the editor.

We suggest setting only the focus distance instead. You can do this using the “Set members in CameraFocusSettings” node. Expose the “Manual Focus Distance” parameter as a pin by selecting the “Set members in CameraFocusSettings” node and ticking the “(As pin)” checkbox next to the “Manual Focus Distance” parameter in the Details panel.

Connect the ”Get Aximmetry Scalar” node to the newly exposed pin.

You also have to connect the current focus settings of the Aximmetry_Camera to  „Struct Ref” pin. Use the “Get Cine Camera Component” node just like in the previous example then add a “Get Focus Settings” node and connect its output to the “Struct Ref” pin of the “Set members in CameraFocusSettings” node. (You might have to uncheck the “Context Sensitive” checkbox to find the “Get Focus Settings” node.

The final blueprint should look like this: 

Note: this works only in the Aximmetry_Camera blueprint. If you want to add this to any other blueprint you also have to connect the „Target” pin of the „Get Cine Camera Component” node just like in the previous example.

 
Profile Image
TwentyStudios
  -  

Great explanation, should be easy enough to follow. Still, I suggest implementing focus control of the Aximmetry Camera as standard. Please make it a part of the Camera Control board, so that we can set focus shifts along with camera paths. 

 
Profile Image
Aximmetry
  -  

It is now implemented in 2020.5.0, so focus distance can be set in Aximmetry.

 
Profile Image
laislafilmes
  -  

How can I control the focal length within Aximmetry?

 
Profile Image
Ahmed@Aximmetry
  -  

Hello laislafilmes,

When you're editing the A or B endpoint of a camera path you can use

  • Zoom - Space + Wheel  or  Space + Left Mouse
  • Focus - Alt + Space + Left Mouse


Please check this documentation on all the available camera controls:
https://aximmetry.com/wiki/index.php?title=Camera_Mover_Mouse_Control 


 
Profile Image
Merovingio
  -  

Hello, this is quite an old post, but it is relevant to me right now, as I'm trying to understand how to set focus distance (and maybe aperture) in Aximmetry, since I have an Optitrack tracked cam, but no lens encoder, and I need a nice bokeh effect in close-up.

Unfortunately some of the images in the explanation above are not loaded and I got a broken link, is this true for you as well?

I am pretty new to Aximmetry, but I can work on Unreal's blueprint, I just need an help on where to start. Thank you.

 
Profile Image
Merovingio
  -  

Ok, I managed to make it work, thank you.

 
Profile Image
Eifert@Aximmetry
  -  

Hi,

Just to reiterate things for people reading it in the future:

In the case of Virtual Camera compounds, when you're editing the A or B endpoint of a camera path you can use:

  • Focus - Alt + Space + Left Mouse

Please check this documentation on all the available camera controls:
https://aximmetry.com/wiki/index.php?title=Camera_Mover_Mouse_Control


In the case of Tracked camera compounds, you could switch to Manual Lens in the Inputs:

However, this will also overwrite your tracked Zoom values.

If you only want to overwrite the Focus values and keep the tracked Zoom values. Then you could use a Set Collection Scalar module with the Cam Focus Key pin to overwrite the Focus:

Warmest regards,

;