RenderableModelProjection
Inherits Renderable
A 3D model that acts as a projection target for spacecraft instrument images, similarly to RenderablePlaneProjection and RenderablePlanetProjection.
Images from a loaded image sequence will be projected onto the model if the instrument’s field-of-view intersects it.
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The file or files that should be loaded, that specifies the model to load. The file can contain filesystem tokens or can be specified relative to the location of the asset file. |
|
Value of type ‘File’ |
No |
|
Contains information about projecting onto this planet. |
|
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 |
|
By default the given |
|
Value of type ‘Boolean’ |
Yes |
|
The scale of the model. For example if the model is in centimeters then |
|
In list { Nanometer, Micrometer, Millimeter, Centimeter, Decimeter, Meter, Kilometer, Thou, Inch, Foot, Yard, Chain, Furlong, Mile }, or Value of type ‘Double’ |
Yes |
|
This value determines the opacity of this renderable. A value of 0 means completely transparent. |
|
In range: ( 0, 1) |
Yes |
|
If true, the model will be shaded based on the location of the Sun. If false, shading is disabled and the model is fully illuminated. |
|
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 |
|
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 |
Asset Examples
1local transforms = asset.require("./transforms")
2local sunAsset = asset.require("scene/solarsystem/sun/transforms")
3local kernels = asset.require("./kernels")
4local coreKernels = asset.require("spice/core")
5
6
7
8local models = asset.resource({
9 Name = "Bennu Models",
10 Type = "HttpSynchronization",
11 Identifier = "bennu_models",
12 Version = 2
13})
14
15local images = asset.resource({
16 Name = "Bennu Images Approach",
17 Type = "HttpSynchronization",
18 Identifier = "osirisrex_bennu_images_approach",
19 Version = 1
20})
21
22local imagesA = asset.resource({
23 Name = "Bennu Images A",
24 Type = "HttpSynchronization",
25 Identifier = "osirisrex_bennu_images_orbit_a",
26 Version = 1
27})
28
29
30local BennuProjection = {
31 Identifier = "BennuProjection",
32 Parent = transforms.BennuBarycenter.Identifier,
33 Transform = {
34 Rotation = {
35 Type = "SpiceRotation",
36 SourceFrame = kernels.Frame.Bennu,
37 DestinationFrame = coreKernels.Frame.Galactic
38 }
39 },
40 Renderable = {
41 Type = "RenderableModelProjection",
42 Body = kernels.ID.Bennu,
43 GeometryFile = models .. "Bennu_v20_200k_an.obj",
44 Projection = {
45 Sequence = { images, imagesA },
46 SequenceType = "image-sequence",
47 Observer = kernels.ID.OsirisRex,
48 Target = kernels.ID.Bennu,
49 Aberration = "NONE",
50 TextureMap = true,
51 DataInputTranslation = {
52 Instruments = {
53 ORX_OCAMS_POLYCAM = {
54 DetectorType = "Camera",
55 Spice = { kernels.Frame.Polycam },
56 },
57 },
58 Target = {
59 Read = {
60 "TARGET_NAME",
61 "INSTRUMENT_HOST_NAME",
62 "INSTRUMENT_ID",
63 "START_TIME",
64 "STOP_TIME"
65 },
66 Convert = {
67 ["2101955"] = { "2101955" },
68 ["OSIRIS-REX"] = { "OSIRIS-REX" },
69 ["ORX_OCAMS_POLYCAM"] = { "ORX_OCAMS_POLYCAM" },
70 }
71 }
72 },
73 Instrument = { -- INVALID DATA - JUST FOR TESTING
74 Name = kernels.Frame.Polycam,
75 Method = "ELLIPSOID",
76 Aberration = "NONE",
77 Fovy = 0.792,
78 Aspect = 1,
79 Near = 0.01,
80 Far = 1000000
81 }
82 }
83 },
84 GUI = {
85 Name = "Bennu Projection",
86 Path = "/Solar System/Asteroid"
87 }
88}
89
90local BennuTrail = {
91 Identifier = "BennuTrail",
92 Parent = sunAsset.SolarSystemBarycenter.Identifier,
93 Renderable = {
94 Type = "RenderableTrailTrajectory",
95 Translation = {
96 Type = "SpiceTranslation",
97 Target = kernels.ID.Bennu,
98 Observer = coreKernels.ID.SolarSystemBarycenter
99 },
100 Color = { 0.4, 0.0, 0.7 },
101 StartTime = "2015 JAN 01 00:00:00.000",
102 EndTime = "2023 MAY 31 00:00:00.000",
103 SampleInterval = 3600
104 },
105 GUI = {
106 Name = "Bennu Trail",
107 Path = "/Solar System/Asteroid",
108 Focusable = false
109 }
110}
111
112
113asset.onInitialize(function()
114 openspace.addSceneGraphNode(BennuProjection)
115 openspace.addSceneGraphNode(BennuTrail)
116end)
117
118asset.onDeinitialize(function()
119 openspace.removeSceneGraphNode(BennuTrail)
120 openspace.removeSceneGraphNode(BennuProjection)
121end)
122
123asset.export(BennuProjection)
124asset.export(BennuTrail)