Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

capture.fromCamera

Render the scene from a specific named camera's authored pose and settings, returning the picture as an image value (and writing a PNG as well when a path is given). By default it uses the camera's exact world-space pose plus its whole lens (fov/near/far, and the projection it builds with the orthoHeight an orthographic camera covers), its diagnostic debugChannel, its post-process setting, its lighting environment (an isolated camera's background and ambient with it) and the scene layers it draws: the camera's own renderLayers with the editor's chrome (EditorUI) and the authoring overlays (debug) taken off, since those are drawn for whoever is editing rather than by that camera into the world. So the frame is precisely what that camera draws of the scene, without changing what is on screen. Pass overrides (renderLayers, debugChannel, fov, near, far, projection, orthoHeight, width, height) to change any of those for the one capture without touching the camera; renderLayers = "all" is how the overlays are captured on purpose.