ViewportFrame
GuiObject that renders 3D objects inside its bounds.
Memory category | Gui |
---|
Member index 10
Description
ViewportFrame
is a GuiObject that renders 3D objects inside its
bounds, offering a way to display 3D objects in a 2D space like a
ScreenGui. This object has the following caveats:
No shadows or post-processing effects are rendered.
Material.Neon and Material.Glass materials render at the lowest quality.
Nested GuiObjects aren't supported.
By default, lighting inside a
ViewportFrame
acts as if Lighting.EnvironmentSpecularScale and Lighting.EnvironmentDiffuseScale are both set to0
, so properties that rely on these fields, such as SurfaceAppearance.MetalnessMap, may look different.This object can use a Sky child as a cubemap for reflections, in which case only the Sky object's six
Skybox[…]
properties are used. Assuming these properties are valid, lighting inside theViewportFrame
acts similarly to if Lighting.EnvironmentSpecularScale and Lighting.EnvironmentDiffuseScale are both set to1
. For details, see here.
History 33
- 645 Change ReturnType of CaptureSnapshotAsync from Content to ContentId
- 599 Add CaptureSnapshotAsync
- 553 Change Default of LightDirection from to Vector3(-1, -1, -1)
- 553 Change Default of LightColor from to Color3(0.54902, 0.54902, 0.54902)
- 553 Change Default of from to false
- 553 Change Default of ImageTransparency from to 0
- 553 Change Default of ImageColor3 from to Color3(1, 1, 1)
- 553 Change Default of CurrentCamera from to
- 553 Add
- 553 Add
- 553 Change Default of Ambient from to Color3(0.784314, 0.784314, 0.784314)
- 540 Add
- 486 Change ThreadSafety of LightDirection from ReadOnly to ReadSafe
- 486 Change ThreadSafety of LightColor from ReadOnly to ReadSafe
- 486 Change ThreadSafety of ImageTransparency from ReadOnly to ReadSafe
- 486 Change ThreadSafety of ImageColor3 from ReadOnly to ReadSafe
- 486 Change ThreadSafety of CurrentCamera from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Ambient from ReadOnly to ReadSafe
- 462 Change ThreadSafety of LightDirection from to ReadOnly
- 462 Change ThreadSafety of LightColor from to ReadOnly
- 462 Change ThreadSafety of ImageTransparency from to ReadOnly
- 462 Change ThreadSafety of ImageColor3 from to ReadOnly
- 462 Change ThreadSafety of CurrentCamera from to ReadOnly
- 462 Change ThreadSafety of Ambient from to ReadOnly
- 384 Add LightDirection
- 384 Add LightColor
- 384 Add Ambient
- 367 Add ImageTransparency
- 367 Add ImageColor3
- 363 Change CanSave of CurrentCamera from true to false
- 363 Change Tags of CurrentCamera from [] to [NotReplicated]
- 361 Add CurrentCamera
- 361 Add ViewportFrame
Members 10
Ambient
Type | Default | |
---|---|---|
Color3 | 0.784314, 0.784314, 0.784314 |
This property determines the lighting hue applied to the area within the
ViewportFrame
. Defaults to
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
CaptureSnapshotAsync
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
ContentId |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 645 Change ReturnType of CaptureSnapshotAsync from Content to ContentId
- 599 Add CaptureSnapshotAsync
CurrentCamera
Type | Default | |
---|---|---|
Camera |
Camera instance that is used to render children objects. Defaults
to nil
.
The Camera object does not replicate so the
ViewportFrame.CurrentCamera won't replicate either. When you set
this property, Camera.CFrame and Camera.FieldOfView will
be saved and replicate with the ViewportFrame
internally so the client
can render the frame without a Camera object.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true/false |
History 6
- 553 Change Default of CurrentCamera from to
- 486 Change ThreadSafety of CurrentCamera from ReadOnly to ReadSafe
- 462 Change ThreadSafety of CurrentCamera from to ReadOnly
- 363 Change CanSave of CurrentCamera from true to false
- 363 Change Tags of CurrentCamera from [] to [NotReplicated]
- 361 Add CurrentCamera
ImageColor3
Type | Default | |
---|---|---|
Color3 | 1, 1, 1 |
This property determines how the rendered viewport image will be
colorized, allowing you to change the color without directly modifying the
rendered object. The default colorization value is
See also ImageTransparency which determines the transparency of the rendered image.
Thread safety | ReadSafe |
---|---|
Category | Image |
Loaded/Saved | true |
History 4
- 553 Change Default of ImageColor3 from to Color3(1, 1, 1)
- 486 Change ThreadSafety of ImageColor3 from ReadOnly to ReadSafe
- 462 Change ThreadSafety of ImageColor3 from to ReadOnly
- 367 Add ImageColor3
ImageTransparency
Type | Default | |
---|---|---|
float | 0 |
This property determines the transparency of the rendered viewport image,
allowing you to change the transparency without directly modifying the
rendered object. A value of 0
(default) is completely opaque and a value
of 1
is completely transparent (invisible).
See also ImageColor3 which determines how the rendered image will be colorized.
Thread safety | ReadSafe |
---|---|
Category | Image |
Loaded/Saved | true |
History 4
- 553 Change Default of ImageTransparency from to 0
- 486 Change ThreadSafety of ImageTransparency from ReadOnly to ReadSafe
- 462 Change ThreadSafety of ImageTransparency from to ReadOnly
- 367 Add ImageTransparency
LightColor
Type | Default | |
---|---|---|
Color3 | 0.54902, 0.54902, 0.54902 |
The color of the emitted light. Defaults to
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
History 4
- 553 Change Default of LightColor from to Color3(0.54902, 0.54902, 0.54902)
- 486 Change ThreadSafety of LightColor from ReadOnly to ReadSafe
- 462 Change ThreadSafety of LightColor from to ReadOnly
- 384 Add LightColor
LightDirection
Type | Default | |
---|---|---|
Vector3 | -1, -1, -1 |
A Vector3 representing the direction of the light source from
position (0, 0, 0)
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
History 4
- 553 Change Default of LightDirection from to Vector3(-1, -1, -1)
- 486 Change ThreadSafety of LightDirection from ReadOnly to ReadSafe
- 462 Change ThreadSafety of LightDirection from to ReadOnly
- 384 Add LightDirection