RenderablePlanetProjection
Inherits Renderable
Serves as a potential target for images projected from a spacecraft’s instrument, when the observed object is a planetary body. The images first have to be loaded into an image sequence and when it is then time to project an image onto the world from the point of view of the instrument, the field-of-view will be checked against the extent of this planetary body. If the field-of-view intersects, the image gets correctly projected onto the surface.
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The texture path selected in this property is used as the base texture that is applied to the planet prior to any image projections. This menu always contains an empty option for not using a color map. If this value is specified in an asset, the last texture is used. |
|
No |
|
|
The texture path selected in this property is used as the height map on the planet. This menu always contains an empty option for not using a heightmap. If this value is specified in an asset, the last texture is used. |
|
No |
|
|
Contains information about projecting onto this planet. |
|
No |
|
|
This value specifies the radius of this sphere in meters. |
|
Value of type ‘Double’, or Value of type ‘Vector3 |
No |
|
This value specifies the number of segments that this sphere is split into. |
|
Value of type ‘Integer’ |
No |
|
This value determines the ambient brightness of the dark side of the planet. |
|
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 |
|
Determines whether this object will be visible or not. |
|
Value of type ‘Boolean’ |
Yes |
|
This value determines the level of height exaggeration that is applied to a potential height field. A value of ‘0’ inhibits the height field, whereas a value of ‘1’ uses the measured height field. |
|
Value of type ‘Double’ |
Yes |
|
The maximum number of image projections to perform per frame. Useful to avoid freezing the system for large delta times. |
|
Value of type ‘Integer’ |
Yes |
|
If this value is enabled, a shift of the meridian by 180 degrees is performed. This is a fix especially for Pluto height maps, where the definition of the meridian has changed through the New Horizons mission and this requires this shift. |
|
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 |
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 ColorTexturePaths
The texture path selected in this property is used as the base texture that is applied to the planet prior to any image projections. This menu always contains an empty option for not using a color map. If this value is specified in an asset, the last texture is used.
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
|
Value of type ‘String’ |
Yes |
Table parameters for HeightTexturePaths
The texture path selected in this property is used as the height map on the planet. This menu always contains an empty option for not using a heightmap. If this value is specified in an asset, the last texture is used.
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
|
Value of type ‘String’ |
Yes |
Asset Examples
1local transforms = asset.require("./transforms")
2local kernels = asset.require("./kernels")
3local coreKernels = asset.require("spice/core")
4
5
6
7local textures = asset.resource({
8 Name = "Charon Textures",
9 Type = "HttpSynchronization",
10 Identifier = "charon_textures",
11 Version = 3
12})
13
14
15local CharonRadius = 603500
16
17local CharonProjection = {
18 Identifier = "CharonProjection",
19 Parent = transforms.PlutoBarycenterAccurate.Identifier,
20 Transform = {
21 Translation = {
22 Type = "SpiceTranslation",
23 Target = kernels.ID.Charon,
24 Observer = kernels.ID.PlutoBarycenter
25 },
26 Rotation = {
27 Type = "SpiceRotation",
28 SourceFrame = kernels.Frame.Charon,
29 DestinationFrame = coreKernels.Frame.Galactic
30 }
31 },
32 Renderable = {
33 Type = "RenderablePlanetProjection",
34 Radius = CharonRadius,
35 Segments = 350,
36 ColorTexturePaths = {
37 textures .. "NH_Charon_mosaic.png",
38 textures .. "NH_Charon_mosaic_8192.png"
39 },
40 HeightTexturePaths = {
41 textures .. "NH_Charon_DTM.png",
42 textures .. "NH_Charon_DTM_8192.png"
43 },
44 MeridianShift = true,
45 Projection = {
46 Observer = kernels.ID.NewHorizons,
47 Target = kernels.ID.Charon,
48 Aberration = "NONE",
49 AspectRatio = 2,
50 Instrument = {
51 Name = kernels.Frame.Lorri,
52 Method = "ELLIPSOID",
53 Aberration = "NONE",
54 Fovy = 0.2907,
55 Aspect = 1,
56 Near = 0.2,
57 Far = 10000
58 },
59 PotentialTargets = {
60 kernels.ID.Pluto,
61 kernels.ID.Charon
62 }
63 }
64 },
65 GUI = {
66 Path = "/Solar System/Dwarf Planets/Pluto",
67 Name = "Charon Projection"
68 }
69}
70
71local CharonText = {
72 Identifier = "CharonText",
73 Parent = CharonProjection.Identifier,
74 Transform = {
75 Translation = {
76 Type = "StaticTranslation",
77 Position = { 0, -1000000.0, 0 }
78 }
79 },
80 Renderable = {
81 Type = "RenderablePlaneImageLocal",
82 Size = 19952623.15,
83 Origin = "Center",
84 Billboard = true,
85 Texture = textures .. "Charon-Text.png",
86 BlendMode = "Additive"
87 },
88 GUI = {
89 Name = "Charon Text",
90 Path = "/Solar System/Dwarf Planets/Pluto",
91 Focusable = false
92 }
93}
94
95local CharonShadow = {
96 Identifier = "CharonShadow",
97 Parent = CharonProjection.Identifier,
98 Renderable = {
99 Type = "RenderableShadowCylinder",
100 Opacity = 0.25,
101 TerminatorType = "PENUMBRAL",
102 LightSource = coreKernels.ID.Sun,
103 Observer = kernels.ID.NewHorizons,
104 Body = kernels.ID.Charon,
105 BodyFrame = kernels.Frame.Charon,
106 Aberration = "NONE"
107 },
108 GUI = {
109 Name = "Charon Shadow",
110 Path = "/Solar System/Dwarf Planets/Pluto",
111 Focusable = false
112 }
113}
114
115
116asset.onInitialize(function()
117 openspace.addSceneGraphNode(CharonProjection)
118 openspace.addSceneGraphNode(CharonText)
119 openspace.addSceneGraphNode(CharonShadow)
120end)
121
122asset.onDeinitialize(function()
123 openspace.removeSceneGraphNode(CharonShadow)
124 openspace.removeSceneGraphNode(CharonText)
125 openspace.removeSceneGraphNode(CharonProjection)
126end)
127
128asset.export(CharonProjection)
129asset.export(CharonText)
130asset.export(CharonShadow)