RenderablePlaneTimeVaryingImage

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

Size

This value specifies the size of the plane in meters

Double, or Vector2<double>

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

No

SourceFolder

This value specifies the image directory that is loaded from disk and is used as a texture that is applied to this plane

String

Value of type ‘String’

No

Billboard

This value specifies whether the plane is a billboard, which means that it is always facing the camera. If this is false, it can be oriented using other transformations

Boolean

Value of type ‘Boolean’

Yes

BlendMode

This determines the blending mode that is applied to this plane

String

In list { Normal, Additive }

Yes

MirrorBackside

If this value is set to false, the image plane will not be mirrored when looking 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

If set, the plane’s texture is multiplied with this color. Useful for applying a color grayscale images

Color3

Value of type ‘Color3’

Yes

RenderType

This value specifies if the plane should be rendered in the Background, Opaque, Transparent, or Overlay rendering step

String

In list { Background, Opaque, PreDeferredTransparency, PostDeferredTransparency, Overlay }

Yes

Inherited members from Renderable

Name

Documentation

Type

Description

Optional

DimInAtmosphere

Enables/Disables if the object should be dimmed when the camera is in the sunny part of an atmosphere

Boolean

Value of type ‘Boolean’

Yes

Enabled

This setting 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

This value specifies if the renderable should be rendered in the Background,Opaque, Pre/PostDeferredTransparency, or Overlay 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

This tells 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}
103local ToggleMeridial = {
104  Identifier = "os.bastilleday.fluxnodescutplane.ToggleMeridial",
105  Name = "Toggle meridial cutplane",
106  Command = [[
107    if openspace.propertyValue("Scene.MeridialCutplane-bastille-day-2000.Renderable.Enabled") then
108      openspace.setPropertyValueSingle(
109        "Scene.MeridialCutplane-bastille-day-2000.Renderable.Fade",
110        0.0,
111        openspace.propertyValue("OpenSpaceEngine.FadeDuration"),
112        "Linear",
113        'openspace.setPropertyValueSingle("Scene.MeridialCutplane-bastille-day-2000.Renderable.Enabled", false)'
114      )
115    else
116      openspace.setPropertyValueSingle("Scene.MeridialCutplane-bastille-day-2000.Renderable.Enabled", true)
117      openspace.setPropertyValueSingle(
118        "Scene.MeridialCutplane-bastille-day-2000.Renderable.Fade",
119        1.0,
120        openspace.propertyValue("OpenSpaceEngine.FadeDuration"),
121        "Linear"
122      )
123    end
124  ]],
125  Documentation = "Toggle meridial cutplane of CME",
126  GuiPath = "/Bastille-Day 2000",
127  IsLocal = false
128}
129
130
131asset.onInitialize(function()
132  openspace.action.registerAction(ToggleEquatorial)
133  openspace.action.registerAction(ToggleMeridial)
134  openspace.addSceneGraphNode(EquatorialCutplane)
135  openspace.addSceneGraphNode(MeridialCutplane)
136end)
137
138asset.onDeinitialize(function()
139  openspace.removeSceneGraphNode(MeridialCutplane)
140  openspace.removeSceneGraphNode(EquatorialCutplane)
141  openspace.action.removeAction(ToggleEquatorial)
142  openspace.action.removeAction(ToggleMeridial)
143end)
144
145asset.export("ToggleEquatorial", ToggleEquatorial.Identifier)
146asset.export("ToggleMeridial", ToggleMeridial.Identifier)
147asset.export(EquatorialCutplane)
148asset.export(MeridialCutplane)
149
150
151
152asset.meta = {
153  Name = "Predictive Science Inc. Cutplanes Bastille Days",
154  Version = "1.1",
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}