RenderableTimeVaryingSphere

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

TextureSource

A directory containing images that are loaded from disk and used for texturing the sphere. The images are expected to be equirectangular projections.

Directory

Value of type ‘Directory’

No

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

Asset Examples

 1local transforms = asset.require("./transforms")
 2
 3
 4
 5local textureSourcePath = asset.resource({
 6  Type = "HttpSynchronization",
 7  Name = "euv_textures_bastille_event",
 8  Identifier = "euv_textures_bastille_event",
 9  Version = 1
10})
11
12
13local EUVLayer = {
14  Identifier = "EUV-Layer-bastille-day-2000",
15  Parent = transforms.SunIAU.Identifier,
16  -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale.
17  -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05,
18  InteractionSphere = 696000000,
19  Renderable = {
20    Type = "RenderableTimeVaryingSphere",
21    Size = 6.96E8, -- Slightly bigger than the sun renderable,
22    Enabled = true,
23    TextureSource = textureSourcePath,
24    Opacity = 1,
25    Segments = 132
26  },
27  GUI = {
28    Name = "EUV Layer",
29    Path = "/Solar System/Sun",
30    Description = [[Texture sequence of an extreme ultra violet (EUV) simulation, during
31      the CME. This asset contains data from 2000-07-14 08:38 to 2000-07-14 19:48]]
32  }
33}
34
35local ToggleEuv = {
36  Identifier = "os.solarsystem.ToggleEuv",
37  Name = "Toggle EUV layer",
38  Command = [[
39    if openspace.propertyValue("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled") then
40      openspace.setPropertyValueSingle(
41        "Scene.EUV-Layer-bastille-day-2000.Renderable.Fade",
42        0.0,
43        openspace.propertyValue("OpenSpaceEngine.FadeDuration"),
44        "Linear",
45        'openspace.setPropertyValueSingle("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled", false)'
46      )
47    else
48      openspace.setPropertyValueSingle("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled", true)
49      openspace.setPropertyValueSingle(
50        "Scene.EUV-Layer-bastille-day-2000.Renderable.Fade",
51        1.0,
52        openspace.propertyValue("OpenSpaceEngine.FadeDuration"),
53        "Linear"
54      )
55    end
56  ]],
57  Documentation = "Toggle EUV layer of sun",
58  GuiPath = "/Bastille-Day 2000",
59  IsLocal = false
60}
61
62
63asset.onInitialize(function()
64  openspace.action.registerAction(ToggleEuv)
65  openspace.addSceneGraphNode(EUVLayer)
66end)
67
68asset.onDeinitialize(function()
69  openspace.removeSceneGraphNode(EUVLayer)
70  openspace.action.removeAction(ToggleEuv)
71end)
72
73asset.export("ToggleEuv", ToggleEuv.Identifier)
74asset.export(EUVLayer)
75
76
77
78asset.meta = {
79  Name = "Predictive Science Inc. EUV texture sequence Bastille Days",
80  Description = [[Texture sequence of an extreme ultraviolet (EUV) simulation during the CME]],
81  Author = "CCMC, OpenSpace team",
82  URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
83  License = "CC-BY"
84}