RenderableHabitableZone

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

EffectiveTemperature

The effective temperature of the corresponding star, in Kelvin. Used to compute the width and size of the disc

Double

Value of type ‘Double’

No

Luminosity

The luminosity of the corresponding star, in units of solar luminosities. Used to compute the width and size of the disc

Double

Value of type ‘Double’

No

Texture

This value is the path to a texture on disk that contains a one-dimensional texture to be used for the color

File

Value of type ‘File’

No

KopparapuTeffInterval

The effective temperature interval for which Kopparapu’s formula is used for the habitable zone computation. For stars with temperatures outside the range, a simpler method by Tom E. Harris is used. This method only uses the star luminosity and does not include computation of the optimistic boundaries

Vector2<double>

Value of type ‘Vector2

Yes

Optimistic

If true, the habitable zone disc is rendered with the optimistic boundaries rather than the conservative ones

Boolean

Value of type ‘Boolean’

Yes

Size

This value specifies the outer radius of the disc in meter

Double

Value of type ‘Double’

Yes

Width

This value is used to set the width of the disc. The actual width is set based on the given size and this value should be set between 0 and 1. A value of 1 results in a full circle and 0.5 a disc with an inner radius of 0.5*size

Double

Value of type ‘Double’

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 transforms = asset.require("./transforms")
 2local textures = asset.require("scene/milkyway/habitable_zones/habitable_zone_textures")
 3
 4
 5
 6local HabitableZone = {
 7  Identifier = "SunHabitableZone",
 8  Parent = transforms.SunEclipJ2000.Identifier,
 9  Renderable = {
10    Type = "RenderableHabitableZone",
11    Enabled = false,
12    Texture = textures.TexturesPath .. "hot_to_cold_faded.png",
13    EffectiveTemperature = 5780, -- Kelvin
14    Luminosity = 1, -- solar
15    Opacity = 0.1,
16    Optimistic = true
17  },
18  GUI = {
19    Name = "Sun Habitable Zone",
20    Path = "/Solar System/Sun",
21    Description = "Habitable zone for the sun in our solar system"
22  }
23}
24
25
26asset.onInitialize(function()
27  openspace.addSceneGraphNode(HabitableZone)
28end)
29
30asset.onDeinitialize(function()
31  openspace.removeSceneGraphNode(HabitableZone)
32end)
33
34asset.export(HabitableZone)
35
36
37
38asset.meta = {
39  Name = "Sun Habitable Zone",
40  Version = "1.1",
41  Description = [[The habitable zone around our sun, computed using formula and
42    coefficients by Kopparapu et al. (2015) https://arxiv.org/abs/1404.5292]],
43  Author = "OpenSpace Team",
44  URL = "http://openspaceproject.com",
45  License = "MIT license"
46}