DataModel

A world of its own, with its own sun and sky. Build as many as you like, fill them with parts, lights and cameras, and film any of them.

A low granite plinth on a paved patio before a sunlit cream plaster wall, blue sky above, mid afternoon sun from the front left; on the plinth a blue, a yellow and a red block stacked, with a green ball on top.
Before
The same frame later in the day (the DataModel's Clock Time at 17.2): low warm sunlight and long shadows.
After

After: The DataModel's Clock Time at 17.2, Day Sky on.

A DataModel is a 3D scene with its own sun, sky (Top, Horizon and Ground colours or a SkyImage) and Background colour. With Day Sky on, Clock Time moves the sun, moon and sky; Real skies, on the Sky Image row, puts a real sky in with one click; Physical Light lights Rendered physically. model:RenderTo(image) draws its CurrentCamera's view. model:Raycast(origin, direction) gives the nearest part a ray meets. Gravity drives its simulation, and Simulation > Bake keeps the simulated frames.

Example

Aim the view and set the sunLuau
-- Studio is the scene a new project starts with
local studio = Root.Studio
studio.CurrentCamera.CFrame = CFrame.lookAt(Vector3.new(0, 40, 30), Vector3.new(0, 40, 0))
studio.SunAzimuth = 0
studio.SunElevation = 45

Properties

World

NameTypeDefaultDescription
AmbientColor30, 0, 0A flat fill from every side that nothing blocks, on every lit surface; black, the default, is off.
BackgroundColor30.063, 0.071, 0.086The colour the picture is cleared to when the DataModel has no Parts.
EnergyKeepingbooleanfalse
ExposureCompensationnumber0
-3 to 3
Added to the camera's exposure, in EV, wherever a lit picture is exposed, so +1 doubles the light; the Camera itself never changes.
PhysicalLightbooleanfalseMakes Rendered light the scene physically; it changes only Rendered.
SkyStrengthnumber1
0 to 20
Multiplies the sky colours in the path tracer; Solid uses them as they are.
SolidSunbooleanfalse
SunAnglenumber1.5
0.05 to 45
The cone the path tracer samples the sun over, giving soft shadows.
SunAzimuthnumber115
-360 to 360
SunElevationnumber38
-90 to 90
SunStrengthnumber6
0 to 100
Set it to 0 to light the scene by the Sky Image alone: the sun stays separate from it.

Advanced

Aurorabooleanfalse
AuroraColorColor30.25, 1, 0.55
AuroraStrengthnumber1
0 to 10
ColorShift_BottomColor30, 0, 0
ColorShift_TopColor30, 0, 0
DayOfYearnumber80
1 to 366
GeographicLatitudenumber40
-90 to 90
MoonAngularSizenumber11
0 to 60
SunAngularSizenumber21
0 to 60
SunHeadingnumber0
-360 to 360

Sky

CelestialBodiesShownbooleantrue
ClockTimenumber14
0 to 24
The time of day for Day Sky, 0 to 24 hours; a key on it is a time-lapse.
DaySkybooleanfalseSets the sun, the moon and the three sky colours from Clock Time; those fields show locked while it is on.
MoonImageImageContent
PhysicalSkyExposurenumber0
-16 to 16
PhysicalSkyStrengthnumber1
0 to 20
PhysicalSkyTintColor31, 1, 1
SkyGroundColor30.35, 0.34, 0.335The ground colour of the sky gradient, which a Sky Image replaces.
SkyHorizonColor30.63, 0.73, 0.87The horizon colour of the sky gradient, which a Sky Image replaces.
SkyImageImageContentAn equirectangular panorama that replaces the sky gradient in both renderers and, when traced, lights the scene too.
SkyPolarizationnumber0
0 to 1
Makes the sky mirrored in water take polarised skylight in Rendered, 0 to 1; 0, the default, is off.
SkyPolarizationColorColor31, 0.2, 0.1
SkyPolarizationMaskImageContent
SkySunLightbooleanfalse
SkyTopColor30.3, 0.49, 0.79The top colour of the sky gradient, which a Sky Image replaces.
SkyboxOrientationVector30, 0, 0
Starsnumber0.5
0 to 1
How dense the stars are, 0 to 1; it can be keyed.
SunImageImageContent
SunScalenumber1
0 to 10

Camera

CurrentCameraCameraThe Camera that draws this DataModel: model:RenderTo(image) is CurrentCamera:RenderTo(image), and errors without one.

Simulation

Gravitynumber196.2
-10000 to 10000
The simulation's gravity, like Roblox's Workspace.Gravity.
SimulationStatusread-only textProperties window onlySays what is baked; a baked DataModel plays its bake instead of simulating live.
BakebuttonProperties window onlyKeeps the simulation's result so it can be scrubbed in Edit.
FreeBakebuttonA bake made before a scene edit still plays: press Free bake, then Bake again.

Methods

NameArgumentsReturnsDescription
BakeSimulation(path: string?)()Bakes like the Bake button; given a path, the baked data goes in that file beside the project instead.
FreeSimulation()booleanThe script form of the Free bake button.
Raycast(origin: Vector3, direction: Vector3, params: RaycastParams?)RaycastResult?Gives the nearest part a ray meets within the direction's length, as a RaycastResult, or nil; RaycastParams picks which parts count.
RenderTo(target: ImageContent)()Draws the DataModel into the image through its CurrentCamera; errors when there is none.
Revolve(options: {[string]: any})(Instance?, string?)
UseRealModel(id: string)(Instance?, string?)
UseRealSky(id: string)ImageContent?Puts one of the Real skies in the Sky Image, downloaded once, and lines the sun up on it; nil when it couldn't be had.
From Instance 22