Camera
Every picture starts here. Aim it, pick a lens and give it its own look: exposure, bloom, depth of field and motion blur.
A Camera is a point of view, perspective (FieldOfView) or orthographic (OrthographicSize). camera:RenderTo(image) draws its Target, or else the DataModel it is in, into an ImageContent, path traced or Solid as the project's Rendered / Solid switch says; ForceSolid keeps it Solid everywhere. The picture's Size, a transparent background and the render settings, from samples to motion blur, live on the camera.
Examples
local video = Root.Bench
local scene = video.Scene
local cam = scene.CurrentCamera
cam.Size = Vector2.new(320, 180)
cam.Samples = 16
cam.Bounces = 4
cam.Aperture = 0.25
cam.FocusDistance = 19local studio = script.Parent.DataModels.Studio
local cam = studio.Shot
Root.Heartbeat:Connect(function()
cam:RenderTo(script.Parent.Viewport)
end)Properties
Ambient Occlusion
| Name | Type | Default | Description |
|---|---|---|---|
| AmbientOcclusion | boolean | false | Turns ambient occlusion on for Solid; Rendered already gets it from the path tracer. |
| AmbientOcclusionIntensity | number | 1 0 to 8 | The exponent on the occlusion. |
| AmbientOcclusionRadius | number | 2 0.05 to 100 | The occlusion radius, in studs. |
Lens
| Aperture | number | 0 0 to 10 | Sets depth of field, together with Focus Distance. |
| AutoFocus | boolean | false | |
| AutoFocusDistance | number | ||
| AutoFocusPoint | Vector2 | ||
| AutoFocusSpeed | number | 0 to 10 | |
| DenoiseLens | boolean | false | With Denoise on Smooth, averages 8 guide rays a pixel over the lens disc for denoising. |
| FocusDistance | number | 25 0.1 to 10000 | Sets depth of field, together with Aperture. |
| ShutterAngle | number | 0 0 to 360 | Motion-blurs its pictures in a video over that part of each frame, where 360 is a whole frame. |
Bloom
| Bloom | boolean | false | Turns bloom on; off by default, so nothing changes until it is turned on. |
| BloomHDR | boolean | false | In Rendered, adds the glow inside the path tracer, before exposure and tone map. |
| BloomIntensity | number | 1 0 to 10 | |
| BloomSize | number | 24 0 to 56 | |
| BloomThreshold | number | 0.9 0 to 1 | A low threshold makes a bright sky glow as a whole; 0.9 keeps a normal sky out and catches highlights and emissive parts. |
Render
| Bounces | number | 6 1 to 32 | The bounces a traced picture uses once the view settles; while you interact, it uses at most Preview Bounces. |
| Denoise | string | "Detail" Off, Smooth, Detail | A string in Luau, which also takes true for Smooth and false for Off. |
| Dither | boolean | true | Adds noise under one 8-bit level so gradients don't band. |
| Exposure | number | 0 -10 to 10 | |
| FireflyClamp | number | 40 1 to 1000 | Caps one light path's brightness; below 40 it caps bounced light too. |
| ForceSolid | boolean | false | Keeps the camera Solid everywhere, whatever the project's Rendered / Solid switch says, final renders included. |
| Look | string | "Punchy" None, Punchy, Punchy Soft | A colour look; Punchy Soft is a moderate AgX look that doesn't push already saturated colours. |
| NoiseThreshold | number | 0.1 0 to 1 | Pixels keep sampling while their noise is above this; the default 0.1 leaves one level in 255 of noise. |
| PixelFilter | string | "Box" Box, Gaussian | Gaussian uses a 0.5 px sigma cut at 1.5 px and costs nothing extra. |
| PreviewBounces | number | 4 1 to 32 | The bounces the live preview uses while the view moves. |
| PreviewLighting | string | "Off" Off, Sun, Sky | |
| SamplePattern | string | "Random" Random, Even | Even gives less grain than Random at the same Samples. |
| Samples | number | 256 1 to 65536 | |
| Tonemap | string | "AgX" AgX, Neutral, ACES, None | The tone map; AgX applies the Look inside it, Neutral is Khronos PBR Neutral, None just clamps. |
Camera
| CFrame | CFrame | Relative to the chain of NullObjects above it, up to the DataModel. | |
| Color | Color3 | 1, 0.541, 0.239 | Viewports looking through the camera get a border in this colour, and its frustum draws in it in other viewports. |
| FieldOfView | number | 70 1 to 179 | |
| Orientation | Vector3 | The rotation half of CFrame, hidden from Properties. | |
| Orthographic | boolean | false | Draws an orthographic view instead of perspective, as parallel rays from a plane when traced. |
| OrthographicSize | number | 20 0.01 to 100000 | The view's height in studs when the camera is orthographic. |
| Position | Vector3 | The position half of CFrame, hidden from Properties. | |
| Target | DataModel | The DataModel it draws; without one, it draws the DataModel it is in. | |
| LookAt | source | Properties window only | Keeps the camera's position and turns it to look at an instance's pivot or a point. |
Image
| Size | Vector2 | 1280, 720 | The size of the picture it renders. |
| Transparent | boolean | false | Leaves the background empty (alpha 0); renders come out premultiplied. |
Scripts
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| RenderTo | (target: ImageContent) | () | Draws its Target, or else the DataModel it is in, into the image; errors when it has neither. |
Deprecated 1
| Name | Type | Instead | Description |
|---|---|---|---|
| Render | string | use ForceSolid | Deprecated: a read gives what it draws as now, and a write turns Force Solid on or off. |
