RenderableTimeVaryingSphere
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
A directory containing images that are loaded from disk and used for texturing the sphere. The images are expected to be equirectangular projections. |
|
Value of type ‘Directory’ |
No |
|
Controls the blending function used to calculate the colors of the sphere with respect to the opacity. |
|
Value of type ‘String’ |
Yes |
|
Color map / Transfer function to use if |
|
Value of type ‘File’ |
Yes |
|
If disabled, no depth values are taken into account for this sphere, meaning that depth values are neither written or tested against during the rendering. This can be useful for spheres that represent a background image. |
|
Value of type ‘Boolean’ |
Yes |
|
Enables/Disables the fade in and out effects. |
|
Value of type ‘Boolean’ |
Yes |
|
The distance from the center of the Milky Way at which the sphere should start to fade in, given as a percentage of the size of the object. A value of zero means that no fading in will happen. |
|
Value of type ‘Double’ |
Yes |
|
A threshold for when the sphere should start fading out, given as a percentage of how much of the sphere that is visible before the fading should start. A value of zero means that no fading out will happen. |
|
In range: ( 0,1 ) |
Yes |
|
If true, mirror the texture along the x-axis. |
|
Value of type ‘Boolean’ |
Yes |
|
Specifies whether the texture is applied to the inside of the sphere, the outside of the sphere, or both. |
|
In list { Outside, Inside, Both } |
Yes |
|
The number of segments that the sphere is split into. |
|
Greater or equal to: 4 |
Yes |
|
The radius of the sphere in meters. |
|
Greater than: 0 |
Yes |
|
Used to toggle color map on or off for the sphere. Mainly used to transform grayscale textures from data into color images. |
|
Value of type ‘Boolean’ |
Yes |
Inherited members from Renderable
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
Decides if the object should be dimmed (i.e. faded out) when the camera is in the sunny part of an atmosphere. |
|
Value of type ‘Boolean’ |
Yes |
|
Determines whether this object will be visible or not. |
|
Value of type ‘Boolean’ |
Yes |
|
This value determines the opacity of this renderable. A value of 0 means completely transparent. |
|
In range: ( 0,1 ) |
Yes |
|
A value that specifies if the renderable should be rendered in the Background, Opaque, Pre-/PostDeferredTransparency, Overlay, or Sticker rendering step. |
|
In list { Background, Opaque, PreDeferredTransparent, Overlay, PostDeferredTransparent, Sticker } |
Yes |
|
A single tag or a list of tags that this renderable will respond to when setting properties. |
|
Value of type ‘Table’, or Value of type ‘String’ |
Yes |
|
The type of the renderable. |
|
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.sun.ToggleEuv",
37 Name = "Toggle EUV layer",
38 Command = [[
39 openspace.toggleFade("Scene.EUV-Layer-bastille-day-2000.Renderable")
40 ]],
41 Documentation = "Toggle EUV layer of sun",
42 GuiPath = "/Bastille-Day 2000",
43 IsLocal = false
44}
45
46
47asset.onInitialize(function()
48 openspace.action.registerAction(ToggleEuv)
49 openspace.addSceneGraphNode(EUVLayer)
50end)
51
52asset.onDeinitialize(function()
53 openspace.removeSceneGraphNode(EUVLayer)
54 openspace.action.removeAction(ToggleEuv)
55end)
56
57asset.export("ToggleEuv", ToggleEuv.Identifier)
58asset.export(EUVLayer)
59
60
61
62asset.meta = {
63 Name = "Predictive Science Inc. EUV texture sequence Bastille Days",
64 Description = [[Texture sequence of an extreme ultraviolet (EUV) simulation during the CME]],
65 Author = "CCMC, OpenSpace team",
66 URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
67 License = "CC-BY"
68}