RenderableStars

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

ColorMap

The path to the texture that is used to convert from the B-V value of the star to its color. The texture is used as a one dimensional lookup function.

File

Value of type ‘File’

No

DataMapping

The mappings between data values and the variable names specified in the SPECK file.

Table

Table parameters

No

File

The path to the SPECK file containing the data for rendering these stars.

File

Value of type ‘File’

No

Glare

Settings for the glare portion of the star.

Table

Table parameters

No

ColorOption

This value determines which quantity is used for determining the color of the stars.

String

In list { Color, Velocity, Speed, Other Data, Fixed Color }

Yes

Core

Settings for the central core portion of the star.

Table

Table parameters

Yes

EnableFadeIn

Enables/Disables the Fade-in effect.

Boolean

Value of type ‘Boolean’

Yes

FadeInDistances

These values determine the initial and final distances from the center of our galaxy from which the astronomical object will start and end fading-in.

Vector2<double>

Value of type ‘Vector2

Yes

FilterOutOfRange

Determines whether other data values outside the value range should be visible or filtered away.

Boolean

Value of type ‘Boolean’

Yes

MagnitudeExponent

Adjust star magnitude by 10^MagnitudeExponent. Stars closer than this distance are given full opacity. Farther away, stars dim proportionally to the logarithm of their distance.

Double

Value of type ‘Double’

Yes

OtherData

The index of the SPECK file data column that is used as the color input.

String

Value of type ‘String’

Yes

OtherDataColorMap

The color map that is used if the ‘Other Data’ rendering method is selected.

File

Value of type ‘File’

Yes

SizeComposition

Method to determine the size for the stars.

String

In list { Distance Modulus, App Brightness, Lum and Size, Abs Magnitude, App Magnitude }

Yes

StaticFilter

Specifies a value that is always filtered out of the value ranges on load. This can be used to trim the dataset’s automatic value range.

Double

Value of type ‘Double’

Yes

StaticFilterReplacement

A value that is used to replace statically filtered values. Setting this value only makes sense if StaticFilter is set as well.

Double

Value of type ‘Double’

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

Table parameters for DataMapping

The mappings between data values and the variable names specified in the SPECK file.

  • Optional: No

Name

Documentation

Type

Description

Optional

AbsoluteMagnitude

The name of the variable in the SPECK file that is used as the absolute magnitude variable.

String

Value of type ‘String’

Yes

Bv

The name of the variable in the SPECK file that is used as the b-v color variable.

String

Value of type ‘String’

Yes

Luminance

The name of the variable in the SPECK file that is used as the luminance variable.

String

Value of type ‘String’

Yes

Speed

The name of the variable in the SPECK file that is used as the speed.

String

Value of type ‘String’

Yes

Vx

The name of the variable in the SPECK file that is used as the star velocity along the x-axis.

String

Value of type ‘String’

Yes

Vy

The name of the variable in the SPECK file that is used as the star velocity along the y-axis.

String

Value of type ‘String’

Yes

Vz

The name of the variable in the SPECK file that is used as the star velocity along the z-axis.

String

Value of type ‘String’

Yes

Table parameters for Glare

Settings for the glare portion of the star.

  • Optional: No

Name

Documentation

Type

Description

Optional

Gamma

An individual gamma exponent for this texture component. Using the multiplier and gamma values for both components, it is possible to finetune the look of the stars.

Double

Value of type ‘Double’

Yes

Multiplier

An individual multiplication factor for this texture component. Using the multiplier and gamma values for both components, it is possible to fine tune the look of the stars or disable the contributions altogether by setting it to 0.

Double

Value of type ‘Double’

Yes

Scale

A uniform scale factor that determines how much of the total size of the star this component is using. If it is 0, it will be hidden. If it is 1, it will take the entire size.

Double

Value of type ‘Double’

Yes

Texture

The path to the texture that should be used.

File

Value of type ‘File’

No

Table parameters for Core

Settings for the central core portion of the star.

  • Optional: Yes

Name

Documentation

Type

Description

Optional

Gamma

An individual gamma exponent for this texture component. Using the multiplier and gamma values for both components, it is possible to finetune the look of the stars.

Double

Value of type ‘Double’

Yes

Multiplier

An individual multiplication factor for this texture component. Using the multiplier and gamma values for both components, it is possible to fine tune the look of the stars or disable the contributions altogether by setting it to 0.

Double

Value of type ‘Double’

Yes

Scale

A uniform scale factor that determines how much of the total size of the star this component is using. If it is 0, it will be hidden. If it is 1, it will take the entire size.

Double

Value of type ‘Double’

Yes

Texture

The path to the texture that should be used.

File

Value of type ‘File’

No

Asset Examples

 1local textures = asset.resource({
 2  Name = "Stars Textures",
 3  Type = "HttpSynchronization",
 4  Identifier = "stars-denver_textures",
 5  Version = 1
 6})
 7
 8local speck = asset.resource({
 9  Name = "Stars Speck Files",
10  Type = "HttpSynchronization",
11  Identifier = "stars-denver_speck",
12  Version = 1
13})
14
15local colorLUT = asset.resource({
16  Name = "Stars Color Table",
17  Type = "HttpSynchronization",
18  Identifier = "stars-denver_colormap",
19  Version = 2
20})
21
22
23local Object = {
24  Identifier = "Stars-Denver",
25  Renderable = {
26    Type = "RenderableStars",
27    File = speck .. "denver_stars.speck",
28    Glare = {
29      Texture = textures .. "halo.png"
30    },
31    ColorMap = colorLUT .. "denver_colorbv.cmap",
32    MagnitudeExponent = 6.2,
33    SizeComposition = "Distance Modulus",
34    DataMapping = {
35      Bv = "colorb_v",
36      Luminance = "lum",
37      AbsoluteMagnitude = "absmag",
38      ApparentMagnitude = "appmag",
39      Vx = "vx",
40      Vy = "vy",
41      Vz = "vz",
42      Speed = "speed"
43    }
44  },
45  GUI = {
46    Name = "Stars (Denver)",
47    Path = "/Milky Way/Stars"
48  }
49}
50
51
52asset.onInitialize(function()
53  openspace.addSceneGraphNode(Object)
54end)
55
56asset.onDeinitialize(function()
57  openspace.removeSceneGraphNode(Object)
58end)
59
60asset.export(Object)
61
62
63
64asset.meta = {
65  Name = "Stars Denver",
66  Description = [[Alternative Milky Way Atlas: based on HIPPARCOS and Yale Bright
67    Star catalogs]],
68  Author = "Ka chun Yu",
69  URL = "http://openspaceproject.com",
70  License = "Creative Commons Attribution-Share Alike 3.0 Unported"
71}