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.


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
-- 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 = 45Properties
World
| Name | Type | Default | Description |
|---|---|---|---|
| Ambient | Color3 | 0, 0, 0 | A flat fill from every side that nothing blocks, on every lit surface; black, the default, is off. |
| Background | Color3 | 0.063, 0.071, 0.086 | The colour the picture is cleared to when the DataModel has no Parts. |
| EnergyKeeping | boolean | false | |
| ExposureCompensation | number | 0 -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. |
| PhysicalLight | boolean | false | Makes Rendered light the scene physically; it changes only Rendered. |
| SkyStrength | number | 1 0 to 20 | Multiplies the sky colours in the path tracer; Solid uses them as they are. |
| SolidSun | boolean | false | |
| SunAngle | number | 1.5 0.05 to 45 | The cone the path tracer samples the sun over, giving soft shadows. |
| SunAzimuth | number | 115 -360 to 360 | |
| SunElevation | number | 38 -90 to 90 | |
| SunStrength | number | 6 0 to 100 | Set it to 0 to light the scene by the Sky Image alone: the sun stays separate from it. |
Advanced
Sky
| CelestialBodiesShown | boolean | true | |
| ClockTime | number | 14 0 to 24 | The time of day for Day Sky, 0 to 24 hours; a key on it is a time-lapse. |
| DaySky | boolean | false | Sets the sun, the moon and the three sky colours from Clock Time; those fields show locked while it is on. |
| MoonImage | ImageContent | ||
| PhysicalSkyExposure | number | 0 -16 to 16 | |
| PhysicalSkyStrength | number | 1 0 to 20 | |
| PhysicalSkyTint | Color3 | 1, 1, 1 | |
| SkyGround | Color3 | 0.35, 0.34, 0.335 | The ground colour of the sky gradient, which a Sky Image replaces. |
| SkyHorizon | Color3 | 0.63, 0.73, 0.87 | The horizon colour of the sky gradient, which a Sky Image replaces. |
| SkyImage | ImageContent | An equirectangular panorama that replaces the sky gradient in both renderers and, when traced, lights the scene too. | |
| SkyPolarization | number | 0 0 to 1 | Makes the sky mirrored in water take polarised skylight in Rendered, 0 to 1; 0, the default, is off. |
| SkyPolarizationColor | Color3 | 1, 0.2, 0.1 | |
| SkyPolarizationMask | ImageContent | ||
| SkySunLight | boolean | false | |
| SkyTop | Color3 | 0.3, 0.49, 0.79 | The top colour of the sky gradient, which a Sky Image replaces. |
| SkyboxOrientation | Vector3 | 0, 0, 0 | |
| Stars | number | 0.5 0 to 1 | How dense the stars are, 0 to 1; it can be keyed. |
| SunImage | ImageContent | ||
| SunScale | number | 1 0 to 10 |
Camera
Simulation
| Gravity | number | 196.2 -10000 to 10000 | The simulation's gravity, like Roblox's Workspace.Gravity. |
| SimulationStatus | read-only text | Properties window only | Says what is baked; a baked DataModel plays its bake instead of simulating live. |
| Bake | button | Properties window only | Keeps the simulation's result so it can be scrubbed in Edit. |
| FreeBake | button | A bake made before a scene edit still plays: press Free bake, then Bake again. |
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| BakeSimulation | (path: string?) | () | Bakes like the Bake button; given a path, the baked data goes in that file beside the project instead. |
| FreeSimulation | () | boolean | The 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. |
