RenderableHabitableZone
Inherits Renderable
Represents a star’s habitable zone, with boundaries computed from its effective temperature and luminosity.
The inner and outer boundaries of the habitable zone are computed using formulas from Kopparapu et al. (2013) for an Earth-like rocky planet. The model defines both optimistic and conservative boundaries: the optimistic range includes regions where liquid water could exist (assuming Venus and Mars once had it), while the conservative range is more restrictive, indicating where stable surface liquid water is most likely under Earth-like conditions.
These formulas are valid for stars with effective temperatures between 2600–7200 K. Outside this range, a simpler method by Tom E. Harris is used, based only on stellar luminosity and without optimistic boundaries. For flexibility, the temperature interval for using Kopparapu’s formulas can be configured.
The habitable zone regions are visualized using the provided 1D Texture, divided into three equal parts: the center represents the conservative zone, the first part the optimistic inner zone, and the last part the optimistic outer zone (furthest from the star).
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The effective temperature of the corresponding star, in Kelvin. Used to compute the width and size of the disc. |
|
Greater or equal to: 0 |
No |
|
The luminosity of the corresponding star, in units of solar luminosities. Used to compute the width and size of the disc. |
|
Greater or equal to: 0 |
No |
|
The path to a file with a one-dimensional texture to be used for the disc color. The leftmost color will be innermost color when rendering the disc, and the rightmost color will be the outermost color. |
|
Value of type ‘File’ |
No |
|
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 |
|
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. |
|
Value of type ‘Vector2 |
Yes |
|
This value determines the opacity of this renderable. A value of 0 means completely transparent. |
|
In range: ( 0, 1) |
Yes |
|
If true, the habitable zone disc is rendered with the optimistic boundaries rather than the conservative ones. |
|
Value of type ‘Boolean’ |
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 |
|
The outer radius of the disc, in meters. |
|
Greater or equal to: 0 |
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 |
|
The disc width, given as a ratio of the full disc radius. For example, a value of 1 results in a full circle, while 0.5 results in a disc where the inner radius is half of the full radius. |
|
In range: ( 0, 1) |
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")
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's Habitable Zone",
20 Path = "/Solar System/Sun",
21 Focusable = false,
22 Description = "Habitable zone for the sun in our solar system"
23 }
24}
25
26
27asset.onInitialize(function()
28 openspace.addSceneGraphNode(HabitableZone)
29end)
30
31asset.onDeinitialize(function()
32 openspace.removeSceneGraphNode(HabitableZone)
33end)
34
35asset.export(HabitableZone)
36
37
38
39asset.meta = {
40 Name = "Sun Habitable Zone",
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 = "https://openspaceproject.com",
45 License = "MIT license"
46}