RenderableModelProjection

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

GeometryFile

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.

File

Value of type ‘File’

No

Projection

Contains information about projecting onto this planet.

Table

ProjectionComponent

No

InvertModelScale

By default the given ModelScale is used to scale down the model. By setting this setting to true the scaling is inverted to that the model is instead scaled up with the given ModelScale.

Boolean

Value of type ‘Boolean’

Yes

ModelScale

The scale of the model. For example if the model is in centimeters then ModelScale = "Centimeter" or ModelScale = 0.01.

String, or Double

In list { Nanometer, Micrometer, Millimeter, Centimeter, Decimeter, Meter, Kilometer, Thou, Inch, Foot, Yard, Chain, Furlong, Mile }, or Value of type ‘Double’

Yes

PerformShading

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.

Boolean

Value of type ‘Boolean’

Yes

Inherited members from Renderable

Name

Documentation

Type

Description

Optional

DimInAtmosphere

Decides if the object should be dimmed (i.e. faded out) when the camera is in the sunny part of an atmosphere.

Boolean

Value of type ‘Boolean’

Yes

Enabled

Determines whether this object will be visible or not.

Boolean

Value of type ‘Boolean’

Yes

Opacity

This value determines the opacity of this renderable. A value of 0 means completely transparent

Double

In range: ( 0,1 )

Yes

RenderBinMode

A value that specifies if the renderable should be rendered in the Background, Opaque, Pre-/PostDeferredTransparency, Overlay, or Sticker rendering step.

String

In list { Background, Opaque, PreDeferredTransparent, PostDeferredTransparent, Overlay }

Yes

Tag

A single tag or a list of tags that this renderable will respond to when setting properties

Table, or String

Value of type ‘Table’, or Value of type ‘String’

Yes

Type

The type of the renderable.

String

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 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    Enabled = true,
 42    Type = "RenderableModelProjection",
 43    Body = kernels.ID.Bennu,
 44    GeometryFile = models .. "Bennu_v20_200k_an.obj",
 45    Projection = {
 46      Sequence = { images, imagesA },
 47      SequenceType = "image-sequence",
 48      Observer = kernels.ID.OsirisRex,
 49      Target = kernels.ID.Bennu,
 50      Aberration = "NONE",
 51      TextureMap = true,
 52      DataInputTranslation = {
 53        Instruments = {
 54          ORX_OCAMS_POLYCAM = {
 55            DetectorType = "Camera",
 56            Spice = { kernels.Frame.Polycam },
 57          },
 58        },
 59        Target = {
 60          Read = {
 61            "TARGET_NAME",
 62            "INSTRUMENT_HOST_NAME",
 63            "INSTRUMENT_ID",
 64            "START_TIME",
 65            "STOP_TIME"
 66          },
 67          Convert = {
 68            ["2101955"] = { "2101955" },
 69            ["OSIRIS-REX"] = { "OSIRIS-REX" },
 70            ["ORX_OCAMS_POLYCAM"] = { "ORX_OCAMS_POLYCAM" },
 71          }
 72        }
 73      },
 74      Instrument = { -- INVALID DATA - JUST FOR TESTING
 75        Name = kernels.Frame.Polycam,
 76        Method = "ELLIPSOID",
 77        Aberration = "NONE",
 78        Fovy = 0.792,
 79        Aspect = 1,
 80        Near = 0.01,
 81        Far = 1000000
 82      }
 83    }
 84  },
 85  GUI = {
 86    Name = "Bennu Projection",
 87    Path = "/Solar System/Asteroid"
 88  }
 89}
 90
 91local BennuTrail = {
 92  Identifier = "BennuTrail",
 93  Parent = sunTransforms.SolarSystemBarycenter.Identifier,
 94  Renderable = {
 95    Type = "RenderableTrailTrajectory",
 96    Translation = {
 97      Type = "SpiceTranslation",
 98      Target = kernels.ID.Bennu,
 99      Observer = coreKernels.ID.SolarSystemBarycenter
100    },
101    Color = { 0.4, 0.0, 0.7 },
102    StartTime = "2015 JAN 01 00:00:00.000",
103    EndTime = "2023 MAY 31 00:00:00.000",
104    SampleInterval = 3600
105  },
106  GUI = {
107    Name = "Bennu Trail",
108    Path = "/Solar System/Asteroid"
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)