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

Specifies whether the plane should be a billboard, which means that it is always facing the camera. If it is not, it can be oriented using other transformations.

Boolean

Value of type ‘Boolean’

Yes

BlendMode

Determines the blending mode that is applied to this plane.

String

In list { Normal, Additive }

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, PostDeferredTransparent, Overlay }

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

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