RenderableFieldlinesSequence

Inherits Renderable

This Renderable visualizes field lines, mainly a sequence of time steps but works with only one time step, too. A sequence is a data source consisting of multiple data files that each correspond to a specific time and is therefore time varying like the name of the renderable suggests.

LoadingType can be specified in two ways;

  1. StaticLoading: In this case all data is loaded when starting OpenSpace. A SourceFolder is then required. The data format is also required to be set with InputFileType.

  2. DynamicDownloading: This case downloads the data during runtime. For this, a few parameters are required: InfoURL together with DataID will construct a URL that is used for a HTTP request that returns meta data. DataURL and DataID, together with this meta data, will be used in constructing another HTTP request that returns the list with data files. The DataID specify which data source to use.

When using CDF data SeedPointDirectory is required. Some prior knowledge of the data is needed to use it in this way. TracingVariable needs to be set and ExtraVariables will have to match what parameters are in the CDF data. Using CDF directly in this Renderable is not recommended. Rather use the KameleonVolumeToFieldlinesTask task first, to save the data to .osfls or .json.

Members

Name

Documentation

Type

Description

Optional

InputFileType

Specify the file format of the data used.

String

In list { Cdf, Json, Osfls }

No

AlphaBlendingEnabled

Activate/deactivate additive blending.

Boolean

Value of type ‘Boolean’

Yes

CacheData

Decides whether or not to cache the downloaded data between runs. By default, caching is disabled and all downloaded content will be deleted when OpenSpace is shut down. Set to true to save all the downloaded files.

Boolean

Value of type ‘Boolean’

Yes

Color

The uniform color of lines shown when ‘Color Method’ is set to ‘Uniform’.

Color4

Value of type ‘Color4’

Yes

ColorMethod

Color lines uniformly or using color tables based on extra quantities like, for examples, temperature or particle density.

String

In list { Uniform, By Quantity }

Yes

ColorMinMaxRange

A min-max range for what the lowest and highest values of the color table can be set to.

Vector2<double>

Value of type ‘Vector2

Yes

ColorQuantity

Quantity used to color lines if the ‘By Quantity’ color method is selected.

Integer

Value of type ‘Integer’

Yes

ColorTablePaths

A list of paths to transferfunction .txt files containing color tables used for colorizing the fieldlines according to different parameters.

Table

Table parameters

Yes

ColorTableRanges

Ranges for which their corresponding parameters values will be colorized by. Should be entered as min value, max value.

Table

Table parameters

Yes

DataID

A data ID that corresponds to what dataset to use if using dynamic data downloading.

Integer

Value of type ‘Integer’

Yes

DataURL

A URL to a JSON-formatted page with a list of each available data file. Required if using dynamic downloading.

String

Value of type ‘String’

Yes

DomainEnabled

Enable/Disable domain limits.

Boolean

Value of type ‘Boolean’

Yes

ExtraVariables

Extra variables that can be used to color the field lines.

Table

Table parameters

Yes

FlowColor

Color of particles flow direction indication.

Color4

Value of type ‘Color4’

Yes

FlowEnabled

Toggles the rendering of moving particles along the lines. Can, for example, illustrate magnetic flow.

Boolean

Value of type ‘Boolean’

Yes

FlowSpeed

Speed of the flow.

Integer

Value of type ‘Integer’

Yes

InfoURL

A URL to a JSON-formatted page with metadata for the DataURL. Required if using dynamic downloading.

String

Value of type ‘String’

Yes

LineWidth

This value specifies the line width of the fieldlines.

Double

Value of type ‘Double’

Yes

LoadingType

Choose type of loading: StaticLoading: Download and load files on startup. DynamicDownloading: Download and load files during run time.

String

In list { StaticLoading, DynamicDownloading }

Yes

ManualTimeOffset

If data sets parameter start_time differ from start of run, elapsed_time_in_seconds might be in relation to start of run. ManuelTimeOffset will be added to trigger time.

Double

Value of type ‘Double’

Yes

MaskingEnabled

Enable/disable masking. Use masking to show lines where a given quantity is within a given range, for example, if you only want to see where the temperature is between 10 and 20 degrees. Also used for masking out line topologies like solar wind & closed lines.

Boolean

Value of type ‘Boolean’

Yes

MaskingMinMaxRange

Ranges for which their corresponding parameters values will be masked by. Should be entered as a min value, max value pair.

Vector2<double>

Value of type ‘Vector2

Yes

MaskingQuantity

Quantity used for masking.

Integer

Value of type ‘Integer’

Yes

MaskingRanges

Ranges for which their corresponding quantity parameter value will be masked by. Should be entered as a list of min value, max value pairs.

Table

Table parameters

Yes

NumberOfFilesToQueue

A maximum number to limit the number of files being downloaded simultaneously.

Integer

Value of type ‘Integer’

Yes

ParticleSize

Size of the particles.

Integer

Value of type ‘Integer’

Yes

ParticleSpacing

Spacing inbetween particles.

Integer

Value of type ‘Integer’

Yes

ReversedFlow

Toggle to make the flow move in the opposite direction.

Boolean

Value of type ‘Boolean’

Yes

ScaleToMeters

Convert the models distance unit, ex. AU to meters for Enlil. 1.0 is default, assuming meters as input. Does not need to be specified if simulationModel is specified. When using a different model, use this value to scale your vertex positions to meters.

Double

Value of type ‘Double’

Yes

SeedPointDirectory

Path to a directory including .txt files that contain seed points. The files need a file name with a timestamp in the format: yyyymmdd_hhmmss.txt. Required if CDF is used as input.

Directory

Value of type ‘Directory’

Yes

ShowAtAllTimes

Set if first/last file should render when time is outside of the sequence interval. This can be used regardless of LoadingType. If this value is not specified, the field lines are shown at all times.

Boolean

Value of type ‘Boolean’

Yes

SimulationModel

If the simulation model is not specified, it means that the scaleFactor (scaleToMeters) will be 1.0 assuming meter as input.

String

In list { Batsrus, Enlil, Pfss }

Yes

SourceFolder

Path to folder containing the input files.

Directory

Value of type ‘Directory’

Yes

TracingVariable

Which variable in CDF file that represents which vector field in the data to trace field lines in.

String

Value of type ‘String’

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 ColorTablePaths

A list of paths to transferfunction .txt files containing color tables used for colorizing the fieldlines according to different parameters.

  • Optional: Yes

Name

Documentation

Type

Description

Optional

*

File

Value of type ‘File’

Yes

Table parameters for ColorTableRanges

Ranges for which their corresponding parameters values will be colorized by. Should be entered as min value, max value.

  • Optional: Yes

Name

Documentation

Type

Description

Optional

*

Vector2<double>

Value of type ‘Vector2

Yes

Table parameters for ExtraVariables

Extra variables that can be used to color the field lines.

  • Optional: Yes

Name

Documentation

Type

Description

Optional

*

String

Value of type ‘String’

Yes

Table parameters for MaskingRanges

Ranges for which their corresponding quantity parameter value will be masked by. Should be entered as a list of min value, max value pairs.

  • Optional: Yes

Name

Documentation

Type

Description

Optional

*

Vector2<double>

Value of type ‘Vector2

Yes

Asset Examples

 1local transforms = asset.require("./transforms")
 2
 3
 4
 5local data = asset.resource({
 6  Type = "HttpSynchronization",
 7  Name = "Ganymede Plane Simulations",
 8  Identifier = "juice_ganymede_fieldlines",
 9  Version = 1
10})
11
12
13local GanymedeMagnetosphere = {
14  Identifier = "GanymedeMagnetosphere",
15  Parent = transforms.GPHIO.Identifier,
16  Renderable = {
17    Type = "RenderableFieldlinesSequence",
18    SourceFolder = data,
19    LineWidth = 3.0,
20    InputFileType = "Json",
21    ShowAtAllTimes = true,
22    ColorMethod = "By Quantity",
23    ColorQuantity = 0,
24    ColorTableRanges = { { 62.556353386366766, 1665.5534182835445} },
25    ColorMinMaxRange = { 0, 10000 },
26    ColorTablePaths = { asset.resource("CMR-illuminance2.txt") },
27    Color = { 1.0, 0.725, 0.75, 0.8 },
28    ParticleSpacing = 42.0,
29    ParticleSize = 30.0,
30    FlowColor = { 1.0, 1.0, 1.0, 0.1 },
31    DomainEnabled = false
32
33  },
34  GUI = {
35    Name = "Ganymede Magnetosphere",
36    Path = "/Solar System/Missions/Juice/Fieldlines",
37    Description = "Fieldlines showing a simulation of the magnetic fields around Ganymede"
38  }
39}
40
41
42asset.onInitialize(function()
43  openspace.addSceneGraphNode(GanymedeMagnetosphere)
44end)
45
46asset.onDeinitialize(function()
47  openspace.removeSceneGraphNode(GanymedeMagnetosphere)
48end)
49
50
51
52asset.meta = {
53  Name = "Static fieldline representation of Ganymede's magnetic field",
54  Description = [[
55    Showing a single timestep of the magnetic fieldlines around Ganymede in the GPHIO
56    coordinate system
57  ]],
58  Author = "OpenSpace Team",
59  URL = "http://openspaceproject.com",
60  License = "MIT license"
61}