RenderableVideoPlane

Inherits Renderable

A RenderablePlane is a renderable that will shows some form of contents projected on a two-dimensional plane, which in turn is placed in three-dimensional space as any other Renderable. It is possible to specify the Size of the plane, whether it should always face the camera (Billboard), and other parameters shown below.

Members

Name

Documentation

Type

Description

Optional

Size

The size of the plane in meters.

Double, or Vector2<double>

Value of type ‘Double’, or Value of type ‘Vector2

No

Video

The video file that is played.

File

Value of type ‘File’

No

AutoScale

Decides whether the plane should automatically adjust in size to match the aspect ratio of the content. Otherwise it will remain in the given size.

Boolean

Value of type ‘Boolean’

Yes

Billboard

Controls whether the plane will be oriented as a billboard. Setting this value to true is the same as setting it to “Camera Position Normal”, setting it to false is the same as setting it to “Fixed Rotation”. If the value is not specified, the default value of false is used instead. “Camera View Direction” rotates the plane so that it is orthogonal to the viewing direction of the camera (useful for planar displays), and “Camera Position Normal” rotates the plane towards the position of the camera (useful for spherical displays, like dome theaters). In both these cases the plane will be billboarded towards the camera but in a slightly different way. In contrast, “Fixed Rotation” does not rotate the plane at all based on the camera and should be used the plane should be oriented in a fixed way.

Boolean, or String

Value of type ‘Boolean’, or In list { Camera View Direction, Camera Position Normal, Fixed Rotation }

Yes

BlendMode

Determines the blending mode that is applied to this plane.

String

In list { Normal, Additive }

Yes

EndTime

The date and time that the video should end in the format ‘YYYY MM DD hh:mm:ss’.

Date and time

Value of type ‘Date and time’

Yes

LoopVideo

If checked, the video is continues playing from the start when it reaches the end of the video.

Boolean

Value of type ‘Boolean’

Yes

MirrorBackside

If false, the image plane will not be mirrored when viewed from the backside. This is usually desirable when the image shows data at a specific location, but not if it is displaying text for example.

Boolean

Value of type ‘Boolean’

Yes

MultiplyColor

An RGB color to multiply with the plane’s texture. Useful for applying a color to grayscale images.

Color3

Value of type ‘Color3’

Yes

PlayAudio

Play audio.

Boolean

Value of type ‘Boolean’

Yes

PlaybackMode

The mode of how the video should be played back. Default is video is played back according to the set start and end times.

String

In list { MapToSimulationTime, RealTimeLoop }

Yes

StartTime

The date and time that the video should start in the format ‘YYYY MM DD hh:mm:ss’.

Date and time

Value of type ‘Date and time’

Yes

Inherited members from Renderable

Name

Documentation

Type

Description

Optional

DimInAtmosphere

Decides if the object should be dimmed (i.e. faded out) when the camera is in the sunny part of an atmosphere.

Boolean

Value of type ‘Boolean’

Yes

Enabled

Determines whether this object will be visible or not.

Boolean

Value of type ‘Boolean’

Yes

Opacity

This value determines the opacity of this renderable. A value of 0 means completely transparent.

Double

In range: ( 0,1 )

Yes

RenderBinMode

A value that specifies if the renderable should be rendered in the Background, Opaque, Pre-/PostDeferredTransparency, Overlay, or Sticker rendering step.

String

In list { Background, Opaque, PreDeferredTransparent, Overlay, PostDeferredTransparent, Sticker }

Yes

Tag

A single tag or a list of tags that this renderable will respond to when setting properties.

Table, or String

Value of type ‘Table’, or Value of type ‘String’

Yes

Type

The type of the renderable.

String

Value of type ‘String’

Yes

Asset Examples

 1-- To learn how you can include your own video, see the wiki
 2-- http://wiki.openspaceproject.com/docs/builders/assets/resources.html
 3
 4local transforms = asset.require("scene/solarsystem/planets/earth/transforms")
 5
 6
 7
 8local Plane = {
 9  Identifier = "VideoPlaneExample",
10  Parent = transforms.EarthCenter.Identifier,
11  Transform = {
12    Translation = {
13      Type = "StaticTranslation",
14      Position = { 0.0, -11E7, 0.0 }
15    }
16  },
17  Renderable = {
18    Type = "RenderableVideoPlane",
19    MirrorBackside = true,
20    Size = 3E7,
21    Video = asset.resource("examplevideo.mp4"),
22  },
23  GUI = {
24    Name = "Video Plane Example",
25    Path = "/Other/Planes"
26  }
27}
28
29
30asset.onInitialize(function()
31  openspace.addSceneGraphNode(Plane)
32end)
33
34asset.onDeinitialize(function()
35  openspace.removeSceneGraphNode(Plane)
36end)
37
38asset.export(Plane)
39
40
41
42asset.meta = {
43  Name = "Video Plane Example",
44  Description = "An example asset that shows how to include a video on a plane.",
45  Author = "OpenSpace Team",
46  URL = "https://openspaceproject.com",
47  License = "MIT"
48}