-
Notifications
You must be signed in to change notification settings - Fork 13
OutputCamera
In VFX Graph, the Camera Type refers to only one camera in the game. However, in some cases, such as split-screen, we want to refer to the camera as "The currently rendering camera". Output Camera feature provides blocks and operators that are only compatible with output contexts, and that enable getting values from the currently rendering camera.
The output Camera Operator gets values from the Currently rendering Camera. It is only working when connected to an Output Context.
- Position the world-space position of the camera
- Forward the world-space direction (forward vector) of the camera
- Up the world-space up vector of the camera
- Right the worls-space right vector of the camera
- Resolution the current rendering resolution of the camera (in pixels)
- NearFarPlane the near and far plane distances of the camera, encoded in X and Y components
- FieldOfView the field of View of the camera projection, in radians
- Ratio the rendering ratio (width/height) of the camera
The output Camera Position to view operator outputs in Camera space an input position based on a Mode, at the near plane distance + offset. See below for camera modes.
- Position the input position to transform
- Position Mode the position mode for use as referential in camera space
- Near Plane Offset an offset to the near plane for the particles
The Transform Position to Output Camera transforms particle positions to camera space based on a Mode, at the near plane distance + offset. See below for camera modes.
- Position Mode the position mode for use as referential in camera space
- Near Plane Offset an offset to the near plane for the particles
There are four camera Modes available in the Transform Position to Output Camera block and Output Camera Position to View operator dropdown.
In all modes the positions are set in an orthogonal referential as follows:
- X : Camera Right Axis
- Y : Camera Up Axis
- Z : Camera Forward Axis
The modes control how X and Y axis scales depending on the screen ratio.
The Normalize to Viewport mode scales the axis as follows:
- X Axis scales from Left (-1.0) to Right (1.0)
- Y Axis scales from Bottom (-1.0) to Top (1.0)
The Ratio Correct (Width) mode scales the axis as follows:
- X Axis scales from Left (-1.0) to Right (1.0)
- Y Axis scales accordingly to maintain correcgt aspect ratio in coordinates
The Ratio Correct (Width) mode scales the axis as follows:
- Y Axis scales from Bottom (-1.0) to Top (1.0)
- X Axis scales accordingly to maintain correcgt aspect ratio in coordinates
The Ratio Correct (Auto) chooses automatically between Ratio Correct Width and Height based on screen ratio, so the longer axis (between witdth, and height) is chosen.
- Blocks and Features
- Other Runtime Features