RenderablePlaneTimeVaryingImage

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

SourceFolder

An image directory that is loaded from disk and contains the textures to use for this plane.

Directory

Value of type ‘Directory’

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

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

DistanceScalingSettings

Settings for scaling points based on camera distance.

Table

Table parameters

Yes

Enabled

Determines whether this object will be visible or not.

Boolean

Value of type ‘Boolean’

Yes

LazyLoading

If set to true the images are only loaded when it is about to be shown instead of preloading them.

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

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

Size

The size of the plane in meters.

Double, or Vector2<double>

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

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

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

Table parameters for DistanceScalingSettings

Settings for scaling points based on camera distance.

  • Optional: Yes

Name

Documentation

Type

Description

Optional

ApparentSizeMultiplier

Value that controls the visual size of the object when using distance scaling.A value of 1.0 results in a natural angular size based on camera distance and field of view. Smaller values (e.g., 0.01) make the object appear smaller, while larger values make it appear bigger.

Double

Greater than: 0

Yes

ScaleByDistance

Decides whether the plane should automatically adjust in size to based on the distance to the camera. Otherwise it will remain in the given size.

Boolean

Value of type ‘Boolean’

Yes

ScaleByDistanceMaxHeight

The maximum height in meters a plane can get when using distance scaling.

Double

Greater than: 0

Yes

ScaleByDistanceMinHeight

The minimum height in meters a plane can get when using distance scaling.

Double

Greater than: 0

Yes

Asset Examples

  1local transforms = asset.require("scene/solarsystem/sun/transforms")
  2local transformsHelio = asset.require("scene/solarsystem/heliosphere/transforms_heliosphere")
  3
  4
  5
  6local TexturesPathEquatorial = asset.resource({
  7Type = "HttpSynchronization",
  8  Name = "cutplanes_textures",
  9  Identifier = "cutplanes_textures",
 10  Version = 1
 11})
 12
 13local TexturesPathMeridial = asset.resource({
 14  Type = "HttpSynchronization",
 15  Name = "cutplane_meridial_textures",
 16  Identifier = "cutplane_meridial_textures",
 17  Version = 1
 18})
 19
 20
 21local EquatorialCutplane = {
 22  Identifier = "EquatorialCutplane-bastille-day-2000",
 23  Parent = transforms.SunIAU.Identifier,
 24  -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale.
 25  -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05,
 26  InteractionSphere = 695700000.0,
 27  Renderable = {
 28    Type = "RenderablePlaneTimeVaryingImage",
 29    Size = 157000000000,
 30    Enabled = true,
 31    SourceFolder = TexturesPathEquatorial,
 32    BlendMode = "Normal",
 33    MirrorBackside = false,
 34    Opacity = 0.7
 35  },
 36  GUI = {
 37    Name = "Cutplane Equatorial",
 38    Path = "/Solar System/Heliosphere/Bastille Day 2000",
 39    Focusable = false,
 40    Description = [[Equatorial cutplane sequence for the bastille day CME event. This
 41      asset contains data from 2000-07-14 08:38 to 2000-07-14 12:00]]
 42  }
 43}
 44
 45local MeridialCutplane = {
 46  Identifier = "MeridialCutplane-bastille-day-2000",
 47  Parent = transformsHelio.HeliocentricEarthEquatorial180.Identifier,
 48  -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale.
 49  -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05,
 50  InteractionSphere = 695700000,
 51  Transform = {
 52    Rotation = {
 53      Type = "StaticRotation",
 54      Rotation = { -math.pi/2, -math.pi, 0.0 }
 55    }
 56  },
 57  Renderable = {
 58    Type = "RenderablePlaneTimeVaryingImage",
 59    Size = 157000000000,
 60    Enabled = true,
 61    SourceFolder = TexturesPathMeridial,
 62    BlendMode = "Normal",
 63    MirrorBackside = false,
 64    Opacity = 0.7
 65  },
 66  GUI = {
 67    Name = "Cutplane Meridial",
 68    Path = "/Solar System/Heliosphere/Bastille Day 2000",
 69    Focusable = false,
 70    Description = [[Meridial cutplane sequence for the bastille day CME event. This asset
 71      contains data from 2000-07-14 08:38 to 2000-07-14 12:00]]
 72  }
 73}
 74
 75local ToggleEquatorial = {
 76  Identifier = "os.bastilleday.fluxnodescutplane.ToggleEquatorial",
 77  Name = "Toggle equatorial cutplane",
 78  Command = [[
 79    openspace.toggleFade("Scene.EquatorialCutplane-bastille-day-2000.Renderable")
 80  ]],
 81  Documentation = "Toggle equatorial cutplane of CME",
 82  GuiPath = "/Bastille-Day 2000",
 83  IsLocal = false
 84}
 85
 86local ToggleMeridial = {
 87  Identifier = "os.bastilleday.fluxnodescutplane.ToggleMeridial",
 88  Name = "Toggle meridial cutplane",
 89  Command = [[
 90    openspace.toggleFade("Scene.MeridialCutplane-bastille-day-2000.Renderable")
 91  ]],
 92  Documentation = "Toggle meridial cutplane of CME",
 93  GuiPath = "/Bastille-Day 2000",
 94  IsLocal = false
 95}
 96
 97
 98asset.onInitialize(function()
 99  openspace.action.registerAction(ToggleEquatorial)
100  openspace.action.registerAction(ToggleMeridial)
101  openspace.addSceneGraphNode(EquatorialCutplane)
102  openspace.addSceneGraphNode(MeridialCutplane)
103end)
104
105asset.onDeinitialize(function()
106  openspace.removeSceneGraphNode(MeridialCutplane)
107  openspace.removeSceneGraphNode(EquatorialCutplane)
108  openspace.action.removeAction(ToggleEquatorial)
109  openspace.action.removeAction(ToggleMeridial)
110end)
111
112asset.export("ToggleEquatorial", ToggleEquatorial.Identifier)
113asset.export("ToggleMeridial", ToggleMeridial.Identifier)
114asset.export(EquatorialCutplane)
115asset.export(MeridialCutplane)
116
117
118
119asset.meta = {
120  Name = "Predictive Science Inc. Cutplanes Bastille Days",
121  Description = "Cutplanes for the bastille day CME event",
122  Author = "CCMC, Christian Adamsson, Emilie Ho",
123  URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
124  License = "CC-BY"
125}