RenderableGalaxy
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
|
No |
||
|
|
No |
||
|
A unit-less scale factor for the probability of dust absorbing a light particle. The amount of absorption determines the spectrum of the light that is emitted from the galaxy. |
|
Value of type ‘Double’ |
Yes |
|
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 |
|
A unit-less scale factor for the amount of light being emitted by dust in the galaxy. |
|
Value of type ‘Double’ |
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 |
|
If specified, the default raycasting shader is overwritten and the shader at this location is used instead. |
|
Value of type ‘File’ |
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 internal rotation of the volume rendering in Euler angles. |
|
Value of type ‘Vector3 |
Yes |
|
Decides whether the point-based star rendering component of the galaxy rendering should be enabled or not. If disabled, the point-based star rendering is skipped. |
|
Value of type ‘Boolean’ |
Yes |
|
The rendering method used for visualizing the stars. |
|
In list { Points, Billboards } |
Yes |
|
Determines the distance between steps taken in the volume rendering. The lower the number is, the better the rendering looks, but also takes more computational resources to render. |
|
Value of type ‘Double’ |
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 |
|
Decides whether the volume rendering component of the galaxy rendering should be enabled or not. If disabled, the volume rendering is skipped. |
|
Value of type ‘Boolean’ |
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 |
Table parameters for Points
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The ratio of point-like stars that are rendered to produce the overall galaxy image. At a value of 0, no stars are rendered, at a value of 1 all points contained in the dataset are rendered. The specific value chosen is a compromise between image fidelity and rendering performance. |
|
Value of type ‘Double’ |
Yes |
|
|
Value of type ‘File’ |
No |
|
|
|
Value of type ‘File’ |
No |
Table parameters for Volume
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
|
Value of type ‘Vector3 |
No |
|
|
The downscaling factor used when rendering the volume. |
|
In range: ( 0, 1) |
Yes |
|
|
Value of type ‘File’ |
No |
|
|
|
Value of type ‘Vector3 |
No |
|
|
The number of integration steps used during the raycasting procedure. |
|
Greater than: 0 |
Yes |
Asset Examples
With Custom Shader
This example creates a rendering of the volumetric milky way galaxy, but using a custom shader to highlight the arms of the galaxy.
1local data = asset.resource({
2 Name = "Milkyway Volume Data",
3 Type = "HttpSynchronization",
4 Identifier = "milkyway_volume_data",
5 Version = 1
6})
7
8
9local KiloParsec = 3.086E19
10
11local Node = {
12 Identifier = "RenderableGalaxy_Example_CustomShader",
13 Transform = {
14 Translation = {
15 Type = "StaticTranslation",
16 -- The center of the Milky Way is approximately 8 kiloparsec from the Sun.
17 -- The x-axis of galactic coordinates points from the Sun towards the galaxy center
18 Position = { 8 * KiloParsec, 0, 0 }
19 }
20 },
21 Renderable = {
22 Type = "RenderableGalaxy",
23 StepSize = 0.01,
24 AbsorptionMultiply = 200,
25 EmissionMultiply = 250,
26 Rotation = { math.pi, 3.1248, 4.45741 },
27 RaycastingShader = asset.resource("galaxyraycast.glsl"),
28 Volume = {
29 Type = "Volume",
30 Filename = data .. "MilkyWayRGBAVolume1024x1024x128.raw",
31 Dimensions = { 1024, 1024, 128 },
32 Size = { 1.2E21, 1.2E21, 0.15E21 },
33 Downscale = 0.4
34 },
35 Points = {
36 Type = "Points",
37 Filename = data .. "MilkyWayPoints.off",
38 EnabledPointsRatio = 0.3,
39 Texture = data .. "halo.png"
40 }
41 },
42 GUI = {
43 Name = "RenderableGalaxy - Custom Shader",
44 Path = "/Examples"
45 }
46}
47
48
49asset.onInitialize(function()
50 openspace.addSceneGraphNode(Node)
51end)
52
53asset.onDeinitialize(function()
54 openspace.removeSceneGraphNode(Node)
55end)