Image2D

Put any picture over your scene, like a logo, a HUD or a render from another camera. Move it, scale it, blend it and give it shadows and outlines.

A low granite plinth on a paved patio before a sunlit cream plaster wall, blue sky above, mid afternoon sun from the front left; four Parts stand on the plinth, a blue block, a red ball, a yellow cylinder and a green wedge.
Before
The same frame with an Image2D, so Stroke's orange fish picture sits at the top right.
After

After: An Image2D of the fish picture with Display Size 300 by 266 pixels.

An Image2D is an ImageContent that draws itself over its DataModel's picture. Size is its pixels, and DisplaySize is how big it's drawn at Position. Give it a file, render into it or DrawOnto it. It is drawn after the 3D image, so moving it never restarts a path trace. Layer styles under it draw with it. As in Roblox, ImageRectOffset and ImageRectSize crop it and ScaleType slices, tiles, fits or crops it; RobloxClass keeps its ImageLabel or ImageButton class.

Example

Show the camera's view as a picture over the sceneLuau
-- Studio is the scene a new project starts with
local studio = Root.Studio
local cam = studio.CurrentCamera
local view = Instance.new("Image2D", studio)
view.Position = Vector2.new(800, 40)
cam:RenderTo(view)

Properties

Interaction

NameTypeDefault
AutoButtonColorboolean
Selectedboolean

Layout

DisplaySizeVector2200, 200How big it is drawn on screen and where DrawOnto places it as a source; Size is its pixel size.

Image

HoverImagestring
ImageRectOffsetVector20, 0With ImageRectSize, crops the image as Roblox does, before any ScaleType draw.
ImageRectSizeVector20, 0With ImageRectOffset, crops the image as Roblox does, before any ScaleType draw.
PressedImagestring
SamplingModestringLinear
Linear, Nearest
Nearest draws it with nearest-pixel filtering for this draw only; the texture's own filtering elsewhere is untouched.
ScaleTypestringStretch
Stretch, Slice, Tile, Fit, Crop
Stretch, Slice, Tile, Fit or Crop, drawn as Roblox does: Slice's nine pieces, Tile's repeat, Fit's bars or Crop's cut.
SliceCenterMaxVector20, 0
SliceCenterMinVector20, 0
SliceScalenumber1
0 to 1000
Slice's corners are drawn at their pixels times SliceScale, all shrunk alike when the box is too small.
TileSizeOffsetVector20, 0
TileSizeScaleVector21, 1

Scripts

ImageColor3Color3scripts onlyRoblox's name for Color, which Luau takes as an alias.
ImageTransparencynumberscripts onlyRoblox's name for Transparency, which Luau takes as an alias.
ResampleModestringscripts onlyRoblox's name for the sampling: Pixelated is SamplingMode Nearest.

Roblox

RobloxClassstring""
ImageLabel, ImageButton
The class it came as, ImageLabel or ImageButton, which Ctrl+C writes back; one made in Stroke goes as an ImageLabel.
From Base2D 20
From BaseImageContent 8
From Instance 22