RenderableAtmosphere
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The thickness of the atmosphere in kilometers. |
|
Value of type ‘Double’ |
No |
|
Multiplier of the ground radiance color during the rendering phase. |
|
Value of type ‘Double’ |
No |
|
|
No |
||
|
|
Value of type ‘Double’ |
No |
|
|
The radius of the planet in meters. |
|
Value of type ‘Double’ |
No |
|
|
No |
||
|
Percentage of the atmosphere where other objects, such as the stars, are faded. |
|
Value of type ‘Double’ |
Yes |
|
|
Yes |
||
|
The name of a scene graph node to be used as the source of illumination for the atmosphere. If not specified, the solar system’s Sun is used. |
|
Value of type ‘String’ |
Yes |
|
Mie Scattering/Extinction Proportion Coefficient. |
|
Value of type ‘Double’ |
Yes |
|
|
Yes |
||
|
Declares shadow groups, meaning which nodes are considered in shadow calculations. |
|
Yes |
|
|
The angular size of the Sun in degrees. |
|
In range: ( 0,180 ) |
Yes |
|
A unitless value that controls the intensity/brightness of the Sun. |
|
Value of type ‘Double’ |
Yes |
|
The angle (degrees) between the Camera and the Sun where the sunset starts, and the atmosphere starts to fade in objects such as the stars. |
|
Value of type ‘Vector2 |
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, PostDeferredTransparent, Overlay } |
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 |
Table parameters for Mie
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
No |
||
|
|
In range: ( -1,1 ) |
No |
|
|
|
Value of type ‘Double’ |
No |
Table parameters for Coefficients
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
Value of type ‘Vector3 |
No |
|
|
|
Value of type ‘Vector3 |
No |
Table parameters for Rayleigh
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
No |
||
|
|
Value of type ‘Double’ |
No |
Table parameters for Coefficients
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
Value of type ‘Vector3 |
No |
|
|
|
Value of type ‘Vector3 |
No |
Table parameters for Debug
Optional: Yes
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
In range: ( 0,1 ) |
Yes |
|
|
|
Value of type ‘Boolean’ |
Yes |
Table parameters for Ozone
Optional: Yes
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
Yes |
||
|
|
Value of type ‘Double’ |
Yes |
Table parameters for Coefficients
Optional: Yes
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
Value of type ‘Vector3 |
Yes |
Table parameters for ShadowGroup
Declares shadow groups, meaning which nodes are considered in shadow calculations.
Optional: Yes
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
A list of objects that cast light on this atmosphere. |
|
No |
|
|
A list of light sources. |
|
No |
Table parameters for Casters
A list of objects that cast light on this atmosphere.
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
Individual shadow casters. |
|
Yes |
Table parameters for *
Individual shadow casters.
Optional: Yes
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The scene graph node name of the source. |
|
Value of type ‘String’ |
No |
|
The radius of the object in meters. |
|
Value of type ‘Double’ |
No |
Table parameters for Sources
A list of light sources.
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
Individual light sources. |
|
Yes |
Table parameters for *
Individual light sources.
Optional: Yes
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The scene graph node name of the source. |
|
Value of type ‘String’ |
No |
|
The radius of the object in meters. |
|
Value of type ‘Double’ |
No |
Asset Examples
1local transforms = asset.require("./titan")
2
3
4
5local Atmosphere = {
6 Identifier = "TitanAtmosphere",
7 Parent = transforms.Titan.Identifier,
8 Renderable = {
9 Type = "RenderableAtmosphere",
10 -- Atmosphere radius in Km
11 AtmosphereHeight = 2666.0 - 2576.0,
12 PlanetRadius = 2576.0,
13 PlanetAverageGroundReflectance = 0.1,
14 GroundRadianceEmission = 0.9,
15 SunIntensity = 6.9,
16 Rayleigh = {
17 Coefficients = {
18 -- Wavelengths are given in 10^-9m
19 Wavelengths = { 680, 550, 440 },
20 -- Reflection coefficients are given in km^-1
21 Scattering = { 0.005349578367831898, 0.01265595939366191, 0.03133178295339324 }
22 },
23 -- Thickness of atmosphere if its density were uniform, in Km
24 H_R = 20.0
25 },
26 Mie = {
27 Coefficients = {
28 -- Reflection coefficients are given in km^-1
29 Scattering = { 0.005, 0.012, 0.08 },
30 -- Extinction coefficients are a fraction of the Mie coefficients
31 Extinction = { 0.004 / 0.37, 0.004 / 0.37, 0.004 / 0.37 }
32 },
33 -- Height scale (atmosphere thickness for constant density) in km
34 H_M = 14.85,
35 -- Mie Phase Function Value
36 -- (G e [-1.0, 1.0]. If G = 1.0, Mie phase function = Rayleigh Phase Function)
37 G = -0.52
38 },
39 Debug = {
40 PreCalculatedTextureScale = 1.0,
41 SaveCalculatedTextures = false
42 }
43 },
44 GUI = {
45 Name = "Titan Atmosphere",
46 Path = "/Solar System/Planets/Saturn/Major Moons/Titan"
47 }
48}
49
50
51asset.onInitialize(function()
52 openspace.addSceneGraphNode(Atmosphere)
53end)
54
55asset.onDeinitialize(function()
56 openspace.removeSceneGraphNode(Atmosphere)
57end)
58
59asset.export(Atmosphere)
60
61
62
63asset.meta = {
64 Name = "Titan Atmosphere",
65 Description = "RenderableAtmosphere for Titan",
66 Author = "OpenSpace Team",
67 URL = "http://openspaceproject.com",
68 License = "MIT license"
69}