RenderablePlaneTimeVaryingImage

Inherits Renderable

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

SourceFolder

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

String

Value of type ‘String’

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

DistanceScalingSettings

Settings for scaling points based on camera distance

Table

Table parameters

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

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