RenderableVideoSphere
Inherits Renderable
This Renderable represents a simple sphere with an image. The image that is shown should be in an equirectangular projection/spherical panoramic image or else distortions will be introduced. The Orientation parameter determines whether the provided image is shown on the inside, outside, or both sides of the sphere.
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The video file that is played. |
|
Value of type ‘File’ |
No |
|
Controls the blending function used to calculate the colors of the sphere with respect to the opacity. |
|
Value of type ‘String’ |
Yes |
|
Color map / Transfer function to use if |
|
Value of type ‘File’ |
Yes |
|
If disabled, no depth values are taken into account for this sphere, meaning that depth values are neither written or tested against during the rendering. This can be useful for spheres that represent a background image. |
|
Value of type ‘Boolean’ |
Yes |
|
Enables/Disables the fade in and out effects. |
|
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 |
|
The distance from the center of the Milky Way at which the sphere should start to fade in, given as a percentage of the size of the object. A value of zero means that no fading in will happen. |
|
Value of type ‘Double’ |
Yes |
|
A threshold for when the sphere should start fading out, given as a percentage of how much of the sphere that is visible before the fading should start. A value of zero means that no fading out will happen. |
|
In range: ( 0,1 ) |
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 true, mirror the texture along the x-axis. |
|
Value of type ‘Boolean’ |
Yes |
|
Specifies whether the texture is applied to the inside of the sphere, the outside of the sphere, or both. |
|
In list { Outside, Inside, Both } |
Yes |
|
Play audio. |
|
Value of type ‘Boolean’ |
Yes |
|
The mode of how the video should be played back. Default is video is played back according to the set start and end times. |
|
In list { MapToSimulationTime, RealTimeLoop } |
Yes |
|
The number of segments that the sphere is split into. |
|
Greater or equal to: 4 |
Yes |
|
The radius of the sphere in meters. |
|
Greater than: 0 |
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 |
|
Used to toggle color map on or off for the sphere. Mainly used to transform grayscale textures from data into color images. |
|
Value of type ‘Boolean’ |
Yes |
Inherited members from Renderable
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
Decides if the object should be dimmed (i.e. faded out) when the camera is in the sunny part of an atmosphere. |
|
Value of type ‘Boolean’ |
Yes |
|
Determines whether this object will be visible or not. |
|
Value of type ‘Boolean’ |
Yes |
|
This value determines the opacity of this renderable. A value of 0 means completely transparent. |
|
In range: ( 0,1 ) |
Yes |
|
A value that specifies if the renderable should be rendered in the Background, Opaque, Pre-/PostDeferredTransparency, Overlay, or Sticker rendering step. |
|
In list { Background, Opaque, PreDeferredTransparent, Overlay, PostDeferredTransparent, Sticker } |
Yes |
|
A single tag or a list of tags that this renderable will respond to when setting properties. |
|
Value of type ‘Table’, or Value of type ‘String’ |
Yes |
|
The type of the renderable. |
|
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 Sphere = {
5 Identifier = "ExampleVideoOnSphere",
6 Renderable = {
7 Type = "RenderableVideoSphere",
8 Size = 100.0,
9 Segments = 80,
10 Video = asset.resource("examplevideo.mp4"),
11 Orientation = "Both"
12 },
13 GUI = {
14 Name = "Video Sphere Example",
15 Path = "/Other/Spheres"
16 }
17}
18
19
20asset.onInitialize(function()
21 openspace.addSceneGraphNode(Sphere)
22end)
23
24asset.onDeinitialize(function()
25 openspace.removeSceneGraphNode(Sphere)
26end)
27
28asset.export(Sphere)
29
30
31
32asset.meta = {
33 Name = "Video Player on Sphere Example",
34 Description = "An example asset that shows how to include a video on a sphere.",
35 Author = "OpenSpace Team",
36 URL = "https://openspaceproject.com",
37 License = "MIT"
38}