Image2D

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

An Image2D is an ImageContent that draws itself over its DataModel's picture: Size is its pixels, DisplaySize how big it is drawn at Position, from the top-left. Give it a file (Path), 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. An image dropped into a scene viewport, but not on a part, becomes one.

Example

Draw one picture onto anotherLuau
local studio = Root.Sandbox.DataModels.Studio
local canvas = Instance.new("Image2D", studio)
canvas.Name = "Canvas"
canvas.Position = Vector2.new(700, 60)
canvas.Size = Vector2.new(400, 300)
canvas.DisplaySize = Vector2.new(400, 300)
local badge = Instance.new("Image2D")
badge.Position = Vector2.new(200, 100)
badge.Size = Vector2.new(160, 160)
badge.DisplaySize = Vector2.new(160, 160)
Root.Images.Checker:DrawOnto(badge)
badge:DrawOnto(canvas)

Properties

Layout

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

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.

Image

SamplingModestring"Linear"
Linear, Nearest
Nearest draws it with nearest-pixel filtering for this draw only; the texture's own filtering elsewhere is untouched.
From Base2D 19
From BaseImageContent 8
From Instance 22