I would like to change the offcenterprojectionoffset of a cinecamera.
In a blueprint, I can GET the values from an fminimialviewinfo, but I don’t know how to SET the values on a cinecamera.
It appears you can use FMinimalViewInfo::BlendViewInfo(...)
and FMinimalViewInfo::AddWeightedViewInfo(...)
, defined in CameraStackTypes.h/.cpp
to affect an FMinimalViewInfo
struct.
However, it appears that a camera component does not have a variable of type FMinimalViewInfo
, and the function GetCameraView(...)
calculates the values that populate the pushed out struct on demand. Further, the struct does not have the OffCenterProjectionOffset
variable set on it, so is unreliable.
You are correct that GetCameraView computes values, but they can’t be changed.
The solution for us ended up being:
Create a subclass of cinecameracomponent, adding a section (like the existing ones for lens info) to add the offset values, and modifying GetCameraView to set the values in the FMinimalViewInfo structure.
I can’t belive this slipped my mind - Did you look into using a Camera Modifier?
Noticing your experience with “offcenterprojectionoffset,” I’d like to ask a question:
For instance, with a frame size of 1920*1080 and a measured optical center at (912, 513), I assume the offcenterprojectionoffset should be set to (-0.05, 0.05). Is this correct?
Thanks