Camera
Create camera that crop image to fix dimension with control of position, zoom. Also can be use to create parallax effect.
Node Data | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Display name | |||||||||||||||
Camera | |||||||||||||||
Internal name | |||||||||||||||
Node_Camera | |||||||||||||||
Inheritances | |||||||||||||||
| Node_Processor | |||||||||||||||
| Node_Camera | |||||||||||||||
Inputs | |||||||||||||||
Camera | |||||||||||||||
vec2 |
Dimension |
||||||||||||||
vec2 |
Dimension |
||||||||||||||
vec2 |
Focus Center |
||||||||||||||
slider |
Zoom |
||||||||||||||
FOV | |||||||||||||||
bool |
Depth Of Field |
||||||||||||||
float |
Focal Distance |
||||||||||||||
float |
Focal Range |
||||||||||||||
float |
Defocus |
||||||||||||||
| |||||||||||||||
Outputs | |||||||||||||||
surface |
Surface Out |
||||||||||||||
Attributes | |||||||||||||||
| Color Depth | |||||||||||||||
Camera node used to capture parts of the scene. You can think of it as a 2D camera with fix dimension looking around your image.
Camera node also allows for parallax and Depth of Field effect.
Properties
| Camera | |
| Focus Center | Center point of the camera target. |
| Zoom | Scale the surface. |
| FOV | |
| Depth Of Field | Apply depth of field effect cased on surface septh. |
| Focal Distance | Middle depth level for sharp output. |
| Focal Range | Range depth where output stays sharp. |
Parallax
Camera node allows for parallax effect by layering multiple surfaces at different depth.
The extra surface can be added to the Element {_S} properties. When the new element is added, you can change the position setting in the Parallax {_S} property. The X and Y value indicate the parallax direction, and the Z value use to control the speed in which the surface will be moved with the camera.

Note that the speed of parallax is depends on both XY and Z axis. If both X and Y are set to 0, then there will be no parallax effect.
Commit History
| 1.21.7.101 |
|
|---|---|
| 1.21.5.003 |
|
Related Links
- Base Code: /scripts/node_camera/node_camera.gml