Merge branch 'master' into feature/profiles

# Conflicts:
#	include/openspace/scene/assetloader.h
#	src/scene/assetloader.cpp
This commit is contained in:
Alexander Bock
2020-06-14 17:54:25 +02:00
117 changed files with 3952 additions and 2105 deletions

View File

@@ -28,8 +28,8 @@ project(OpenSpace)
set(OPENSPACE_VERSION_MAJOR 0)
set(OPENSPACE_VERSION_MINOR 15)
set(OPENSPACE_VERSION_PATCH 1)
set(OPENSPACE_VERSION_STRING "Beta-5")
set(OPENSPACE_VERSION_PATCH 2)
set(OPENSPACE_VERSION_STRING "Beta-7 (RC1)")
set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}")

View File

@@ -57,7 +57,6 @@
#include <sgct/viewport.h>
#include <stb_image.h>
#include <Tracy.hpp>
#include <TracyOpenGL.hpp>
#include <chrono>
#include <ctime>

View File

@@ -3,7 +3,7 @@
#Asset
scene/solarsystem/planets/earth/moon/moon required
scene/solarsystem/missions/apollo/apollo8 required
scene/solarsystem/missions/apollo/8/apollo8 required
scene/solarsystem/planets/earth/earth required
#Property

View File

@@ -5,7 +5,7 @@ local sceneHelper = asset.require('util/scene_helper')
asset.require('scene/solarsystem/planets/earth/moon/moon')
asset.require('scene/solarsystem/missions/apollo/apollo8.asset')
asset.require('scene/solarsystem/missions/apollo/8/apollo8.asset')
-- Custom Keybindings
local Keybindings = {
@@ -118,7 +118,6 @@ asset.onInitialize(function ()
openspace.markInterestingNodes({ "Earth", "Moon", "Apollo8", "Apollo8Launch" })
openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.MinimumAllowedDistance', 0.000000);
openspace.setPropertyValueSingle('Scene.Moon.Renderable.LodScaleFactor', 24.0);
openspace.globebrowsing.goToGeo(earthAsset.Earth.Identifier, 20, -60, 15000000)
end)

View File

@@ -3,17 +3,15 @@
#Asset
scene/solarsystem/planets/earth/moon/moon required
scene/solarsystem/missions/apollo/apollo8 required
scene/solarsystem/missions/apollo/apollo11 required
scene/solarsystem/missions/apollo/a17_lem required
scene/solarsystem/missions/apollo/8/apollo8 required
scene/solarsystem/missions/apollo/11/apollo11 required
scene/solarsystem/missions/apollo/17/lem required
scene/solarsystem/missions/apollo/apollo_globebrowsing required
scene/solarsystem/missions/apollo/apollo_11_lem_flipbook required
scene/solarsystem/missions/apollo/11/lem_flipbook required
scene/solarsystem/missions/apollo/insignias_map required
#Property
setPropertyValueSingle Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.BlendMode 0
setPropertyValueSingle Scene.Apollo11LemDescentModel.Renderable.RotationVector { 273.750,28.0,309.85 }
setPropertyValueSingle Scene.Apollo11LemLandedModel.Renderable.RotationVector { 273.750,28.0,309.85 }
setPropertyValueSingle Scene.Moon.Renderable.PerformShading false
#Keybinding

View File

@@ -1,15 +1,14 @@
asset.require('./base')
--moonrocks.scene
local sceneHelper = asset.require('util/scene_helper')
-- local station2 = asset.require('scene/solarsystem/missions/apollo/bouldersstation2')
-- local station6 = asset.require('scene/solarsystem/missions/apollo/bouldersstation6')
-- local station7 = asset.require('scene/solarsystem/missions/apollo/bouldersstation7')
asset.require('scene/solarsystem/missions/apollo/apollo8')
asset.require('scene/solarsystem/missions/apollo/apollo11')
asset.require('scene/solarsystem/missions/apollo/a17_lem')
-- local station2 = asset.require('scene/solarsystem/missions/apollo/17/bouldersstation2')
-- local station6 = asset.require('scene/solarsystem/missions/apollo/17/bouldersstation6')
-- local station7 = asset.require('scene/solarsystem/missions/apollo/17/bouldersstation7')
asset.require('scene/solarsystem/missions/apollo/8/apollo8')
asset.require('scene/solarsystem/missions/apollo/11/apollo11')
asset.require('scene/solarsystem/missions/apollo/17/lem')
asset.require('scene/solarsystem/missions/apollo/apollo_globebrowsing')
asset.require('scene/solarsystem/missions/apollo/apollo_11_lem_flipbook')
asset.require('scene/solarsystem/missions/apollo/11/lem_flipbook')
asset.require('scene/solarsystem/missions/apollo/insignias_map')
local Keybindings = {
@@ -100,9 +99,6 @@ asset.onInitialize(function ()
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_11.Enabled', true);
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A11_M177481212_p_longlat.Enabled', true);
openspace.setPropertyValueSingle('Scene.Apollo11LemDescentModel.Renderable.RotationVector', { 273.750,28.0,309.85 });
openspace.setPropertyValueSingle('Scene.Apollo11LemLandedModel.Renderable.RotationVector', { 273.750,28.0,309.85 });
openspace.globebrowsing.goToGeo(moonAsset.Moon.Identifier, 20, -60, 15000000)
openspace.setPropertyValueSingle("Scene.Moon.Renderable.PerformShading", false)

View File

@@ -16,6 +16,8 @@ asset.require('scene/solarsystem/planets/mars/moons/phobos')
asset.require('scene/solarsystem/planets/mars/moons/deimos')
asset.require('scene/solarsystem/dwarf_planets/pluto/system')
asset.request('scene/milkyway/milkyway/volume')
asset.request('scene/milkyway/constellations/constellation_art')
asset.request('scene/milkyway/constellations/constellation_keybinds')
assetHelper.requestAll(asset, 'scene/digitaluniverse')

View File

@@ -14,9 +14,10 @@ asset.require('util/default_dashboard')
asset.require('util/default_joystick')
-- Load web gui
asset.require('util/webgui')
local webGui = asset.require('util/webgui')
asset.onInitialize(function ()
webGui.setCefRoute("onscreen")
openspace.setDefaultGuiSorting()
openspace.globebrowsing.loadWMSServersFromFile(
openspace.absPath("${DATA}/globebrowsing_servers.lua")

View File

@@ -18,3 +18,12 @@ end)
asset.onDeinitialize(function ()
openspace.removeInterestingNodes({ "Earth", "Mars", "Moon", "Sun" })
end)
asset.meta = {
Name = "Default scene",
Version = "1.0",
Description = [[ Bla bla, something something asteroids ]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}

61
data/assets/mars.scene Normal file
View File

@@ -0,0 +1,61 @@
asset.require('./base')
local sceneHelper = asset.require('util/scene_helper')
local perseveranceAsset = asset.require('scene/solarsystem/missions/perseverance/perseverance')
local perseveranceShortcuts = asset.require('scene/solarsystem/missions/perseverance/shortcuts')
local insightAsset = asset.require('scene/solarsystem/missions/insight/edl')
local insightShortcuts = asset.require('scene/solarsystem/missions/insight/shortcuts')
local insightEDLShortcuts = sceneHelper.extractShortcuts({"Insight Height Offset",
"Enable HiRISE",
"Insight EDL Time",
"Insight EDL NavigationState"},
insightShortcuts.Shortcuts)
local insightDisableShortcuts = sceneHelper.extractShortcuts({
"Default Height Offset",
"Disable HiRISE"},
insightShortcuts.Shortcuts)
local PerseverenceLandedShortcuts = sceneHelper.extractShortcuts({
"Perseverance Height Offset",
"Perseverance landed time",
"Enable HiRISE"},
perseveranceShortcuts.Shortcuts)
local Keybindings = {
sceneHelper.createKeyBindFromShortcuts("i",
insightEDLShortcuts,
"/Missions/Insight",
"Set and goto Insight Landing",
"Setup scene for insight EDL"
),
sceneHelper.createKeyBindFromShortcuts("SHIFT+i",
insightDisableShortcuts,
"/Missions/Insight",
"Unset Insight Landing",
"Disable Mars layer settings used for insight EDL"
),
sceneHelper.createKeyBindFromShortcuts("p",
PerseverenceLandedShortcuts,
"/Missions/Perseverance"
)
}
asset.onInitialize(function ()
local now = openspace.time.currentWallTime()
openspace.time.setTime(now)
sceneHelper.bindKeys(Keybindings)
openspace.globebrowsing.goToGeo("Mars", 58.5877, 16.1924, 8000000)
openspace.markInterestingNodes({ "Mars", insightAsset.Insight.Identifier, "Perseverance" })
end)
asset.onDeinitialize(function ()
sceneHelper.unbindKeys(Keybindings)
openspace.removeInterestingNodes({ "Mars", insightAsset.Insight.Identifier})
end)

View File

@@ -43,6 +43,12 @@ local deepSkyPoints = {
--CorrectionSizeFactor = 10.45
EnablePixelSizeControl = true
},
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, 3.14159265359 }
}
},
GUI = {
Name = "Deep Sky Objects Points",
Path = "/Universe/Galaxies"
@@ -66,6 +72,12 @@ local deepSkyImages = {
--FadeInDistances = {0.001, 0.05010},
PlaneMinSize = 5.0
},
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = {3.14159265359, 3.14159265359, 0 }
}
},
GUI = {
Name = "Deep Sky Objects Images",
Path = "/Universe/Galaxies"

View File

@@ -24,7 +24,8 @@ local radio = {
Renderable = {
Type = "RenderableSphericalGrid",
Enabled = false,
GridColor = { 0.3, 0.84, 1.0, 0.3},
Opacity = 1.0,
GridColor = { 0.3, 0.84, 1.0 },
LineWidth = 2.0,
GridMatrix = { -0.05487554, 0.4941095, -0.8676661 , 0.0,
-0.9938214 , -0.1109906, -0.0003515167, 0.0,
@@ -49,7 +50,8 @@ local oort = {
Renderable = {
Type = "RenderableSphericalGrid",
Enabled = false,
GridColor = { 0.8, 0.4, 0.4, 0.25},
Opacity = 0.8,
GridColor = { 0.8, 0.4, 0.4 },
LineWidth = 2.0,
GridMatrix = { -0.05487554, 0.4941095, -0.8676661 , 0.0,
-0.9938214 , -0.1109906, -0.0003515167, 0.0,
@@ -74,7 +76,8 @@ local ecliptic = {
Renderable = {
Type = "RenderableSphericalGrid",
Enabled = false,
GridColor = { 0.74, 0.26, 0.26, 0.5},
Opacity = 1.0,
GridColor = { 0.74, 0.26, 0.26 },
LineWidth = 2.0,
GridMatrix = { -0.05487554, 0.4941095, -0.8676661 , 0.0,
-0.9938214 , -0.1109906, -0.0003515167, 0.0,
@@ -127,7 +130,8 @@ local equatorial = {
Renderable = {
Type = "RenderableSphericalGrid",
Enabled = false,
GridColor = { 0.69, 0.68, 0.29, 0.8},
Opacity = 0.8,
GridColor = { 0.69, 0.68, 0.29 },
LineWidth = 2.0,
GridMatrix = { -0.05487554, 0.4941095, -0.8676661, 0.0,
-0.8734371 , -0.4448296, -0.1980764, 0.0,
@@ -181,7 +185,8 @@ local galactic = {
Type = "RenderableSphericalGrid",
Enabled = false,
LineWidth = 2.0,
GridColor = { 0.0, 0.6, 0.6, 0.6}
Opacity = 1.0,
GridColor = { 0.0, 0.6, 0.6 }
},
GUI = {
Name = "Galactic Sphere",

View File

@@ -0,0 +1,28 @@
local constellation_helper = asset.require('./generate_constellations')
local constellationsCSV = asset.localResource('constellation_data.csv')
local nodes = {}
asset.onInitialize(function ()
nodes = constellation_helper.createConstellations('Constellation Art', constellationsCSV)
for _, n in ipairs(nodes) do
openspace.addSceneGraphNode(n);
end
end)
asset.onDeinitialize(function ()
for _, n in ipairs(nodes) do
openspace.removeSceneGraphNode(n.Identifier);
end
end)
asset.meta = {
Name = "Constellation Images",
Version = "1.0",
Description = "Artistic images depicting the constellations",
Author = "James Hedberg",
URL = "jameshedberg.com",
License = "CC-BY"
}

View File

@@ -0,0 +1,85 @@
Data about Constellations columns are: group, name, x, y, z, scale, imageName, rotX, rotY, rotZ, centerStar
normal,Ori,Orion,-550.8742,-259.3621,-188.9620,1.5,Ori.png,1.128407,1.058407,1.668407,HD37128
zodiac,Tau,Taurus,-18.7277,-0.3175,-6.9092,1.2,Tau.png,1.198407,0.908407,1.378407,Aldebran
zodiac,Ari,Aries,-13.2892,9.4519,-11.9378,0.8,Ari.png,0.668407,0.538407,0.518407,Hamal
zodiac,Gem,Gemini,-362.5493,-102.2245,79.4030,0.85,Gem.png,-0.731593,2.268407,-0.451593,Mekbuda
zodiac,Cnc,Cancer,-30.9209,-16.4584,22.6601,0.8,Cnc.png,-1.151593,1.888407,-1.041593,HD74442
zodiac,Leo,Leo,-17.9030,-13.2719,31.4196,1.33,Leo.png,-0.131593,2.448407,0.418407,HD89484
zodiac,Vir,Virgo,36.5809,-35.1877,62.3341,1.5,Vir.png,-0.371593,3.138407,0.518407,HD116658
zodiac,Lib,Libra,17.5393,-6.2768,14.5916,1.0,Lib.png,-1.011593,3.138407,1.318407,HD130819
zodiac,Sco,Scorpius,137.4378,-19.4456,37.3606,1.2,Sco.png,1.698407,-1.001593,-1.751593,HD148478
zodiac,Sgr,Sagittarius,66.2304,11.1498,-14.8095,1.2,Sgr.png,1.728407,-1.321593,-1.751593,HD175191
zodiac,Cap,Capricornus,32.9799,20.0621,-29.3945,1.3,Cap.png,1.158407,-0.881593,-0.561593,HD200761
zodiac,Aqr,Aquarius,86.5090,149.4078,-155.8102,1.2,Aqr.png,-2.921593,-2.391593,-2.551593,-2.511593
zodiac,Psc,Pisces,-28.0235,45.3150,-76.8893,1.6,Psc.png,0.458407,-0.001593,0.618407,HD4656
northern,Uma,Ursa Major,-12.0503,7.1931,19.8974,1.6,UMa.png,0.748407,2.398407,0.658407,HD95418
northern,Dra,Draco,-1.4340,20.6566,23.5098,1.9,Dra.png,0.658407,-2.541593,1.058407,HD137759
southern,Ant,Antila,-0.2233,-103.8908,42.7940,1.3,Ant.png,1.848407,0.198407,-3.141593,HD90610
southern,Crv,Corvus,8.0442,-16.8858,19.3984,1.1,Crv.png,2.198407,-0.041593,-2.221593,HD108767
southern,Cet,Cetus,-28.7960,7.2425,-73.6693,1.5,Cet.png,0.238407,0.368407,0.688407,HD11353
southern,Cha,Chameleon,53.5121,-108.3624,-38.1807,1.1,Cha.png,-1.801593,2.738407,0.448407,HD92305
northern,Cam,Camelopardalis,-304.8155,179.0620,71.1454,1.7,Cam.png,2.128407,1.228407,1.478407,HD31910
equatorial,Aql,Aquila,11.7741,9.7467,-1.6418,1.0,Aql.png,-2.601593,-2.511593,-3.141593,HD182640
southern,Aps,Apus,31.6370,-32.5620,-16.5786,1.1,Aps.png,-1.691593,-2.281593,0.838407,HD149324
northern,Lyn,Lynx,-98.3174,4.4830,67.2289,1.2,Lyn.png,1.688407,1.768407,1.668407,HD70272
southern,Phe,Phoenix,5.0172,-4.2096,-22.8088,1.5,Phe.png,-3.141593,3.138407,-3.141593,HD6595
northern,Cyg,Cygnus,78.7445,375.2440,12.4995,1.4,Cyg.png,1.668407,-0.931593,-0.261593,HD194093
southern,Cen,Centaurus,20.1398,-33.1830,9.5915,2.7,Cen.png,-1.291593,3.088407,0.458407,HD110304
northern,Aur,Auriga,-12.3062,3.8595,1.0302,1.5,Aur.png,1.378407,1.108407,1.178407,HD34029
northern,Peg,Pegasus,0.9791,32.5947,-27.7339,2.42,Peg.png,0.918407,-0.221593,-0.191593,HD218045
southern,Hya,Hydra,-2.9043,-33.5496,25.8962,3,Hya.png,-0.531593,2.838407,0.368407,HD93813
southern,Oct,Octans,22.0434,-27.8601,-24.3108,1.0,Oct.png,-0.911593,0.398407,1.198407,HD214846
southern,Nor,Norma,34.9251,-17.5643,0.0068,1.0,Nor.png,-1.631593,-2.421593,1.298407,HD146686
southern,Mus,Musca,48.8888,-79.2952,-10.2828,1.25,Mus.png,-1.871593,3.138407,0.358407,HD109668
southern,Hyi,Hydrus,3.2767,-4.7183,-4.7829,1.1,Hyi.png,2.438407,-3.141593,-2.381593,HD2151
northern,Lac,Lacerta,-6.0878,30.5794,-3.6064,1.0,Lac.png,-1.521593,-2.391593,3.138407,HD213558
equatorial,Lep,Lepus,-212.6297,-184.4909,-132.1156,1.0,Lep.png,-1.801593,-2.351593,-0.861593,HD36673
southern,Lup,Lupus,129.1166,-102.2983,33.3251,1.2,Lup.png,-1.191593,-2.391593,0.798407,HD129056
southern,Men,Mensa,2.4149,-8.5586,-4.8892,1.0,Men.png,-2.101593,-2.781593,0.828407,HD43834
southern,Mic,Microscopium,51.0335,11.1671,-44.3692,1.0,Mic.png,0.728407,-0.831593,-0.561593,HD199951
equatorial,Mon,Monoceros,-93.0725,-66.8909,8.6548,1.2,Mon.png,-1.331593,1.988407,-0.891593,HD55185
southern,Pav,Pavo,4.4549,-2.5959,-3.2739,1.3,Pav.png,-2.391593,-2.171593,1.648407,HD190248
southern,Ind,Indus,133.6149,-53.5569,-115.9552,1.5,Ind.png,-2.031593,-1.491593,1.758407,HD198700
northern,LMi,Leo Minor,-23.3948,-2.5770,38.0756,1.1,LMi.png,-3.141593,0.478407,-2.201593,HD90537
northern,Lyr,Lyra,2.8086,6.7630,2.5555,1.0,Lyr.png,-1.831593,-2.091593,3.141500,HD172167
northern,Her,Hercules,14.0526,14.9773,12.5478,1.3,Her.png,-1.511593,-1.811593,2.288407,HD156164
southern,Gru,Grus,18.6528,-3.2893,-24.6602,1.3,Gru.png,-3.141593,-2.511593,-2.901593,HD209952
southern,Crt,Crater,1.5886,-43.9831,40.3390,1.3,Crt.png,-0.521593,3.140000,0.588407,HD98430
northern,Del,Delphinus,14.8599,24.6150,-8.0550,1.2,Del.png,1.308407,-0.951593,-0.241593,HD196524
southern,Dor,Dorado,-0.6460,-9.3172,-6.9654,1.2,Dor.png,2.118407,1.768407,-2.901593,HD33262
northern,Equ,Equuleus,27.7363,41.7071,-27.4371,1.2,Equ.png,-1.801593,-2.511593,2.558407,HD202447
southern,Eri,Eridanus,-37.5153,-23.5231,-65.6368,2.1,Eri.png,0.128407,0.698407,0.998407,HD20720
southern,For,Fornax,-14.0351,-17.8282,-46.5514,1.4,For.png,3.138407,2.678407,-2.351593,HD17652
southern,Hor,Horologium,2.1021,-27.1310,-40.5136,1.2,Hor.png,-3.141593,2.468407,-2.191593,HD16920
southern,Pyx,Pyxis,-66.7424,-248.9639,26.0445,1.2,Pyx.png,1.838407,-1.651593,2.708407,HD74575
southern,Ret,Reticulum,2.8130,-37.2904,-33.2644,1.5,Ret.png,1.998407,2.188407,-2.591593,HD27256
northern,Sge,Sagitta,44.3886,70.9446,-7.6264,1.2,Sge.png,-0.741593,-2.231593,2.108407,HD189319
southern,Scl,Sculptor,21.6545,-6.8861,-166.5240,1.3,Scl.png,-0.071593,-0.221593,0.638407,HD2429
southern,Sct,Scutum,48.8939,21.5158,-0.1629,1.2,Sct.png,1.188407,-1.271593,-0.971593,HD171443
southern,Tuc,Tucana,35.3950,-20.2535,-45.2324,1.1,Tuc.png,-0.351593,-0.161593,0.308407,HD211416
northern,Tri,Triangulum,-26.6263,21.9119,-16.2254,1.2,Tri.png,1.168407,0.218407,0.558407,HD13161
southern,TrA,Triangulum Australe,96.2283,-76.4459,-33.5257,1.2,TrA.png,-1.991593,-2.491593,1.128407,HD150798
southern,Tel,Telescopium,72.3444,-14.5016,-20.0248,1.2,Tel.png,-0.461593,-1.731593,0.298407,HD169467
southern,Ara,Ara,164.9273,-75.6246,-35.3100,1.1,Ara.png,-1.381593,-2.131593,1.048407,HD157244
southern,Cae,Caelum,-6.0961,-13.7926,-13.3392,1.0,Cae.png,-0.661593,0.948407,0.418407,HD29875
southern,CMa,Canis Major,-1.7693,-1.9125,-0.4074,1.3,CMa.png,1.128407,1.048407,1.878407,HD48915
northern,CMi,Canis Minor,-2.8348,-1.8906,0.7881,1.2,CMi.png,2.538407,1.138407,-3.141593,HD61421
southern,Vol,Volans,37.6000,-182.7856,-62.6559,1.2,Vol.png,-2.441593,1.988407,-0.351593,HD68520
northern,UMi,Ursa Minor,-11.3527,27.2100,25.1835,1.3,UMi.png,-2.491593,-0.581593,-2.381593,HD131873
northern,And,Andromdeda,-32.8276,43.3946,-27.8475,1.6,And.png,-2.021593,-3.141593,-2.521593,HD6860
northern,Boo,Bootes,11.2468,14.9864,30.4945,2.0,Boo.png,-3.141593,-0.601593,-2.361593,HD135722
northern,Vul,Vulpecula,46.7540,77.7780,5.3953,1.1,Vul.png,-2.301593,-2.061593,-3.141593,HD131873
northern,CVn,Canes Venatici,-3.1198,5.7935,33.1368,1.3,CVn.png,0.148407,3.138407,0.428407,HD112413
southern,Cir,Circinus,11.4255,-11.6937,-1.3129,1.0,Cir.png,1.448407,-0.391593,-2.211593,HD128898
northern,Com,Coma Berenices,1.9257,-1.2062,12.2465,1.4,Com.png,3.138407,-0.051593,-2.711593,HD114378
southern,CrA,Corona Australis,146.1322,-4.7492,-53.7124,1.0,CrA.png,-3.141593,-2.021593,-3.141593,HD178345
northern,CrB,Corona Borealis,33.5737,32.0314,52.9729,1.3,CrB.png,-3.141593,-0.601593,-2.271593,HD143107
northern,Cas,Cassiopeia,-36.3073,59.4424,-7.6926,1.4,Cas.png,-1.431593,3.128407,-2.331593,HD3712
northern,Cep,Cepheus,-2.8178,14.4985,2.3848,1.7,Cep.png,-1.331593,-2.291593,-2.931593,HD203280
southern,Car,Carina Vela Puppis,14.1325,-188.6018,-42.2785,2.0,Car.png,2.078407,1.048407,-3.111593,HD71129
northern,Col,Columba,-11.2568,-20.5973,-11.9895,1.0,Col.png,2.518407,1.358407,-2.981593,HD39425
northern,Per,Perseus,-139.8202,79.8063,-16.2631,1.3,Per.png,-1.751593,2.428407,-2.411593,HD22928
northern,Oph,Ophiuchus,127.9419,14.0822,56.2015,3.2,Oph.png,2.178407,-0.781593,-1.681593,HD149757
southern,PsA,Piscis Austrinus,99.9977,47.6679,-199.6345,1.0,PsA.png,3.138407,-2.541593,-2.881593,HD214748
southern,Cru,Crux,49.3509,-85.0446,-0.6223,1.1,Cru.png,1.718407,0.048407,-2.741593,HD108248
southern,Pic,Pictor,-4.5417,-45.5649,-27.1768,1.0,Pic.png,2.568407,2.138407,-2.081593,HD39523
1 Data about Constellations columns are: group, name, x, y, z, scale, imageName, rotX, rotY, rotZ, centerStar
2 normal,Ori,Orion,-550.8742,-259.3621,-188.9620,1.5,Ori.png,1.128407,1.058407,1.668407,HD37128
3 zodiac,Tau,Taurus,-18.7277,-0.3175,-6.9092,1.2,Tau.png,1.198407,0.908407,1.378407,Aldebran
4 zodiac,Ari,Aries,-13.2892,9.4519,-11.9378,0.8,Ari.png,0.668407,0.538407,0.518407,Hamal
5 zodiac,Gem,Gemini,-362.5493,-102.2245,79.4030,0.85,Gem.png,-0.731593,2.268407,-0.451593,Mekbuda
6 zodiac,Cnc,Cancer,-30.9209,-16.4584,22.6601,0.8,Cnc.png,-1.151593,1.888407,-1.041593,HD74442
7 zodiac,Leo,Leo,-17.9030,-13.2719,31.4196,1.33,Leo.png,-0.131593,2.448407,0.418407,HD89484
8 zodiac,Vir,Virgo,36.5809,-35.1877,62.3341,1.5,Vir.png,-0.371593,3.138407,0.518407,HD116658
9 zodiac,Lib,Libra,17.5393,-6.2768,14.5916,1.0,Lib.png,-1.011593,3.138407,1.318407,HD130819
10 zodiac,Sco,Scorpius,137.4378,-19.4456,37.3606,1.2,Sco.png,1.698407,-1.001593,-1.751593,HD148478
11 zodiac,Sgr,Sagittarius,66.2304,11.1498,-14.8095,1.2,Sgr.png,1.728407,-1.321593,-1.751593,HD175191
12 zodiac,Cap,Capricornus,32.9799,20.0621,-29.3945,1.3,Cap.png,1.158407,-0.881593,-0.561593,HD200761
13 zodiac,Aqr,Aquarius,86.5090,149.4078,-155.8102,1.2,Aqr.png,-2.921593,-2.391593,-2.551593,-2.511593
14 zodiac,Psc,Pisces,-28.0235,45.3150,-76.8893,1.6,Psc.png,0.458407,-0.001593,0.618407,HD4656
15 northern,Uma,Ursa Major,-12.0503,7.1931,19.8974,1.6,UMa.png,0.748407,2.398407,0.658407,HD95418
16 northern,Dra,Draco,-1.4340,20.6566,23.5098,1.9,Dra.png,0.658407,-2.541593,1.058407,HD137759
17 southern,Ant,Antila,-0.2233,-103.8908,42.7940,1.3,Ant.png,1.848407,0.198407,-3.141593,HD90610
18 southern,Crv,Corvus,8.0442,-16.8858,19.3984,1.1,Crv.png,2.198407,-0.041593,-2.221593,HD108767
19 southern,Cet,Cetus,-28.7960,7.2425,-73.6693,1.5,Cet.png,0.238407,0.368407,0.688407,HD11353
20 southern,Cha,Chameleon,53.5121,-108.3624,-38.1807,1.1,Cha.png,-1.801593,2.738407,0.448407,HD92305
21 northern,Cam,Camelopardalis,-304.8155,179.0620,71.1454,1.7,Cam.png,2.128407,1.228407,1.478407,HD31910
22 equatorial,Aql,Aquila,11.7741,9.7467,-1.6418,1.0,Aql.png,-2.601593,-2.511593,-3.141593,HD182640
23 southern,Aps,Apus,31.6370,-32.5620,-16.5786,1.1,Aps.png,-1.691593,-2.281593,0.838407,HD149324
24 northern,Lyn,Lynx,-98.3174,4.4830,67.2289,1.2,Lyn.png,1.688407,1.768407,1.668407,HD70272
25 southern,Phe,Phoenix,5.0172,-4.2096,-22.8088,1.5,Phe.png,-3.141593,3.138407,-3.141593,HD6595
26 northern,Cyg,Cygnus,78.7445,375.2440,12.4995,1.4,Cyg.png,1.668407,-0.931593,-0.261593,HD194093
27 southern,Cen,Centaurus,20.1398,-33.1830,9.5915,2.7,Cen.png,-1.291593,3.088407,0.458407,HD110304
28 northern,Aur,Auriga,-12.3062,3.8595,1.0302,1.5,Aur.png,1.378407,1.108407,1.178407,HD34029
29 northern,Peg,Pegasus,0.9791,32.5947,-27.7339,2.42,Peg.png,0.918407,-0.221593,-0.191593,HD218045
30 southern,Hya,Hydra,-2.9043,-33.5496,25.8962,3,Hya.png,-0.531593,2.838407,0.368407,HD93813
31 southern,Oct,Octans,22.0434,-27.8601,-24.3108,1.0,Oct.png,-0.911593,0.398407,1.198407,HD214846
32 southern,Nor,Norma,34.9251,-17.5643,0.0068,1.0,Nor.png,-1.631593,-2.421593,1.298407,HD146686
33 southern,Mus,Musca,48.8888,-79.2952,-10.2828,1.25,Mus.png,-1.871593,3.138407,0.358407,HD109668
34 southern,Hyi,Hydrus,3.2767,-4.7183,-4.7829,1.1,Hyi.png,2.438407,-3.141593,-2.381593,HD2151
35 northern,Lac,Lacerta,-6.0878,30.5794,-3.6064,1.0,Lac.png,-1.521593,-2.391593,3.138407,HD213558
36 equatorial,Lep,Lepus,-212.6297,-184.4909,-132.1156,1.0,Lep.png,-1.801593,-2.351593,-0.861593,HD36673
37 southern,Lup,Lupus,129.1166,-102.2983,33.3251,1.2,Lup.png,-1.191593,-2.391593,0.798407,HD129056
38 southern,Men,Mensa,2.4149,-8.5586,-4.8892,1.0,Men.png,-2.101593,-2.781593,0.828407,HD43834
39 southern,Mic,Microscopium,51.0335,11.1671,-44.3692,1.0,Mic.png,0.728407,-0.831593,-0.561593,HD199951
40 equatorial,Mon,Monoceros,-93.0725,-66.8909,8.6548,1.2,Mon.png,-1.331593,1.988407,-0.891593,HD55185
41 southern,Pav,Pavo,4.4549,-2.5959,-3.2739,1.3,Pav.png,-2.391593,-2.171593,1.648407,HD190248
42 southern,Ind,Indus,133.6149,-53.5569,-115.9552,1.5,Ind.png,-2.031593,-1.491593,1.758407,HD198700
43 northern,LMi,Leo Minor,-23.3948,-2.5770,38.0756,1.1,LMi.png,-3.141593,0.478407,-2.201593,HD90537
44 northern,Lyr,Lyra,2.8086,6.7630,2.5555,1.0,Lyr.png,-1.831593,-2.091593,3.141500,HD172167
45 northern,Her,Hercules,14.0526,14.9773,12.5478,1.3,Her.png,-1.511593,-1.811593,2.288407,HD156164
46 southern,Gru,Grus,18.6528,-3.2893,-24.6602,1.3,Gru.png,-3.141593,-2.511593,-2.901593,HD209952
47 southern,Crt,Crater,1.5886,-43.9831,40.3390,1.3,Crt.png,-0.521593,3.140000,0.588407,HD98430
48 northern,Del,Delphinus,14.8599,24.6150,-8.0550,1.2,Del.png,1.308407,-0.951593,-0.241593,HD196524
49 southern,Dor,Dorado,-0.6460,-9.3172,-6.9654,1.2,Dor.png,2.118407,1.768407,-2.901593,HD33262
50 northern,Equ,Equuleus,27.7363,41.7071,-27.4371,1.2,Equ.png,-1.801593,-2.511593,2.558407,HD202447
51 southern,Eri,Eridanus,-37.5153,-23.5231,-65.6368,2.1,Eri.png,0.128407,0.698407,0.998407,HD20720
52 southern,For,Fornax,-14.0351,-17.8282,-46.5514,1.4,For.png,3.138407,2.678407,-2.351593,HD17652
53 southern,Hor,Horologium,2.1021,-27.1310,-40.5136,1.2,Hor.png,-3.141593,2.468407,-2.191593,HD16920
54 southern,Pyx,Pyxis,-66.7424,-248.9639,26.0445,1.2,Pyx.png,1.838407,-1.651593,2.708407,HD74575
55 southern,Ret,Reticulum,2.8130,-37.2904,-33.2644,1.5,Ret.png,1.998407,2.188407,-2.591593,HD27256
56 northern,Sge,Sagitta,44.3886,70.9446,-7.6264,1.2,Sge.png,-0.741593,-2.231593,2.108407,HD189319
57 southern,Scl,Sculptor,21.6545,-6.8861,-166.5240,1.3,Scl.png,-0.071593,-0.221593,0.638407,HD2429
58 southern,Sct,Scutum,48.8939,21.5158,-0.1629,1.2,Sct.png,1.188407,-1.271593,-0.971593,HD171443
59 southern,Tuc,Tucana,35.3950,-20.2535,-45.2324,1.1,Tuc.png,-0.351593,-0.161593,0.308407,HD211416
60 northern,Tri,Triangulum,-26.6263,21.9119,-16.2254,1.2,Tri.png,1.168407,0.218407,0.558407,HD13161
61 southern,TrA,Triangulum Australe,96.2283,-76.4459,-33.5257,1.2,TrA.png,-1.991593,-2.491593,1.128407,HD150798
62 southern,Tel,Telescopium,72.3444,-14.5016,-20.0248,1.2,Tel.png,-0.461593,-1.731593,0.298407,HD169467
63 southern,Ara,Ara,164.9273,-75.6246,-35.3100,1.1,Ara.png,-1.381593,-2.131593,1.048407,HD157244
64 southern,Cae,Caelum,-6.0961,-13.7926,-13.3392,1.0,Cae.png,-0.661593,0.948407,0.418407,HD29875
65 southern,CMa,Canis Major,-1.7693,-1.9125,-0.4074,1.3,CMa.png,1.128407,1.048407,1.878407,HD48915
66 northern,CMi,Canis Minor,-2.8348,-1.8906,0.7881,1.2,CMi.png,2.538407,1.138407,-3.141593,HD61421
67 southern,Vol,Volans,37.6000,-182.7856,-62.6559,1.2,Vol.png,-2.441593,1.988407,-0.351593,HD68520
68 northern,UMi,Ursa Minor,-11.3527,27.2100,25.1835,1.3,UMi.png,-2.491593,-0.581593,-2.381593,HD131873
69 northern,And,Andromdeda,-32.8276,43.3946,-27.8475,1.6,And.png,-2.021593,-3.141593,-2.521593,HD6860
70 northern,Boo,Bootes,11.2468,14.9864,30.4945,2.0,Boo.png,-3.141593,-0.601593,-2.361593,HD135722
71 northern,Vul,Vulpecula,46.7540,77.7780,5.3953,1.1,Vul.png,-2.301593,-2.061593,-3.141593,HD131873
72 northern,CVn,Canes Venatici,-3.1198,5.7935,33.1368,1.3,CVn.png,0.148407,3.138407,0.428407,HD112413
73 southern,Cir,Circinus,11.4255,-11.6937,-1.3129,1.0,Cir.png,1.448407,-0.391593,-2.211593,HD128898
74 northern,Com,Coma Berenices,1.9257,-1.2062,12.2465,1.4,Com.png,3.138407,-0.051593,-2.711593,HD114378
75 southern,CrA,Corona Australis,146.1322,-4.7492,-53.7124,1.0,CrA.png,-3.141593,-2.021593,-3.141593,HD178345
76 northern,CrB,Corona Borealis,33.5737,32.0314,52.9729,1.3,CrB.png,-3.141593,-0.601593,-2.271593,HD143107
77 northern,Cas,Cassiopeia,-36.3073,59.4424,-7.6926,1.4,Cas.png,-1.431593,3.128407,-2.331593,HD3712
78 northern,Cep,Cepheus,-2.8178,14.4985,2.3848,1.7,Cep.png,-1.331593,-2.291593,-2.931593,HD203280
79 southern,Car,Carina Vela Puppis,14.1325,-188.6018,-42.2785,2.0,Car.png,2.078407,1.048407,-3.111593,HD71129
80 northern,Col,Columba,-11.2568,-20.5973,-11.9895,1.0,Col.png,2.518407,1.358407,-2.981593,HD39425
81 northern,Per,Perseus,-139.8202,79.8063,-16.2631,1.3,Per.png,-1.751593,2.428407,-2.411593,HD22928
82 northern,Oph,Ophiuchus,127.9419,14.0822,56.2015,3.2,Oph.png,2.178407,-0.781593,-1.681593,HD149757
83 southern,PsA,Piscis Austrinus,99.9977,47.6679,-199.6345,1.0,PsA.png,3.138407,-2.541593,-2.881593,HD214748
84 southern,Cru,Crux,49.3509,-85.0446,-0.6223,1.1,Cru.png,1.718407,0.048407,-2.741593,HD108248
85 southern,Pic,Pictor,-4.5417,-45.5649,-27.1768,1.0,Pic.png,2.568407,2.138407,-2.081593,HD39523

View File

@@ -0,0 +1,38 @@
local scene_helper = asset.require('util/scene_helper')
local Keybindings = {
{
Key = "c",
Name = "Show Constellation Art",
Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0);" ..
"openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Enabled', true);" ..
"openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0.1, 2);",
Documentation = "Enables and fades up constellation art work",
GuiPath = "/Rendering",
Local = false
},
{
Key = "SHIFT+c",
Name = "Hide Constellation Art",
Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0, 2);",
Documentation = "Fades out constellation artwork",
GuiPath = "/Rendering",
Local = false
},
{
Key = "CTRL+c",
Name = "Disable Constellation Art",
Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Enabled', false);",
Documentation = "Disable constellation artwork",
GuiPath = "/Rendering",
Local = false
}
}
asset.onInitialize(function ()
scene_helper.bindKeys(Keybindings)
end)
asset.onDeinitialize(function ()
scene_helper.unbindKeys(Keybindings)
end)

View File

@@ -0,0 +1,79 @@
local assetHelper = asset.require('util/asset_helper')
local transforms = asset.require("scene/solarsystem/sun/transforms")
local images = asset.syncedResource({
Name = "Constellation Images",
Type = "HttpSynchronization",
Identifier = "constellation_images",
Version = 1
})
--function that reads the file
local createConstellations = function (guiPath, constellationfile)
local genConstellations = {};
--skip the first line
local notFirstLine = false;
-- define parsec to meters
local PARSEC_CONSTANT = 3.0856776E16;
-- how many parsecs away do you want the images to be?
-- this setting puts the billboards at the location of the constellation bounds grid from DU.
-- but they can really be anywhere since the billboard size will scale with distance.
local distanceMultiplier = 3.2;
local baseScale = 1e17;
for line in io.lines(openspace.absPath(constellationfile)) do
if (notFirstLine) then
-- describes the data
local matchstring = '(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-)$'
local group, abbreviation, name, x, y, z, scale, imageName, rotX, rotY, rotZ, centerStar = line:match(matchstring)
local magVec = math.sqrt(x*x + y*y + z*z)
local normx = x/magVec
local normy = y/magVec
local normz = z/magVec
group = (group == '' and globe or group)
local aconstellation = {
Identifier = guiPath .. '-' .. name,
Parent = transforms.SolarSystemBarycenter.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
-- position is in parsecs from the SolarSystemBarycenter, so convert to meters
Position = {
normx * PARSEC_CONSTANT * distanceMultiplier,
normy * PARSEC_CONSTANT * distanceMultiplier,
normz * PARSEC_CONSTANT * distanceMultiplier
}
},
Rotation = {
Type = "StaticRotation",
Rotation = { tonumber(rotX), tonumber(rotY), tonumber(rotZ) }
}
},
Renderable = {
Type = "RenderablePlaneImageLocal",
Size = tonumber(baseScale*scale*distanceMultiplier/10),
Enabled = false,
Origin = "Center",
Billboard = false,
Texture = images .. "/" .. imageName,
BlendMode = "Additive",
Opacity = 0.1
},
Tag = { "ConstellationArtImage", group },
GUI = {
Name = name .. ' Image',
Path = '/Milky Way/' .. guiPath
}
}
table.insert(genConstellations, aconstellation);
else
notFirstLine = true
end
end
return genConstellations
end
asset.export('createConstellations', createConstellations)

View File

@@ -20,7 +20,7 @@ local C2019Q4BorisovTrail = {
Color = { 0.9, 0.9, 0.0 },
StartTime = "2015 JAN 01 00:00:00",
EndTime = "2024 JAN 01 00:00:00",
SampleInterval = 60
SampleInterval = 60 * 60 * 24 * 7
},
GUI = {
Name = "C-2019 Q4 Borisov Trail",

View File

@@ -1,39 +1,24 @@
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local descentKeyframes = asset.require('./apollo11_lem_descent.asset')
local descentRotationKeyframes = asset.require('./apollo11_lem_descent_rotation.asset')
local model = asset.require('scene/solarsystem/missions/apollo/lem_model')
local asset_helper = asset.require('util/asset_helper')
local sun_transforms = asset.require('scene/solarsystem/sun/transforms')
local moon_transforms = asset.require('scene/solarsystem/planets/earth/moon/moon')
local descentKeyframes = asset.require('./lem_descent.asset')
local descentRotationKeyframes = asset.require('./lem_descent_rotation.asset')
local lem_model = asset.require('scene/solarsystem/missions/apollo/lem_model')
local kernels = asset.require('./kernels').kernels
local models = asset.require('./models').models
asset.require('spice/base')
local kernelsFolder = asset.syncedResource({
Name = "Apollo Kernels",
Type = "HttpSynchronization",
Identifier = "apollo_11_spice",
Version = 1
})
local modelFolder = asset.syncedResource({
Name = "Apollo Models",
Type = "HttpSynchronization",
Identifier = "apollo_11_models",
Version = 1
})
local kernels = {
kernelsFolder .. "/moon_080317.tf",
kernelsFolder .. "/apollo_naif_ids.tf",
kernelsFolder .. "/moon_pa_de421_1900-2050.bpc",
kernelsFolder .. '/apollo11_orbits_full9km.bsp',
kernelsFolder .. '/apollo11_orbits_lm9km.bsp',
}
--landing - 1969-07-20T20:17:40
local apolloSpiceId = "-911"
local apolloLemSpiceId = "-911500"
local Apollo11Position = {
Identifier = "Apollo11Position",
Parent = "Moon",
Parent = moon_transforms.Moon.Identifier,
TimeFrame = {
Type = "TimeFrameInterval",
Start = "1969 JUL 19 19:38:29.183",
@@ -58,28 +43,27 @@ local Apollo11Position = {
local Apollo11Model = {
Identifier = "Apollo11",
Parent = Apollo11Position.Identifier,
TimeFrame = {
Type = "TimeFrameInterval",
Start = "1969 JUL 19 19:38:29.183",
End = "1969 JUL 22 04:55:35.183"
},
Transform = {
Scale = {
Type = "StaticScale",
Scale = 20.0
}
},
TimeFrame = {
Type = "TimeFrameInterval",
Start = "1969 JUL 19 19:38:29.183",
End = "1969 JUL 22 04:55:35.183"
},
Renderable = {
Type = "RenderableModel",
Geometry = {
Type = "MultiModelGeometry",
GeometryFile = modelFolder .. "/Apollo_CSM_shrunk_rotated_xy_double_size.obj"
GeometryFile = models .. "/Apollo_CSM_shrunk_rotated_xy_double_size.obj"
},
ColorTexture = modelFolder .. "/gray.png",
LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier)
ColorTexture = models .. "/gray.png",
LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier)
},
GUI = {
Hidden = false,
Name = "Apollo 11 CSM",
Path = "/Solar System/Missions/Apollo/11"
}
@@ -87,7 +71,7 @@ local Apollo11Model = {
local Apollo11MoonTrail = {
Identifier = "Apollo11MoonTrail",
Parent = "Moon",
Parent = moon_transforms.Moon.Identifier,
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
@@ -102,7 +86,7 @@ local Apollo11MoonTrail = {
EndTime = "1969 JUL 22 04:55:35.183",
SampleInterval = 60,
EnableFade = false,
Enabled = false,
Enabled = false
},
GUI = {
Name = "Apollo 11 Moon Orbits",
@@ -140,7 +124,7 @@ local lemRotation = {
local Apollo11LemTrail = {
Identifier = "Apollo11LemTrail",
Parent = "Moon",
Parent = moon_transforms.Moon.Identifier,
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = lemTranslation,
@@ -159,7 +143,7 @@ local Apollo11LemTrail = {
local Apollo11LemPosition = {
Identifier = "Apollo11LemPosition",
Parent = "Moon",
Parent = moon_transforms.Moon.Identifier,
TimeFrame = {
Type = "TimeFrameInterval",
Start = "1969 JUL 20 19:10:25.183"
@@ -169,7 +153,6 @@ local Apollo11LemPosition = {
Rotation = lemRotation
},
GUI = {
Hidden = false,
Name = "Apollo 11 Lunar Lander Position",
Path = "/Solar System/Missions/Apollo/11"
}
@@ -194,14 +177,14 @@ local Apollo11LemDescentModel = {
Type = "RenderableModel",
Geometry = {
Type = "MultiModelGeometry",
GeometryFile = model.modelFolder .. "/lmremoved.obj"
GeometryFile = lem_model.modelFolder .. "/lmremoved.obj"
},
SpecularIntensity = 0.0,
ColorTexture = model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg",
LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier)
RotationVector = { 273.750,28.0,309.85 },
ColorTexture = lem_model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg",
LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier)
},
GUI = {
Hidden = false,
Name = "Apollo 11 Descent Lem",
Path = "/Solar System/Missions/Apollo/11"
}
@@ -224,14 +207,14 @@ local Apollo11LemLandedModel = {
Type = "RenderableModel",
Geometry = {
Type = "MultiModelGeometry",
GeometryFile = model.modelFolder .. "/LM-2_ver2clean.obj"
GeometryFile = lem_model.modelFolder .. "/LM-2_ver2clean.obj"
},
SpecularIntensity = 0.0,
ColorTexture = model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg",
LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier)
RotationVector = { 273.750,28.0,309.85 },
ColorTexture = lem_model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg",
LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier)
},
GUI = {
Hidden = false,
Name = "Apollo 11 Landed Lem",
Path = "/Solar System/Missions/Apollo/11"
}
@@ -248,4 +231,4 @@ local exportList = {
Apollo11LemTrail,
}
assetHelper.registerSceneGraphNodesAndExport(asset, exportList)
asset_helper.registerSceneGraphNodesAndExport(asset, exportList)

View File

@@ -0,0 +1,16 @@
local kernelsFolder = asset.syncedResource({
Name = "Apollo Kernels",
Type = "HttpSynchronization",
Identifier = "apollo_11_spice",
Version = 1
})
local kernels = {
kernelsFolder .. "/moon_080317.tf",
kernelsFolder .. "/apollo_naif_ids.tf",
kernelsFolder .. "/moon_pa_de421_1900-2050.bpc",
kernelsFolder .. '/apollo11_orbits_full9km.bsp',
kernelsFolder .. '/apollo11_orbits_lm9km.bsp',
}
asset.export('kernels', kernels)

View File

@@ -1,18 +1,18 @@
-- a11_lem.asset
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon')
local asset_helper = asset.require('util/asset_helper')
local sun_transforms = asset.require('scene/solarsystem/sun/transforms')
local moon_asset = asset.require('scene/solarsystem/planets/earth/moon/moon')
local model = asset.require('scene/solarsystem/missions/apollo/lem_model')
local lem_model = asset.require('scene/solarsystem/missions/apollo/lem_model')
local Apollo11Lem = {
Identifier = "Apollo11Lem",
Parent = moonAsset.Moon.Identifier,
Parent = moon_asset.Moon.Identifier,
Transform = {
Translation = {
Type = "GlobeTranslation",
Globe = moonAsset.Moon.Identifier,
Globe = moon_asset.Moon.Identifier,
Longitude = -360+23.47306,
Latitude = 0.67402,
Altitude = -1927.65,
@@ -38,10 +38,11 @@ local Apollo11LemModel = {
Type = "RenderableModel",
Geometry = {
Type = "MultiModelGeometry",
GeometryFile = model.modelFolder .. "/LM-2_ver2clean.obj"
GeometryFile = lem_model.modelFolder .. "/LM-2_ver2clean.obj"
},
ColorTexture = model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg",
LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier)
RotationVector = { 91.044090,171.229706,111.666664 },
ColorTexture = lem_model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg",
LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier)
},
GUI = {
Hidden = false,
@@ -50,11 +51,4 @@ local Apollo11LemModel = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
Apollo11Lem,
Apollo11LemModel
})
asset.onInitialize(function ()
openspace.setPropertyValueSingle('Scene.Apollo11LemModel.Renderable.RotationVector', { 91.044090,171.229706,111.666664} );
end)
asset_helper.registerSceneGraphNodesAndExport(asset, { Apollo11Lem, Apollo11LemModel })

View File

@@ -1,16 +1,16 @@
-- The following keyframe data was converted from the_last_four_minutes_2019-06-09.kml,
-- which is available at http://apollo.mem-tek.com/GoogleMoonKMZ.html
-- In the conversion, some assumptions and simplifications were made:
-- * The descent markers in the KML have Point nodes expressed "relative to ground"
-- We assume that the ground is fixed at altitude 1927.65 meters below the reference ellipsoid,
-- in order to match height data from a height map constructed from LRO data.
-- * We manually offset the coordiantes slightly, by 0.013496003622691433 degrees in longitude and -0.007472581881668883 degrees in latitude,
-- in order to match the landing spot specified at long: 23.47306, lat: 0.67402 extracted from footage from LRO.
-- The kml file provided 23.45956399637731, lat: 0.6814925818816688 as the landing coordinates - hence the manual offset.
-- If more accurate height/color maps are aqcuired, these values can be adjusted by running the conversion script again.
-- For more information, contact emil.axelsson@liu.se.
--[[
In the conversion, some assumptions and simplifications were made:
* The descent markers in the KML have Point nodes expressed "relative to ground".
We assume that the ground is fixed at altitude 1927.65 meters below the reference ellipsoid,
in order to match height data from a height map constructed from LRO data.
* We manually offset the coordiantes slightly, by 0.013496003622691433 degrees in longitude and -0.007472581881668883 degrees in latitude,
in order to match the landing spot specified at long: 23.47306, lat: 0.67402 extracted from footage from LRO.
The kml file provided 23.45956399637731, lat: 0.6814925818816688 as the landing coordinates - hence the manual offset.
If more accurate height/color maps are aqcuired, these values can be adjusted by running the conversion script again.
]]--
local keyframes = {
['1969-07-20T20:13:40'] = {
@@ -1832,4 +1832,3 @@ local keyframes = {
};
asset.export('keyframes', keyframes);

View File

@@ -1,8 +1,8 @@
--apollo_11_lem_flipbook.asset
local helper = asset.require('util/vrt_flipbook_helper')
local moon_asset = asset.require('scene/solarsystem/planets/earth/moon/moon')
local assetPrefix = "A11flip";
local assetGlobe = "Moon";
local assetGlobe = moon_asset.Moon.Identifier;
local flipbookCount = 19;
local flipbook = nil;

View File

@@ -0,0 +1,8 @@
local modelFolder = asset.syncedResource({
Name = "Apollo Models",
Type = "HttpSynchronization",
Identifier = "apollo_11_models",
Version = 1
})
asset.export('models', modelFolder)

View File

@@ -0,0 +1,115 @@
local assetHelper = asset.require('util/asset_helper')
local moon_transforms = asset.require('scene/solarsystem/planets/earth/moon/moon')
local sun_transforms = asset.require('scene/solarsystem/sun/transforms')
local csm = asset.require('../apollo_csm')
asset.require('spice/base')
local kernels = asset.require('scene/solarsystem/missions/apollo/15/kernels').kernels
-- local models = asset.syncedResource({
-- Name = "Apollo 15 Models",
-- Type = "HttpSynchronization",
-- Identifier = "apollo_models",
-- Version = 1
-- })
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
-- {
-- Identifier = "Camera",
-- Type = "CameraLightSource",
-- Intensity = 0.5,
-- Enabled = false
-- }
}
local Apollo15 = {
Identifier = "Apollo15",
Parent = moon_transforms.Moon.Identifier,
Transform = {
Translation = {
Type = "SpiceTranslation",
Target = "APOLLO 15",
Observer = "MOON",
Frame = "IAU_MOON",
Kernels = kernels
},
Rotation = {
Type = "SpiceRotation",
SourceFrame = "A15_METRIC",
DestinationFrame = "GALACTIC"
}
},
TimeFrame = {
Type = "TimeFrameInterval",
Start = "1971-07-30T02:22:00.00",
End = "1971-08-01T18:05:00.00"
},
GUI = {
Name = "Apollo 15",
Path = "/Solar System/Missions/Apollo/15"
}
}
-- local Apollo15Main = {
-- Identifier = "Apollo15Main",
-- Parent = Apollo15.Identifier,
-- Renderable = {
-- Type = "RenderableModel",
-- Geometry = {
-- Type = "MultiModelGeometry",
-- -- GeometryFile = models .. "/Apollo_Spacecraft.obj"
-- GeometryFile = models .. "/Apollo_CSM_shrunk_rotated_xy_doubble_size.obj"
-- },
-- ColorTexture = models .. "/gray.png",
-- LightSources = LightSources,
-- DisableFaceCulling = true
-- },
-- GUI = {
-- Name = "Apollo 15 Main",
-- Path = "/Solar System/Missions/Apollo 15"
-- }
-- }
local Apollo15Trail = {
Identifier = "Apollo15Trail",
Parent = moon_transforms.Moon.Identifier,
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Target = "APOLLO 15",
Observer = "MOON",
Frame = "IAU_MOON",
Kernels = kernels
},
Color = { 0.70, 0.50, 0.20 },
StartTime = "1971 JUL 26",
EndTime = "1971 AUG 01 14:30:41.680",
SampleInterval = 2
},
GUI = {
Name = "Apollo 15 Trail",
Path = "/Solar System/Missions/Apollo/15"
}
}
local model_part = csm.createCsmModel(Apollo15.Identifier)
local list = { Apollo15, Apollo15Trail }
for k,v in pairs(model_part) do
v.GUI.Path = "/Solar System/Missions/Apollo/15/Model"
table.insert(list, v)
end
assetHelper.registerSceneGraphNodesAndExport(asset, list)

View File

@@ -0,0 +1,92 @@
local folder = asset.syncedResource({
Name = "Apollo Kernels",
Type = "HttpSynchronization",
Identifier = "apollo_spice",
Version = 1
})
local kernels = {
folder .. "/apollo15.0001.tsc",
-- folder .. '/AS15-P_v01.bc',
folder .. '/apollo15.0001.tf',
folder .. '/apollo15MetricAddendum002.ti',
-- folder .. '/apollo15PanoramicAddendum001.ti',
folder .. '/apollo15_metric.0002.ti',
-- folder .. '/apollo15_panoramic.0001.ti',
folder .. '/apollo15-1.bsp',
folder .. '/AS15-M_v01.bc',
-- folder .. '/AS15-M_v01.bsp',
}
-- local kernels = {
-- --sclk
-- folder .. "apollo15.0001.tsc",
-- --pck
-- folder .. "moon_080317.tf",
-- folder .. "moon_assoc_me.tf",
-- --ik
-- folder .. "apollo15_metric_v2.0001.ti",
-- folder .. "apollo15_panoramic.0001.ti",
-- --tspk
-- folder .. "de421.bsp",
-- folder .. "moon_pa_de421_1900-2050.bpc",
-- --iak
-- folder .. "apollo15MetricAddendum002.ti",
-- folder .. "apolloPanAddendum001.ti",
-- --fk
-- folder .. "apollo15_v2.0001.tf",
-- folder .. "apollo15_v2.0002.tf",
-- --spk
-- folder .. "AS15_M_REV23_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV4.bsp ",
-- folder .. "AS15_M_REV70_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV04_v2.bsp ",
-- folder .. "AS15_M_REV27_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV44_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV71_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV15_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV33_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV50_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV71_SMITHED_V02.bsp",
-- folder .. "AS15_M_REV15_v2.bsp ",
-- folder .. "AS15_M_REV34_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV60_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV72_v2.bsp",
-- folder .. "AS15_M_REV16_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV35_SMITHED_V02.bsp",
-- folder .. "AS15_M_REV62_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV22_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV38_SMITHED_V01.bsp",
-- folder .. "AS15_M_REV63_SMITHED_V01.bsp",
-- --ck
-- folder .. "AS15_M_REV04_SMITHED_V01.bc",
-- folder .. "AS15_M_REV15_SMITHED_V01.bc",
-- folder .. "AS15_M_REV16_SMITHED_V01.bc",
-- folder .. "AS15_M_REV22_SMITHED_V01.bc",
-- folder .. "AS15_M_REV23_SMITHED_V01.bc",
-- folder .. "AS15_M_REV27_SMITHED_V01.bc",
-- folder .. "AS15_M_REV33_SMITHED_V01.bc",
-- folder .. "AS15_M_REV34_SMITHED_V01.bc",
-- folder .. "AS15_M_REV35_SMITHED_V01.bc",
-- folder .. "AS15_M_REV35_SMITHED_V02.bc",
-- folder .. "AS15_M_REV38_SMITHED_V01.bc",
-- folder .. "AS15_M_REV44_SMITHED_V01.bc",
-- folder .. "AS15_M_REV50_SMITHED_V01.bc",
-- folder .. "AS15_M_REV60_SMITHED_V01.bc",
-- folder .. "AS15_M_REV62_SMITHED_V01.bc",
-- folder .. "AS15_M_REV63_SMITHED_V01.bc",
-- folder .. "AS15_M_REV70_SMITHED_V01.bc",
-- folder .. "AS15_M_REV71_SMITHED_V01.bc",
-- folder .. "AS15_M_REV71_SMITHED_V02.bc",
-- folder .. "AS15_M_REV72_v2.bc",
-- }
asset.export("kernels", kernels)

View File

@@ -0,0 +1,8 @@
local models = asset.syncedResource({
Name = "Apollo Boulders Models",
Type = "HttpSynchronization",
Identifier = "apollo_boulders",
Version = 1
})
asset.export('models', models)

View File

@@ -1,20 +1,13 @@
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local assetHelper = asset.require('util/asset_helper')
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon')
local models = asset.syncedResource({
Name = "Apollo Models",
Type = "HttpSynchronization",
Identifier = "apollo_boulders",
Version = 1
})
local sun_transforms = asset.require('scene/solarsystem/sun/transforms')
local asset_helper = asset.require('util/asset_helper')
local moon_asset = asset.require('scene/solarsystem/planets/earth/moon/moon')
local models = asset.require('./boulder_models').models
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
@@ -26,11 +19,11 @@ local LightSources = {
local Station2Boulder1Holder = {
Identifier = "Station_2_Boulder1",
Parent = moonAsset.Moon.Identifier,
Parent = moon_asset.Moon.Identifier,
Transform = {
Translation = {
Type = "GlobeTranslation",
Globe = moonAsset.Moon.Identifier,
Globe = moon_asset.Moon.Identifier,
Longitude = -360+30.5294692,
Latitude = 20.098824,
Altitude = -2442.8,
@@ -58,6 +51,7 @@ local Station2Boulder1Model = {
Type = "MultiModelGeometry",
GeometryFile = models .. "/b1-v2.obj"
},
RotationVector = { 243.243256 ,206.270264, 309.677429 },
ColorTexture = models .. "/b1-v2_u1_v1.jpeg",
LightSources = LightSources,
PerformShading = false,
@@ -71,11 +65,11 @@ local Station2Boulder1Model = {
local Station2Boulder2Holder = {
Identifier = "Station_2_Boulder2",
Parent = moonAsset.Moon.Identifier,
Parent = moon_asset.Moon.Identifier,
Transform = {
Translation = {
Type = "GlobeTranslation",
Globe = moonAsset.Moon.Identifier,
Globe = moon_asset.Moon.Identifier,
Longitude = -360+30.5287892,
Latitude = 20.098240,
Altitude = -2434.6,
@@ -103,6 +97,7 @@ local Station2Boulder2Model = {
Type = "MultiModelGeometry",
GeometryFile = models .. "/b2model.obj"
},
RotationVector = { 66.162155, 7.783780, 114.193550 },
ColorTexture = models .. "/b2model_u1_v1.jpeg",
LightSources = LightSources,
PerformShading = false,
@@ -116,11 +111,11 @@ local Station2Boulder2Model = {
local Station2Boulder3Holder = {
Identifier = "Station_2_Boulder3",
Parent = moonAsset.Moon.Identifier,
Parent = moon_asset.Moon.Identifier,
Transform = {
Translation = {
Type = "GlobeTranslation",
Globe = moonAsset.Moon.Identifier,
Globe = moon_asset.Moon.Identifier,
Longitude = -360+30.5294692,
Latitude = 20.098610,
Altitude = -2441.55,
@@ -148,6 +143,7 @@ local Station2Boulder3Model = {
Type = "MultiModelGeometry",
GeometryFile = models .. "/b3model.obj"
},
RotationVector = { 161.513519 ,243.243256, 65.806450 },
ColorTexture = models .. "/b3model_u1_v1.jpeg",
LightSources = LightSources,
PerformShading = false,
@@ -159,25 +155,8 @@ local Station2Boulder3Model = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
asset_helper.registerSceneGraphNodesAndExport(asset, {
Station2Boulder1Holder, Station2Boulder1Model,
Station2Boulder2Holder, Station2Boulder2Model,
Station2Boulder3Holder, Station2Boulder3Model
})
asset.onInitialize(function ()
openspace.setPropertyValueSingle(
'Scene.Station2Boulder1Model.Renderable.RotationVector',
{ 243.243256 ,206.270264, 309.677429 }
);
openspace.setPropertyValueSingle(
'Scene.Station2Boulder3Model.Renderable.RotationVector',
{ 161.513519 ,243.243256, 65.806450 }
);
openspace.setPropertyValueSingle(
'Scene.Station2Boulder2Model.Renderable.RotationVector',
{ 66.162155, 7.783780, 114.193550 }
);
end)

View File

@@ -1,20 +1,13 @@
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local assetHelper = asset.require('util/asset_helper')
local models = asset.syncedResource({
Name = "Apollo Models",
Type = "HttpSynchronization",
Identifier = "apollo_boulders",
Version = 1
})
local sun_transforms = asset.require('scene/solarsystem/sun/transforms')
local asset_helper = asset.require('util/asset_helper')
local moon_asset = asset.require('scene/solarsystem/planets/earth/moon/moon')
local models = asset.require('./boulder_models').models
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
@@ -24,17 +17,14 @@ local LightSources = {
}
}
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon')
local Station6Frag1Holder = {
Identifier = "Station_6_Fragment1",
Parent = moonAsset.Moon.Identifier,
Parent = moon_asset.Moon.Identifier,
Transform = {
Translation = {
Type = "GlobeTranslation",
Globe = moonAsset.Moon.Identifier,
Globe = moon_asset.Moon.Identifier,
Longitude = -360+30.80068,
Latitude = 20.2903,
Altitude = -2562.6,
@@ -53,7 +43,7 @@ local Station6Frag1Model = {
Transform = {
Translation = {
Type = "GlobeTranslation",
Globe = moonAsset.Moon.Identifier,
Globe = moon_asset.Moon.Identifier,
Longitude = -360+30.8007,
Latitude = 20.2903,
Altitude = -2562.6,
@@ -72,6 +62,7 @@ local Station6Frag1Model = {
Type = "MultiModelGeometry",
GeometryFile = models .. "/A17-S6-frag1.obj"
},
RotationVector = { 235.909088,165.000000,286.299194 },
ColorTexture = models .. "/A17-S6-frag1.png",
LightSources = LightSources,
PerformShading = false,
@@ -87,7 +78,7 @@ local Station6Frag1Model = {
local Station6Frag23Holder = {
Identifier = "Station_6_Fragments_2_3",
Parent = moonAsset.Moon.Identifier,
Parent = moon_asset.Moon.Identifier,
GUI = {
Name = "Station 6 Fragments 2 & 3 Holder",
Path = "/Solar System/Missions/Apollo/17/Station 6"
@@ -105,7 +96,7 @@ local Station6Frag2Model = {
},
Translation = {
Type = "GlobeTranslation",
Globe = moonAsset.Moon.Identifier,
Globe = moon_asset.Moon.Identifier,
Longitude = -360+30.80055,
Latitude = 20.289808,
Altitude = -2566.5,
@@ -118,6 +109,7 @@ local Station6Frag2Model = {
Type = "MultiModelGeometry",
GeometryFile = models .. "/station6_boulder_frag2.obj"
},
RotationVector = { 336.959991,210.239990,325.984253 },
ColorTexture = models .. "/frag2crop_u1_v1.jpeg",
LightSources = LightSources,
PerformShading = false,
@@ -129,8 +121,6 @@ local Station6Frag2Model = {
}
}
local Station6Frag3Model = {
Identifier = "A17S6F3",
Parent = Station6Frag23Holder.Identifier,
@@ -141,7 +131,7 @@ local Station6Frag3Model = {
},
Translation = {
Type = "GlobeTranslation",
Globe = moonAsset.Moon.Identifier,
Globe = moon_asset.Moon.Identifier,
Longitude = -360+30.80053,
Latitude = 20.29030,
Altitude = -2563.0,
@@ -154,6 +144,7 @@ local Station6Frag3Model = {
Type = "MultiModelGeometry",
GeometryFile = models .. "/station6_boulder_frag3.obj"
},
RotationVector = { 293.181824,255.000000,4.090910 },
ColorTexture = models .. "/frag3crop_u1_v1.jpeg",
LightSources = LightSources,
PerformShading = false,
@@ -165,22 +156,6 @@ local Station6Frag3Model = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
asset_helper.registerSceneGraphNodesAndExport(asset, {
Station6Frag1Holder, Station6Frag1Model, Station6Frag23Holder, Station6Frag2Model, Station6Frag3Model,
})
asset.onInitialize(function ()
openspace.setPropertyValueSingle('Scene.Station6Frag1Model.Renderable.RotationVector', {235.909088,165.000000,286.299194});
openspace.setPropertyValueSingle('Scene.A17S6F5.Renderable.RotationVector', {336.959991,210.239990,325.984253});
openspace.setPropertyValueSingle('Scene.A17S6F3.Renderable.RotationVector', {293.181824,255.000000,4.090910});
openspace.setPropertyValueSingle('Scene.Station6Frag1Model.Renderable.PerformShading', false);
openspace.setPropertyValueSingle("NavigationHandler.OrbitalNavigator.MinimumAllowedDistance", 0.050000)
end)

View File

@@ -1,19 +1,13 @@
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local assetHelper = asset.require('util/asset_helper')
local models = asset.syncedResource({
Name = "Apollo Models",
Type = "HttpSynchronization",
Identifier = "apollo_boulders",
Version = 1
})
local sun_transforms = asset.require('scene/solarsystem/sun/transforms')
local asset_helper = asset.require('util/asset_helper')
local moon_asset = asset.require('scene/solarsystem/planets/earth/moon/moon')
local models = asset.require('./boulder_models').models
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
@@ -23,15 +17,13 @@ local LightSources = {
}
}
local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon')
local Station7BoulderHolder = {
Identifier = "Station_7_Boulder",
Parent = moonAsset.Moon.Identifier,
Parent = moon_asset.Moon.Identifier,
Transform = {
Translation = {
Type = "GlobeTranslation",
Globe = moonAsset.Moon.Identifier,
Globe = moon_asset.Moon.Identifier,
Longitude = -360+30.8165882,
Latitude = 20.2908556,
Altitude = -2593.5,
@@ -59,6 +51,7 @@ local Station7BoulderModel = {
Type = "MultiModelGeometry",
GeometryFile = models .. "/b7model.obj"
},
RotationVector = { 1.945950,274.378387,212.903214 },
ColorTexture = models .. "/b7model_u1_v1.jpeg",
LightSources = LightSources,
PerformShading = false,
@@ -70,11 +63,6 @@ local Station7BoulderModel = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
asset_helper.registerSceneGraphNodesAndExport(asset, {
Station7BoulderHolder, Station7BoulderModel
})
asset.onInitialize(function ()
openspace.setPropertyValueSingle('Scene.Station7BoulderModel.Renderable.RotationVector', {1.945950,274.378387,212.903214});
end)

View File

@@ -1,17 +1,16 @@
--a17_lem.asset
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon')
local asset_helper = asset.require('util/asset_helper')
local sun_transforms = asset.require('scene/solarsystem/sun/transforms')
local moon_asset = asset.require('scene/solarsystem/planets/earth/moon/moon')
local model = asset.require('scene/solarsystem/missions/apollo/lem_model')
local Apollo17Lem = {
Identifier = "Apollo17Lem",
Parent = moonAsset.Moon.Identifier,
Parent = moon_asset.Moon.Identifier,
Transform = {
Translation = {
Type = "GlobeTranslation",
Globe = moonAsset.Moon.Identifier,
Globe = moon_asset.Moon.Identifier,
Longitude = -329.22833,
Latitude = 20.19092,
UseHeightmap = true
@@ -40,21 +39,14 @@ local Apollo17LemModel = {
GeometryFile = model.modelFolder .. "/LM-2_ver2clean.obj"
},
SpecularIntensity = 0.0,
RotationVector = { 110.255219,171.229706,126.666664 },
ColorTexture = model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg",
LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier)
LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier)
},
GUI = {
Hidden = false,
Name = "Apollo 17 Lem",
Path = "/Solar System/Missions/Apollo/17"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
Apollo17Lem,
Apollo17LemModel,
})
asset.onInitialize(function ()
openspace.setPropertyValueSingle('Scene.Apollo17LemModel.Renderable.RotationVector', { 110.255219,171.229706,126.666664 });
end)
asset_helper.registerSceneGraphNodesAndExport(asset, { Apollo17Lem, Apollo17LemModel })

View File

@@ -0,0 +1,3 @@
asset.require('./model')
asset.require('./launch_model')
asset.require('./trails')

View File

@@ -0,0 +1,17 @@
local kernelsFolder = asset.syncedResource({
Name = "Apollo Kernels",
Type = "HttpSynchronization",
Identifier = "apollo_spice",
Version = 1
})
local kernels = {
kernelsFolder .. "/moon_080317.tf",
kernelsFolder .. "/apollo8.tf",
kernelsFolder .. "/moon_pa_de421_1900-2050.bpc",
kernelsFolder .. '/apollo8.tsc',
kernelsFolder .. '/apollo8.bsp',
kernelsFolder .. '/apollo8_earthrise.bc',
}
asset.export('kernels', kernels)

View File

@@ -0,0 +1,65 @@
local asset_helper = asset.require('util/asset_helper')
local earth_transforms = asset.require('scene/solarsystem/planets/earth/transforms')
local kernels = asset.require('./kernels').kernels
local csm = asset.require('../apollo_csm')
local apolloSpiceId = "-908"
local Apollo8Launch = {
Identifier = "Apollo8Launch",
Parent = earth_transforms.EarthIAU.Identifier,
TimeFrame = {
Type = "TimeFrameInterval",
Start = "1968 DEC 21",
End = "1968 DEC 28"
},
Transform = {
Translation = {
Type = "SpiceTranslation",
Target = apolloSpiceId,
Observer = "EARTH",
Frame = "IAU_EARTH",
Kernels = kernels
},
},
GUI = {
Name = "Apollo 8 Launch Capsule",
Path = "/Solar System/Missions/Apollo"
}
}
local Apollo8LaunchModel = {
Identifier = "Apollo8LaunchModel",
Parent = Apollo8Launch.Identifier,
TimeFrame = {
Type = "TimeFrameInterval",
Start = "1968 DEC 21",
End = "1968 DEC 22"
},
Transform = {
Scale = {
Type = "StaticScale",
-- The scale of the model is in cm; OpenSpace is in m
Scale = 0.01
},
Rotation = {
Type = "StaticRotation",
Rotation = {0.0, 0.0, -3.1415 / 2}
}
},
GUI = {
Hidden = true,
Name = "Apollo 8 Launch Model",
Path = "/Solar System/Missions/Apollo/8"
}
}
local launch_model_part = csm.createCsmModel(Apollo8LaunchModel.Identifier)
local list = { Apollo8Launch, Apollo8LaunchModel }
for k,v in pairs(launch_model_part) do
v.GUI.Path = "/Solar System/Missions/Apollo/8/Model"
table.insert(list, v)
end
asset_helper.registerSceneGraphNodesAndExport(asset, list)

View File

@@ -0,0 +1,93 @@
local asset_helper = asset.require('util/asset_helper')
local earth_transforms = asset.require('scene/solarsystem/planets/earth/transforms')
local kernels = asset.require('./kernels').kernels
local csm = asset.require('../apollo_csm')
local apolloSpiceId = "-908"
local Apollo8 = {
Identifier = "Apollo8",
Parent = earth_transforms.EarthBarycenter.Identifier,
TimeFrame = {
Type = "TimeFrameInterval",
Start = "1968 DEC 21",
End = "1968 DEC 28"
},
Transform = {
Translation = {
Type = "SpiceTranslation",
Target = apolloSpiceId,
Observer = "EARTH BARYCENTER",
Frame = "GALACTIC",
Kernels = kernels
},
Rotation = {
Type = "SpiceRotation",
SourceFrame = "A8_EARTHRISE",
DestinationFrame = "GALACTIC",
TimeFrame = {
-- The orientation of Apollo 8 is only available during the few minutes
-- when the Earthrise picture was taken.
Type = "TimeFrameInterval",
Start = "1968 DEC 24 16:37:19",
End = "1968 DEC 24 16:40:15"
}
}
},
GUI = {
Name = "Apollo 8",
Path = "/Solar System/Missions/Apollo"
}
}
local Apollo8Model = {
Identifier = "Apollo8Model",
Parent = Apollo8.Identifier,
TimeFrame = {
Type = "TimeFrameInterval",
Start = "1968 DEC 22",
End = "1968 DEC 28"
},
Transform = {
Scale = {
Type = "StaticScale",
-- The scale of the model is in cm; OpenSpace is in m
Scale = 0.01
},
Rotation = {
Type = "StaticRotation",
Rotation = {0.0, 0.0, -3.1415 / 2}
}
},
GUI = {
Hidden = true,
Name = "Apollo 8 Model",
Path = "/Solar System/Missions/Apollo"
}
}
-- The pivot node is used for navigation inside the spacecraft
local Apollo8Pivot = {
Identifier = "Apollo8Pivot",
Parent = Apollo8.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0, 2.5, 0 }
},
},
GUI = {
Name = "Apollo 8 Pivot",
Path = "/Solar System/Missions/Apollo"
}
}
local model_part = csm.createCsmModel(Apollo8Model.Identifier)
local list = { Apollo8, Apollo8Model, Apollo8Pivot }
for k,v in pairs(model_part) do
v.GUI.Path = "/Solar System/Missions/Apollo/8/Model"
table.insert(list, v)
end
asset_helper.registerSceneGraphNodesAndExport(asset, list)

View File

@@ -0,0 +1,81 @@
local assetHelper = asset.require('util/asset_helper')
local earth_transforms = asset.require('scene/solarsystem/planets/earth/transforms')
local moon_transforms = asset.require('scene/solarsystem/planets/earth/moon/moon')
local kernels = asset.require('./kernels').kernels
local apolloSpiceId = "-908"
local LaunchTrail = {
Identifier = "Apollo8LaunchTrail",
Parent = earth_transforms.EarthIAU.Identifier,
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Target = apolloSpiceId,
Observer = "EARTH",
Frame = "IAU_EARTH",
Kernels = kernels
},
Color = { 0.70, 0.50, 0.20 },
StartTime = "1968 DEC 21 12:51:00",
EndTime = "1968 DEC 21 23:23:22",
SampleInterval = 30
},
GUI = {
Name = "Apollo 8 Launch Trail",
Path = "/Solar System/Missions/Apollo"
}
}
local MoonTrail = {
Identifier = "Apollo8MoonTrail",
Parent = moon_transforms.Moon.Identifier,
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Target = apolloSpiceId,
Observer = "MOON",
Frame = "IAU_MOON",
Kernels = kernels
},
Color = { 0.70, 0.50, 0.20 },
StartTime = "1968 DEC 23",
EndTime = "1968 DEC 26",
SampleInterval = 30,
Enabled = false,
},
GUI = {
Name = "Apollo 8 Moon Trail",
Path = "/Solar System/Missions/Apollo"
}
}
local EarthBarycenterTrail = {
Identifier = "Apollo8EarthBarycenterTrail",
Parent = earth_transforms.EarthCenter.Identifier,
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Target = apolloSpiceId,
Observer = "EARTH",
Frame = "GALACTIC",
Kernels = kernels
},
Color = { 0.8, 0.2, 0.2 },
StartTime = "1968 DEC 21",
EndTime = "1968 DEC 28",
SampleInterval = 30,
Enabled = true,
},
GUI = {
Name = "Apollo 8 Earth Barycenter Trail",
Path = "/Solar System/Missions/Apollo"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { LaunchTrail, MoonTrail, EarthBarycenterTrail })

View File

@@ -1,203 +0,0 @@
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
asset.require('spice/base')
--asset.require('scene/solarsystem/missions/apollo/a15kernels')
local models = asset.syncedResource({
Name = "Apollo 15 Models",
Type = "HttpSynchronization",
Identifier = "apollo_models",
Version = 1
})
local kernels = asset.syncedResource({
Name = "Apollo Kernels",
Type = "HttpSynchronization",
Identifier = "apollo_spice",
Version = 1
})
local Kernels = {
kernels .. "/apollo15.0001.tsc",
-- kernels .. '/AS15-P_v01.bc',
kernels .. '/apollo15.0001.tf',
kernels .. '/apollo15MetricAddendum002.ti',
-- kernels .. '/apollo15PanoramicAddendum001.ti',
kernels .. '/apollo15_metric.0002.ti',
-- kernels .. '/apollo15_panoramic.0001.ti',
kernels .. '/apollo15-1.bsp',
kernels .. '/AS15-M_v01.bc',
-- kernels .. '/AS15-M_v01.bsp',
}
-- local Apollo15Kernels = {
-- --sclk
-- ApolloKernels .. "/apollo15.0001.tsc",
-- --pck
-- ApolloKernels .. "/moon_080317.tf",
-- ApolloKernels .. "/moon_assoc_me.tf",
-- --ik
-- ApolloKernels .. "/apollo15_metric_v2.0001.ti",
-- ApolloKernels .. "/apollo15_panoramic.0001.ti",
-- --tspk
-- ApolloKernels .. "/de421.bsp",
-- ApolloKernels .. "/moon_pa_de421_1900-2050.bpc",
-- --iak
-- ApolloKernels .. "/apollo15MetricAddendum002.ti",
-- ApolloKernels .. "/apolloPanAddendum001.ti",
-- --fk
-- ApolloKernels .. "/apollo15_v2.0001.tf",
-- ApolloKernels .. "/apollo15_v2.0002.tf",
-- --spk
-- ApolloKernels .. "/AS15_M_REV23_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV4.bsp ",
-- ApolloKernels .. "/AS15_M_REV70_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV04_v2.bsp ",
-- ApolloKernels .. "/AS15_M_REV27_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV44_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV71_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV15_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV33_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV50_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV71_SMITHED_V02.bsp",
-- ApolloKernels .. "/AS15_M_REV15_v2.bsp ",
-- ApolloKernels .. "/AS15_M_REV34_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV60_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV72_v2.bsp",
-- ApolloKernels .. "/AS15_M_REV16_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV35_SMITHED_V02.bsp",
-- ApolloKernels .. "/AS15_M_REV62_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV22_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV38_SMITHED_V01.bsp",
-- ApolloKernels .. "/AS15_M_REV63_SMITHED_V01.bsp",
-- --ck
-- ApolloKernels .. "/AS15_M_REV04_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV15_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV16_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV22_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV23_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV27_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV33_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV34_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV35_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV35_SMITHED_V02.bc",
-- ApolloKernels .. "/AS15_M_REV38_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV44_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV50_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV60_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV62_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV63_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV70_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV71_SMITHED_V01.bc",
-- ApolloKernels .. "/AS15_M_REV71_SMITHED_V02.bc",
-- ApolloKernels .. "/AS15_M_REV72_v2.bc",
-- }
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
-- {
-- Identifier = "Camera",
-- Type = "CameraLightSource",
-- Intensity = 0.5,
-- Enabled = false
-- }
}
local Apollo15 = {
Identifier = "Apollo15",
Parent = "Moon",
Transform = {
Translation = {
Type = "SpiceTranslation",
Target = "APOLLO 15",
Observer = "MOON",
Frame = "IAU_MOON",
Kernels = Kernels
},
Rotation = {
Type = "SpiceRotation",
SourceFrame = "A15_METRIC",
DestinationFrame = "GALACTIC"
}
},
TimeFrame = { -- Using Spice kernels for 1850-2150
Type = "TimeFrameInterval",
Start = "1971-07-30T02:22:00.00",
End = "1971-08-01T18:05:00.00"
},
GUI = {
Name = "Apollo 15",
Path = "/Solar System/Missions/Apollo 15"
}
}
local Apollo15Main = {
Identifier = "Apollo15Main",
Parent = Apollo15.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {
Type = "MultiModelGeometry",
-- GeometryFile = models .. "/Apollo_Spacecraft.obj"
GeometryFile = models .. "/Apollo_CSM_shrunk_rotated_xy_doubble_size.obj"
},
ColorTexture = models .. "/gray.png",
LightSources = LightSources,
DisableFaceCulling = true
},
GUI = {
Name = "Apollo 15 Main",
Path = "/Solar System/Missions/Apollo 15"
}
}
local Apollo15Trail = {
Identifier = "Apollo15Trail",
Parent = "Moon",
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Target = "APOLLO 15",
Observer = "MOON",
Frame = "IAU_MOON",
Kernels = Kernels
},
Color = { 0.70, 0.50, 0.20 },
StartTime = "1971 JUL 26",
EndTime = "1971 AUG 01 14:30:41.680",
SampleInterval = 2
},
GUI = {
Name = "Apollo 15 Trail",
Path = "/Solar System/Missions/Apollo 15"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
Apollo15,
Apollo15Main,
Apollo15Trail
})

View File

@@ -1,86 +0,0 @@
local ApolloKernels = asset.syncedResource({
Name = "Apollo Kernels",
Type = "HttpSynchronization",
Identifier = "apollo_spice",
Version = 1
})
local Apollo15Kernels = {
--sclk
ApolloKernels .. "apollo15.0001.tsc",
--pck
ApolloKernels .. "moon_080317.tf",
ApolloKernels .. "moon_assoc_me.tf",
--ik
ApolloKernels .. "apollo15_metric_v2.0001.ti",
ApolloKernels .. "apollo15_panoramic.0001.ti",
--tspk
ApolloKernels .. "de421.bsp",
ApolloKernels .. "moon_pa_de421_1900-2050.bpc",
--iak
ApolloKernels .. "apollo15MetricAddendum002.ti",
ApolloKernels .. "apolloPanAddendum001.ti",
--fk
ApolloKernels .. "apollo15_v2.0001.tf",
ApolloKernels .. "apollo15_v2.0002.tf",
--spk
ApolloKernels .. "AS15_M_REV23_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV4.bsp ",
ApolloKernels .. "AS15_M_REV70_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV04_v2.bsp ",
ApolloKernels .. "AS15_M_REV27_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV44_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV71_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV15_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV33_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV50_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV71_SMITHED_V02.bsp",
ApolloKernels .. "AS15_M_REV15_v2.bsp ",
ApolloKernels .. "AS15_M_REV34_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV60_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV72_v2.bsp",
ApolloKernels .. "AS15_M_REV16_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV35_SMITHED_V02.bsp",
ApolloKernels .. "AS15_M_REV62_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV22_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV38_SMITHED_V01.bsp",
ApolloKernels .. "AS15_M_REV63_SMITHED_V01.bsp",
--ck
ApolloKernels .. "AS15_M_REV04_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV15_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV16_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV22_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV23_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV27_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV33_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV34_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV35_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV35_SMITHED_V02.bc",
ApolloKernels .. "AS15_M_REV38_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV44_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV50_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV60_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV62_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV63_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV70_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV71_SMITHED_V01.bc",
ApolloKernels .. "AS15_M_REV71_SMITHED_V02.bc",
ApolloKernels .. "AS15_M_REV72_v2.bc",
}
--asset.export("ApolloKernels", Kernels)
asset.export("Apollo15Kernels", Apollo15Kernels)

View File

@@ -1,235 +0,0 @@
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local csm = asset.require('./apollo_csm')
asset.require('spice/base')
local kernelsFolder = asset.syncedResource({
Name = "Apollo Kernels",
Type = "HttpSynchronization",
Identifier = "apollo_spice",
Version = 1
})
local kernels = {
kernelsFolder .. "/moon_080317.tf",
kernelsFolder .. "/apollo8.tf",
kernelsFolder .. "/moon_pa_de421_1900-2050.bpc",
kernelsFolder .. '/apollo8.tsc',
kernelsFolder .. '/apollo8.bsp',
kernelsFolder .. '/apollo8_earthrise.bc',
}
local apolloSpiceId = "-908"
local Apollo8Launch = {
Identifier = "Apollo8Launch",
Parent = "Earth",
TimeFrame = { -- Using Spice kernels for 1850-2150
Type = "TimeFrameInterval",
Start = "1968 DEC 21",
End = "1968 DEC 28"
},
Transform = {
Translation = {
Type = "SpiceTranslation",
Target = apolloSpiceId,
Observer = "EARTH",
Frame = "IAU_EARTH",
Kernels = kernels
},
},
GUI = {
Name = "Apollo 8 Launch Capsule",
Path = "/Solar System/Missions/Apollo"
}
}
local Apollo8 = {
Identifier = "Apollo8",
Parent = "EarthBarycenter",
TimeFrame = { -- Using Spice kernels for 1850-2150
Type = "TimeFrameInterval",
Start = "1968 DEC 21",
End = "1968 DEC 28"
},
Transform = {
Translation = {
Type = "SpiceTranslation",
Target = apolloSpiceId,
Observer = "EARTH BARYCENTER",
Frame = "GALACTIC",
Kernels = kernels
},
Rotation = {
Type = "SpiceRotation",
SourceFrame = "A8_EARTHRISE",
DestinationFrame = "GALACTIC",
TimeFrame = {
-- The orientation of Apollo 8 is only
-- available during the few minutes when
-- the famous Earthrise picture was taken.
Type = "TimeFrameInterval",
Start = "1968 DEC 24 16:37:19",
End = "1968 DEC 24 16:40:15"
}
}
},
GUI = {
Name = "Apollo 8",
Path = "/Solar System/Missions/Apollo"
}
}
local Apollo8LaunchModel = {
Identifier = "Apollo8LaunchModel",
Parent = Apollo8Launch.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
-- The scale of the model is in cm; OpenSpace is in m
Scale = 0.01
},
Rotation = {
Type = "StaticRotation",
Rotation = {0.0, 0.0, -3.1415/2}
}
},
GUI = {
Hidden = true,
Name = "Apollo 8 Launch Model",
Path = "/Solar System/Missions/Apollo"
}
}
local Apollo8Model = {
Identifier = "Apollo8Model",
Parent = Apollo8.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
-- The scale of the model is in cm; OpenSpace is in m
Scale = 0.01
},
Rotation = {
Type = "StaticRotation",
Rotation = {0.0, 0.0, -3.1415/2}
}
},
GUI = {
Hidden = true,
Name = "Apollo 8 Model",
Path = "/Solar System/Missions/Apollo"
}
}
local PivotOffset = { 0, 2.5, 0 }
-- The pivot node is used for navigation inside the spacecraft
local Apollo8Pivot = {
Identifier = "Apollo8Pivot",
Parent = Apollo8.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = PivotOffset
},
},
GUI = {
Name = "Apollo 8 Pivot",
Path = "/Solar System/Missions/Apollo"
}
}
local Apollo8LaunchTrail = {
Identifier = "Apollo8LaunchTrail",
Parent = "Earth",
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Target = apolloSpiceId,
Observer = "EARTH",
Frame = "IAU_EARTH",
Kernels = kernels
},
Color = { 0.70, 0.50, 0.20 },
StartTime = "1968 DEC 21 12:51:00",
EndTime = "1968 DEC 21 23:23:22",
SampleInterval = 30
},
GUI = {
Name = "Apollo 8 Launch Trail",
Path = "/Solar System/Missions/Apollo"
}
}
local Apollo8MoonTrail = {
Identifier = "Apollo8MoonTrail",
Parent = "Moon",
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Target = apolloSpiceId,
Observer = "MOON",
Frame = "IAU_MOON",
Kernels = kernels
},
Color = { 0.70, 0.50, 0.20 },
StartTime = "1968 DEC 23",
EndTime = "1968 DEC 26",
SampleInterval = 30,
Enabled = false,
},
GUI = {
Name = "Apollo 8 Moon Trail",
Path = "/Solar System/Missions/Apollo"
}
}
local Apollo8EarthBarycenterTrail = {
Identifier = "Apollo8EarthBarycenterTrail",
Parent = "EarthBarycenter",
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Target = apolloSpiceId,
Observer = "EARTH",
Frame = "GALACTIC",
Kernels = kernels
},
Color = { 0.8, 0.2, 0.2 },
StartTime = "1968 DEC 21",
EndTime = "1968 DEC 28",
SampleInterval = 30,
Enabled = true,
},
GUI = {
Name = "Apollo 8 Earth Barycenter Trail",
Path = "/Solar System/Missions/Apollo"
}
}
local exportList = {
Apollo8,
Apollo8Model,
Apollo8Launch,
Apollo8LaunchModel,
Apollo8Pivot,
Apollo8LaunchTrail,
Apollo8MoonTrail,
Apollo8EarthBarycenterTrail
}
assetHelper.registerSceneGraphNodesAndExport(asset, exportList)
-- Registering Command and Service module needs to happen fter the export list
-- has been registered, since it depends on the Apollo8Model scene graph node.
csm.registerCsm(asset, Apollo8Model.Identifier)
csm.registerCsm(asset, Apollo8LaunchModel.Identifier)

View File

@@ -1,74 +0,0 @@
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local kernelsFolder = asset.syncedResource({
Name = "Apollo Kernels",
Type = "HttpSynchronization",
Identifier = "apollo_spice",
Version = 1
})
local kernels = {
kernelsFolder .. "/moon_080317.tf",
kernelsFolder .. "/apollo8.tf",
kernelsFolder .. "/moon_pa_de421_1900-2050.bpc",
kernelsFolder .. '/apollo8.tsc',
kernelsFolder .. '/apollo8.bsp',
kernelsFolder .. '/apollo8_earthrise.bc',
}
local apolloSpiceId = "-908"
local Apollo8LaunchTrail = {
Identifier = "Apollo8LaunchTrail",
Parent = "Earth",
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Target = apolloSpiceId,
Observer = "EARTH",
Frame = "IAU_EARTH",
Kernels = kernels
},
Color = { 0.70, 0.50, 0.20 },
StartTime = "1968 DEC 21 12:51:00",
EndTime = "1968 DEC 21 23:23:22",
SampleInterval = 30
},
GUI = {
Name = "Apollo 8 Launch Trail",
Path = "/Solar System/Missions/Apollo"
}
}
local Apollo8EarthBarycenterTrail = {
Identifier = "Apollo8EarthBarycenterTrail",
Parent = "EarthBarycenter",
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Target = apolloSpiceId,
Observer = "EARTH BARYCENTER",
Frame = "GALACTIC",
Kernels = kernels
},
Color = { 1, 0.0, 0.0 },
StartTime = "1968 DEC 21",
EndTime = "1968 DEC 28",
SampleInterval = 30,
Enabled = false,
},
GUI = {
Name = "Apollo 8 Earth Barycenter Trail",
Path = "/Solar System/Missions/Apollo"
}
}
local exportList = {
Apollo8LaunchTrail,
Apollo8EarthBarycenterTrail,
}
assetHelper.registerSceneGraphNodesAndExport(asset, exportList)

View File

@@ -1,11 +1,11 @@
-- This asset exports a function to create an Apollo Command and Service Module (CSM).
-- Instead of hard-coding the scene graph node parent,
-- client assets can decide which object that the CSM should be attached to.
-- Usage example: registerCsm(asset, Apollo8.Idenfitier)
-- Usage example: createCsmModel(asset, Apollo8.Idenfitier)
-- ...where Apollo8 is the scene graph node identifier to attach the CSM to.
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local asset_helper = asset.require('util/asset_helper')
local sun_transforms = asset.require('scene/solarsystem/sun/transforms')
local models = asset.syncedResource({
Name = "Apollo Models",
@@ -18,115 +18,115 @@ local partsInfo = {
-- Data is structured as: Geometry file name (except .obj suffix), texture file name, shading
-- Exterior
{"AP08_cone_command_module", "Command_module_diff.png", true},
{"AP08_cone_hatchdoor_handle_scratched_metal", "scratched_metal_gloss.png", true},
{"AP08_cone_vent_ports_black", "black.png", true},
{"AP08_cone_vent_ports_red", "red.png", true},
{"AP08_cone_hatchdoor_interior", "apollo_hatchdoor_interior.jpg", false},
{ "AP08_cone_command_module", "Command_module_diff.png", true },
{ "AP08_cone_hatchdoor_handle_scratched_metal", "scratched_metal_gloss.png", true },
{ "AP08_cone_vent_ports_black", "black.png", true },
{ "AP08_cone_vent_ports_red", "red.png", true },
{ "AP08_cone_hatchdoor_interior", "apollo_hatchdoor_interior.jpg", false },
{"AP08_service_black", "black.png", true},
{"AP08_service_brown", "brown.png", true},
{"AP08_service_grey", "gray.png", true},
{"AP08_service_high_gain_antenna", "Antenna_diff.png", true},
{"AP08_service_module", "Service_module_diff.png", true},
{"AP08_service_nozzle", "Nozzle_diff.png", true},
{"AP08_service_pink", "pink.png", true},
{"AP08_service_red", "red.png", true},
{"AP08_service_scratched_metal", "scratched_metal_gloss.png", true},
{"AP08_service_white", "white.png", true},
{ "AP08_service_black", "black.png", true },
{ "AP08_service_brown", "brown.png", true },
{ "AP08_service_grey", "gray.png", true },
{ "AP08_service_high_gain_antenna", "Antenna_diff.png", true },
{ "AP08_service_module", "Service_module_diff.png", true },
{ "AP08_service_nozzle", "Nozzle_diff.png", true },
{ "AP08_service_pink", "pink.png", true },
{ "AP08_service_red", "red.png", true },
{ "AP08_service_scratched_metal", "scratched_metal_gloss.png", true },
{ "AP08_service_white", "white.png", true },
-- Interior
-- {"AP11_int_back_wall_left", "AP11_int_back_wall_left.png", false},
-- {"AP11_int_back_wall_right", "AP11_int_back_wall_right.png", false},
-- {"AP11_interior_back_wall_top_0Shape3", "back_wall_top_0Shape3_tpAmbient_paint_03.png", false},
-- {"AP11_interior_belt_buckles_02_L2", "belt_buckles_02_L2Shape_tpAmbient.png", false},
-- {"AP11_interior_belt_straps_02", "belt_straps_02Shape_tpAmbient_paint_01.png", false},
-- {"AP11_interior_black_push_buttons", "push_buttonsShape_tpAmbient.png", false},
-- {"AP11_interior_bottom_boxes_03", "bottom_boxes_03_paint_01.png", false},
-- {"AP11_interior_bottom_floor_tp", "bottom_floor_tpAmbient_paint_v002.png", false},
-- {"AP11_interior_box_back_01", "box_back_01_paint_v001.png", false},
-- {"AP11_interior_box_back_02", "box_back_02_paint_v001.png", false},
-- {"AP11_interior_box_back_04", "box_back_04_paint_v001.png", false},
-- {"AP11_interior_box_lft_lower_01", "box_lft_lower_01Shape_Diffuse_paint_v002.png", false},
-- {"AP11_interior_box_lft_top", "box_lft_topShape_Diffuse_paint_v009.png", false},
-- {"AP11_interior_box_mid_tp", "box_mid_tpDiffuse_paint_v001.png", false},
-- {"AP11_interior_box_rt_top_02", "box_rt_top_02_paint_04.png", false},
-- {"AP11_interior_brushed_blue_ano", "brushed_blue_ano_paint_01.png", false},
-- {"AP11_interior_brushed_brass", "brushed_brass_paint_01.png", false},
-- {"AP11_interior_brushed_grey_ano", "brushed_grey_ano_paint_02.png", false},
-- {"AP11_interior_canvas_cover", "canvas_coverShape_tpAmbient_paint_01.png", false},
-- {"AP11_interior_Channel_attachment", "Channel_attachment_Diffuse.png", false},
-- {"AP11_interior_Channel_baseMetal", "Channel_baseMetal_Diffuse.png", false},
-- {"AP11_interior_Channel_Material", "Channel_Material_Diffuse.png", false},
-- {"AP11_interior_Channel_rsMaterial2", "Channel_rsMaterial2_Diffuse.png", false},
-- {"AP11_interior_cloth_01", "cloth_01Shape_tpAmbient_paint_01.png", false},
-- {"AP11_interior_coiled_hose", "coiled_hoseShape_tpAmbient.png", false},
-- {"AP11_interior_control_panel_left_win_plates", "control_panel_left_win_platesShape_tpAmbient.png", false},
-- {"AP11_interior_control_panel_rt_win_plates", "control_panel_rt_win_platesShape_tpAmbient.png", false},
-- {"AP11_interior_copper_parts_main_cp", "copper_parts_main_cpShape_tpAmbient.png", false},
-- {"AP11_interior_dials_main2", "dials_main2Shape_tpAmbient.png", false},
-- {"AP11_interior_dials_t2", "dials_t2Shape_tpAmbient.png", false},
-- {"AP11_interior_dial_fixes_01", "dial_fixes_01Shape_tpAmbient.png", false},
-- {"AP11_interior_fire_ex_02", "fire_ex_02_paint_v001.png", false},
-- {"AP11_interior_floor_panels_3", "floor_panels_3Shape_tpAmbient_paint_01.png", false},
-- {"AP11_interior_floor_tile_tex_01", "floor_tile_tex_01.png", false},
-- {"AP11_interior_grey", "gray.png", false},
-- {"AP11_interior_handholds_cp", "handholds_cpShape_tpAmbient_paint_05.png", false},
-- {"AP11_interior_hatch_release_0Shape5", "hatch_release_0Shape5_tpAmbient_paint_02.png", false},
-- {"AP11_interior_headrests_02", "headrests_02Shape_tpAmbient_paint_01.png", false},
-- {"AP11_interior_hoses_black_01", "hoses_black_01Shape_tpAmbient_paint_01.png", false},
-- {"AP11_interior_hoses_white_0Shape1", "hoses_white_0Shape1_tpAmbient_paint_01.png", false},
-- {"AP11_interior_josticks1", "joysticks1Shape_tpAmbient_paint_01.png", false},
-- {"AP11_interior_joysticks_fabric1", "joysticks_fabric1_Shape_tpAmbient_paint_01.png", false},
-- {"AP11_interior_joystick_poles_lft_05", "joystick_poles_lft_05_paint_v002.png", false},
-- {"AP11_interior_joystick_poles_lft_long_05", "joystick_poles_lft_long_05_paint_v002.png", false},
-- {"AP11_interior_joystick_poles_rt_05", "joystick_poles_rt_05_paint_v002.png", false},
-- {"AP11_interior_latch_mechanisms_01", "latch_mechanisms_01Shape_tpAmbient.png", false},
-- {"AP11_interior_lower_push_buttons", "lower_push_buttonsShape_tpAmbient.png", false},
-- {"AP11_interior_lower_walls_back", "lower_walls_back_paint_04.png", false},
-- {"AP11_interior_lower_walls_boxes_head", "lower_walls_boxes_headShape_tpAmbient_paint_v001.png", false},
-- {"AP11_interior_main_cp_left_smth_03", "main_cp_left_0Shape3_tpAmbient_paint_02.png", false},
-- {"AP11_interior_main_cp_mid_smth_02", "main_cp_mid_smth_02Shape_tpAmbient_paint_02.png", false},
-- {"AP11_interior_main_cp_rt_smth", "main_cp_rt_smthShape_tpAmbient_paint_02.png", false},
-- {"AP11_interior_main_cp_wheels", "main_cp_wheelsShape_tpAmbient.png", false},
-- {"AP11_interior_metal_brackets_under_hatch", "metal_brackets_under_hatchShape_tpAmbient.png", false},
-- {"AP11_interior_metal_tunnel_parts", "metal_tunnel_partsShape_tpAmbient_paint_01.png", false},
-- {"AP11_interior_metal_window_parts", "metal_window_partsShape_tpAmbient_paint_01.png", false},
-- {"AP11_interior_middle_walls_05", "middle_walls_05_tpAmbient_paint_02.png", false},
-- {"AP11_interior_middle_walls_0Shape8", "middle_walls_0Shape8_tpAmbient_paint_01.png", false},
-- {"AP11_interior_mid_tunnel_parts", "mid_tunnel_parts_03Shape_tpAmbient_paint_02.png", false},
-- {"AP11_interior_new_switch_rails1", "new_switch_rails1Shape_tpAmbient.png", false},
-- {"AP11_interior_nozzles_02", "nozzles_02Shape_tpAmbient_paint_01.png", false},
-- {"AP11_interior_outlet_fabric3", "outlet_fabric3Shape_tpAmbient_paint_02.png", false},
-- {"AP11_interior_pole_end_02", "pole_end_02.png", false},
-- {"AP11_interior_pole_end_03", "pole_end_03.png", false},
-- {"AP11_interior_pole_tex_03", "pole_tex_03.png", false},
-- {"AP11_interior_pole_tex_04", "pole_tex_04.png", false},
-- {"AP11_interior_pole_tex_05", "pole_tex_05.png", false},
-- {"AP11_interior_pole_tex_lower_01", "pole_tex_lower_01.png", false},
-- {"AP11_interior_pole_under_seat_paint_01", "pole_under_seat_paint_01.png", false},
-- {"AP11_interior_pole_under_seat_square_bar", "pole_under_seat_square_bar_paint_01.png", false},
-- {"AP11_interior_push_switches_lft1", "push_switches_lft1Shape_tpAmbient.png", false},
-- {"AP11_interior_random_small_parts_01", "random_small_parts_01Shape_tpAmbient_paint_02.png", false},
-- {"AP11_interior_red", "red.png", false},
-- {"AP11_interior_reticle_wheel_tp", "reticle_wheel_tpAmbient_paint_01.png", false},
-- {"AP11_interior_rivet_paint_v001", "rivet_paint_v001.png", false},
-- {"AP11_interior_seats_fabric", "seats_fabric_paint_01.png", false},
-- {"AP11_interior_seat_left_tp", "seat_left_tpAmbient_paint_v001.png", false},
-- {"AP11_interior_seat_lights_left", "seat_lights_left_Shape_tpAmbient_paint_v001.png", false},
-- {"AP11_interior_seat_lights_rt", "seat_lights_rt_Shape_tpAmbient_paint_v001.png", false},
-- {"AP11_interior_seat_middle_tp", "seat_middle_tpAmbient_paint_v001.png", false},
-- {"AP11_interior_seat_poles_0Shape1", "seat_poles_0Shape1_tpAmbient_paint_01.png", false},
-- {"AP11_interior_seat_pole_mirror_0Shape1", "seat_pole_mirror_0Shape1_tpAmbient_paint_01.png", false},
-- {"AP11_interior_seat_rt_tp", "seat_rt_tpAmbient_paint_v001.png", false},
-- {"AP11_interior_sextant_0Shape2", "sextant_0Shape2_tpAmbient.png", false},
-- {"AP11_interior_switch_covers_main_middle1", "switch_covers_main_middle1Shape_tpAmbient.png", false},
-- {"AP11_interior_switch_rails_lft", "switch_rails_lftShape_tpAmbient.png", false},
-- {"AP11_interior_tunnel_main_cylinder1", "switch_rails_lftShape_tpAmbient.png", false},
-- {"AP11_interior_tunnel_switches_01", "tunnel_switches_01Shape_tpAmbient.png", false},
-- {"AP11_interior_tunnel_wheelsShape", "tunnel_wheelsShape_tpAmbient.png", false},
-- {"AP11_interior_walls_mid_left", "walls_mid_leftShape_tpAmbient_paint_01.png", false},
-- {"AP11_interior_windows_front_0Shape4", "windows_front_0Shape4_tpAmbient_paint_01.png", false}
-- { "AP11_int_back_wall_left", "AP11_int_back_wall_left.png", false},
-- { "AP11_int_back_wall_right", "AP11_int_back_wall_right.png", false },
-- { "AP11_interior_back_wall_top_0Shape3", "back_wall_top_0Shape3_tpAmbient_paint_03.png", false },
-- { "AP11_interior_belt_buckles_02_L2", "belt_buckles_02_L2Shape_tpAmbient.png", false },
-- { "AP11_interior_belt_straps_02", "belt_straps_02Shape_tpAmbient_paint_01.png", false },
-- { "AP11_interior_black_push_buttons", "push_buttonsShape_tpAmbient.png", false },
-- { "AP11_interior_bottom_boxes_03", "bottom_boxes_03_paint_01.png", false },
-- { "AP11_interior_bottom_floor_tp", "bottom_floor_tpAmbient_paint_v002.png", false },
-- { "AP11_interior_box_back_01", "box_back_01_paint_v001.png", false },
-- { "AP11_interior_box_back_02", "box_back_02_paint_v001.png", false },
-- { "AP11_interior_box_back_04", "box_back_04_paint_v001.png", false },
-- { "AP11_interior_box_lft_lower_01", "box_lft_lower_01Shape_Diffuse_paint_v002.png", false },
-- { "AP11_interior_box_lft_top", "box_lft_topShape_Diffuse_paint_v009.png", false },
-- { "AP11_interior_box_mid_tp", "box_mid_tpDiffuse_paint_v001.png", false },
-- { "AP11_interior_box_rt_top_02", "box_rt_top_02_paint_04.png", false },
-- { "AP11_interior_brushed_blue_ano", "brushed_blue_ano_paint_01.png", false },
-- { "AP11_interior_brushed_brass", "brushed_brass_paint_01.png", false },
-- { "AP11_interior_brushed_grey_ano", "brushed_grey_ano_paint_02.png", false },
-- { "AP11_interior_canvas_cover", "canvas_coverShape_tpAmbient_paint_01.png", false },
-- { "AP11_interior_Channel_attachment", "Channel_attachment_Diffuse.png", false },
-- { "AP11_interior_Channel_baseMetal", "Channel_baseMetal_Diffuse.png", false },
-- { "AP11_interior_Channel_Material", "Channel_Material_Diffuse.png", false },
-- { "AP11_interior_Channel_rsMaterial2", "Channel_rsMaterial2_Diffuse.png", false },
-- { "AP11_interior_cloth_01", "cloth_01Shape_tpAmbient_paint_01.png", false },
-- { "AP11_interior_coiled_hose", "coiled_hoseShape_tpAmbient.png", false },
-- { "AP11_interior_control_panel_left_win_plates", "control_panel_left_win_platesShape_tpAmbient.png", false },
-- { "AP11_interior_control_panel_rt_win_plates", "control_panel_rt_win_platesShape_tpAmbient.png", false },
-- { "AP11_interior_copper_parts_main_cp", "copper_parts_main_cpShape_tpAmbient.png", false },
-- { "AP11_interior_dials_main2", "dials_main2Shape_tpAmbient.png", false },
-- { "AP11_interior_dials_t2", "dials_t2Shape_tpAmbient.png", false },
-- { "AP11_interior_dial_fixes_01", "dial_fixes_01Shape_tpAmbient.png", false },
-- { "AP11_interior_fire_ex_02", "fire_ex_02_paint_v001.png", false },
-- { "AP11_interior_floor_panels_3", "floor_panels_3Shape_tpAmbient_paint_01.png", false },
-- { "AP11_interior_floor_tile_tex_01", "floor_tile_tex_01.png", false },
-- { "AP11_interior_grey", "gray.png", false },
-- { "AP11_interior_handholds_cp", "handholds_cpShape_tpAmbient_paint_05.png", false },
-- { "AP11_interior_hatch_release_0Shape5", "hatch_release_0Shape5_tpAmbient_paint_02.png", false },
-- { "AP11_interior_headrests_02", "headrests_02Shape_tpAmbient_paint_01.png", false },
-- { "AP11_interior_hoses_black_01", "hoses_black_01Shape_tpAmbient_paint_01.png", false },
-- { "AP11_interior_hoses_white_0Shape1", "hoses_white_0Shape1_tpAmbient_paint_01.png", false },
-- { "AP11_interior_josticks1", "joysticks1Shape_tpAmbient_paint_01.png", false },
-- { "AP11_interior_joysticks_fabric1", "joysticks_fabric1_Shape_tpAmbient_paint_01.png", false },
-- { "AP11_interior_joystick_poles_lft_05", "joystick_poles_lft_05_paint_v002.png", false },
-- { "AP11_interior_joystick_poles_lft_long_05", "joystick_poles_lft_long_05_paint_v002.png", false },
-- { "AP11_interior_joystick_poles_rt_05", "joystick_poles_rt_05_paint_v002.png", false },
-- { "AP11_interior_latch_mechanisms_01", "latch_mechanisms_01Shape_tpAmbient.png", false },
-- { "AP11_interior_lower_push_buttons", "lower_push_buttonsShape_tpAmbient.png", false },
-- { "AP11_interior_lower_walls_back", "lower_walls_back_paint_04.png", false },
-- { "AP11_interior_lower_walls_boxes_head", "lower_walls_boxes_headShape_tpAmbient_paint_v001.png", false },
-- { "AP11_interior_main_cp_left_smth_03", "main_cp_left_0Shape3_tpAmbient_paint_02.png", false },
-- { "AP11_interior_main_cp_mid_smth_02", "main_cp_mid_smth_02Shape_tpAmbient_paint_02.png", false },
-- { "AP11_interior_main_cp_rt_smth", "main_cp_rt_smthShape_tpAmbient_paint_02.png", false },
-- { "AP11_interior_main_cp_wheels", "main_cp_wheelsShape_tpAmbient.png", false },
-- { "AP11_interior_metal_brackets_under_hatch", "metal_brackets_under_hatchShape_tpAmbient.png", false },
-- { "AP11_interior_metal_tunnel_parts", "metal_tunnel_partsShape_tpAmbient_paint_01.png", false },
-- { "AP11_interior_metal_window_parts", "metal_window_partsShape_tpAmbient_paint_01.png", false },
-- { "AP11_interior_middle_walls_05", "middle_walls_05_tpAmbient_paint_02.png", false },
-- { "AP11_interior_middle_walls_0Shape8", "middle_walls_0Shape8_tpAmbient_paint_01.png", false },
-- { "AP11_interior_mid_tunnel_parts", "mid_tunnel_parts_03Shape_tpAmbient_paint_02.png", false },
-- { "AP11_interior_new_switch_rails1", "new_switch_rails1Shape_tpAmbient.png", false },
-- { "AP11_interior_nozzles_02", "nozzles_02Shape_tpAmbient_paint_01.png", false },
-- { "AP11_interior_outlet_fabric3", "outlet_fabric3Shape_tpAmbient_paint_02.png", false },
-- { "AP11_interior_pole_end_02", "pole_end_02.png", false },
-- { "AP11_interior_pole_end_03", "pole_end_03.png", false },
-- { "AP11_interior_pole_tex_03", "pole_tex_03.png", false },
-- { "AP11_interior_pole_tex_04", "pole_tex_04.png", false },
-- { "AP11_interior_pole_tex_05", "pole_tex_05.png", false },
-- { "AP11_interior_pole_tex_lower_01", "pole_tex_lower_01.png", false },
-- { "AP11_interior_pole_under_seat_paint_01", "pole_under_seat_paint_01.png", false },
-- { "AP11_interior_pole_under_seat_square_bar", "pole_under_seat_square_bar_paint_01.png", false },
-- { "AP11_interior_push_switches_lft1", "push_switches_lft1Shape_tpAmbient.png", false },
-- { "AP11_interior_random_small_parts_01", "random_small_parts_01Shape_tpAmbient_paint_02.png", false },
-- { "AP11_interior_red", "red.png", false },
-- { "AP11_interior_reticle_wheel_tp", "reticle_wheel_tpAmbient_paint_01.png", false },
-- { "AP11_interior_rivet_paint_v001", "rivet_paint_v001.png", false },
-- { "AP11_interior_seats_fabric", "seats_fabric_paint_01.png", false },
-- { "AP11_interior_seat_left_tp", "seat_left_tpAmbient_paint_v001.png", false },
-- { "AP11_interior_seat_lights_left", "seat_lights_left_Shape_tpAmbient_paint_v001.png", false },
-- { "AP11_interior_seat_lights_rt", "seat_lights_rt_Shape_tpAmbient_paint_v001.png", false },
-- { "AP11_interior_seat_middle_tp", "seat_middle_tpAmbient_paint_v001.png", false },
-- { "AP11_interior_seat_poles_0Shape1", "seat_poles_0Shape1_tpAmbient_paint_01.png", false },
-- { "AP11_interior_seat_pole_mirror_0Shape1", "seat_pole_mirror_0Shape1_tpAmbient_paint_01.png", false },
-- { "AP11_interior_seat_rt_tp", "seat_rt_tpAmbient_paint_v001.png", false },
-- { "AP11_interior_sextant_0Shape2", "sextant_0Shape2_tpAmbient.png", false },
-- { "AP11_interior_switch_covers_main_middle1", "switch_covers_main_middle1Shape_tpAmbient.png", false },
-- { "AP11_interior_switch_rails_lft", "switch_rails_lftShape_tpAmbient.png", false },
-- { "AP11_interior_tunnel_main_cylinder1", "switch_rails_lftShape_tpAmbient.png", false },
-- { "AP11_interior_tunnel_switches_01", "tunnel_switches_01Shape_tpAmbient.png", false },
-- { "AP11_interior_tunnel_wheelsShape", "tunnel_wheelsShape_tpAmbient.png", false },
-- { "AP11_interior_walls_mid_left", "walls_mid_leftShape_tpAmbient_paint_01.png", false },
-- { "AP11_interior_windows_front_0Shape4", "windows_front_0Shape4_tpAmbient_paint_01.png", false }
}
@@ -134,147 +134,147 @@ local partsInfoFull = {
-- Data is structured as: Geometry file name (except .obj suffix), texture file name, shading
-- Exterior
{"AP08_cone_command_module", "Command_module_diff.png", true},
{"AP08_cone_hatchdoor_handle_scratched_metal", "scratched_metal_gloss.png", true},
{"AP08_cone_vent_ports_black", "black.png", true},
{"AP08_cone_vent_ports_red", "red.png", true},
{"AP08_cone_hatchdoor_interior", "apollo_hatchdoor_interior.jpg", false},
{ "AP08_cone_command_module", "Command_module_diff.png", true },
{ "AP08_cone_hatchdoor_handle_scratched_metal", "scratched_metal_gloss.png", true },
{ "AP08_cone_vent_ports_black", "black.png", true },
{ "AP08_cone_vent_ports_red", "red.png", true },
{ "AP08_cone_hatchdoor_interior", "apollo_hatchdoor_interior.jpg", false },
{"AP08_service_black", "black.png", true},
{"AP08_service_brown", "brown.png", true},
{"AP08_service_grey", "gray.png", true},
{"AP08_service_high_gain_antenna", "Antenna_diff.png", true},
{"AP08_service_module", "Service_module_diff.png", true},
{"AP08_service_nozzle", "Nozzle_diff.png", true},
{"AP08_service_pink", "pink.png", true},
{"AP08_service_red", "red.png", true},
{"AP08_service_scratched_metal", "scratched_metal_gloss.png", true},
{"AP08_service_white", "white.png", true},
{ "AP08_service_black", "black.png", true },
{ "AP08_service_brown", "brown.png", true },
{ "AP08_service_grey", "gray.png", true },
{ "AP08_service_high_gain_antenna", "Antenna_diff.png", true },
{ "AP08_service_module", "Service_module_diff.png", true },
{ "AP08_service_nozzle", "Nozzle_diff.png", true },
{ "AP08_service_pink", "pink.png", true },
{ "AP08_service_red", "red.png", true },
{ "AP08_service_scratched_metal", "scratched_metal_gloss.png", true },
{ "AP08_service_white", "white.png", true },
-- Interior
{"AP11_int_back_wall_left", "AP11_int_back_wall_left.png", false},
{"AP11_int_back_wall_right", "AP11_int_back_wall_right.png", false},
{"AP11_interior_back_wall_top_0Shape3", "back_wall_top_0Shape3_tpAmbient_paint_03.png", false},
{"AP11_interior_belt_buckles_02_L2", "belt_buckles_02_L2Shape_tpAmbient.png", false},
{"AP11_interior_belt_straps_02", "belt_straps_02Shape_tpAmbient_paint_01.png", false},
{"AP11_interior_black_push_buttons", "push_buttonsShape_tpAmbient.png", false},
{"AP11_interior_bottom_boxes_03", "bottom_boxes_03_paint_01.png", false},
{"AP11_interior_bottom_floor_tp", "bottom_floor_tpAmbient_paint_v002.png", false},
{"AP11_interior_box_back_01", "box_back_01_paint_v001.png", false},
{"AP11_interior_box_back_02", "box_back_02_paint_v001.png", false},
{"AP11_interior_box_back_04", "box_back_04_paint_v001.png", false},
{"AP11_interior_box_lft_lower_01", "box_lft_lower_01Shape_Diffuse_paint_v002.png", false},
{"AP11_interior_box_lft_top", "box_lft_topShape_Diffuse_paint_v009.png", false},
{"AP11_interior_box_mid_tp", "box_mid_tpDiffuse_paint_v001.png", false},
{"AP11_interior_box_rt_top_02", "box_rt_top_02_paint_04.png", false},
{"AP11_interior_brushed_blue_ano", "brushed_blue_ano_paint_01.png", false},
{"AP11_interior_brushed_brass", "brushed_brass_paint_01.png", false},
{"AP11_interior_brushed_grey_ano", "brushed_grey_ano_paint_02.png", false},
{"AP11_interior_canvas_cover", "canvas_coverShape_tpAmbient_paint_01.png", false},
{"AP11_interior_Channel_attachment", "Channel_attachment_Diffuse.png", false},
{"AP11_interior_Channel_baseMetal", "Channel_baseMetal_Diffuse.png", false},
{"AP11_interior_Channel_Material", "Channel_Material_Diffuse.png", false},
{"AP11_interior_Channel_rsMaterial2", "Channel_rsMaterial2_Diffuse.png", false},
{"AP11_interior_cloth_01", "cloth_01Shape_tpAmbient_paint_01.png", false},
{"AP11_interior_coiled_hose", "coiled_hoseShape_tpAmbient.png", false},
{"AP11_interior_control_panel_left_win_plates", "control_panel_left_win_platesShape_tpAmbient.png", false},
{"AP11_interior_control_panel_rt_win_plates", "control_panel_rt_win_platesShape_tpAmbient.png", false},
{"AP11_interior_copper_parts_main_cp", "copper_parts_main_cpShape_tpAmbient.png", false},
{"AP11_interior_dials_main2", "dials_main2Shape_tpAmbient.png", false},
{"AP11_interior_dials_t2", "dials_t2Shape_tpAmbient.png", false},
{"AP11_interior_dial_fixes_01", "dial_fixes_01Shape_tpAmbient.png", false},
{"AP11_interior_fire_ex_02", "fire_ex_02_paint_v001.png", false},
{"AP11_interior_floor_panels_3", "floor_panels_3Shape_tpAmbient_paint_01.png", false},
{"AP11_interior_floor_tile_tex_01", "floor_tile_tex_01.png", false},
{"AP11_interior_grey", "gray.png", false},
{"AP11_interior_handholds_cp", "handholds_cpShape_tpAmbient_paint_05.png", false},
{"AP11_interior_hatch_release_0Shape5", "hatch_release_0Shape5_tpAmbient_paint_02.png", false},
{"AP11_interior_headrests_02", "headrests_02Shape_tpAmbient_paint_01.png", false},
{"AP11_interior_hoses_black_01", "hoses_black_01Shape_tpAmbient_paint_01.png", false},
{"AP11_interior_hoses_white_0Shape1", "hoses_white_0Shape1_tpAmbient_paint_01.png", false},
{"AP11_interior_josticks1", "joysticks1Shape_tpAmbient_paint_01.png", false},
{"AP11_interior_joysticks_fabric1", "joysticks_fabric1_Shape_tpAmbient_paint_01.png", false},
{"AP11_interior_joystick_poles_lft_05", "joystick_poles_lft_05_paint_v002.png", false},
{"AP11_interior_joystick_poles_lft_long_05", "joystick_poles_lft_long_05_paint_v002.png", false},
{"AP11_interior_joystick_poles_rt_05", "joystick_poles_rt_05_paint_v002.png", false},
{"AP11_interior_latch_mechanisms_01", "latch_mechanisms_01Shape_tpAmbient.png", false},
{"AP11_interior_lower_push_buttons", "lower_push_buttonsShape_tpAmbient.png", false},
{"AP11_interior_lower_walls_back", "lower_walls_back_paint_04.png", false},
{"AP11_interior_lower_walls_boxes_head", "lower_walls_boxes_headShape_tpAmbient_paint_v001.png", false},
{"AP11_interior_main_cp_left_smth_03", "main_cp_left_0Shape3_tpAmbient_paint_02.png", false},
{"AP11_interior_main_cp_mid_smth_02", "main_cp_mid_smth_02Shape_tpAmbient_paint_02.png", false},
{"AP11_interior_main_cp_rt_smth", "main_cp_rt_smthShape_tpAmbient_paint_02.png", false},
{"AP11_interior_main_cp_wheels", "main_cp_wheelsShape_tpAmbient.png", false},
{"AP11_interior_metal_brackets_under_hatch", "metal_brackets_under_hatchShape_tpAmbient.png", false},
{"AP11_interior_metal_tunnel_parts", "metal_tunnel_partsShape_tpAmbient_paint_01.png", false},
{"AP11_interior_metal_window_parts", "metal_window_partsShape_tpAmbient_paint_01.png", false},
{"AP11_interior_middle_walls_05", "middle_walls_05_tpAmbient_paint_02.png", false},
{"AP11_interior_middle_walls_0Shape8", "middle_walls_0Shape8_tpAmbient_paint_01.png", false},
{"AP11_interior_mid_tunnel_parts", "mid_tunnel_parts_03Shape_tpAmbient_paint_02.png", false},
{"AP11_interior_new_switch_rails1", "new_switch_rails1Shape_tpAmbient.png", false},
{"AP11_interior_nozzles_02", "nozzles_02Shape_tpAmbient_paint_01.png", false},
{"AP11_interior_outlet_fabric3", "outlet_fabric3Shape_tpAmbient_paint_02.png", false},
{"AP11_interior_pole_end_02", "pole_end_02.png", false},
{"AP11_interior_pole_end_03", "pole_end_03.png", false},
{"AP11_interior_pole_tex_03", "pole_tex_03.png", false},
{"AP11_interior_pole_tex_04", "pole_tex_04.png", false},
{"AP11_interior_pole_tex_05", "pole_tex_05.png", false},
{"AP11_interior_pole_tex_lower_01", "pole_tex_lower_01.png", false},
{"AP11_interior_pole_under_seat_paint_01", "pole_under_seat_paint_01.png", false},
{"AP11_interior_pole_under_seat_square_bar", "pole_under_seat_square_bar_paint_01.png", false},
{"AP11_interior_push_switches_lft1", "push_switches_lft1Shape_tpAmbient.png", false},
{"AP11_interior_random_small_parts_01", "random_small_parts_01Shape_tpAmbient_paint_02.png", false},
{"AP11_interior_red", "red.png", false},
{"AP11_interior_reticle_wheel_tp", "reticle_wheel_tpAmbient_paint_01.png", false},
{"AP11_interior_rivet_paint_v001", "rivet_paint_v001.png", false},
{"AP11_interior_seats_fabric", "seats_fabric_paint_01.png", false},
{"AP11_interior_seat_left_tp", "seat_left_tpAmbient_paint_v001.png", false},
{"AP11_interior_seat_lights_left", "seat_lights_left_Shape_tpAmbient_paint_v001.png", false},
{"AP11_interior_seat_lights_rt", "seat_lights_rt_Shape_tpAmbient_paint_v001.png", false},
{"AP11_interior_seat_middle_tp", "seat_middle_tpAmbient_paint_v001.png", false},
{"AP11_interior_seat_poles_0Shape1", "seat_poles_0Shape1_tpAmbient_paint_01.png", false},
{"AP11_interior_seat_pole_mirror_0Shape1", "seat_pole_mirror_0Shape1_tpAmbient_paint_01.png", false},
{"AP11_interior_seat_rt_tp", "seat_rt_tpAmbient_paint_v001.png", false},
{"AP11_interior_sextant_0Shape2", "sextant_0Shape2_tpAmbient.png", false},
{"AP11_interior_switch_covers_main_middle1", "switch_covers_main_middle1Shape_tpAmbient.png", false},
{"AP11_interior_switch_rails_lft", "switch_rails_lftShape_tpAmbient.png", false},
{"AP11_interior_tunnel_main_cylinder1", "switch_rails_lftShape_tpAmbient.png", false},
{"AP11_interior_tunnel_switches_01", "tunnel_switches_01Shape_tpAmbient.png", false},
{"AP11_interior_tunnel_wheelsShape", "tunnel_wheelsShape_tpAmbient.png", false},
{"AP11_interior_walls_mid_left", "walls_mid_leftShape_tpAmbient_paint_01.png", false},
{"AP11_interior_windows_front_0Shape4", "windows_front_0Shape4_tpAmbient_paint_01.png", false}
{ "AP11_int_back_wall_left", "AP11_int_back_wall_left.png", false },
{ "AP11_int_back_wall_right", "AP11_int_back_wall_right.png", false },
{ "AP11_interior_back_wall_top_0Shape3", "back_wall_top_0Shape3_tpAmbient_paint_03.png", false },
{ "AP11_interior_belt_buckles_02_L2", "belt_buckles_02_L2Shape_tpAmbient.png", false },
{ "AP11_interior_belt_straps_02", "belt_straps_02Shape_tpAmbient_paint_01.png", false },
{ "AP11_interior_black_push_buttons", "push_buttonsShape_tpAmbient.png", false },
{ "AP11_interior_bottom_boxes_03", "bottom_boxes_03_paint_01.png", false },
{ "AP11_interior_bottom_floor_tp", "bottom_floor_tpAmbient_paint_v002.png", false },
{ "AP11_interior_box_back_01", "box_back_01_paint_v001.png", false },
{ "AP11_interior_box_back_02", "box_back_02_paint_v001.png", false },
{ "AP11_interior_box_back_04", "box_back_04_paint_v001.png", false },
{ "AP11_interior_box_lft_lower_01", "box_lft_lower_01Shape_Diffuse_paint_v002.png", false },
{ "AP11_interior_box_lft_top", "box_lft_topShape_Diffuse_paint_v009.png", false },
{ "AP11_interior_box_mid_tp", "box_mid_tpDiffuse_paint_v001.png", false },
{ "AP11_interior_box_rt_top_02", "box_rt_top_02_paint_04.png", false },
{ "AP11_interior_brushed_blue_ano", "brushed_blue_ano_paint_01.png", false },
{ "AP11_interior_brushed_brass", "brushed_brass_paint_01.png", false },
{ "AP11_interior_brushed_grey_ano", "brushed_grey_ano_paint_02.png", false },
{ "AP11_interior_canvas_cover", "canvas_coverShape_tpAmbient_paint_01.png", false },
{ "AP11_interior_Channel_attachment", "Channel_attachment_Diffuse.png", false },
{ "AP11_interior_Channel_baseMetal", "Channel_baseMetal_Diffuse.png", false },
{ "AP11_interior_Channel_Material", "Channel_Material_Diffuse.png", false },
{ "AP11_interior_Channel_rsMaterial2", "Channel_rsMaterial2_Diffuse.png", false },
{ "AP11_interior_cloth_01", "cloth_01Shape_tpAmbient_paint_01.png", false },
{ "AP11_interior_coiled_hose", "coiled_hoseShape_tpAmbient.png", false },
{ "AP11_interior_control_panel_left_win_plates", "control_panel_left_win_platesShape_tpAmbient.png", false },
{ "AP11_interior_control_panel_rt_win_plates", "control_panel_rt_win_platesShape_tpAmbient.png", false },
{ "AP11_interior_copper_parts_main_cp", "copper_parts_main_cpShape_tpAmbient.png", false },
{ "AP11_interior_dials_main2", "dials_main2Shape_tpAmbient.png", false },
{ "AP11_interior_dials_t2", "dials_t2Shape_tpAmbient.png", false },
{ "AP11_interior_dial_fixes_01", "dial_fixes_01Shape_tpAmbient.png", false },
{ "AP11_interior_fire_ex_02", "fire_ex_02_paint_v001.png", false },
{ "AP11_interior_floor_panels_3", "floor_panels_3Shape_tpAmbient_paint_01.png", false },
{ "AP11_interior_floor_tile_tex_01", "floor_tile_tex_01.png", false },
{ "AP11_interior_grey", "gray.png", false },
{ "AP11_interior_handholds_cp", "handholds_cpShape_tpAmbient_paint_05.png", false },
{ "AP11_interior_hatch_release_0Shape5", "hatch_release_0Shape5_tpAmbient_paint_02.png", false },
{ "AP11_interior_headrests_02", "headrests_02Shape_tpAmbient_paint_01.png", false },
{ "AP11_interior_hoses_black_01", "hoses_black_01Shape_tpAmbient_paint_01.png", false },
{ "AP11_interior_hoses_white_0Shape1", "hoses_white_0Shape1_tpAmbient_paint_01.png", false },
{ "AP11_interior_josticks1", "joysticks1Shape_tpAmbient_paint_01.png", false },
{ "AP11_interior_joysticks_fabric1", "joysticks_fabric1_Shape_tpAmbient_paint_01.png", false },
{ "AP11_interior_joystick_poles_lft_05", "joystick_poles_lft_05_paint_v002.png", false },
{ "AP11_interior_joystick_poles_lft_long_05", "joystick_poles_lft_long_05_paint_v002.png", false },
{ "AP11_interior_joystick_poles_rt_05", "joystick_poles_rt_05_paint_v002.png", false },
{ "AP11_interior_latch_mechanisms_01", "latch_mechanisms_01Shape_tpAmbient.png", false },
{ "AP11_interior_lower_push_buttons", "lower_push_buttonsShape_tpAmbient.png", false },
{ "AP11_interior_lower_walls_back", "lower_walls_back_paint_04.png", false },
{ "AP11_interior_lower_walls_boxes_head", "lower_walls_boxes_headShape_tpAmbient_paint_v001.png", false },
{ "AP11_interior_main_cp_left_smth_03", "main_cp_left_0Shape3_tpAmbient_paint_02.png", false },
{ "AP11_interior_main_cp_mid_smth_02", "main_cp_mid_smth_02Shape_tpAmbient_paint_02.png", false },
{ "AP11_interior_main_cp_rt_smth", "main_cp_rt_smthShape_tpAmbient_paint_02.png", false },
{ "AP11_interior_main_cp_wheels", "main_cp_wheelsShape_tpAmbient.png", false },
{ "AP11_interior_metal_brackets_under_hatch", "metal_brackets_under_hatchShape_tpAmbient.png", false },
{ "AP11_interior_metal_tunnel_parts", "metal_tunnel_partsShape_tpAmbient_paint_01.png", false },
{ "AP11_interior_metal_window_parts", "metal_window_partsShape_tpAmbient_paint_01.png", false },
{ "AP11_interior_middle_walls_05", "middle_walls_05_tpAmbient_paint_02.png", false },
{ "AP11_interior_middle_walls_0Shape8", "middle_walls_0Shape8_tpAmbient_paint_01.png", false },
{ "AP11_interior_mid_tunnel_parts", "mid_tunnel_parts_03Shape_tpAmbient_paint_02.png", false },
{ "AP11_interior_new_switch_rails1", "new_switch_rails1Shape_tpAmbient.png", false },
{ "AP11_interior_nozzles_02", "nozzles_02Shape_tpAmbient_paint_01.png", false },
{ "AP11_interior_outlet_fabric3", "outlet_fabric3Shape_tpAmbient_paint_02.png", false },
{ "AP11_interior_pole_end_02", "pole_end_02.png", false },
{ "AP11_interior_pole_end_03", "pole_end_03.png", false },
{ "AP11_interior_pole_tex_03", "pole_tex_03.png", false },
{ "AP11_interior_pole_tex_04", "pole_tex_04.png", false },
{ "AP11_interior_pole_tex_05", "pole_tex_05.png", false },
{ "AP11_interior_pole_tex_lower_01", "pole_tex_lower_01.png", false },
{ "AP11_interior_pole_under_seat_paint_01", "pole_under_seat_paint_01.png", false },
{ "AP11_interior_pole_under_seat_square_bar", "pole_under_seat_square_bar_paint_01.png", false },
{ "AP11_interior_push_switches_lft1", "push_switches_lft1Shape_tpAmbient.png", false },
{ "AP11_interior_random_small_parts_01", "random_small_parts_01Shape_tpAmbient_paint_02.png", false },
{ "AP11_interior_red", "red.png", false },
{ "AP11_interior_reticle_wheel_tp", "reticle_wheel_tpAmbient_paint_01.png", false },
{ "AP11_interior_rivet_paint_v001", "rivet_paint_v001.png", false },
{ "AP11_interior_seats_fabric", "seats_fabric_paint_01.png", false },
{ "AP11_interior_seat_left_tp", "seat_left_tpAmbient_paint_v001.png", false },
{ "AP11_interior_seat_lights_left", "seat_lights_left_Shape_tpAmbient_paint_v001.png", false },
{ "AP11_interior_seat_lights_rt", "seat_lights_rt_Shape_tpAmbient_paint_v001.png", false },
{ "AP11_interior_seat_middle_tp", "seat_middle_tpAmbient_paint_v001.png", false },
{ "AP11_interior_seat_poles_0Shape1", "seat_poles_0Shape1_tpAmbient_paint_01.png", false },
{ "AP11_interior_seat_pole_mirror_0Shape1", "seat_pole_mirror_0Shape1_tpAmbient_paint_01.png", false },
{ "AP11_interior_seat_rt_tp", "seat_rt_tpAmbient_paint_v001.png", false },
{ "AP11_interior_sextant_0Shape2", "sextant_0Shape2_tpAmbient.png", false },
{ "AP11_interior_switch_covers_main_middle1", "switch_covers_main_middle1Shape_tpAmbient.png", false },
{ "AP11_interior_switch_rails_lft", "switch_rails_lftShape_tpAmbient.png", false },
{ "AP11_interior_tunnel_main_cylinder1", "switch_rails_lftShape_tpAmbient.png", false },
{ "AP11_interior_tunnel_switches_01", "tunnel_switches_01Shape_tpAmbient.png", false },
{ "AP11_interior_tunnel_wheelsShape", "tunnel_wheelsShape_tpAmbient.png", false },
{ "AP11_interior_walls_mid_left", "walls_mid_leftShape_tpAmbient_paint_01.png", false },
{ "AP11_interior_windows_front_0Shape4", "windows_front_0Shape4_tpAmbient_paint_01.png", false }
}
asset.export("registerCsm", function (asset, parentNodeIdentifier)
asset.export("createCsmModel", function (parentNodeIdentifier)
local parts = {}
for i, info in ipairs(partsInfo) do
parts[#parts + 1] = assetHelper.createModelPart(
parts[#parts + 1] = asset_helper.createModelPart(
parentNodeIdentifier,
sunTransforms.SolarSystemBarycenter.Identifier,
sun_transforms.SolarSystemBarycenter.Identifier,
models,
info[1],
info[2],
info[3]
)
end
assetHelper.registerSceneGraphNodesAndExport(asset, parts)
return parts
end)
asset.export("registerCsmFull", function (asset, parentNodeIdentifier)
asset.export("createCsmModelFull", function (parentNodeIdentifier)
local parts = {}
for i, info in ipairs(partsInfoFull) do
parts[#parts + 1] = assetHelper.createModelPart(
parts[#parts + 1] = asset_helper.createModelPart(
parentNodeIdentifier,
sunTransforms.SolarSystemBarycenter.Identifier,
sun_transforms.SolarSystemBarycenter.Identifier,
models,
info[1],
info[2],
info[3]
)
end
assetHelper.registerSceneGraphNodesAndExport(asset, parts)
end)
return parts
end)

View File

@@ -1,5 +1,5 @@
--apollo_globebrowsing.asset
local moon_transforms = asset.require('scene/solarsystem/planets/earth/moon/moon')
local heightmaps = asset.syncedResource({
Name = "Apollo Globebrowsing Heightmaps",
@@ -30,8 +30,8 @@ local stations = asset.syncedResource({
})
asset.onInitialize(function ()
openspace.globebrowsing.addBlendingLayersFromDirectory(heightmaps, "Moon")
openspace.globebrowsing.addBlendingLayersFromDirectory(basemaps, "Moon")
openspace.globebrowsing.addBlendingLayersFromDirectory(naclighting, "Moon")
openspace.globebrowsing.addBlendingLayersFromDirectory(stations, "Moon")
openspace.globebrowsing.addBlendingLayersFromDirectory(heightmaps, moon_transforms.Moon.Identifier)
openspace.globebrowsing.addBlendingLayersFromDirectory(basemaps, moon_transforms.Moon.Identifier)
openspace.globebrowsing.addBlendingLayersFromDirectory(naclighting, moon_transforms.Moon.Identifier)
openspace.globebrowsing.addBlendingLayersFromDirectory(stations, moon_transforms.Moon.Identifier)
end)

View File

@@ -3,11 +3,11 @@
-- This asset exports a function to create an Apollo Lunar Excursion Module (LEM).
-- Instead of hard-coding the scene graph node parent,
-- client assets can decide which object that the LEM should be attached to.
-- Usage example: registerLem(asset, Apollo11Lem.Idenfitier)
-- Usage example: createLem(Apollo11Lem.Idenfitier)
-- ...where Apollo11Lem is the scene graph node identifier to attach the LEM to.
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local asset_helper = asset.require('util/asset_helper')
local sun_transforms = asset.require('scene/solarsystem/sun/transforms')
local models = asset.syncedResource({
Name = "Apollo Models",
@@ -35,17 +35,17 @@ local partsInfo = {
}
asset.export("registerLem", function (asset, parentNodeIdentifier)
asset.export("createLem", function (parentNodeIdentifier)
local parts = {}
for i, info in ipairs(partsInfo) do
parts[#parts + 1] = assetHelper.createModelPart(
parts[#parts + 1] = asset_helper.createModelPart(
parentNodeIdentifier,
sunTransforms.SolarSystemBarycenter.Identifier,
sun_transforms.SolarSystemBarycenter.Identifier,
models,
info[1],
info[2],
info[3]
)
end
assetHelper.registerSceneGraphNodesAndExport(asset, parts)
return parts
end)

View File

@@ -2,7 +2,7 @@
-- The insignias are invisible by default, but can be enabled using shown or hidden using
-- the exported functions `showInsignias(interpolationDuration)` and `hideInsignias(interpolationDuration)`.
local assetHelper = asset.require('util/asset_helper')
local asset_helper = asset.require('util/asset_helper')
local insigniasPath = asset.syncedResource({
Name = "Apollo Insignias",
@@ -18,37 +18,37 @@ local landingData = {
Name = "Apollo 11",
Name = "Apollo 11",
Texture = "apollo11.png",
LunarModule = {0.67409, 23.47298, 0.0},
LunarModule = { 0.67409, 23.47298, 0.0 }
},
{
Identifier = "Apollo12",
Name = "Apollo 12",
Texture = "apollo12.png",
LunarModule = {-3.01381, -23.41930, 0.0}
LunarModule = { -3.01381, -23.41930, 0.0 }
},
{
Identifier = "Apollo14",
Name = "Apollo 14",
Texture = "apollo14.png",
LunarModule = {-3.64544, -17.47139, 0.0}
LunarModule = { -3.64544, -17.47139, 0.0 }
},
{
Identifier = "Apollo15",
Name = "Apollo 15",
Texture = "apollo15.png",
LunarModule = {26.13224, 3.63400, 0.0}
LunarModule = { 26.13224, 3.63400, 0.0 }
},
{
Identifier = "Apollo16",
Name = "Apollo 16",
Texture = "apollo16.png",
LunarModule = {-8.97341, 15.49859, 0.0}
LunarModule = { -8.97341, 15.49859, 0.0 }
},
{
Identifier = "Apollo17",
Name = "Apollo 17",
Texture = "apollo17.png",
LunarModule = {20.18809, 30.77475, 0.0}
LunarModule = { 20.18809, 30.77475, 0.0 }
}
}
@@ -117,4 +117,4 @@ asset.export('hideInsignias', function (interpolationDuration)
openspace.setPropertyValue("Scene.Apollo*Insignia.Renderable.Opacity", 0, interpolationDuration)
end)
assetHelper.registerSceneGraphNodesAndExport(asset, nodes)
asset_helper.registerSceneGraphNodesAndExport(asset, nodes)

View File

@@ -0,0 +1,62 @@
--insight/shortcuts.asset
local InsightEntryTime = "2018 NOV 26 19:39:03.68"
local insightNavigationSate = "{" ..
"Anchor = 'Insight'," ..
"Pitch = 0.567457E-4," ..
"Position = { 1.240506E1,-1.369270E1,-2.423553E0 }," ..
"ReferenceFrame = 'Root',"..
"Up = { 0.441211E0,0.247019E0,0.862737E0 }," ..
"Yaw = -0.446853E-4}"
local Shortcuts = {
{
Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000);" ..
"openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', -470.800006);",
Documentation = "Enable Insight landing height layer offset",
Name = "Insight Height Offset",
GuiPath = "/Missions/Insight",
Local = false
},
{
Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', 0);" ..
"openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', 0);",
Documentation = "Disable Insight landing height layer offset",
Name = "Default Height Offset",
GuiPath = "/Missions/Insight",
Local = false
},
{
Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', true);" ..
"openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', true);",
Documentation = "Enables HiRISE layer for insight landing",
Name = "Enable HiRISE",
GuiPath = "/Missions/Insight",
Local = false
},
{
Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', false);" ..
"openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', false);",
Documentation = "Disables HiRISE layer used for insight landing",
Name = "Disable HiRISE",
GuiPath = "/Missions/Insight",
Local = false
},
{
Command = "openspace.navigation.setNavigationState(" .. insightNavigationSate .. ");",
Documentation = "Change the camera state for the start of Insight EDL",
Name = "Insight EDL NavigationState",
GuiPath = "/Missions/Insight",
Local = false
},
{
Command = "openspace.time.setPause(true);openspace.time.setTime('" .. InsightEntryTime .. "');",
Documentation = "Change the time for the start of Insight EDL",
Name = "Insight EDL Time",
GuiPath = "/Missions/Insight",
Local = false
},
}
asset.export("Shortcuts", Shortcuts)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,5 @@
--perseverance.asset
asset.require('./model')
asset.require('./trail')

View File

@@ -0,0 +1,70 @@
--perseverance/shortcuts.asset
local PerseveranceLaunchTime = "2020 JUL 17 13:56:42"
local PerseveranceLandingTime = "2021 FEB 18 20:32:16"
local PerseveranceNavigationState = "{" ..
"Anchor = 'Perseverance'," ..
"Pitch = 0.567457E-4," ..
"Position = { 1.240506E1,-1.369270E1,-2.423553E0 }," ..
"ReferenceFrame = 'Root',"..
"Up = { 0.441211E0,0.247019E0,0.862737E0 }," ..
"Yaw = -0.446853E-4}"
local Shortcuts = {
{
Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -1677.088867);" ..
"openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', -1677.088867);",
Documentation = "Enable height layer offset for Perseverance landing trail",
Name = "Perseverance Height Offset",
GuiPath = "/Missions/Insight",
Local = false
},
{
Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', 0);" ..
"openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', 0);",
Documentation = "Disable Perseverance landing height layer offset",
Name = "Default Height Offset",
GuiPath = "/Missions/Insight",
Local = false
},
{
Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', true);" ..
"openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', true);",
Documentation = "Enables HiRISE layer for Perseverance",
Name = "Enable HiRISE",
GuiPath = "/Missions/Insight",
Local = false
},
{
Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', false);" ..
"openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', false);",
Documentation = "Disables HiRISE layer used for Perseverance",
Name = "Disable HiRISE",
GuiPath = "/Missions/Insight",
Local = false
},
{
Command = "openspace.navigation.setNavigationState(" .. PerseveranceNavigationState .. ");",
Documentation = "Change the camera state for the start of Insight EDL",
Name = "Insight EDL NavigationState",
GuiPath = "/Missions/Insight",
Local = false
},
{
Command = "openspace.time.setPause(true);openspace.time.setTime('" .. PerseveranceLaunchTime .. "');",
Documentation = "Change the time for Perseverance launch",
Name = "Perseverance launch time",
GuiPath = "/Missions/Perseverance",
Local = false
},
{
Command = "openspace.time.setPause(true);openspace.time.setTime('" .. PerseveranceLandingTime .. "');",
Documentation = "Change the time for when Perseverance has landed",
Name = "Perseverance landed time",
GuiPath = "/Missions/Perseverance",
Local = false
},
}
asset.export("Shortcuts", Shortcuts)

View File

@@ -0,0 +1,96 @@
--trail.asset
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local marsTransforms = asset.require('scene/solarsystem/planets/mars/transforms')
local kernels = asset.syncedResource({
Name = "Mars 2020 Kernels",
Type = "HttpSynchronization",
Identifier = "perseverance_kernels",
Version = 1
})
local perseverance_id = "-168"
local m2020_kernels = {
kernels .. "/m2020.tf",
kernels .. "/m2020.tls",
kernels .. "/naif0012.tls",
kernels .. "/m2020.tsc",
kernels .. "/m2020_FMAresponse_JEZ_20200717_P000.cruise.bsp",
kernels .. "/m2020_FMAresponse_JEZ_20200717_P000.edl.bsp",
}
local startTime = "2020 JUL 17 13:56:42"
local approachMars = "2021 FEB 11 20:32:16"
local endTime = "2021 FEB 18 20:32:16"
local PerseveranceNode = {
Identifier = "PerseveranceNode",
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
Transform = {
Translation = {
Type = "SpiceTranslation",
Target = perseverance_id,
Observer = "SUN",
Kernels = m2020_kernels
},
},
GUI = {
Name = "Perseverance Node",
Path = "/Solar System/Missions/Perseverance",
}
}
local PerseveranceTrailSun = {
Identifier = "PerseveranceTrailSun",
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Target = perseverance_id,
Observer = "SUN",
Kernels = m2020_kernels
},
Color = { 0.2, 0.7, 0.1 },
StartTime = startTime,
EndTime = endTime,
SampleInterval = 100
},
GUI = {
Name = "Perseverance Trail",
Path = "/Solar System/Missions/Perseverance",
}
}
local PerseveranceTrailMars = {
Identifier = "PerseveranceTrailMars",
Parent = marsTransforms.MarsBarycenter.Identifier,
Renderable = {
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Target = perseverance_id,
Observer = "MARS",
Kernels = m2020_kernels
},
Color = { 0.7, 0.9, 0.6 },
StartTime = approachMars,
EndTime = endTime,
SampleInterval = 100
},
GUI = {
Name = "Perseverance Trail (Mars)",
Path = "/Solar System/Missions/Perseverance",
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
PerseveranceNode,
PerseveranceTrailSun,
PerseveranceTrailMars
})

View File

@@ -0,0 +1,505 @@
local assetHelper = asset.require('util/asset_helper')
local marsTransforms = asset.require('scene/solarsystem/planets/mars/transforms')
local marsAsset = asset.require('scene/solarsystem/planets/mars/mars')
local trailAsset = asset.require('./trail')
local MSL_Body = {
Identifier = "MSL_Body",
Parent = trailAsset.PerseveranceNode.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0, 0.0, 2.8 }
},
Rotation = {
Type = "StaticRotation",
Rotation = { -0.521593,0.648407,2.888407 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
---- ROBOTIC ARM RA ----
local RA_Base_Location = {
Identifier = "RA_Base_Location",
Parent = MSL_Body.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 1.111, -0.4525, -0.106 }
},
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
--AZ
local RA_Shoulder_AZ_Location = {
Identifier = "RA_Shoulder_AZ_Location",
Parent = RA_Base_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.0, -0.08 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
----EL
local RA_Shoulder_EL_Location = {
Identifier = "RA_Shoulder_EL_Location",
Parent = RA_Shoulder_AZ_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.17, 0.2, -0.005 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
--ELBOW
local RA_Elbow_Location = {
Identifier = "RA_Elbow_Location",
Parent = RA_Shoulder_EL_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.83, -0.2, 0.0 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
--WRIST
local RA_Wrist_Location = {
Identifier = "RA_Wrist_Location",
Parent = RA_Elbow_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.77, 0.13, 0.035 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
--TURRET
local RA_Turret_Location = {
Identifier = "RA_Turret_Location",
Parent = RA_Wrist_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.04, -0.15 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
--MAHLI
local RA_Mahli_Location = {
Identifier = "RA_Mahli_Location",
Parent = RA_Turret_Location.Identifier
}
---- MASTCAM RSM ----
local RSM_ROOT_Location = {
Identifier = "RSM_ROOT_Location",
Parent = MSL_Body.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.7039, 0.5769, -0.563 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local RSM_AZ_Location = {
Identifier = "RSM_AZ_Location",
Parent = RSM_ROOT_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.008, 0.0 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local RSM_ZERO_EL_Location = {
Identifier = "RSM_ZERO_EL_Location",
Parent = RSM_AZ_Location.Identifier,
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local RSM_EL_Location = {
Identifier = "RSM_EL_Location",
Parent = RSM_AZ_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
--Position = {0.0, 0.0, -0.664}
Position = { 0.002, 0.007, -0.688 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
---- HIGH GAIN ANTENNA HGA ----
local HGA_AZ_Location = {
Identifier = "HGA_AZ_Location",
Parent = MSL_Body.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { -0.46, -0.47, -0.55 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local HGA_EL_Location = {
Identifier = "HGA_EL_Location",
Parent = HGA_AZ_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.0, -0.17 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
---- SAM & HEMIN ----
local SAM_Cover_1_Location = {
Identifier = "SAM_Cover_1_Location",
Parent = MSL_Body.Identifier,
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local SAM_Cover_2_Location = {
Identifier = "SAM_Cover_2_Location",
Parent = MSL_Body.Identifier,
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local CHEMIN_Location = {
Identifier = "CHEMIN_Location",
Parent = MSL_Body.Identifier,
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
---- Wheels ----
local Wheel_base_Location = {
Identifier = "Wheel_base_Location",
Parent = MSL_Body.Identifier,
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
-- Left side --
local Leg_1_L_Location = {
Identifier = "Leg_1_L_Location",
Parent = Wheel_base_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.217, -0.812, -0.215 } --for the right side
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Leg_2_L_Location = {
Identifier = "Leg_2_L_Location",
Parent = Leg_1_L_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { -0.74, -0.00380, 0.223 } --CORRECT, DONT CHANGE
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wrist_F_L_Location = {
Identifier = "Wrist_F_L_Location",
Parent = Leg_1_L_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.8839, -0.2659, 0.2 } --CORRECT, DONT TOUCH
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wheel_F_L_Location = {
Identifier = "Wheel_F_L_Location",
Parent = Wrist_F_L_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.0, 0.426 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wheel_C_L_Location = {
Identifier = "Wheel_C_L_Location",
Parent = Leg_2_L_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.45, -0.4, 0.403 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wrist_B_L_Location = {
Identifier = "Wrist_B_L_Location",
Parent = Leg_2_L_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { -0.627, -0.2635, -0.022 } --CORRECT, DONT CHANGE
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wheel_B_L_Location = {
Identifier = "Wheel_B_L_Location",
Parent = Wrist_B_L_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, -0.0, 0.426 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
-- wheels, Right Side --
local Leg_1_R_Location = {
Identifier = "Leg_1_R_Location",
Parent = Wheel_base_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.217, 0.812, -0.215 } --Check with caroline!!!
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Leg_2_R_Location = {
Identifier = "Leg_2_R_Location",
Parent = Leg_1_R_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
--Position = {-0.74, 0.0, 0.24}
Position = { -0.74, 0.00380, 0.223 } --want to use this one, once the center point is changed in maya
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wrist_F_R_Location = {
Identifier = "Wrist_F_R_Location",
Parent = Leg_1_R_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.882, 0.259, 0.215 }
--Position = {0.8839, 0.2659, 0.2} --position for the Wrist_F_L
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wheel_F_R_Location = {
Identifier = "Wheel_F_R_Location",
Parent = Wrist_F_R_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.0, 0.426 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wheel_C_R_Location = {
Identifier = "Wheel_C_R_Location",
Parent = Leg_2_R_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.45, 0.4, 0.403 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wrist_B_R_Location = {
Identifier = "Wrist_B_R_Location",
Parent = Leg_2_R_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { -0.6208, 0.2759, -0.025 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wheel_B_R_Location = {
Identifier = "Wheel_B_R_Location",
Parent = Wrist_B_R_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, -0.0005, 0.426 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
MSL_Body,
RA_Base_Location,
RA_Shoulder_AZ_Location,
RA_Shoulder_EL_Location,
RA_Elbow_Location,
RA_Wrist_Location,
RA_Turret_Location,
RA_Mahli_Location,
RSM_ROOT_Location,
RSM_AZ_Location,
RSM_ZERO_EL_Location,
RSM_EL_Location,
HGA_AZ_Location,
HGA_EL_Location,
SAM_Cover_1_Location,
SAM_Cover_2_Location,
CHEMIN_Location,
Wheel_base_Location,
Leg_1_L_Location,
Leg_2_L_Location,
Wrist_F_L_Location,
Wheel_F_L_Location,
Wheel_C_L_Location,
Wrist_B_L_Location,
Wheel_B_L_Location,
Leg_1_R_Location,
Leg_2_R_Location,
Wrist_F_R_Location,
Wheel_F_R_Location,
Wheel_C_R_Location,
Wrist_B_R_Location,
Wheel_B_R_Location
})

View File

@@ -61,7 +61,12 @@ local Voyager1 = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "VG1_SC_BUS",
DestinationFrame = "GALACTIC"
DestinationFrame = "GALACTIC",
TimeFrame = {
Type = "TimeFrameInterval",
Start = "1977-SEP-05 14:10:11.786",
End = "2027-DEC-27"
}
}
},
GUI = {

View File

@@ -64,7 +64,12 @@ local Voyager2 = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "VG2_SC_BUS",
DestinationFrame = "GALACTIC"
DestinationFrame = "GALACTIC",
TimeFrame = {
Type = "TimeFrameInterval",
Start = "1977-AUG-20 16:07:06.535",
End = "2027-DEC-27"
}
}
},
GUI = {

View File

@@ -22,3 +22,13 @@ asset.request('./planets/uranus/major_moons')
asset.request('./planets/neptune/neptune')
asset.request('./planets/neptune/major_moons')
asset.meta = {
Name = "Planets",
Version = "1.0",
Description = [[ Collection of planets in the solar system ]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}

View File

@@ -112,12 +112,12 @@ local Earth = {
)
},
{
Name = "BMNH [Utah]",
Name = "BMNG [Utah]",
Identifier = "BMNG_Utah",
FilePath = mapServiceConfigsPath .. "/Utah/Bmng.wms"
},
{
Name = "BMNH [Sweden]",
Name = "BMNG [Sweden]",
Identifier = "BMNG_Sweden",
FilePath = mapServiceConfigsPath .. "/LiU/Bmng.wms"
},
@@ -329,3 +329,13 @@ local EarthLabel = {
assetHelper.registerSceneGraphNodesAndExport(asset, { Earth, EarthLabel })
asset.meta = {
Name = "Earth",
Version = "1.0",
Description = [[ Earth is a special planet with special needs ]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}

View File

@@ -100,12 +100,12 @@ local Moon = {
},
{
Identifier = "Lola_Clr_Shade_Utah",
Name = "Lola Clear Shade [Utah]",
Name = "Lola Color Shade [Utah]",
FilePath = mapServiceConfigs .. "/Utah/LolaClrShade.wms"
},
{
Identifier = "Lola_Clr_Shade_Sweden",
Name = "Lola Clear Shade [Sweden]",
Name = "Lola Color Shade [Sweden]",
FilePath = mapServiceConfigs .. "/LiU/Lola_Clr_Shade.wms"
},
{

View File

@@ -9,25 +9,20 @@ local filename = "ISS.txt"
local nodes = {}
local tle = satelliteHelper.downloadTLEFile(asset, url, identifier, filename)
local modelsLocation = asset.syncedResource({
local models = asset.syncedResource({
Name = "ISS Models",
Type = "HttpSynchronization",
Identifier = "iss_model",
Version = 1
Version = 2
})
local initializeAndAddNodes = function()
local lineElement = satelliteHelper.makeSingleLineElement(tle, filename)
local period = satelliteHelper.getPeriodFromElement(lineElement)
local path = tle .. "/" .. filename
-- TLE data is only relevant in EarthInertial frame which means the model
-- will inherit some irrelevant rotations from its parent. To get around that
-- we perform the reverse rotation back to EarthBarycenter frame after applying
-- the TLE translation
local iss = {
Identifier = identifier,
Identifier = "ISS",
Parent = transforms.EarthInertial.Identifier,
Transform = {
Translation = {
@@ -45,38 +40,47 @@ local initializeAndAddNodes = function()
},
Tag = { "earth_satellite", "ISS" },
GUI = {
Path = "/Solar System/Planets/Earth/Satellites/ISS",
Hiden = true
Path = "/Solar System/Planets/Earth/Satellites/ISS"
}
}
local issModel = {
Identifier = identifier .. "_model",
Parent = iss.Identifier,
Transform = {
Rotation = {
Type = "FixedRotation",
Attached = "ISS_model",
XAxis = { 1.0, 0.0, 0.0 },
XAxisOrthogonal = true,
ZAxis = transforms.EarthInertial.Identifier
}
},
Renderable = {
Type = "RenderableModel",
Geometry = {
Type = "MultiModelGeometry",
GeometryFile = modelsLocation .. "/iss.obj"
local parentNode = {
Identifier = "ISSparentNode",
Parent = iss.Identifier,
Transform = {
Rotation = {
Type = "FixedRotation",
Attached = "ISSparentNode",
XAxis = { 0.01, -1.0, 0.56 },
XAxisOrthogonal = true,
YAxis = transforms.EarthInertial.Identifier
}
},
ColorTexture = modelsLocation .. "/gray.png",
LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier)
},
Tag = { "earth_satellite", "ISS" },
GUI = {
Path = "/Solar System/Planets/Earth/Satellites/ISS"
}
GUI = {
Name = "ISSparentNode",
Path = "/Solar System/Planets/Earth/Satellites/ISS",
Hidden = true,
}
}
local list = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "10", "11",
"13", "14", "15", "16", "17", "19", "21", "22", "23", "24", "25",
"foilsilver", "olive", "basemetal", "white_20", "plasticblack", "ecostresswhite",
"plain"}
local nodes = { iss, parentNode }
for i, info in ipairs(list) do
n = assetHelper.createModelPart(
parentNode.Identifier,
sunTransforms.SolarSystemBarycenter.Identifier,
models,
info,
info .. ".png",
true
)
table.insert(nodes, n)
end
local issTrail = {
Identifier = identifier .. "_trail",
Parent = transforms.EarthInertial.Identifier,
@@ -96,24 +100,19 @@ local initializeAndAddNodes = function()
},
Tag = { "earth_satellite", "ISS" },
GUI = {
Path = "/Solar System/Planets/Earth/Satellites/ISS"
Name = "ISS Trail",
Path = "/Solar System/Planets/Earth/Satellites/ISS"
}
}
local myNodes = { iss, issModel, issTrail }
for _, node in ipairs(myNodes) do
openspace.addSceneGraphNode(node)
end
return myNodes
table.insert(nodes, issTrail)
return nodes
end
asset.onInitialize(function ()
nodes = initializeAndAddNodes()
end)
asset.onDeinitialize(function ()
openspace.removeSceneGraphNode(nodes[3].Identifier) -- Removing trail
openspace.removeSceneGraphNode(nodes[1].Identifier) -- Removing ISS and model recursively
for _, node in ipairs(nodes) do
openspace.addSceneGraphNode(node)
end
openspace.setPropertyValueSingle("Scene.ISSparentNode.Rotation.yAxis-InvertObject", true)
end)

View File

@@ -10,7 +10,7 @@ local EarthBarycenter = {
Transform = {
Translation = {
Type = "SpiceTranslation",
Target = "EARTH",
Target = "EARTH BARYCENTER",
Observer = "SUN"
}
},
@@ -21,10 +21,27 @@ local EarthBarycenter = {
}
}
local EarthCenter = {
Identifier = "EarthCenter",
Parent = EarthBarycenter.Identifier,
Transform = {
Translation = {
Type = "SpiceTranslation",
Target = "EARTH",
Observer = "EARTH BARYCENTER"
}
},
GUI = {
Name = "Earth Center",
Path = "/Solar System/Planets/Earth",
Hidden = true
}
}
local EarthInertial = {
-- The default reference frame for Earth-orbiting satellites
Identifier = "EarthInertial",
Parent = EarthBarycenter.Identifier,
Parent = EarthCenter.Identifier,
Transform = {
Rotation = {
Type = "SpiceRotation",
@@ -41,7 +58,7 @@ local EarthInertial = {
local EarthIAU = {
Identifier = "EarthIAU",
Parent = EarthBarycenter.Identifier,
Parent = EarthCenter.Identifier,
Transform = {
Rotation = {
Type = "SpiceRotation",
@@ -58,6 +75,7 @@ local EarthIAU = {
assetHelper.registerSceneGraphNodesAndExport(asset, {
EarthBarycenter,
EarthCenter,
EarthInertial,
EarthIAU
})

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'amor_asteroid', 'sssb_data_amor_asteroid')
local object = sharedSssb.createSssbGroupObject('sssb_data_amor_asteroid.csv', "Amor Asteroids", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_amor_asteroid.csv', "Amor Asteroids", filepath, { 0.69, 0.47, 0.0 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 4
object.Renderable.TrailFade = 11

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'apollo_asteroid', 'sssb_data_apollo_asteroid')
local object = sharedSssb.createSssbGroupObject('sssb_data_apollo_asteroid.csv', "Apollo Asteroids", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_apollo_asteroid.csv', "Apollo Asteroids", filepath, { 0.72, 0.5, 0.38 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 6
object.Renderable.TrailFade = 10

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'aten_asteroid', 'sssb_data_aten_asteroid')
local object = sharedSssb.createSssbGroupObject('sssb_data_aten_asteroid.csv', "Aten Asteroids", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_aten_asteroid.csv', "Aten Asteroids", filepath, { 0.9, 0.43, 0.1 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 2
object.Renderable.TrailFade = 18

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'atira_asteroid', 'sssb_data_atira_asteroid')
local object = sharedSssb.createSssbGroupObject('sssb_data_atira_asteroid.csv', "Atira Asteroids", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_atira_asteroid.csv', "Atira Asteroids", filepath, { 0.08, 0.09, 1.0 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 2
object.Renderable.TrailFade = 25

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'centaur_asteroid', 'sssb_data_centaur_asteroid')
local object = sharedSssb.createSssbGroupObject('sssb_data_centaur_asteroid.csv', "Centaur Asteroids", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_centaur_asteroid.csv', "Centaur Asteroids", filepath, { 0.94, 0.96, 0.94 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 6
object.Renderable.TrailFade = 18

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'chiron-type_comet', 'sssb_data_chiron-type_comet')
local object = sharedSssb.createSssbGroupObject('sssb_data_chiron-type_comet.csv', "Chiron-type Comets", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_chiron-type_comet.csv', "Chiron-type Comets", filepath, { 0.69 ,0.47 ,0.8 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 10
object.Renderable.TrailFade = 25

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'encke-type_comet', 'sssb_data_encke-type_comet')
local object = sharedSssb.createSssbGroupObject('sssb_data_encke-type_comet.csv', "Encke-type Comets", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_encke-type_comet.csv', "Encke-type Comets", filepath, { 0.16, 0.25, 1.0 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 2
object.Renderable.TrailFade = 23

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'halley-type_comet', 'sssb_data_halley-type_comet')
local object = sharedSssb.createSssbGroupObject('sssb_data_halley-type_comet.csv', "Halley-type Comets", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_halley-type_comet.csv', "Halley-type Comets", filepath, { 0.3, 0.69, 0.67 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 9
object.Renderable.TrailFade = 18

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'inner_main_belt_asteroid', 'sssb_data_inner_main_belt_asteroid')
local object = sharedSssb.createSssbGroupObject('sssb_data_inner_main_belt_asteroid.csv', "Inner Main Asteroid Belt", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_inner_main_belt_asteroid.csv', "Inner Main Asteroid Belt", filepath, { 0.86, 0.86, 0.2 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 1
object.Renderable.TrailFade = 0.5

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'jupiter-family_comet', 'sssb_data_jupiter-family_comet')
local object = sharedSssb.createSssbGroupObject('sssb_data_jupiter-family_comet.csv', "Jupiter-family Comets", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_jupiter-family_comet.csv', "Jupiter-family Comets", filepath, { 0.29, 0.46, 0.73 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 10
object.Renderable.TrailFade = 28

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'jupiter_trojan_asteroid', 'sssb_data_jupiter_trojan_asteroid')
local object = sharedSssb.createSssbGroupObject('sssb_data_jupiter_trojan_asteroid.csv', "Jupiter Trojan Asteroids", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_jupiter_trojan_asteroid.csv', "Jupiter Trojan Asteroids", filepath, { 0.8, 0.7, 0.7 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 1
object.Renderable.TrailFade = 5

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'main_belt_asteroid', 'sssb_data_main_belt_asteroid')
local object = sharedSssb.createSssbGroupObject('sssb_data_main_belt_asteroid.csv', "Main Asteroid Belt", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_main_belt_asteroid.csv', "Main Asteroid Belt", filepath, { 0.58, 0.58, 0.2 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 1
object.Renderable.TrailFade = 0.1

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'mars-crossing_asteroid', 'sssb_data_mars-crossing_asteroid')
local object = sharedSssb.createSssbGroupObject('sssb_data_mars-crossing_asteroid.csv', "Mars-crossing Asteroids", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_mars-crossing_asteroid.csv', "Mars-crossing Asteroids", filepath, { 0.814, 0.305, 0.220 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 1
object.Renderable.TrailFade = 13

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'outer_main_belt_asteroid', 'sssb_data_outer_main_belt_asteroid')
local object = sharedSssb.createSssbGroupObject('sssb_data_outer_main_belt_asteroid.csv', "Outer Main Asteroid Belt", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_outer_main_belt_asteroid.csv', "Outer Main Asteroid Belt", filepath, { 0.5, 0.50, 0.67 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 1
object.Renderable.TrailFade = 2

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'pha', 'sssb_data_pha')
local object = sharedSssb.createSssbGroupObject('sssb_data_pha.csv', "Potentially Hazardous Asteroids", filepath, { 0.75, 0.2, 0.2 })
local object = sharedSssb.createSssbGroupObject('sssb_data_pha.csv', "Potentially Hazardous Asteroids", filepath, { 0.98, 0.09, 0.06})
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 3
object.Renderable.TrailFade = 17

View File

@@ -2,7 +2,7 @@ local assetHelper = asset.require('util/asset_helper')
local sharedSssb = asset.require('./sssb_shared')
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'transneptunian_object_asteroid', 'sssb_data_transneptunian_object_asteroid')
local object = sharedSssb.createSssbGroupObject('sssb_data_transneptunian_object_asteroid.csv', "Transneptunian Object Asteroids", filepath, { 0.9, 0.3, 0.1 })
local object = sharedSssb.createSssbGroupObject('sssb_data_transneptunian_object_asteroid.csv', "Transneptunian Object Asteroids", filepath, {0.32, 0.32, 0.34 })
object.Renderable.Enabled = false
object.Renderable.SegmentQuality = 8
object.Renderable.TrailFade = 10

View File

@@ -66,3 +66,80 @@ local setDeltaTimeKeys = function(t)
return result
end
asset.export("setDeltaTimeKeys", setDeltaTimeKeys)
--shortcut function
local function has_value (tab, val)
for index, value in ipairs(tab) do
-- We grab the first index of our sub-table instead
if value[1] == val then
return true
end
end
return false
end
local extractShortcuts = function(names, shortcuts)
local foundShortcuts = {};
if type(names) ~= "table" then
openspace.printWarning("scene_helper.extractShortcuts invalid paramater names (not Table)")
end
if type(shortcuts) ~= "table" then
openspace.printWarning("scene_helper.extractShortcuts invalid paramater shortcuts (not Table)")
end
for _, shortcut in ipairs(shortcuts) do
for _, name in ipairs(names ) do
if (shortcut.Name == name) then
foundShortcuts[#foundShortcuts+1] = shortcut
end
end
end
return foundShortcuts
end
asset.export("extractShortcuts", extractShortcuts)
local createKeyBindFromShortcuts = function(key, shortcuts, guipath, title, documentation)
if type(key) ~= "string" then
openspace.printWarning("scene_helper.createKeyBindFromShortcuts invalid paramater key (not String)")
end
if type(shortcuts) ~= "table" or #shortcuts == 0 then
openspace.printWarning("scene_helper.createKeyBindFromShortcuts invalid paramater shortcuts (not Table or empty)")
end
-- if type(guipath) ~= "string" then
-- guipath = shortcuts[0].GuiPath
-- end
local concatTitle = type(title) ~= "string"
local concatDocumentation = type(documentation) ~= "string"
local keybind = {
Key = key,
Command = "",
Name = name or "",
Documentation = documentation or "",
GuiPath = guipath or "",
Local = false
}
for _, shortcut in ipairs(shortcuts) do
keybind.Command = keybind.Command .. shortcut.Command
if concatTitle then
keybind.Name = keybind.Name .. "/" .. shortcut.Name
end
if concatDocumentation then
keybind.Documentation = keybind.Documentation .. "," .. shortcut.Documentation
end
keybind.Local = keybind.Local and shortcut.Local
end
return keybind
end
asset.export("createKeyBindFromShortcuts", createKeyBindFromShortcuts)

View File

@@ -82,3 +82,13 @@ end
asset.export("setCefRoute", setCefRoute)
asset.meta = {
Name = "WebGUI",
Version = "0.1",
Description = [[ insert CEF rant ]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}

View File

@@ -3,14 +3,12 @@
<div class="row">
<div class="col-lg-12">
<p>
<a href="#{{urlify module}}" name="{{urlify module}}">
<span class="documentation-key">{{module}}</span>
</a>
<p>{{name}}</p>
<br />
<p>{{attribution}}</p>
<p>{{url}}</p>
<p>{{licenseText}}</p>
<h3>Asset - {{name}}</h3>
<p>{{description}}</p>
<p>Version - {{version}}</p>
<p>Author - {{author}}</p>
<p>Associated URL - <a href="{{url}}">{{url}}</a></p>
<p>Filepath - {{path}}</p>
</p>
</div>
</div>

View File

@@ -28,6 +28,7 @@
#include <openspace/util/resourcesynchronization.h>
#include <openspace/util/synchronizationwatcher.h>
#include <memory>
#include <optional>
#include <string>
#include <vector>
@@ -37,7 +38,7 @@ class AssetLoader;
class Asset : public std::enable_shared_from_this<Asset> {
public:
enum class State : unsigned int {
enum class State {
Unloaded,
LoadingFailed,
Loaded,
@@ -48,8 +49,14 @@ public:
InitializationFailed
};
using StateChangeCallback = std::function<void(State)>;
using CallbackHandle = size_t;
struct MetaInformation {
std::string name;
std::string version;
std::string description;
std::string author;
std::string url;
std::string license;
};
/**
* Root asset constructor
@@ -69,10 +76,9 @@ public:
AssetLoader* loader() const;
State state() const;
void addSynchronization(std::shared_ptr<ResourceSynchronization> synchronization);
void addSynchronization(std::unique_ptr<ResourceSynchronization> synchronization);
void clearSynchronizations();
const std::vector<std::shared_ptr<ResourceSynchronization>>&
ownSynchronizations() const;
std::vector<ResourceSynchronization*> ownSynchronizations() const;
void syncStateChanged(ResourceSynchronization* sync,
ResourceSynchronization::State state);
@@ -92,12 +98,6 @@ public:
* its own synchronizations and required assets' synchronizations could start.
*/
bool startSynchronizations();
bool hasSyncingOrResolvedParent() const;
bool isSynchronized() const;
bool isSyncingOrResolved() const;
bool cancelAllSynchronizations();
bool cancelUnwantedSynchronizations();
bool restartAllSynchronizations();
float requiredSynchronizationProgress() const;
float requestedSynchronizationProgress();
@@ -120,21 +120,16 @@ public:
void request(std::shared_ptr<Asset> child);
void unrequest(Asset* child);
const std::vector<std::shared_ptr<Asset>>& requestedAssets() const;
std::vector<std::shared_ptr<Asset>> requestingAssets() const;
const std::vector<std::shared_ptr<Asset>>& requiredAssets() const;
std::vector<std::shared_ptr<Asset>> requiringAssets() const;
std::vector<Asset*> requestedAssets() const;
std::vector<Asset*> requestingAssets() const;
std::vector<Asset*> requiredAssets() const;
std::vector<Asset*> requiringAssets() const;
std::vector<std::shared_ptr<const Asset>> requiredSubTreeAssets() const;
std::vector<std::shared_ptr<const Asset>> subTreeAssets() const;
std::vector<std::shared_ptr<Asset>> childAssets() const;
std::vector<std::shared_ptr<Asset>> parentAssets() const;
std::vector<const Asset*> subTreeAssets() const;
std::vector<Asset*> childAssets() const;
bool isRequired() const;
bool isRequested() const;
bool shouldBeInitialized() const;
std::string resolveLocalResource(std::string resourceName);
void setMetaInformation(MetaInformation metaInformation);
std::optional<MetaInformation> metaInformation() const;
private:
void setState(State state);
@@ -142,7 +137,14 @@ private:
void requiredAssetChangedState(Asset::State childState);
void requestedAssetChangedState(Asset* child, Asset::State childState);
bool isSynchronized() const;
bool isSyncingOrResolved() const;
bool isSyncResolveReady();
bool hasSyncingOrResolvedParent() const;
bool cancelAllSynchronizations();
bool cancelUnwantedSynchronizations();
std::vector<const Asset*> requiredSubTreeAssets() const;
std::atomic<State> _state;
AssetLoader* _loader;
@@ -157,6 +159,8 @@ private:
// Absolute path to asset file
std::string _assetPath;
std::optional<MetaInformation> _metaInformation;
// Required assets
std::vector<std::shared_ptr<Asset>> _requiredAssets;

View File

@@ -32,12 +32,9 @@ namespace openspace {
class AssetListener {
public:
virtual ~AssetListener() = default;
virtual void assetStateChanged(std::shared_ptr<Asset> asset, Asset::State state) = 0;
virtual void assetRequested(std::shared_ptr<Asset> parent,
std::shared_ptr<Asset> child) = 0;
virtual void assetUnrequested(std::shared_ptr<Asset> parent,
std::shared_ptr<Asset> child) = 0;
virtual void assetStateChanged(Asset* asset, Asset::State state) = 0;
virtual void assetRequested(Asset* parent, std::shared_ptr<Asset> child) = 0;
virtual void assetUnrequested(Asset* parent, std::shared_ptr<Asset> child) = 0;
};
} // namespace openspace

View File

@@ -50,15 +50,13 @@ int request(lua_State* state);
int exists(lua_State* state);
int localResource(lua_State* state);
int syncedResource(lua_State* state);
int noOperation(lua_State* state);
int exportAsset(lua_State* state);
} // namespace assetloader
class Asset;
class AssetListener;
class ResourceSynchronization;
class SynchronizationWatcher;
class AssetListener;
class AssetLoader {
public:
@@ -88,30 +86,26 @@ public:
void untrackAsset(Asset* asset);
/**
* Return the asset identified by the identifier,
* if the asset is tracked. Otherwise return nullptr.
*/
* Return the asset identified by the identifier,
* if the asset is tracked. Otherwise return nullptr.
*/
std::shared_ptr<Asset> has(const std::string& identifier) const;
/**
* Return the lua state
*/
ghoul::lua::LuaState* luaState();
/// Return the root asset
const Asset& rootAsset() const;
/// Return the root asset
Asset& rootAsset();
/**
* Return the root asset
* Return the asset root directory
*/
std::shared_ptr<Asset> rootAsset() const;
/**
* Return the asset root directory
*/
const std::string& assetRootDirectory() const;
/**
* Load an asset
*/
bool loadAsset(std::shared_ptr<Asset> asset);
bool loadAsset(Asset* asset);
/**
* Unload an asset
@@ -158,17 +152,17 @@ public:
/**
* Notify listeners about asset state change
*/
void assetStateChanged(std::shared_ptr<Asset> asset, Asset::State state);
void assetStateChanged(Asset* asset, Asset::State state);
/**
* Notify listeners about new requests
*/
void assetRequested(std::shared_ptr<Asset> parent, std::shared_ptr<Asset> child);
void assetRequested(Asset* parent, std::shared_ptr<Asset> child);
/**
* Notify listeners about removed requests
*/
void assetUnrequested(std::shared_ptr<Asset> parent, std::shared_ptr<Asset> child);
void assetUnrequested(Asset* parent, std::shared_ptr<Asset> child);
/**
* Retrieve a reference to vector list of all assets events, including require,
@@ -182,7 +176,6 @@ public:
void resetAssetEvents();
private:
std::shared_ptr<Asset> require(const std::string& identifier);
std::shared_ptr<Asset> request(const std::string& identifier);
void unrequest(const std::string& identifier);
void addToProfileTracking(std::string asset, Profile::AssetEventType type);
@@ -190,10 +183,10 @@ private:
void setUpAssetLuaTable(Asset* asset);
void tearDownAssetLuaTable(Asset* asset);
std::shared_ptr<Asset> getAsset(std::string name);
std::shared_ptr<Asset> getAsset(const std::string& name);
ghoul::filesystem::Directory currentDirectory() const;
void setCurrentAsset(std::shared_ptr<Asset> asset);
void setCurrentAsset(Asset* asset);
void addLuaDependencyTable(Asset* dependant, Asset* dependency);
// Lua functions
@@ -208,7 +201,7 @@ private:
int syncedResourceLua(Asset* asset);
int exportAssetLua(Asset* asset);
// Friend c closures (callable from lua, and maps to lua functions above)
// Friend C closures (callable from Lua, and maps to Lua functions above)
friend int assetloader::onInitialize(lua_State* state);
friend int assetloader::onDeinitialize(lua_State* state);
friend int assetloader::onInitializeDependency(lua_State* state);
@@ -222,7 +215,7 @@ private:
// Member variables
std::shared_ptr<Asset> _rootAsset;
std::shared_ptr<Asset> _currentAsset;
Asset* _currentAsset = nullptr;
std::unordered_map<std::string, std::weak_ptr<Asset>> _trackedAssets;
SynchronizationWatcher* _synchronizationWatcher;
std::string _assetRootDirectory;
@@ -231,14 +224,15 @@ private:
// State change listeners
std::vector<AssetListener*> _assetListeners;
// References to lua values
// References to Lua values
std::unordered_map<Asset*, std::vector<int>> _onInitializationFunctionRefs;
std::unordered_map<Asset*, std::vector<int>> _onDeinitializationFunctionRefs;
std::unordered_map<Asset*, std::map<Asset*, std::vector<int>>>
_onDependencyInitializationFunctionRefs;
std::unordered_map<Asset*, std::map<Asset*, std::vector<int>>>
_onDependencyDeinitializationFunctionRefs;
int _assetsTableRef;
int _assetsTableRef = 0;
std::vector<Profile::AssetEvent> _profileAssets;
};

View File

@@ -28,9 +28,12 @@
#include <openspace/scene/assetlistener.h>
#include <openspace/scene/profile.h>
#include <openspace/scene/assetloader.h>
#include <ghoul/lua/ghoul_lua.h>
#include <ghoul/lua/luastate.h>
#include <memory>
#include <vector>
#include <unordered_map>
#include <vector>
namespace openspace {
@@ -42,18 +45,14 @@ class SynchronizationWatcher;
/**
* Interface for managing assets.
* The asset manager interface is only concerned with "top level" assets,
* i.e. assets that are loaded using setTargetAssetState, and not their dependencies.
* However, an asset is not considered synchronized before all its deps are
* synchronized.
* Also, setting a target state of an asset to Unloaded will only unload an asset
* from the system if it is not a dependency of a loaded asset.
* The asset manager interface is only concerned with "top level" assets, and not their
* dependencies. However, an asset is not considered synchronized before all its deps are
* synchronized. Also, setting a target state of an asset to Unloaded will only unload an
* asset from the system if it is not a dependency of a loaded asset.
*/
class AssetManager : AssetListener {
public:
AssetManager(std::unique_ptr<AssetLoader> loader,
std::unique_ptr<SynchronizationWatcher> syncWatcher);
AssetManager(ghoul::lua::LuaState* state, std::string assetRootDirectory);
virtual ~AssetManager() = default;
@@ -62,13 +61,12 @@ public:
void add(const std::string& path);
void remove(const std::string& path);
void removeAll();
std::shared_ptr<Asset> rootAsset();
const Asset& rootAsset() const;
Asset& rootAsset();
void assetStateChanged(std::shared_ptr<Asset> asset, Asset::State state) override;
void assetRequested(std::shared_ptr<Asset> parent,
std::shared_ptr<Asset> child) override;
void assetUnrequested(std::shared_ptr<Asset> parent,
std::shared_ptr<Asset> child) override;
void assetStateChanged(Asset* asset, Asset::State state) override;
void assetRequested(Asset* parent, std::shared_ptr<Asset> child) override;
void assetUnrequested(Asset* parent, std::shared_ptr<Asset> child) override;
bool update();
const std::vector<Profile::AssetEvent>& assetEvents() const;
@@ -80,8 +78,8 @@ private:
std::mutex _pendingInitializationsMutex;
std::vector<std::shared_ptr<Asset>> _pendingInitializations;
std::unique_ptr<SynchronizationWatcher> _synchronizationWatcher;
std::unique_ptr<AssetLoader> _assetLoader;
SynchronizationWatcher _synchronizationWatcher;
AssetLoader _assetLoader;
};
} // namespace openspace

View File

@@ -28,7 +28,6 @@
#include <openspace/interaction/navigationhandler.h>
#include <openspace/scene/profilefile.h>
#include <openspace/scene/scenegraphnode.h>
#include <openspace/scene/scenelicense.h>
#include <ghoul/misc/easing.h>
#include <ghoul/misc/exception.h>
#include <mutex>

View File

@@ -28,7 +28,6 @@
#include <openspace/properties/propertyowner.h>
#include <openspace/scene/scenegraphnode.h>
#include <openspace/scene/scenelicense.h>
#include <ghoul/misc/easing.h>
#include <ghoul/misc/exception.h>
#include <mutex>
@@ -134,8 +133,6 @@ public:
*/
void unregisterNode(SceneGraphNode* node);
void addSceneLicense(SceneLicense license);
/**
* Mark the node registry as dirty
*/
@@ -146,14 +143,6 @@ public:
*/
const std::vector<SceneGraphNode*>& allSceneGraphNodes() const;
/**
* Generate JSON about the license information for the scenegraph nodes that are
* contained in this scene
* \param path The file path that will contain the documentation about the licenses
* used in this scene
*/
std::string generateSceneLicenseDocumentationJson();
/**
* Returns a map from identifier to scene graph node.
*/
@@ -261,8 +250,6 @@ private:
std::vector<InterestingTime> _interestingTimes;
std::vector<SceneLicense> _licenses;
std::mutex _programUpdateLock;
std::set<ghoul::opengl::ProgramObject*> _programsToUpdate;
std::vector<std::unique_ptr<ghoul::opengl::ProgramObject>> _programs;

View File

@@ -1,56 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2020 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __OPENSPACE_CORE___SCENELICENSE___H__
#define __OPENSPACE_CORE___SCENELICENSE___H__
#include <string>
#include <vector>
namespace ghoul { class Dictionary; }
namespace openspace {
namespace documentation { struct Documentation; }
struct SceneLicense {
// module must not be empty
SceneLicense(const ghoul::Dictionary& dictionary, std::string m);
std::string module;
std::string name;
std::string attribution;
std::string url;
std::string licenseText;
static documentation::Documentation Documentation();
};
void writeSceneLicenseDocumentation(const std::vector<SceneLicense>& licenses,
const std::string& file, const std::string& type);
} // namespace openspace
#endif // __OPENSPACE_CORE___SCENELICENSE___H__

View File

@@ -31,15 +31,10 @@
namespace openspace {
struct SceneLicense;
class SceneLicenseWriter : public DocumentationGenerator {
public:
SceneLicenseWriter(std::vector<SceneLicense> licenses);
SceneLicenseWriter();
std::string generateJson() const override;
private:
const std::vector<SceneLicense>& _licenses;
};
} // namespace openspace

View File

@@ -68,9 +68,9 @@ public:
State state() const;
const std::string& name() const;
bool isResolved();
bool isRejected();
bool isSyncing();
bool isResolved() const;
bool isRejected() const;
bool isSyncing() const;
CallbackHandle addStateChangeCallback(StateChangeCallback cb);
void removeStateChangeCallback(CallbackHandle id);

View File

@@ -53,12 +53,6 @@ public:
ResourceSynchronization::StateChangeCallback callback;
};
/*using SyncStateChangeCallback =
std::function<void(
std::shared_ptr<ResourceSynchronization>,
ResourceSynchronization::State
)>;*/
WatchHandle watchSynchronization(
std::shared_ptr<ResourceSynchronization> synchronization,
ResourceSynchronization::StateChangeCallback callback
@@ -69,7 +63,6 @@ public:
void notify();
private:
WatchHandle generateWatchHandle();
std::mutex _mutex;
std::unordered_map<WatchHandle, WatchData> _watchedSyncs;
std::vector<NotificationData> _pendingNotifications;

View File

@@ -262,6 +262,7 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
}
}
addPropertySubOwner(_lightSourcePropertyOwner);
addPropertySubOwner(_geometry.get());
@@ -278,14 +279,13 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
addProperty(_rotationVec);
_rotationVec.onChange([this]() {
glm::vec3 degreeVector = _rotationVec;
glm::vec3 radianVector = glm::vec3(
glm::radians(degreeVector.x),
glm::radians(degreeVector.y),
glm::radians(degreeVector.z)
);
_modelTransform = glm::mat4_cast(glm::quat(radianVector));
_modelTransform = glm::mat4_cast(glm::quat(glm::radians(_rotationVec.value())));
});
if (dictionary.hasKey(RotationVecInfo.identifier)) {
_rotationVec = dictionary.value<glm::vec3>(RotationVecInfo.identifier);
}
}
bool RenderableModel::isReady() const {

View File

@@ -362,48 +362,49 @@ void RenderableSphere::render(const RenderData& data, RendererTasks&) {
float adjustedTransparency = _opacity;
if (_fadeInThreshold > -1.0) {
const float logDistCamera = glm::log(static_cast<float>(
glm::distance(data.camera.positionVec3(), data.modelTransform.translation)
));
const float startLogFadeDistance = glm::log(_size * _fadeInThreshold);
const float stopLogFadeDistance = startLogFadeDistance + 1.f;
if (!_disableFadeInDistance) {
if (_fadeInThreshold > -1.0) {
const float logDistCamera = glm::log(static_cast<float>(
glm::distance(data.camera.positionVec3(), data.modelTransform.translation)
));
const float startLogFadeDistance = glm::log(_size * _fadeInThreshold);
const float stopLogFadeDistance = startLogFadeDistance + 1.f;
if (logDistCamera > startLogFadeDistance && logDistCamera < stopLogFadeDistance) {
const float fadeFactor = glm::clamp(
(logDistCamera - startLogFadeDistance) /
(stopLogFadeDistance - startLogFadeDistance),
0.f,
1.f
);
adjustedTransparency *= fadeFactor;
if (logDistCamera > startLogFadeDistance && logDistCamera < stopLogFadeDistance) {
const float fadeFactor = glm::clamp(
(logDistCamera - startLogFadeDistance) /
(stopLogFadeDistance - startLogFadeDistance),
0.f,
1.f
);
adjustedTransparency *= fadeFactor;
}
else if (logDistCamera <= startLogFadeDistance) {
adjustedTransparency = 0.f;
}
}
else if (logDistCamera <= startLogFadeDistance) {
adjustedTransparency = 0.f;
if (_fadeOutThreshold > -1.0) {
const float logDistCamera = glm::log(static_cast<float>(
glm::distance(data.camera.positionVec3(), data.modelTransform.translation)
));
const float startLogFadeDistance = glm::log(_size * _fadeOutThreshold);
const float stopLogFadeDistance = startLogFadeDistance + 1.f;
if (logDistCamera > startLogFadeDistance && logDistCamera < stopLogFadeDistance) {
const float fadeFactor = glm::clamp(
(logDistCamera - startLogFadeDistance) /
(stopLogFadeDistance - startLogFadeDistance),
0.f,
1.f
);
adjustedTransparency *= (1.f - fadeFactor);
}
else if (logDistCamera >= stopLogFadeDistance) {
adjustedTransparency = 0.f;
}
}
}
if (_fadeOutThreshold > -1.0) {
const float logDistCamera = glm::log(static_cast<float>(
glm::distance(data.camera.positionVec3(), data.modelTransform.translation)
));
const float startLogFadeDistance = glm::log(_size * _fadeOutThreshold);
const float stopLogFadeDistance = startLogFadeDistance + 1.f;
if (logDistCamera > startLogFadeDistance && logDistCamera < stopLogFadeDistance) {
const float fadeFactor = glm::clamp(
(logDistCamera - startLogFadeDistance) /
(stopLogFadeDistance - startLogFadeDistance),
0.f,
1.f
);
adjustedTransparency *= (1.f - fadeFactor);
}
else if (logDistCamera >= stopLogFadeDistance) {
adjustedTransparency = 0.f;
}
}
// Performance wise
if (adjustedTransparency < 0.01f) {
return;

View File

@@ -80,7 +80,7 @@ documentation::Documentation RenderableSphericalGrid::Documentation() {
},
{
GridColorInfo.identifier,
new DoubleVector4Verifier,
new DoubleVector3Verifier,
Optional::Yes,
GridColorInfo.description
},
@@ -107,9 +107,9 @@ RenderableSphericalGrid::RenderableSphericalGrid(const ghoul::Dictionary& dictio
, _gridMatrix(GridMatrixInfo, glm::mat4(1.f))
, _gridColor(
GridColorInfo,
glm::vec4(0.5f, 0.5, 0.5f, 1.f),
glm::vec4(0.f),
glm::vec4(1.f)
glm::vec3(0.5f, 0.5, 0.5f),
glm::vec3(0.f),
glm::vec3(1.f)
)
, _segments(SegmentsInfo, 36, 4, 200)
, _lineWidth(LineWidthInfo, 0.5f, 0.f, 20.f)
@@ -129,7 +129,7 @@ RenderableSphericalGrid::RenderableSphericalGrid(const ghoul::Dictionary& dictio
addProperty(_gridMatrix);
if (dictionary.hasKey(GridColorInfo.identifier)) {
_gridColor = dictionary.value<glm::vec4>(GridColorInfo.identifier);
_gridColor = dictionary.value<glm::vec3>(GridColorInfo.identifier);
}
_gridColor.setViewOption(properties::Property::ViewOptions::Color);
addProperty(_gridColor);
@@ -214,16 +214,29 @@ void RenderableSphericalGrid::render(const RenderData& data, RendererTasks&){
const glm::dmat4 modelViewTransform = data.camera.combinedViewMatrix() *
modelTransform;
_gridProgram->setUniform("modelViewTransform", glm::mat4(modelViewTransform));
_gridProgram->setUniform("projectionTransform", data.camera.projectionMatrix());
_gridProgram->setUniform("modelViewTransform", modelViewTransform);
_gridProgram->setUniform(
"MVPTransform",
glm::dmat4(data.camera.projectionMatrix()) * modelViewTransform
);
_gridProgram->setUniform("gridColor", _gridColor);
float adjustedLineWidth = 1.f;
#ifndef __APPLE__
adjustedLineWidth = _lineWidth;
#endif
// Saves current state:
GLboolean isBlendEnabled = glIsEnabledi(GL_BLEND, 0);
GLboolean isLineSmoothEnabled = glIsEnabled(GL_LINE_SMOOTH);
GLfloat currentLineWidth;
glGetFloatv(GL_LINE_WIDTH, &currentLineWidth);
GLboolean isLineSmoothEnabled = glIsEnabled(GL_LINE_SMOOTH);
GLenum currentDepthFunction;
glGetIntegerv(GL_DEPTH_FUNC, &currentDepthFunction);
glDepthFunc(GL_LEQUAL);
GLenum blendEquationRGB, blendEquationAlpha, blendDestAlpha,
blendDestRGB, blendSrcAlpha, blendSrcRGB;
@@ -235,11 +248,11 @@ void RenderableSphericalGrid::render(const RenderData& data, RendererTasks&){
glGetIntegerv(GL_BLEND_SRC_RGB, &blendSrcRGB);
// Changes GL state:
glLineWidth(_lineWidth);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glLineWidth(adjustedLineWidth);
glEnablei(GL_BLEND, 0);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_LINE_SMOOTH);
glBindVertexArray(_vaoID);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _iBufferID);
glDrawElements(_mode, _isize, GL_UNSIGNED_INT, nullptr);
@@ -251,12 +264,16 @@ void RenderableSphericalGrid::render(const RenderData& data, RendererTasks&){
glLineWidth(currentLineWidth);
glBlendEquationSeparate(blendEquationRGB, blendEquationAlpha);
glBlendFuncSeparate(blendSrcRGB, blendDestRGB, blendSrcAlpha, blendDestAlpha);
if (!isBlendEnabled) {
glDisablei(GL_BLEND, 0);
}
if (!isLineSmoothEnabled) {
glDisable(GL_LINE_SMOOTH);
}
glDepthFunc(currentDepthFunction);
}
void RenderableSphericalGrid::update(const UpdateData&) {

View File

@@ -31,7 +31,7 @@
#include <openspace/properties/matrix/dmat4property.h>
#include <openspace/properties/scalar/floatproperty.h>
#include <openspace/properties/scalar/intproperty.h>
#include <openspace/properties/vector/vec4property.h>
#include <openspace/properties/vector/vec3property.h>
#include <ghoul/opengl/ghoul_gl.h>
namespace ghoul::opengl { class ProgramObject; }
@@ -63,7 +63,7 @@ protected:
ghoul::opengl::ProgramObject* _gridProgram;
properties::DMat4Property _gridMatrix;
properties::Vec4Property _gridColor;
properties::Vec3Property _gridColor;
properties::IntProperty _segments;
properties::FloatProperty _lineWidth;

View File

@@ -25,18 +25,22 @@
#include "fragment.glsl"
#include "PowerScaling/powerScaling_fs.hglsl"
in float vs_screenSpaceDepth;
in float vs_depthClipSpace;
in vec4 vs_positionViewSpace;
uniform vec4 gridColor;
uniform vec3 gridColor;
uniform float opacity;
Fragment getFragment() {
Fragment frag;
frag.color = gridColor;
frag.color.a *= opacity;
frag.depth = vs_screenSpaceDepth;
frag.gPosition = vs_positionViewSpace;
frag.gNormal = vec4(0.0, 0.0, 0.0, 1.0);
frag.color.rgb = gridColor;
frag.color.a = opacity;
frag.depth = vs_depthClipSpace;
frag.gPosition = vs_positionViewSpace;
// There is no normal here
frag.gNormal = vec4(0.0, 0.0, -1.0, 1.0);
return frag;
}

View File

@@ -28,18 +28,21 @@
layout(location = 0) in vec3 in_position;
out float vs_screenSpaceDepth;
out float vs_depthClipSpace;
out vec4 vs_positionViewSpace;
uniform mat4 modelViewTransform;
uniform mat4 projectionTransform;
uniform dmat4 modelViewTransform;
uniform dmat4 MVPTransform;
void main() {
vec4 positionViewSpace = modelViewTransform * vec4(in_position, 1.0);
vec4 positionClipSpace = projectionTransform * positionViewSpace;
vec4 positionScreenSpace = z_normalization(positionClipSpace);
vs_screenSpaceDepth = positionScreenSpace.w;
vs_positionViewSpace = positionViewSpace;
dvec4 objPosDouble = dvec4(in_position, 1.0);
dvec4 positionViewSpace = modelViewTransform * objPosDouble;
dvec4 positionClipSpace = MVPTransform * objPosDouble;
gl_Position = positionScreenSpace;
positionClipSpace.z = 0.0;
vs_depthClipSpace = float(positionClipSpace.w);
vs_positionViewSpace = vec4(positionViewSpace);
gl_Position = vec4(positionClipSpace);
}

View File

@@ -124,9 +124,11 @@ TimeFrameInterval::TimeFrameInterval(const ghoul::Dictionary& dictionary)
addProperty(_hasEnd);
addProperty(_end);
documentation::testSpecificationAndThrow(Documentation(),
dictionary,
"TimeFrameInterval");
documentation::testSpecificationAndThrow(
Documentation(),
dictionary,
"TimeFrameInterval"
);
if (dictionary.hasValue<std::string>(StartInfo.identifier)) {
_start = SpiceManager::ref().ephemerisTimeFromDate(

View File

@@ -117,11 +117,6 @@ create_new_module(
${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES}
)
option(OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION "Instrumentation for GlobeBrowsing Performance" OFF)
if (OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION)
target_compile_definitions(openspace-module-globebrowsing INTERFACE "OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION")
endif ()
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/gdal_data DESTINATION modules/globebrowsing)
if (WIN32)

View File

@@ -106,14 +106,6 @@ namespace {
"The maximum size of the MemoryAwareTileCache, on the CPU and GPU."
};
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
constexpr const openspace::properties::Property::PropertyInfo InstrumentationInfo = {
"SaveInstrumentationInfo",
"Save Instrumentation Info",
"If enabled, the instrumentation data is saved to disk at the end of the frame."
};
#endif // OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
openspace::GlobeBrowsingModule::Capabilities
parseSubDatasets(char** subDatasets, int nSubdatasets)
@@ -176,24 +168,12 @@ GlobeBrowsingModule::GlobeBrowsingModule()
, _wmsCacheLocation(WMSCacheLocationInfo, "${BASE}/cache_gdal")
, _wmsCacheSizeMB(WMSCacheSizeInfo, 1024)
, _tileCacheSizeMB(TileCacheSizeInfo, 1024)
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
, _saveInstrumentation(InstrumentationInfo, false)
#endif // OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
{
addProperty(_wmsCacheEnabled);
addProperty(_offlineMode);
addProperty(_wmsCacheLocation);
addProperty(_wmsCacheSizeMB);
addProperty(_tileCacheSizeMB);
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
_saveInstrumentation.onChange([&]() {
if (_saveInstrumentation) {
_frameInfo.lastSavedFrame = global::renderEngine.frameNumber();
}
});
addProperty(_saveInstrumentation);
#endif // OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
}
void GlobeBrowsingModule::internalInitialize(const ghoul::Dictionary& dict) {
@@ -268,45 +248,6 @@ void GlobeBrowsingModule::internalInitialize(const ghoul::Dictionary& dict) {
_tileCache->update();
});
// Postdraw
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
global::callback::postDraw.emplace_back([&]() {
ZoneScopedN("GlobeBrowsingModule")
// >= as we might have multiple frames per postDraw call (stereo rendering,
// fisheye, etc)
const uint16_t next = _frameInfo.lastSavedFrame + _frameInfo.saveEveryNthFrame;
const bool shouldSave = _saveInstrumentation &&
global::renderEngine.frameNumber() >= next;
if (shouldSave) {
using K = const globebrowsing::RenderableGlobe*;
using V = std::vector<FrameInfo>;
for (const std::pair<K, V>& i : _frameInfo.frames) {
std::string filename = fmt::format(
"_inst_globebrowsing_{}_{}_{}.txt",
i.first->owner()->identifier(), // Owner of the renderable has a name
_frameInfo.lastSavedFrame,
_frameInfo.saveEveryNthFrame
);
std::ofstream file(absPath("${BIN}/" + filename));
for (const FrameInfo& f : i.second) {
std::string line = fmt::format(
"{}\t{}\t{}\t{}",
f.iFrame,
f.nTilesRenderedLocal,
f.nTilesRenderedGlobal,
f.nTilesUploaded
);
file << line << '\n';
}
}
_frameInfo.frames.clear();
_frameInfo.lastSavedFrame = global::renderEngine.frameNumber();
}
});
#endif // OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
// Deinitialize
global::callback::deinitialize.emplace_back([&]() {
ZoneScopedN("GlobeBrowsingModule")
@@ -834,27 +775,4 @@ uint64_t GlobeBrowsingModule::wmsCacheSize() const {
return size * 1024 * 1024;
}
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
void GlobeBrowsingModule::addFrameInfo(globebrowsing::RenderableGlobe* globe,
uint32_t nTilesRenderedLocal,
uint32_t nTilesRenderedGlobal,
uint32_t nTilesUploaded)
{
auto it = _frameInfo.frames.find(globe);
if (it == _frameInfo.frames.end()) {
_frameInfo.frames[globe] = std::vector<FrameInfo>();
_frameInfo.frames[globe].reserve(_frameInfo.saveEveryNthFrame);
}
else {
it->second.push_back({
global::renderEngine.frameNumber(),
nTilesRenderedLocal,
nTilesRenderedGlobal,
nTilesUploaded
});
}
}
#endif // OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
} // namespace openspace

View File

@@ -95,11 +95,6 @@ public:
std::string wmsCacheLocation() const;
uint64_t wmsCacheSize() const; // bytes
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
void addFrameInfo(globebrowsing::RenderableGlobe* globe, uint32_t nTilesRenderedLocal,
uint32_t nTilesRenderedGlobal, uint32_t nTilesUploaded);
#endif // OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
protected:
void internalInitialize(const ghoul::Dictionary&) override;
@@ -141,26 +136,6 @@ private:
std::map<std::string, Capabilities> _capabilitiesMap;
std::multimap<std::string, UrlInfo> _urlList;
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
struct FrameInfo {
uint64_t iFrame = 0;
uint32_t nTilesRenderedLocal = 0;
uint32_t nTilesRenderedGlobal = 0;
uint32_t nTilesUploaded = 0;
};
struct {
std::unordered_map<
globebrowsing::RenderableGlobe*,
std::vector<FrameInfo>
> frames;
uint64_t lastSavedFrame = 0;
const uint16_t saveEveryNthFrame = 2048;
} _frameInfo;
properties::BoolProperty _saveInstrumentation;
#endif // OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
};
} // namespace openspace

View File

@@ -50,13 +50,6 @@
#include <numeric>
#include <queue>
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
#include <openspace/engine/moduleengine.h>
#include <modules/globebrowsing/globebrowsingmodule.h>
openspace::GlobeBrowsingModule* _module = nullptr;
#endif // OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
namespace {
// Global flags to modify the RenderableGlobe
constexpr const bool LimitLevelByAvailableData = true;
@@ -709,10 +702,6 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary)
_generalProperties.shadowMapping = true;
}
_generalProperties.shadowMapping.onChange(notifyShaderRecompilation);
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
_module = global::moduleEngine.module<GlobeBrowsingModule>();
#endif // OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
}
void RenderableGlobe::initializeGL() {
@@ -786,7 +775,7 @@ void RenderableGlobe::render(const RenderData& data, RendererTasks& rendererTask
try {
// Before Shadows
//renderChunks(data, rendererTask);
//_globeLabelsComponent.draw(data);
_globeLabelsComponent.draw(data);
if (_hasShadows && _shadowComponent.isEnabled()) {
// Set matrices and other GL states
@@ -921,11 +910,7 @@ void RenderableGlobe::update(const UpdateData& data) {
_shadowComponent.update(data);
}
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
_nUploadedTiles = _layerManager.update();
#else
_layerManager.update();
#endif // OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
if (_nLayersIsDirty) {
std::array<LayerGroup*, LayerManager::NumLayerGroups> lgs =
@@ -1237,15 +1222,6 @@ void RenderableGlobe::renderChunks(const RenderData& data, RendererTasks&,
}
_localRenderer.program->deactivate();
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
_module->addFrameInfo(
this,
std::min(localCount, ChunkBufferSize),
std::min(globalCount, ChunkBufferSize),
_nUploadedTiles
);
#endif // OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
if (_debugProperties.showChunkBounds || _debugProperties.showChunkAABB) {
for (int i = 0; i < std::min(globalCount, ChunkBufferSize); ++i) {
debugRenderChunk(

View File

@@ -297,10 +297,6 @@ private:
// Labels
GlobeLabelsComponent _globeLabelsComponent;
ghoul::Dictionary _labelsDictionary;
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
int _nUploadedTiles = 0;
#endif // OPENSPACE_MODULE_GLOBEBROWSING_INSTRUMENTATION
};
} // namespace openspace::globebrowsing

Some files were not shown because too many files have changed in this diff Show More