ScreenSpaceVideo
Inherits ScreenSpaceRenderable
Can be used to render a video in front of the camera.
The video can either be played back based on a given simulation time (PlaybackMode MapToSimulationTime) or through the user interface (for PlaybackMode RealTimeLoop). It is also possible to control whether the video should loop or just be played once.
Note that, unless playback is mapped to simulation time, the video must be started manually via the user interface.
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The type of the |
|
Must name a valid ScreenSpaceRenderable |
No |
|
The video file that is played. |
|
Value of type ‘File’ |
No |
|
A fixed color that is combined with the screen space renderable to create the final color. The actual color of the screen space renderable is alpha-blended with the background color to produce the final result. |
|
Value of type ‘Color4’ |
Yes |
|
The color of the border. |
|
Value of type ‘Color3’ |
Yes |
|
If this value is enabled and a border width is set, the border will be rendered as a feathered border rather than a hard corner. |
|
Value of type ‘Boolean’ |
Yes |
|
The width of the border. |
|
Greater than: 0 |
Yes |
|
Determines the position of this screen space plane in Cartesian three-dimensional coordinates (meters). |
|
Value of type ‘Vector3 |
Yes |
|
Determines whether this sceen space object will be rendered or not. |
|
Value of type ‘Boolean’ |
Yes |
|
The date and time that the video should end in the format ‘YYYY MM DD hh:mm:ss’. |
|
Value of type ‘Date and time’ |
Yes |
|
If enabled, the object will be rotated to face the camera position. Any local rotation is then applied after this rotation. |
|
Value of type ‘Boolean’ |
Yes |
|
Sets the gamma correction of the texture that is applied in addition to the global gamma value. |
|
Value of type ‘Double’ |
Yes |
|
The unique identifier for this screen space renderable. It has to be unique amongst all existing screen space nodes that have been added to the scene. |
|
An identifier string. May not contain ‘.’, spaces, newlines, or tabs |
Yes |
|
If checked, the video is continues playing from the start when it reaches the end of the video. |
|
Value of type ‘Boolean’ |
Yes |
|
If set, the plane’s texture is multiplied with this color. Useful for applying a color grayscale images. |
|
Value of type ‘Color3’ |
Yes |
|
The name of the |
|
Value of type ‘String’ |
Yes |
|
The opacity of the screen space object. If 1, the object is completely opaque. If 0, the object is completely transparent. |
|
In range: ( 0, 1) |
Yes |
|
Decides whether to play audio when playing back the video. |
|
Value of type ‘Boolean’ |
Yes |
|
The mode of how the video is played back. The Default is |
|
In list { MapToSimulationTime, RealTimeLoop } |
Yes |
|
The delay, in milliseconds, that the system will wait before issuing the play command. A higher value will increase the time it takes for the video to start but may result in a more synchronized playback start. |
|
Value of type ‘Integer’ |
Yes |
|
Determines the position of this screen space plane in a coordinate system based on radius (meters), azimuth (radians), and elevation (radians). |
|
Value of type ‘Vector3 |
Yes |
|
If true, this screen space renderable is going to ignore the global blackout factor from the Render Engine and will always render at full opacity. If false, it will adhere to the factor and fade out like the rest of the 3D rendering. |
|
Value of type ‘Boolean’ |
Yes |
|
An Euler rotation (x, y, z) to apply to the screen space object. |
|
Value of type ‘Vector3 |
Yes |
|
A scale factor for the plane that can be used to increase or decrease the visual size. The default size is determined separately for each screen space renderable type and may for example be affected by the size of an image being displayed. |
|
Value of type ‘Double’ |
Yes |
|
The date and time that the video should start in the format ‘YYYY MM DD hh:mm:ss’. |
|
Value of type ‘Date and time’ |
Yes |
|
Defines either a single or multiple tags that apply to this |
|
Value of type ‘String’, or Value of type ‘Table’ |
Yes |
|
Determines whetether the z/radius values affects the size of the plane or not. |
|
Value of type ‘Boolean’ |
Yes |
|
Determines whether the location of this screen space plane will be specified using radius, azimuth and elevation (if ‘true’) or using Cartesian coordinates. The Cartesian coordinate system is useful if a regular rendering is applied, whereas the radius azimuth elevation are most useful in a planetarium environment. |
|
Value of type ‘Boolean’ |
Yes |
Inherited members from ScreenSpaceRenderable
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The type of the |
|
Must name a valid ScreenSpaceRenderable |
No |
|
A fixed color that is combined with the screen space renderable to create the final color. The actual color of the screen space renderable is alpha-blended with the background color to produce the final result. |
|
Value of type ‘Color4’ |
Yes |
|
The color of the border. |
|
Value of type ‘Color3’ |
Yes |
|
If this value is enabled and a border width is set, the border will be rendered as a feathered border rather than a hard corner. |
|
Value of type ‘Boolean’ |
Yes |
|
The width of the border. |
|
Greater than: 0 |
Yes |
|
Determines the position of this screen space plane in Cartesian three-dimensional coordinates (meters). |
|
Value of type ‘Vector3 |
Yes |
|
Determines whether this sceen space object will be rendered or not. |
|
Value of type ‘Boolean’ |
Yes |
|
If enabled, the object will be rotated to face the camera position. Any local rotation is then applied after this rotation. |
|
Value of type ‘Boolean’ |
Yes |
|
Sets the gamma correction of the texture that is applied in addition to the global gamma value. |
|
Value of type ‘Double’ |
Yes |
|
The unique identifier for this screen space renderable. It has to be unique amongst all existing screen space nodes that have been added to the scene. |
|
An identifier string. May not contain ‘.’, spaces, newlines, or tabs |
Yes |
|
If set, the plane’s texture is multiplied with this color. Useful for applying a color grayscale images. |
|
Value of type ‘Color3’ |
Yes |
|
The name of the |
|
Value of type ‘String’ |
Yes |
|
The opacity of the screen space object. If 1, the object is completely opaque. If 0, the object is completely transparent. |
|
In range: ( 0, 1) |
Yes |
|
Determines the position of this screen space plane in a coordinate system based on radius (meters), azimuth (radians), and elevation (radians). |
|
Value of type ‘Vector3 |
Yes |
|
If true, this screen space renderable is going to ignore the global blackout factor from the Render Engine and will always render at full opacity. If false, it will adhere to the factor and fade out like the rest of the 3D rendering. |
|
Value of type ‘Boolean’ |
Yes |
|
An Euler rotation (x, y, z) to apply to the screen space object. |
|
Value of type ‘Vector3 |
Yes |
|
A scale factor for the plane that can be used to increase or decrease the visual size. The default size is determined separately for each screen space renderable type and may for example be affected by the size of an image being displayed. |
|
Value of type ‘Double’ |
Yes |
|
Defines either a single or multiple tags that apply to this |
|
Value of type ‘String’, or Value of type ‘Table’ |
Yes |
|
Determines whetether the z/radius values affects the size of the plane or not. |
|
Value of type ‘Boolean’ |
Yes |
|
Determines whether the location of this screen space plane will be specified using radius, azimuth and elevation (if ‘true’) or using Cartesian coordinates. The Cartesian coordinate system is useful if a regular rendering is applied, whereas the radius azimuth elevation are most useful in a planetarium environment. |
|
Value of type ‘Boolean’ |
Yes |
Asset Examples
Basic
Creates a screenspace video plane that plays a video file. The dimensions of the plane are automatically set to match the aspect ratio of the video.
1-- The video file is here downloaded from a URL. This code returns the path to a folder
2-- where the file is stored after download
3local data = asset.resource({
4 Name = "Example Video",
5 Type = "UrlSynchronization",
6 Identifier = "example_video",
7 Url = "https://liu-se.cdn.openspaceproject.com/files/examples/video/chlorophyll_model_2048.mp4"
8})
9
10-- For a local file, use "asset.resource("path/to/local/video.mp4")" here instead
11local video = data .. "chlorophyll_model_2048.mp4"
12
13local Item = {
14 Name = "ScreenSpaceVideo Example",
15 Type = "ScreenSpaceVideo",
16 Identifier = "ScreenSpaceVideo_Example",
17 Video = video
18}
19
20
21asset.onInitialize(function()
22 openspace.addScreenSpaceRenderable(Item)
23end)
24
25asset.onDeinitialize(function()
26 openspace.removeScreenSpaceRenderable(Item)
27end)