RenderablePlanetProjection
Inherits Renderable
This Renderable serves as a potential target for images projected from a spacecraft’s instrument. Images have to be loaded into an image sequence first and when it is then time to project an image into 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 |
|
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 |
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 sunTransforms = asset.require("scene/solarsystem/sun/transforms")
3local kernels = asset.require("./kernels")
4local coreKernels = asset.require("spice/core")
5
6
7
8local textures = asset.resource({
9 Name = "Charon Textures",
10 Type = "HttpSynchronization",
11 Identifier = "charon_textures",
12 Version = 3
13})
14
15
16local CharonRadius = 603500
17
18local CharonProjection = {
19 Identifier = "CharonProjection",
20 Parent = transforms.PlutoBarycenterAccurate.Identifier,
21 Transform = {
22 Translation = {
23 Type = "SpiceTranslation",
24 Target = kernels.ID.Charon,
25 Observer = kernels.ID.PlutoBarycenter
26 },
27 Rotation = {
28 Type = "SpiceRotation",
29 SourceFrame = kernels.Frame.Charon,
30 DestinationFrame = coreKernels.Frame.Galactic
31 }
32 },
33 Renderable = {
34 Type = "RenderablePlanetProjection",
35 Radius = CharonRadius,
36 Segments = 350,
37 ColorTexturePaths = {
38 textures .. "NH_Charon_mosaic.png",
39 textures .. "NH_Charon_mosaic_8192.png"
40 },
41 HeightTexturePaths = {
42 textures .. "NH_Charon_DTM.png",
43 textures .. "NH_Charon_DTM_8192.png"
44 },
45 MeridianShift = true,
46 Projection = {
47 Observer = kernels.ID.NewHorizons,
48 Target = kernels.ID.Charon,
49 Aberration = "NONE",
50 AspectRatio = 2,
51 Instrument = {
52 Name = kernels.Frame.Lorri,
53 Method = "ELLIPSOID",
54 Aberration = "NONE",
55 Fovy = 0.2907,
56 Aspect = 1,
57 Near = 0.2,
58 Far = 10000
59 },
60 PotentialTargets = {
61 kernels.ID.Pluto,
62 kernels.ID.Charon
63 }
64 }
65 },
66 GUI = {
67 Path = "/Solar System/Dwarf Planets/Pluto",
68 Name = "Charon Projection"
69 }
70}
71
72local CharonText = {
73 Identifier = "CharonText",
74 Parent = CharonProjection.Identifier,
75 Transform = {
76 Translation = {
77 Type = "StaticTranslation",
78 Position = { 0, -1000000.0, 0 }
79 }
80 },
81 Renderable = {
82 Type = "RenderablePlaneImageLocal",
83 Size = 19952623.15,
84 Origin = "Center",
85 Billboard = true,
86 Texture = textures .. "Charon-Text.png",
87 BlendMode = "Additive"
88 },
89 GUI = {
90 Name = "Charon Text",
91 Path = "/Solar System/Dwarf Planets/Pluto",
92 Focusable = false
93 }
94}
95
96local CharonShadow = {
97 Identifier = "CharonShadow",
98 Parent = CharonProjection.Identifier,
99 Renderable = {
100 Type = "RenderableShadowCylinder",
101 Opacity = 0.25,
102 TerminatorType = "PENUMBRAL",
103 LightSource = coreKernels.ID.Sun,
104 Observer = kernels.ID.NewHorizons,
105 Body = kernels.ID.Charon,
106 BodyFrame = kernels.Frame.Charon,
107 Aberration = "NONE"
108 },
109 GUI = {
110 Name = "Charon Shadow",
111 Path = "/Solar System/Dwarf Planets/Pluto",
112 Focusable = false
113 }
114}
115
116
117asset.onInitialize(function()
118 openspace.addSceneGraphNode(CharonProjection)
119 openspace.addSceneGraphNode(CharonText)
120 openspace.addSceneGraphNode(CharonShadow)
121end)
122
123asset.onDeinitialize(function()
124 openspace.removeSceneGraphNode(CharonShadow)
125 openspace.removeSceneGraphNode(CharonText)
126 openspace.removeSceneGraphNode(CharonProjection)
127end)
128
129asset.export(CharonProjection)
130asset.export(CharonText)
131asset.export(CharonShadow)