diff --git a/.gitignore b/.gitignore index 1ed32e43c9..11489c2ac9 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ Thumbs.db /cache/ /cache-*/ /cache_gdal/ +/mrf_cache/ /documentation/ /logs/ /screenshots/ diff --git a/apps/OpenSpace/ext/launcher/CMakeLists.txt b/apps/OpenSpace/ext/launcher/CMakeLists.txt index b1c87bfe64..f7a465bd3c 100644 --- a/apps/OpenSpace/ext/launcher/CMakeLists.txt +++ b/apps/OpenSpace/ext/launcher/CMakeLists.txt @@ -113,9 +113,6 @@ target_include_directories( openspace-ui-launcher PUBLIC include - # @TODO: This should be handled in a better way - ../sgct/include - ../sgct/sgct/ext/glm ) target_link_libraries( openspace-ui-launcher @@ -126,6 +123,8 @@ target_link_libraries( Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network + PRIVATE + sgct ) target_precompile_headers(openspace-ui-launcher PRIVATE diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 61fe0fe3ef..05ed52d053 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 61fe0fe3efd67fc822f4442ea96837dcee5705b1 +Subproject commit 05ed52d0533b95954913a363499bb828512a6245 diff --git a/data/assets/scene/digitaluniverse/backgroundradiation.asset b/data/assets/scene/digitaluniverse/backgroundradiation.asset index 4b6c8f00e2..5605f16bad 100644 --- a/data/assets/scene/digitaluniverse/backgroundradiation.asset +++ b/data/assets/scene/digitaluniverse/backgroundradiation.asset @@ -29,7 +29,6 @@ local wmap = { Texture = textures .. "wmap_ilc_7yr_v4_200uK_RGB_sos.png", Orientation = "Both", MirrorTexture = true, - RenderBinMode = "PreDeferredTransparent", FadeInThreshold = 0.4 }, GUI = { @@ -55,7 +54,6 @@ local cbe = { Texture = textures .. "COBErect.png", Orientation = "Both", MirrorTexture = true, - RenderBinMode = "PreDeferredTransparent", FadeInThreshold = 0.4 }, GUI = { @@ -81,7 +79,6 @@ local planck = { Texture = textures .. "cmb4k.jpg", Orientation = "Both", MirrorTexture = true, - RenderBinMode = "PreDeferredTransparent", FadeInThreshold = 0.4 }, GUI = { @@ -107,7 +104,6 @@ local Halpha = { Opacity = 0.4, Texture = textures .. "mwHalpha-f.png", Orientation = "Inside", - RenderBinMode = "PreDeferredTransparent", MirrorTexture = true, FadeOutThreshold = 0.025, Background = true diff --git a/data/assets/scene/digitaluniverse/backgroundradiation_multiverse.asset b/data/assets/scene/digitaluniverse/backgroundradiation_multiverse.asset index 736a1e416e..9015923568 100644 --- a/data/assets/scene/digitaluniverse/backgroundradiation_multiverse.asset +++ b/data/assets/scene/digitaluniverse/backgroundradiation_multiverse.asset @@ -26,7 +26,6 @@ local multiverse_planck_1 = { Texture = textures .. "cmb4k.jpg", Orientation = "Both", MirrorTexture = true, - RenderBinMode = "PreDeferredTransparent", FadeInThreshold = 0.4 }, GUI = { @@ -56,7 +55,6 @@ local multiverse_planck_2 = { Texture = textures .. "cmb4k.jpg", Orientation = "Both", MirrorTexture = true, - RenderBinMode = "PreDeferredTransparent", FadeInThreshold = 0.4 }, GUI = { @@ -86,7 +84,6 @@ local multiverse_planck_3 = { Texture = textures .. "cmb4k.jpg", Orientation = "Both", MirrorTexture = true, - RenderBinMode = "PreDeferredTransparent", FadeInThreshold = 0.4 }, GUI = { @@ -116,7 +113,6 @@ local multiverse_planck_4 = { Texture = textures .. "cmb4k.jpg", Orientation = "Both", MirrorTexture = true, - RenderBinMode = "PreDeferredTransparent", FadeInThreshold = 0.4 }, GUI = { diff --git a/data/assets/scene/digitaluniverse/milkyway_sphere.asset b/data/assets/scene/digitaluniverse/milkyway_sphere.asset index 2cde64e74a..9094724bd9 100644 --- a/data/assets/scene/digitaluniverse/milkyway_sphere.asset +++ b/data/assets/scene/digitaluniverse/milkyway_sphere.asset @@ -21,7 +21,6 @@ local sphere = { Opacity = 0.35, Texture = sphereTextures .. "DarkUniverse_mellinger_4k.jpg", Orientation = "Inside", - RenderBinMode = "PreDeferredTransparent", MirrorTexture = true, FadeOutThreshold = 0.0015, Background = true, diff --git a/data/assets/scene/milkyway/milkyway/eso.asset b/data/assets/scene/milkyway/milkyway/eso.asset index 37f64415bc..0276fea594 100644 --- a/data/assets/scene/milkyway/milkyway/eso.asset +++ b/data/assets/scene/milkyway/milkyway/eso.asset @@ -19,7 +19,6 @@ local object = { Segments = 40, Opacity = 0.4, Texture = textures .. "eso0932a_blend.png", - RenderBinMode = "PreDeferredTransparent", Orientation = "Inside", MirrorTexture = true, FadeOutThreshold = 0.01, diff --git a/data/assets/scene/solarsystem/missions/jwst/jwst.asset b/data/assets/scene/solarsystem/missions/jwst/jwst.asset index c333782857..5cdff947e1 100644 --- a/data/assets/scene/solarsystem/missions/jwst/jwst.asset +++ b/data/assets/scene/solarsystem/missions/jwst/jwst.asset @@ -48,8 +48,7 @@ local JWSTBand = { Segments = 50, DisableFadeInOut = true, Orientation = "Inside", - Opacity = 0.05, - RenderBinMode = "PreDeferredTransparent", + Opacity = 0.05 }, Tag = { "mission_jwst_fov" }, GUI = { diff --git a/data/assets/scene/solarsystem/missions/rosetta/67p.asset b/data/assets/scene/solarsystem/missions/rosetta/67p.asset index 6c327d2228..3ddae9990d 100644 --- a/data/assets/scene/solarsystem/missions/rosetta/67p.asset +++ b/data/assets/scene/solarsystem/missions/rosetta/67p.asset @@ -21,10 +21,11 @@ local images = asset.syncedResource({ Type = "HttpSynchronization", Identifier = "rosettaimages", Version = 2, - UnzipFiles = true + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = images .. "images_v1_v2" +local imagesDestination = images .. "images" local Barycenter = { Identifier = "67PBarycenter", diff --git a/data/assets/scene/solarsystem/planets/earth/lagrange_points/L1.asset b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L1.asset index 82a0506fe3..bf774d859f 100644 --- a/data/assets/scene/solarsystem/planets/earth/lagrange_points/L1.asset +++ b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L1.asset @@ -39,7 +39,6 @@ local L1 = { Parent = L1Position.Identifier, Renderable = { Type = "RenderablePlaneImageLocal", - RenderBinMode = "Opaque", Billboard = true, Size = 700E5, Texture = circle .. "circle.png", diff --git a/data/assets/scene/solarsystem/planets/earth/lagrange_points/L2.asset b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L2.asset index bae8099049..5dfbe59979 100644 --- a/data/assets/scene/solarsystem/planets/earth/lagrange_points/L2.asset +++ b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L2.asset @@ -64,7 +64,6 @@ local L2Small = { Parent = L2Position.Identifier, Renderable = { Type = "RenderablePlaneImageLocal", - RenderBinMode = "Opaque", Billboard = true, Size = 400E4, Texture = circle .. "circle.png", @@ -82,7 +81,6 @@ local L2 = { Parent = L2Position.Identifier, Renderable = { Type = "RenderablePlaneImageLocal", - RenderBinMode = "Opaque", Billboard = true, Size = 700E5, Texture = circle .. "circle.png", diff --git a/data/assets/scene/solarsystem/planets/earth/lagrange_points/L4.asset b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L4.asset index 4acaf26ebf..4118b9e731 100644 --- a/data/assets/scene/solarsystem/planets/earth/lagrange_points/L4.asset +++ b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L4.asset @@ -39,7 +39,6 @@ local L4 = { Parent = L4Position.Identifier, Renderable = { Type = "RenderablePlaneImageLocal", - RenderBinMode = "Opaque", Billboard = true, Size = 800E6, Texture = circle .. "circle.png", diff --git a/data/assets/scene/solarsystem/planets/earth/lagrange_points/L5.asset b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L5.asset index cd66f1bc15..fcb3c0a195 100644 --- a/data/assets/scene/solarsystem/planets/earth/lagrange_points/L5.asset +++ b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L5.asset @@ -39,7 +39,6 @@ local L5 = { Parent = L5Position.Identifier, Renderable = { Type = "RenderablePlaneImageLocal", - RenderBinMode = "Opaque", Billboard = true, Size = 800E6, Texture = circle .. "circle.png", diff --git a/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset b/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset index 6f038f0fa0..f74a81f97c 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset @@ -1,7 +1,7 @@ local transforms = asset.require("../transforms") asset.require("spice/base") asset.require("./trail") -local kernel = asset.require("../kernels").jup310 +local kernel = asset.require("../kernels").jup365 local labelsPath = asset.syncedResource({ Name = "Jupiter Labels", diff --git a/data/assets/scene/solarsystem/planets/jupiter/callisto/trail.asset b/data/assets/scene/solarsystem/planets/jupiter/callisto/trail.asset index 4e278dd93d..0576249c34 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/callisto/trail.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/callisto/trail.asset @@ -1,6 +1,6 @@ local transforms = asset.require("../transforms") asset.require("spice/base") -local kernel = asset.require("../kernels").jup310 +local kernel = asset.require("../kernels").jup365 diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset index 002cce3765..b81150b745 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset @@ -1,7 +1,7 @@ local transforms = asset.require("../transforms") asset.require("spice/base") asset.require("./trail") -local kernel = asset.require("../kernels").jup310 +local kernel = asset.require("../kernels").jup365 local labelsPath = asset.syncedResource({ Name = "Jupiter Labels", @@ -92,7 +92,7 @@ asset.export(Europa) asset.meta = { - Name = "Mimas", + Name = "Europa", Version = "1.1", Description = "Europa globe with labels", Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/trail.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/trail.asset index 5a5e6e7e1b..7854fc5514 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/europa/trail.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/trail.asset @@ -1,6 +1,6 @@ local transforms = asset.require("../transforms") asset.require("spice/base") -local kernel = asset.require("../kernels").jup310 +local kernel = asset.require("../kernels").jup365 local EuropaTrail = { Identifier = "EuropaTrail", diff --git a/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset b/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset index 40fad40f2c..d5aa371cd1 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset @@ -1,7 +1,7 @@ local transforms = asset.require("../transforms") asset.require("spice/base") asset.require("./trail") -local kernel = asset.require("../kernels").jup310 +local kernel = asset.require("../kernels").jup365 local labelsPath = asset.syncedResource({ Name = "Jupiter Labels", diff --git a/data/assets/scene/solarsystem/planets/jupiter/ganymede/trail.asset b/data/assets/scene/solarsystem/planets/jupiter/ganymede/trail.asset index 974be0f559..48d08b3b2f 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/ganymede/trail.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/ganymede/trail.asset @@ -1,6 +1,6 @@ local transforms = asset.require("../transforms") asset.require("spice/base") -local kernel = asset.require("../kernels").jup310 +local kernel = asset.require("../kernels").jup365 diff --git a/data/assets/scene/solarsystem/planets/jupiter/io/io.asset b/data/assets/scene/solarsystem/planets/jupiter/io/io.asset index ff28967ee9..b06f55b355 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/io/io.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/io/io.asset @@ -1,7 +1,7 @@ local transforms = asset.require("../transforms") asset.require("spice/base") asset.require("./trail") -local kernel = asset.require("../kernels").jup310 +local kernel = asset.require("../kernels").jup365 local labelsPath = asset.syncedResource({ Name = "Jupiter Labels", diff --git a/data/assets/scene/solarsystem/planets/jupiter/io/trail.asset b/data/assets/scene/solarsystem/planets/jupiter/io/trail.asset index 3c963617bb..4b75ba1f8d 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/io/trail.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/io/trail.asset @@ -1,6 +1,6 @@ local transforms = asset.require("../transforms") asset.require("spice/base") -local kernel = asset.require("../kernels").jup310 +local kernel = asset.require("../kernels").jup365 diff --git a/data/assets/scene/solarsystem/planets/jupiter/kernels.asset b/data/assets/scene/solarsystem/planets/jupiter/kernels.asset index cbc3414775..f8aa9766e9 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/kernels.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/kernels.asset @@ -2,11 +2,12 @@ local Kernels = asset.syncedResource({ Name = "Jupiter Spice Kernels", Type = "HttpSynchronization", Identifier = "jupiter_kernels", - Version = 1 + Version = 2 }) -asset.export("jup310", Kernels .. "jup310.bsp") -asset.export("jup341", Kernels .. "jup341.bsp") +asset.export("jup344", Kernels .. "jup344.bsp") +asset.export("jup346", Kernels .. "jup346.bsp") +asset.export("jup365", Kernels .. "jup365.bsp") asset.meta = { diff --git a/data/assets/scene/solarsystem/planets/jupiter/minor/ananke_group.asset b/data/assets/scene/solarsystem/planets/jupiter/minor/ananke_group.asset index 0db8004434..f77e5c80e6 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/minor/ananke_group.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/minor/ananke_group.asset @@ -1,6 +1,7 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").jup341 +local kernel = asset.require("../kernels").jup344 +local kernel346 = asset.require("../kernels").jup346 @@ -92,7 +93,7 @@ local anankeGroup = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "55068", + Spice = "55506", Radii = { 2000, 2000, 2000 }, Tags = tags, TrailTags = trailTags, @@ -205,6 +206,168 @@ local anankeGroup = { TrailColor = trailColor, OrbitPeriod = 640.38, Kernels = kernel + }, + { + Identifier = "S2021J1", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55512", + Radii = { 1000, 1000, 1000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2021 J 1", + Path = "/Solar System/Planets/Jupiter/Moons/Ananke Group" + }, + TrailColor = trailColor, + OrbitPeriod = 606.99, + Kernels = kernel346 + }, + { + Identifier = "S2021J2", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55513", + Radii = { 1000, 1000, 1000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2021 J 2", + Path = "/Solar System/Planets/Jupiter/Moons/Ananke Group" + }, + TrailColor = trailColor, + OrbitPeriod = 627.96, + Kernels = kernel346 + }, + { + Identifier = "S2021J3", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55514", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2021 J 3", + Path = "/Solar System/Planets/Jupiter/Moons/Ananke Group" + }, + TrailColor = trailColor, + OrbitPeriod = 643.85, + Kernels = kernel346 + }, + { + Identifier = "S2022J3", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55523", + Radii = { 1000, 1000, 1000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2022 J 3", + Path = "/Solar System/Planets/Jupiter/Moons/Ananke Group" + }, + TrailColor = trailColor, + OrbitPeriod = 617.82, + Kernels = kernel346 + }, + { + Identifier = "S2017J3", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "564", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2017 J 3", + Path = "/Solar System/Planets/Jupiter/Moons/Ananke Group" + }, + TrailColor = trailColor, + OrbitPeriod = 606.3, + Kernels = kernel + }, + { + Identifier = "S2017J7", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "568", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2017 J 7", + Path = "/Solar System/Planets/Jupiter/Moons/Ananke Group" + }, + TrailColor = trailColor, + OrbitPeriod = 602.6, + Kernels = kernel + }, + { + Identifier = "S2017J9", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "570", + Radii = { 3000, 3000, 3000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2017 J 9", + Path = "/Solar System/Planets/Jupiter/Moons/Ananke Group" + }, + TrailColor = trailColor, + OrbitPeriod = 639.2, + Kernels = kernel + }, + { + Identifier = "S2003J2", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55501", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2003 J 2", + Path = "/Solar System/Planets/Jupiter/Moons/Ananke Group" + }, + TrailColor = trailColor, + OrbitPeriod = 602.02, + Kernels = kernel + }, + { + Identifier = "S2003J12", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55505", + Radii = { 1000, 1000, 1000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2003 J 12", + Path = "/Solar System/Planets/Jupiter/Moons/Ananke Group" + }, + TrailColor = trailColor, + OrbitPeriod = 646.64, + Kernels = kernel } } diff --git a/data/assets/scene/solarsystem/planets/jupiter/minor/carme_group.asset b/data/assets/scene/solarsystem/planets/jupiter/minor/carme_group.asset index 683cf0c489..90763e4a77 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/minor/carme_group.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/minor/carme_group.asset @@ -1,6 +1,7 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").jup341 +local kernel = asset.require("../kernels").jup344 +local kernel346 = asset.require("../kernels").jup346 @@ -273,6 +274,240 @@ local carmeGroup = { TrailColor = trailColor, OrbitPeriod = 758.34, Kernels = kernel + }, + { + Identifier = "S2018J3", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55511", + Radii = { 1000, 1000, 1000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2018 J 3", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 704.56, + Kernels = kernel346 + }, + { + Identifier = "S2021J4", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55515", + Radii = { 1000, 1000, 1000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2021 J 4", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 710.13, + Kernels = kernel346 + }, + { + Identifier = "S2021J5", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55516", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2021 J 5", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 704.80, + Kernels = kernel346 + }, + { + Identifier = "S2021J6", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55517", + Radii = { 1000, 1000, 1000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2021 J 6", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 732.55, + Kernels = kernel346 + }, + { + Identifier = "S2016J3", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55518", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2016 J 3", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 676.37, + Kernels = kernel346 + }, + { + Identifier = "S2022J1", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55521", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2022 J 1", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 667.34, + Kernels = kernel346 + }, + { + Identifier = "S2022J2", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55522", + Radii = { 1000, 1000, 1000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2022 J 2", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 685.51, + Kernels = kernel346 + }, + { + Identifier = "S2017J2", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "563", + Radii = { 1000, 1000, 1000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2017 J 2", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 723.1, + Kernels = kernel346 + }, + { + Identifier = "S2017J5", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "566", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2017 J 5", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 719.5, + Kernels = kernel + }, + { + Identifier = "S2017J8", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "569", + Radii = { 1000, 1000, 1000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2017 J 8", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 719.6, + Kernels = kernel + }, + { + Identifier = "S2011J1", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "572", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2011 J 1", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 686.6, + Kernels = kernel + }, + { + Identifier = "S2003J9", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55503", + Radii = { 1000, 1000, 1000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2003 J 9", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 767.6, + Kernels = kernel + }, + { + Identifier = "S2003J10", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55504", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2003 J 10", + Path = "/Solar System/Planets/Jupiter/Moons/Carme Group" + }, + TrailColor = trailColor, + OrbitPeriod = 705.96, + Kernels = kernel } } diff --git a/data/assets/scene/solarsystem/planets/jupiter/minor/carpo_group.asset b/data/assets/scene/solarsystem/planets/jupiter/minor/carpo_group.asset index 64e658658e..f6f721bd4a 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/minor/carpo_group.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/minor/carpo_group.asset @@ -1,6 +1,7 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").jup341 +local kernel = asset.require("../kernels").jup344 +local kernel346 = asset.require("../kernels").jup346 @@ -33,6 +34,24 @@ local carpoGroup = { TrailColor = trailColor, OrbitPeriod = 458.62, Kernels = kernel + }, + { + Identifier = "S2018J4", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55520", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2018 J 4", + Path = "/Solar System/Planets/Jupiter/Moons/Carpo Group" + }, + TrailColor = trailColor, + OrbitPeriod = 427.631, + Kernels = kernel346 } } diff --git a/data/assets/scene/solarsystem/planets/jupiter/minor/himalia_group.asset b/data/assets/scene/solarsystem/planets/jupiter/minor/himalia_group.asset index e66ae2fa9c..906bbd179d 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/minor/himalia_group.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/minor/himalia_group.asset @@ -1,6 +1,7 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").jup341 +local kernel = asset.require("../kernels").jup344 +local kernel346 = asset.require("../kernels").jup346 @@ -91,8 +92,7 @@ local himaliaGroup = { Identifier = parentIdentifier, Spice = parentSpice }, - -- Spice = "DIA", -- The Identifier is not correctly registered in the Spice kernel - Spice = "553", + Spice = "DIA", Radii = { 4000, 4000, 4000 }, Tags = tags, TrailTags = trailTags, @@ -102,6 +102,76 @@ local himaliaGroup = { TrailColor = trailColor, OrbitPeriod = 287.93, Kernels = kernel + }, + { + Identifier = "S2011J3", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55509", + Radii = { 3000, 3000, 3000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2011 J 3", + Path = "/Solar System/Planets/Jupiter/Moons/Himalia Group" + }, + TrailColor = trailColor, + OrbitPeriod = 261.77, + Kernels = kernel346 + }, + { + Identifier = "S2018J2", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55510", + Radii = { 3000, 3000, 3000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2018 J 2", + Path = "/Solar System/Planets/Jupiter/Moons/Himalia Group" + }, + TrailColor = trailColor, + OrbitPeriod = 250.88, + Kernels = kernel346 + }, + { + Identifier = "Pandia", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "565", + Radii = { 3000, 3000, 3000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Jupiter/Moons/Himalia Group" + }, + TrailColor = trailColor, + OrbitPeriod = 251.911, + Kernels = kernel + }, + { + Identifier = "Ersa", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "571", + Radii = { 3000, 3000, 3000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Jupiter/Moons/Himalia Group" + }, + TrailColor = trailColor, + OrbitPeriod = 249.229, + Kernels = kernel } } diff --git a/data/assets/scene/solarsystem/planets/jupiter/minor/inner_group.asset b/data/assets/scene/solarsystem/planets/jupiter/minor/inner_group.asset index 49e438f9af..17524a2be7 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/minor/inner_group.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/minor/inner_group.asset @@ -1,6 +1,6 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").jup341 +local kernel = asset.require("../kernels").jup365 diff --git a/data/assets/scene/solarsystem/planets/jupiter/minor/other_groups.asset b/data/assets/scene/solarsystem/planets/jupiter/minor/other_groups.asset index ca46e4a280..75f6a0e8ce 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/minor/other_groups.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/minor/other_groups.asset @@ -1,6 +1,6 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").jup341 +local kernel = asset.require("../kernels").jup344 @@ -18,57 +18,21 @@ local trailTags = { local otherGroups = { { - Identifier = "S2003J12", + Identifier = "Eupheme", Parent = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "55066", - Radii = { 1000, 1000, 1000 }, - Tags = tags, - TrailTags = trailTags, - GUI = { - Name = "S/2003 J 12", - Path = "/Solar System/Planets/Jupiter/Moons/Other Groups" - }, - TrailColor = trailColor, - OrbitPeriod = 482.69, - Kernels = kernel - }, - { - Identifier = "S/2003J3", - Parent = { - Identifier = parentIdentifier, - Spice = parentSpice - }, - Spice = "55061", + Spice = "560", Radii = { 2000, 2000, 2000 }, Tags = tags, TrailTags = trailTags, GUI = { - Name = "S/2003 J 3", + Name = "Eupheme", Path = "/Solar System/Planets/Jupiter/Moons/Other Groups" }, TrailColor = trailColor, - OrbitPeriod = 561.52, - Kernels = kernel - }, - { - Identifier = "S2011J1", - Parent = { - Identifier = parentIdentifier, - Spice = parentSpice - }, - Spice = "55074", - Radii = { 1000, 1000, 1000 }, - Tags = tags, - TrailTags = trailTags, - GUI = { - Name = "S/2011 J 1", - Path = "/Solar System/Planets/Jupiter/Moons/Other Groups" - }, - TrailColor = trailColor, - OrbitPeriod = 582.22, + OrbitPeriod = 628.06, Kernels = kernel }, { @@ -77,7 +41,7 @@ local otherGroups = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "55070", + Spice = "561", Radii = { 2000, 2000, 2000 }, Tags = tags, TrailTags = trailTags, @@ -90,75 +54,21 @@ local otherGroups = { Kernels = kernel }, { - Identifier = "S2003J10", + Identifier = "Valetudo", Parent = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "55065", - Radii = { 2000, 2000, 2000 }, + Spice = "562", + Radii = { 1000, 1000, 1000 }, Tags = tags, TrailTags = trailTags, GUI = { - Name = "S/2003 J 10", + Name = "Valetudo", Path = "/Solar System/Planets/Jupiter/Moons/Other Groups" }, TrailColor = trailColor, - OrbitPeriod = 700.13, - Kernels = kernel - }, - { - Identifier = "S2003J23", - Parent = { - Identifier = parentIdentifier, - Spice = parentSpice - }, - Spice = "55071", - Radii = { 2000, 2000, 2000 }, - Tags = tags, - TrailTags = trailTags, - GUI = { - Name = "S/2003 J 23", - Path = "/Solar System/Planets/Jupiter/Moons/Other Groups" - }, - TrailColor = trailColor, - OrbitPeriod = 700.54, - Kernels = kernel - }, - { - Identifier = "S2003J9", - Parent = { - Identifier = parentIdentifier, - Spice = parentSpice - }, - Spice = "55064", - Radii = { 2000, 2000, 2000 }, - Tags = tags, - TrailTags = trailTags, - GUI = { - Name = "S/2003 J 9", - Path = "/Solar System/Planets/Jupiter/Moons/Other Groups" - }, - TrailColor = trailColor, - OrbitPeriod = 752.84, - Kernels = kernel - }, - { - Identifier = "S2003J2", - Parent = { - Identifier = parentIdentifier, - Spice = parentSpice - }, - Spice = "55060", - Radii = { 2000, 2000, 2000 }, - Tags = tags, - TrailTags = trailTags, - GUI = { - Name = "S/2003 J 2", - Path = "/Solar System/Planets/Jupiter/Moons/Other Groups" - }, - TrailColor = trailColor, - OrbitPeriod = 981.55, + OrbitPeriod = 527.41, Kernels = kernel } } diff --git a/data/assets/scene/solarsystem/planets/jupiter/minor/pasiphae_group.asset b/data/assets/scene/solarsystem/planets/jupiter/minor/pasiphae_group.asset index 0fbf568e03..95f6a304ea 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/minor/pasiphae_group.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/minor/pasiphae_group.asset @@ -1,6 +1,7 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").jup341 +local kernel = asset.require("../kernels").jup344 +local kernel346 = asset.require("../kernels").jup346 @@ -248,7 +249,7 @@ local pasiphaeGroup = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "55062", + Spice = "55502", Radii = { 2000, 2000, 2000 }, Tags = tags, TrailTags = trailTags, @@ -361,6 +362,60 @@ local pasiphaeGroup = { TrailColor = trailColor, OrbitPeriod = 792.44, Kernels = kernel + }, + { + Identifier = "S2016J4", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55519", + Radii = { 1000, 1000, 1000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2016 J 4", + Path = "/Solar System/Planets/Jupiter/Moons/Pasiphae Group" + }, + TrailColor = trailColor, + OrbitPeriod = 743.69, + Kernels = kernel346 + }, + { + Identifier = "S2017J6", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "567", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2017 J 6", + Path = "/Solar System/Planets/Jupiter/Moons/Pasiphae Group" + }, + TrailColor = trailColor, + OrbitPeriod = 683.0, + Kernels = kernel + }, + { + Identifier = "S2003J23", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "55507", + Radii = { 2000, 2000, 2000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2003 J 23", + Path = "/Solar System/Planets/Jupiter/Moons/Other Groups" + }, + TrailColor = trailColor, + OrbitPeriod = 792.00, + Kernels = kernel } } diff --git a/data/assets/scene/solarsystem/planets/jupiter/minor/themisto_group.asset b/data/assets/scene/solarsystem/planets/jupiter/minor/themisto_group.asset index 5656a8e53f..efa7f6b7f9 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/minor/themisto_group.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/minor/themisto_group.asset @@ -1,6 +1,6 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").jup341 +local kernel = asset.require("../kernels").jup344 diff --git a/data/assets/scene/solarsystem/planets/mars/default_layers.asset b/data/assets/scene/solarsystem/planets/mars/default_layers.asset index 92b856d860..f3390997c6 100644 --- a/data/assets/scene/solarsystem/planets/mars/default_layers.asset +++ b/data/assets/scene/solarsystem/planets/mars/default_layers.asset @@ -14,7 +14,7 @@ asset.require("./layers/colorlayers/themis_ir_night_utah", false) asset.require("./layers/colorlayers/themis_ir_night_sweden", false) asset.require("./layers/colorlayers/ctx_mosaic_utah", false) asset.require("./layers/colorlayers/ctx_mosaic_sweden", false) -asset.require("./layers/colorlayers/ctx_blended_01", false) +asset.require("./layers/colorlayers/ctx_blended", false) asset.require("./layers/colorlayers/hirise", false) asset.require("./layers/colorlayers/hirisels", false) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended.asset new file mode 100644 index 0000000000..4df28544f5 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended.asset @@ -0,0 +1,36 @@ +local globeIdentifier = asset.require("../../mars").Mars.Identifier + +local layer = { + Identifier = "CTX_blended", + Name = "CTX Blended", + Enabled = asset.enabled, + FilePath = asset.localResource("ctx_blended.vrt"), + BlendMode = "Color", + Description = [[The Bruce Murray Laboratory for Planetary Visualization has completed a 5.7 terapixel mosaic of the surface of Mars rendered at 5.0 m/px. Each pixel in the mosaic is about the size of a typical parking space, providing unprecedented resolution of the martian surface at the global scale. + + The mosaic covers 99.5% of Mars from 88°S to 88°N. The pixels that make up the mosaic can all be mapped back to their source data, providing full traceability for the entire mosaic. The mosaic is available to stream over the internet and to download, as described below. + + All data in the mosaic come from the Context Camera (CTX) onboard the Mars Reconnaissance Orbiter (MRO). (Description from URL)]] +} + +asset.onInitialize(function() + openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) +end) + +asset.onDeinitialize(function() + openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer) +end) + +asset.export("layer", layer) + + + +asset.meta = { + Name = "CTX Blended", + Version = "1.0", + Description = [[New blended CTX map for Mars from CalTech Murray lab. This map is + hosted by ESRI]], + Author = "Caltech Murray Lab", + URL = "http://murray-lab.caltech.edu/CTX/", + License = "Esri Master License Agreement" +} diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_01.vrt b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended.vrt similarity index 90% rename from data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_01.vrt rename to data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended.vrt index ed8fb78132..342a7ad608 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_01.vrt +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended.vrt @@ -5,7 +5,7 @@ 0.00000000000000E+00 Gray - ctx_blended_01.wms + ctx_blended.wms 1 @@ -17,7 +17,7 @@ 0 Alpha - ctx_blended_01.wms + ctx_blended.wms 1 diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended.wms b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended.wms new file mode 100644 index 0000000000..cb5c3f9598 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended.wms @@ -0,0 +1,22 @@ + + + https://astro.arcgis.com/arcgis/rest/services/OnMars/CTX1/raw/tile/${z}/${y}/${x} + + + -180.0 + 90.0 + 180.0 + -90.0 + 4194304 + 2097152 + 12 + top + + GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] + 512 + 512 + 1 + 5 + + 404,400 + diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_01.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_beta01.asset similarity index 97% rename from data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_01.asset rename to data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_beta01.asset index 884991fc0b..e4e4f48944 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_01.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_beta01.asset @@ -4,7 +4,7 @@ local layer = { Identifier = "CTX_blended_01", Name = "CTX Blended beta01", Enabled = asset.enabled, - FilePath = asset.localResource("ctx_blended_01.vrt"), + FilePath = asset.localResource("ctx_blended_beta01.vrt"), BlendMode = "Color", Settings = { Gamma = 2.14, diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_beta01.vrt b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_beta01.vrt new file mode 100644 index 0000000000..5b4b29aa85 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_beta01.vrt @@ -0,0 +1,28 @@ + + GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] + -8.1000000000000000e+02, 8.5830688476562500e-05, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -8.5830688476562500e-05 + + 0.00000000000000E+00 + Gray + + ctx_blended_beta01.wms + 1 + + + + 0 + + + + 0 + Alpha + + ctx_blended_beta01.wms + 1 + + + + 0:0,1:255,255:255 + + + diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_01.wms b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_beta01.wms similarity index 71% rename from data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_01.wms rename to data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_beta01.wms index 28ea11c342..fb7677b04f 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_01.wms +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_beta01.wms @@ -3,10 +3,14 @@ http://astro.arcgis.com/arcgis/rest/services/OnMars/CTX/MapServer/tile/${z}/${y}/${x} - -180.0 90.0 - 180.0 -90.0 - 4194304 2097152 - 12 top + -180.0 + 90.0 + 180.0 + -90.0 + 4194304 + 2097152 + 12 + top GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] 512 diff --git a/data/assets/scene/solarsystem/planets/neptune/inner_moons.asset b/data/assets/scene/solarsystem/planets/neptune/inner_moons.asset index 29372eb903..94c9ff4fa4 100644 --- a/data/assets/scene/solarsystem/planets/neptune/inner_moons.asset +++ b/data/assets/scene/solarsystem/planets/neptune/inner_moons.asset @@ -1,9 +1,7 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("./transforms") -local kernels = asset.require("./kernels") -local kernel081 = kernels.nep081 -local kernel087 = kernels.nep087 -local kernel088 = kernels.nep088 +local kernel095 = asset.require("./kernels").nep095 +local kernel = asset.require("./kernels").nep097 @@ -35,7 +33,7 @@ local innerMoons = { }, TrailColor = trailColor, OrbitPeriod = 0.294, - Kernels = kernel088 + Kernels = kernel095 }, { Identifier = "Thalassa", @@ -52,7 +50,7 @@ local innerMoons = { }, TrailColor = trailColor, OrbitPeriod = 0.311, - Kernels = kernel088 + Kernels = kernel095 }, { Identifier = "Despina", @@ -69,7 +67,7 @@ local innerMoons = { }, TrailColor = trailColor, OrbitPeriod = 0.335, - Kernels = kernel088 + Kernels = kernel095 }, { Identifier = "Galatea", @@ -86,7 +84,7 @@ local innerMoons = { }, TrailColor = trailColor, OrbitPeriod = 0.429, - Kernels = kernel088 + Kernels = kernel095 }, { Identifier = "Larissa", @@ -103,10 +101,10 @@ local innerMoons = { }, TrailColor = trailColor, OrbitPeriod = 0.555, - Kernels = kernel088 + Kernels = kernel095 }, { - Identifier = "S2004N1", + Identifier = "Hippocamp", Parent = { Identifier = parentIdentifier, Spice = parentSpice @@ -116,12 +114,12 @@ local innerMoons = { Tags = tags, TrailTags = trailTags, GUI = { - Name = "S/2004 N 1", + Name = "Hippocamp", Path = "/Solar System/Planets/Neptune/Moons/Inner Moons" }, TrailColor = trailColor, OrbitPeriod = 0.936, - Kernels = kernel088 + Kernels = kernel }, { Identifier = "Proteus", @@ -138,7 +136,7 @@ local innerMoons = { }, TrailColor = trailColor, OrbitPeriod = 1.122, - Kernels = kernel081 + Kernels = kernel095 } } diff --git a/data/assets/scene/solarsystem/planets/neptune/irregular_prograde_moons.asset b/data/assets/scene/solarsystem/planets/neptune/irregular_moons.asset similarity index 79% rename from data/assets/scene/solarsystem/planets/neptune/irregular_prograde_moons.asset rename to data/assets/scene/solarsystem/planets/neptune/irregular_moons.asset index 4677234303..98b4946e71 100644 --- a/data/assets/scene/solarsystem/planets/neptune/irregular_prograde_moons.asset +++ b/data/assets/scene/solarsystem/planets/neptune/irregular_moons.asset @@ -1,9 +1,6 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("./transforms") -local kernels = asset.require("./kernels") -local kernel081 = kernels.nep081 -local kernel086 = kernels.nep086 -local kernel088 = kernels.nep088 +local kernel = asset.require("./kernels").nep102 @@ -35,7 +32,7 @@ local irregularProgradeMoons = { }, TrailColor = trailColor, OrbitPeriod = 1879.08, - Kernels = kernel086 + Kernels = kernel }, { Identifier = "Psamathe", @@ -52,7 +49,41 @@ local irregularProgradeMoons = { }, TrailColor = trailColor, OrbitPeriod = 9074.3, - Kernels = kernel086 + Kernels = kernel + }, + { + Identifier = "Sao", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "SAO", + Radii = { 44000, 44000, 44000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Neptune/Moons/Irregular Prograde Moons" + }, + TrailColor = trailColor, + OrbitPeriod = 2912.72, + Kernels = kernel + }, + { + Identifier = "Laomedeia", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "LAOMEDEIA", + Radii = { 42000, 42000, 42000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Neptune/Moons/Irregular Prograde Moons" + }, + TrailColor = trailColor, + OrbitPeriod = 3171.33, + Kernels = kernel }, { Identifier = "Neso", @@ -69,7 +100,7 @@ local irregularProgradeMoons = { }, TrailColor = trailColor, OrbitPeriod = 9740.73, - Kernels = kernel086 + Kernels = kernel } } diff --git a/data/assets/scene/solarsystem/planets/neptune/irregular_retrograde_moons.asset b/data/assets/scene/solarsystem/planets/neptune/irregular_retrograde_moons.asset deleted file mode 100644 index ff8e2102c1..0000000000 --- a/data/assets/scene/solarsystem/planets/neptune/irregular_retrograde_moons.asset +++ /dev/null @@ -1,143 +0,0 @@ -local proceduralGlobes = asset.require("util/procedural_globe") -local transforms = asset.require("./transforms") -local kernels = asset.require("./kernels") -local kernel081 = kernels.nep081 -local kernel086 = kernels.nep086 - - - -local parentIdentifier = transforms.NeptuneBarycenter.Identifier -local parentSpice = "NEPTUNE BARYCENTER" -local tags = { "moon_solarSystem", "moon_giants", "moon_neptune", "moon_irregular_retrograde", "moon_minor", "moon_minor_neptune" } -local trailColor = { 0.2, 0.5, 0.75 } -local trailTags = { - "moonTrail_solarSystem", - "moonTrail_giants", - "moonTrail_neptune", - "moonTrail_minor", - "moonTrail_minor_neptune" -} - -local irregularRetrogradeMoons = { - { - Identifier = "Nereid", - Parent = { - Identifier = parentIdentifier, - Spice = parentSpice - }, - Spice = "NEREID", - Radii = { 340000, 340000, 340000 }, - Tags = tags, - TrailTags = trailTags, - GUI = { - Path = "/Solar System/Planets/Neptune/Moons/Irregular Retrograde Moons" - }, - TrailColor = trailColor, - OrbitPeriod = 360.13, - Kernels = kernel081 - }, - { - Identifier = "Sao", - Parent = { - Identifier = parentIdentifier, - Spice = parentSpice - }, - Spice = "SAO", - Radii = { 44000, 44000, 44000 }, - Tags = tags, - TrailTags = trailTags, - GUI = { - Path = "/Solar System/Planets/Neptune/Moons/Irregular Retrograde Moons" - }, - TrailColor = trailColor, - OrbitPeriod = 2912.72, - Kernels = kernel086 - }, - { - Identifier = "Laomedeia", - Parent = { - Identifier = parentIdentifier, - Spice = parentSpice - }, - Spice = "LAOMEDEIA", - Radii = { 42000, 42000, 42000 }, - Tags = tags, - TrailTags = trailTags, - GUI = { - Path = "/Solar System/Planets/Neptune/Moons/Irregular Retrograde Moons" - }, - TrailColor = trailColor, - OrbitPeriod = 3171.33, - Kernels = kernel086 - } -} - - --- Generate labels for each moon -local moon_labels = {} - -for i, moon in ipairs(irregularRetrogradeMoons) do - local moonName = moon.GUI.Name or moon.Identifier - moon_labels[i] = { - Identifier = moon.Identifier .. "Label", - Parent = moon.Identifier, - Renderable = { - Enabled = false, - Type = "RenderableLabel", - Text = moonName, - FontSize = 70.0, - Size = 7.4, - MinMaxSize = { 1, 25 }, - OrientationOption = "Camera View Direction", - BlendMode = "Additive", - EnableFading = true, - FadeUnit = "Gm", - FadeDistances = { 1, 250.0 }, - FadeWidths = { 1, 250.0 }, - }, - Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, - GUI = { - Name = moonName .. " Label", - Path = "/Solar System/Planets/Neptune/Moons", - Description = "Label for Neptune's moon " .. moonName .. " (Irregular retrograde group)" - } - } -end - -local nodes = proceduralGlobes.createGlobes(irregularRetrogradeMoons) - -asset.onInitialize(function() - for _, node in ipairs(nodes) do - openspace.addSceneGraphNode(node) - end - - for _, moonlabel in ipairs(moon_labels) do - openspace.addSceneGraphNode(moonlabel) - end -end) - -asset.onDeinitialize(function() - for i = #moon_labels, 1, -1 do - openspace.removeSceneGraphNode(moon_labels[i]) - end - - for i = #nodes, 1, -1 do - openspace.removeSceneGraphNode(nodes[i]) - end -end) - -for _, node in ipairs(nodes) do - asset.export(node) -end - - -asset.meta = { - Name = "Neptune Irregular Retrograde Moons", - Version = "1.0", - Description = [[Procedural Globe asset containing Neptune' irregular retrograde - moons: Nereid, Sao and Laomedeia. Blank globes and SPICE trails are generated for - each moon]], - Author = "OpenSpace Team", - URL = "http://openspaceproject.com", - License = "MIT license" -} diff --git a/data/assets/scene/solarsystem/planets/neptune/kernels.asset b/data/assets/scene/solarsystem/planets/neptune/kernels.asset index 1511116f76..3343a941e3 100644 --- a/data/assets/scene/solarsystem/planets/neptune/kernels.asset +++ b/data/assets/scene/solarsystem/planets/neptune/kernels.asset @@ -2,13 +2,13 @@ local Kernels = asset.syncedResource({ Name = "Neptune Spice Kernels", Type = "HttpSynchronization", Identifier = "neptune_kernels", - Version = 1 + Version = 2 }) -asset.export("nep081", Kernels .. "nep081.bsp") -asset.export("nep086", Kernels .. "nep086.bsp") -asset.export("nep087", Kernels .. "nep087.bsp") -asset.export("nep088", Kernels .. "nep088.bsp") +asset.export("nep095", Kernels .. "nep095.bsp") +asset.export("nep097", Kernels .. "nep097.bsp") +asset.export("nep101xl_802", Kernels .. "nep101xl-802.bsp") +asset.export("nep102", Kernels .. "nep102.bsp") asset.meta = { diff --git a/data/assets/scene/solarsystem/planets/neptune/major_moons.asset b/data/assets/scene/solarsystem/planets/neptune/major_moons.asset index b3ad035361..2d5ad03546 100644 --- a/data/assets/scene/solarsystem/planets/neptune/major_moons.asset +++ b/data/assets/scene/solarsystem/planets/neptune/major_moons.asset @@ -1,4 +1,5 @@ -asset.require("./triton") +asset.require("./triton/triton") +asset.require("./nereid/nereid") asset.meta = { diff --git a/data/assets/scene/solarsystem/planets/neptune/minor_moons.asset b/data/assets/scene/solarsystem/planets/neptune/minor_moons.asset index d32b5195dd..19a16e02d2 100644 --- a/data/assets/scene/solarsystem/planets/neptune/minor_moons.asset +++ b/data/assets/scene/solarsystem/planets/neptune/minor_moons.asset @@ -1,6 +1,5 @@ asset.require("./inner_moons") -asset.require("./irregular_prograde_moons") -asset.require("./irregular_retrograde_moons") +asset.require("./irregular_moons") local minormoons_on = { Identifier = "os.solarsystem.neptune.minormoonson", @@ -63,8 +62,8 @@ end) asset.meta = { Name = "Neptune Minor Moons", Version = "1.1", - Description = [[Meta asset containing 3 moon groups: inner_moons, - irregular_prograde_moons, and irregular_retrograde_moons]], + Description = [[Meta asset containing two moon groups: inner_moons and + irregular_moons]], Author = "OpenSpace Team", URL = "http://openspaceproject.com", License = "MIT license" diff --git a/data/assets/scene/solarsystem/planets/neptune/neptune.asset b/data/assets/scene/solarsystem/planets/neptune/neptune.asset index 917cbe7439..e9b6152538 100644 --- a/data/assets/scene/solarsystem/planets/neptune/neptune.asset +++ b/data/assets/scene/solarsystem/planets/neptune/neptune.asset @@ -1,6 +1,7 @@ local transforms = asset.require("./transforms") asset.require("spice/base") asset.require("./trail") +local kernel = asset.require("./kernels").nep097 local Neptune = { Identifier = "Neptune", @@ -9,7 +10,8 @@ local Neptune = { Translation = { Type = "SpiceTranslation", Target = "NEPTUNE", - Observer = "NEPTUNE BARYCENTER" + Observer = "NEPTUNE BARYCENTER", + Kernels = kernel }, Rotation = { Type = "SpiceRotation", diff --git a/data/assets/scene/solarsystem/planets/neptune/nereid/nereid.asset b/data/assets/scene/solarsystem/planets/neptune/nereid/nereid.asset new file mode 100644 index 0000000000..21be217580 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/neptune/nereid/nereid.asset @@ -0,0 +1,93 @@ +local proceduralGlobes = asset.require("util/procedural_globe") +local transforms = asset.require("../transforms") +local kernel = asset.require("../kernels").nep101xl_802 + + +local Nereid = { + Identifier = "Nereid", + Parent = { + Identifier = transforms.NeptuneBarycenter.Identifier, + Spice = "NEPTUNE BARYCENTER" + }, + Spice = "NEREID", + Radii = { 357000, 340000, 340000 }, + Tags = { "moon_solarSystem", "moon_giants", "moon_neptune" }, + TrailTags = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_neptune" }, + GUI = { + Path = "/Solar System/Planets/Neptune/Moons" + }, + TrailColor = { 0.2, 0.5, 0.75 }, + OrbitPeriod = 360.13, + Kernels = kernel +} + + +-- Generate labels for each moon +local moon_labels = {} + +for i, moon in ipairs({ Nereid }) do + local moonName = moon.GUI.Name or moon.Identifier + moon_labels[i] = { + Identifier = moon.Identifier .. "Label", + Parent = moon.Identifier, + Renderable = { + Enabled = false, + Type = "RenderableLabel", + Text = moonName, + FontSize = 50.0, + Size = 7.0, + MinMaxSize = { 1, 25 }, + OrientationOption = "Camera View Direction", + BlendMode = "Additive", + EnableFading = true, + FadeUnit = "Gm", + FadeDistances = { 1, 15.0 }, + FadeWidths = { 1, 15.0 }, + }, + Tag = { "solarsystem_labels", "moon_labels", "major_moon_labels" }, + GUI = { + Name = moonName .. " Label", + Path = "/Solar System/Planets/Neptune/Moons", + Description = "Label for Neptune's moon " .. moonName + } + } +end + + +local nodes = proceduralGlobes.createGlobes({ Nereid }) + +asset.onInitialize(function() + for _, node in ipairs(nodes) do + openspace.addSceneGraphNode(node) + end + + for _, moonlabel in ipairs(moon_labels) do + openspace.addSceneGraphNode(moonlabel) + end +end) + +asset.onDeinitialize(function() + for i = #moon_labels, 1, -1 do + openspace.removeSceneGraphNode(moon_labels[i]) + end + + for i = #nodes, 1, -1 do + openspace.removeSceneGraphNode(nodes[i]) + end +end) + +for _, node in ipairs(nodes) do + asset.export(node) +end + + + +asset.meta = { + Name = "Nereid", + Version = "1.1", + Description = [[Procedural Globe asset containing Neptune's moon: Nereid. A blank globe + and SPICE trail are generated for the moon]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license" +} diff --git a/data/assets/scene/solarsystem/planets/neptune/trail.asset b/data/assets/scene/solarsystem/planets/neptune/trail.asset index 4af5ba2cd4..dda68425c0 100644 --- a/data/assets/scene/solarsystem/planets/neptune/trail.asset +++ b/data/assets/scene/solarsystem/planets/neptune/trail.asset @@ -1,5 +1,6 @@ local transforms = asset.require("scene/solarsystem/sun/transforms") asset.require("spice/base") +local kernel = asset.require("./kernels").nep097 @@ -11,7 +12,8 @@ local NeptuneTrail = { Translation = { Type = "SpiceTranslation", Target = "NEPTUNE", - Observer = "SSB" + Observer = "SSB", + Kernels = kernel }, Color = { 0.2, 0.5, 1.0 }, -- Period = 60200, diff --git a/data/assets/scene/solarsystem/planets/neptune/trail_barycenter.asset b/data/assets/scene/solarsystem/planets/neptune/trail_barycenter.asset index 112c4a71ed..ae92975815 100644 --- a/data/assets/scene/solarsystem/planets/neptune/trail_barycenter.asset +++ b/data/assets/scene/solarsystem/planets/neptune/trail_barycenter.asset @@ -1,5 +1,6 @@ local transforms = asset.require("scene/solarsystem/sun/transforms") asset.require("spice/base") +local kernel = asset.require("./kernels").nep097 @@ -11,7 +12,8 @@ local NeptuneBarycenterTrail = { Translation = { Type = "SpiceTranslation", Target = "NEPTUNE BARYCENTER", - Observer = "SSB" + Observer = "SSB", + Kernels = kernel }, Color = { 0.2, 0.5, 1.0 }, Period = 60266, diff --git a/data/assets/scene/solarsystem/planets/neptune/trail_earth.asset b/data/assets/scene/solarsystem/planets/neptune/trail_earth.asset index b79ed5ac5c..8ea0b55222 100644 --- a/data/assets/scene/solarsystem/planets/neptune/trail_earth.asset +++ b/data/assets/scene/solarsystem/planets/neptune/trail_earth.asset @@ -1,6 +1,7 @@ local transforms = asset.require("scene/solarsystem/sun/transforms") local earthTransforms = asset.require("scene/solarsystem/planets/earth/transforms") asset.require("spice/base") +local kernel = asset.require("./kernels").nep097 @@ -12,7 +13,8 @@ local NeptuneTrailEarth = { Translation = { Type = "SpiceTranslation", Target = "NEPTUNE", - Observer = "EARTH" + Observer = "EARTH", + Kernels = kernel }, Color = { 1.0, 0.5, 0.2 }, Period = 224.695, diff --git a/data/assets/scene/solarsystem/planets/neptune/transforms.asset b/data/assets/scene/solarsystem/planets/neptune/transforms.asset index a4c81387b8..903a55f4f6 100644 --- a/data/assets/scene/solarsystem/planets/neptune/transforms.asset +++ b/data/assets/scene/solarsystem/planets/neptune/transforms.asset @@ -1,5 +1,6 @@ local sun_transforms_asset = asset.require("scene/solarsystem/sun/transforms") asset.require("spice/base") +local kernel = asset.require("./kernels").nep097 local NeptuneBarycenter = { Identifier = "NeptuneBarycenter", @@ -8,7 +9,8 @@ local NeptuneBarycenter = { Translation = { Type = "SpiceTranslation", Target = "NEPTUNE BARYCENTER", - Observer = "SSB" + Observer = "SSB", + Kernels = kernel } }, GUI = { diff --git a/data/assets/scene/solarsystem/planets/neptune/triton.asset b/data/assets/scene/solarsystem/planets/neptune/triton/triton.asset similarity index 92% rename from data/assets/scene/solarsystem/planets/neptune/triton.asset rename to data/assets/scene/solarsystem/planets/neptune/triton/triton.asset index 0f63edb6c8..ebbc644a2e 100644 --- a/data/assets/scene/solarsystem/planets/neptune/triton.asset +++ b/data/assets/scene/solarsystem/planets/neptune/triton/triton.asset @@ -1,6 +1,6 @@ local proceduralGlobes = asset.require("util/procedural_globe") -local transforms = asset.require("./transforms") -local kernel = asset.require("./kernels").nep081 +local transforms = asset.require("../transforms") +local kernel = asset.require("../kernels").nep097 @@ -15,7 +15,7 @@ local Triton = { Tags = { "moon_solarSystem", "moon_giants", "moon_neptune" }, TrailTags = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_neptune" }, GUI = { - Path = "/Solar System/Planets/Neptune/Moons/Irregular Prograde Moons" + Path = "/Solar System/Planets/Neptune/Moons" }, TrailColor = { 0.2, 0.5, 0.75 }, OrbitPeriod = 5.877, diff --git a/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset b/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset index 5a2baed2ee..447aca79ec 100644 --- a/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset +++ b/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 asset.require("./trail") local labelsPath = asset.syncedResource({ diff --git a/data/assets/scene/solarsystem/planets/saturn/dione/trail.asset b/data/assets/scene/solarsystem/planets/saturn/dione/trail.asset index 0bd7895e15..076bfe9ea7 100644 --- a/data/assets/scene/solarsystem/planets/saturn/dione/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/dione/trail.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset index 4035fe53f5..dda8760dd0 100644 --- a/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 asset.require("./trail") local labelsPath = asset.syncedResource({ diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/trail.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/trail.asset index 8918169f3b..408ef6914b 100644 --- a/data/assets/scene/solarsystem/planets/saturn/enceladus/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/trail.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 diff --git a/data/assets/scene/solarsystem/planets/saturn/hyperion/hyperion.asset b/data/assets/scene/solarsystem/planets/saturn/hyperion/hyperion.asset index 9df51d793f..72d6f82cbf 100644 --- a/data/assets/scene/solarsystem/planets/saturn/hyperion/hyperion.asset +++ b/data/assets/scene/solarsystem/planets/saturn/hyperion/hyperion.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 asset.require("./trail") local labelsPath = asset.syncedResource({ diff --git a/data/assets/scene/solarsystem/planets/saturn/hyperion/trail.asset b/data/assets/scene/solarsystem/planets/saturn/hyperion/trail.asset index 09f870b4f7..4bc21d9acd 100644 --- a/data/assets/scene/solarsystem/planets/saturn/hyperion/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/hyperion/trail.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 diff --git a/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset b/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset index a841b2e21f..3c57ea8c92 100644 --- a/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset +++ b/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 asset.require("./trail") local labelsPath = asset.syncedResource({ diff --git a/data/assets/scene/solarsystem/planets/saturn/iapetus/trail.asset b/data/assets/scene/solarsystem/planets/saturn/iapetus/trail.asset index b9b3371148..db55d9ba5d 100644 --- a/data/assets/scene/solarsystem/planets/saturn/iapetus/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/iapetus/trail.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 diff --git a/data/assets/scene/solarsystem/planets/saturn/kernels.asset b/data/assets/scene/solarsystem/planets/saturn/kernels.asset index e6f3176e7b..c52a03bd21 100644 --- a/data/assets/scene/solarsystem/planets/saturn/kernels.asset +++ b/data/assets/scene/solarsystem/planets/saturn/kernels.asset @@ -2,13 +2,12 @@ local Kernels = asset.syncedResource({ Name = "Saturn Spice Kernels", Type = "HttpSynchronization", Identifier = "saturn_kernels", - Version = 1 + Version = 2 }) -asset.export("sat319", Kernels .. "sat319.bsp") -asset.export("sat368", Kernels .. "sat368.bsp") -asset.export("sat375", Kernels .. "sat375.bsp") -asset.export("sat393", Kernels .. "sat393.bsp") +asset.export("sat415", Kernels .. "sat415.bsp") +asset.export("sat441", Kernels .. "sat441.bsp") +asset.export("sat452", Kernels .. "sat452.bsp") asset.meta = { diff --git a/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset b/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset index 1c63b5c0ef..e806aed9c1 100644 --- a/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset +++ b/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 asset.require("./trail") local labelsPath = asset.syncedResource({ diff --git a/data/assets/scene/solarsystem/planets/saturn/mimas/trail.asset b/data/assets/scene/solarsystem/planets/saturn/mimas/trail.asset index 16326c78b1..20fb844653 100644 --- a/data/assets/scene/solarsystem/planets/saturn/mimas/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/mimas/trail.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 diff --git a/data/assets/scene/solarsystem/planets/saturn/minor/gallic_group.asset b/data/assets/scene/solarsystem/planets/saturn/minor/gallic_group.asset index 7b2f72efdb..f82db16368 100644 --- a/data/assets/scene/solarsystem/planets/saturn/minor/gallic_group.asset +++ b/data/assets/scene/solarsystem/planets/saturn/minor/gallic_group.asset @@ -1,6 +1,6 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat368 +local kernel = asset.require("../kernels").sat452 diff --git a/data/assets/scene/solarsystem/planets/saturn/minor/inuit_group.asset b/data/assets/scene/solarsystem/planets/saturn/minor/inuit_group.asset index 6642e7850f..2ee155c0fe 100644 --- a/data/assets/scene/solarsystem/planets/saturn/minor/inuit_group.asset +++ b/data/assets/scene/solarsystem/planets/saturn/minor/inuit_group.asset @@ -1,6 +1,6 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat368 +local kernel = asset.require("../kernels").sat452 @@ -101,6 +101,60 @@ local inuitGroup = { TrailColor = trailColor, OrbitPeriod = 894.86, Kernels = kernel + }, + { + Identifier = "S2004S29", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "660", + Radii = { 4000, 4000, 4000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2004 S 29", + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 858.77, + Kernels = kernel + }, + { + Identifier = "S2004S31", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "65067", + Radii = { 4000, 4000, 4000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2004 S 31", + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 853.80, + Kernels = kernel + }, + { + Identifier = "S2019S01", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "65093", + Radii = { 5000, 5000, 5000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2019 S 01", + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 443.78, + Kernels = kernel } } diff --git a/data/assets/scene/solarsystem/planets/saturn/minor/norse_group.asset b/data/assets/scene/solarsystem/planets/saturn/minor/norse_group.asset index 0a1efada10..1400306681 100644 --- a/data/assets/scene/solarsystem/planets/saturn/minor/norse_group.asset +++ b/data/assets/scene/solarsystem/planets/saturn/minor/norse_group.asset @@ -1,8 +1,8 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("../transforms") local kernels = asset.require("../kernels") -local kernel368 = kernels.sat368 -local kernel375 = kernels.sat375 +local kernel441 = kernels.sat441 +local kernel452 = kernels.sat452 @@ -34,7 +34,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 545.09, - Kernels = kernel375 + Kernels = kernel441 }, { Identifier = "Skathi", @@ -51,7 +51,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 732.52, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "S2007S2", @@ -59,7 +59,7 @@ local norseGroup = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "65055", + Spice = "65091", Radii = { 6000, 6000, 6000 }, Tags = tags, TrailTags = trailTags, @@ -69,7 +69,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 792.96, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Skoll", @@ -86,7 +86,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 862.37, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "S2004S13", @@ -94,7 +94,7 @@ local norseGroup = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "65041", + Spice = "65087", Radii = { 6000, 6000, 6000 }, Tags = tags, TrailTags = trailTags, @@ -104,7 +104,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 905.85, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Greip", @@ -121,7 +121,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 906.56, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Hyrrokkin", @@ -138,7 +138,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 914.29, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Jarnsaxa", @@ -155,7 +155,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 943.78, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Mundilfari", @@ -172,7 +172,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 956.70, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "S2006S1", @@ -180,7 +180,7 @@ local norseGroup = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "65048", + Spice = "65089", Radii = { 6000, 6000, 6000 }, Tags = tags, TrailTags = trailTags, @@ -190,7 +190,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 972.41, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "S2004S17", @@ -198,7 +198,7 @@ local norseGroup = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "65045", + Spice = "65088", Radii = { 4000, 4000, 4000 }, Tags = tags, TrailTags = trailTags, @@ -208,7 +208,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 985.45, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Bergelmir", @@ -225,7 +225,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 985.83, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Narvi", @@ -242,7 +242,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1008.45, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Suttungr", @@ -259,7 +259,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1022.82, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Hati", @@ -276,7 +276,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1033.05, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "S2004S12", @@ -284,7 +284,7 @@ local norseGroup = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "65040", + Spice = "65086", Radii = { 5000, 5000, 5000 }, Tags = tags, TrailTags = trailTags, @@ -294,7 +294,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1048.54, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Farbauti", @@ -311,7 +311,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1054.78, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Thrymr", @@ -328,7 +328,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1078.09, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Aegir", @@ -345,7 +345,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1094.46, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "S2007S3", @@ -353,7 +353,7 @@ local norseGroup = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "65056", + Spice = "65092", Radii = { 5000, 5000, 5000 }, Tags = tags, TrailTags = trailTags, @@ -363,7 +363,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1100, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Bestla", @@ -380,7 +380,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1101.45, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "S2004S7", @@ -388,7 +388,7 @@ local norseGroup = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "65035", + Spice = "65085", Radii = { 6000, 6000, 6000 }, Tags = tags, TrailTags = trailTags, @@ -398,7 +398,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1101.99, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "S2006S3", @@ -406,7 +406,7 @@ local norseGroup = { Identifier = parentIdentifier, Spice = parentSpice }, - Spice = "65050", + Spice = "65090", Radii = { 6000, 6000, 6000 }, Tags = tags, TrailTags = trailTags, @@ -416,7 +416,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1142.37, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "FENRIR", @@ -433,25 +433,24 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1212.53, - Kernels = kernel368 + Kernels = kernel452 + }, + { + Identifier = "Surtur", -- Rising + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "648", + Radii = { 6000, 6000, 6000 }, + Tags = tags, + GUI = { + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1297.7, + Kernels = kernel452 }, - -- Not yet in the Spice kernels - -- { - -- Identifier = "Sutur", -- Rising - -- Parent = { - -- Identifier = parentIdentifier, - -- Spice = parentSpice - -- }, - -- Spice = "SUTUR", - -- Radii = { 6000, 6000, 6000 }, - -- Tags = tags, - -- GUI = { - -- Path = "/Solar System/Planets/Saturn/Moons/Norse Group" - -- }, - -- TrailColor = trailColor, - -- OrbitPeriod = 1242.36, - -- Kernels = kernels368 - -- }, { Identifier = "Kari", Parent = { @@ -467,7 +466,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1245.06, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Ymir", @@ -484,7 +483,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1254.15, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Loge", @@ -501,7 +500,7 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1300.95, - Kernels = kernel368 + Kernels = kernel452 }, { Identifier = "Fornjot", @@ -518,7 +517,320 @@ local norseGroup = { }, TrailColor = trailColor, OrbitPeriod = 1432.16, - Kernels = kernel368 + Kernels = kernel452 + }, + { + Identifier = "Skadi", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "627", + Radii = { 8000, 8000, 8000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 728.2, + Kernels = kernel452 + }, + { + Identifier = "Gridr", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "654", + Radii = { 4000, 4000, 4000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 990.23, + Kernels = kernel452 + }, + { + Identifier = "Angrboda", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "655", + Radii = { 3000, 3000, 3000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1080.4, + Kernels = kernel452 + }, + { + Identifier = "Skrymir", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "656", + Radii = { 4000, 4000, 4000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1164.3, + Kernels = kernel452 + }, + { + Identifier = "Gerd", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "657", + Radii = { 4000, 4000, 4000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1095.0, + Kernels = kernel452 + }, + { + Identifier = "S2004S26", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "658", + Radii = { 4000, 4000, 4000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2004 S 26", + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1624.2, + Kernels = kernel452 + }, + { + Identifier = "Eggther", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "659", + Radii = { 6000, 6000, 6000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1033.0, + Kernels = kernel452 + }, + { + Identifier = "Beli", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "661", + Radii = { 4000, 4000, 4000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1084.1, + Kernels = kernel452 + }, + { + Identifier = "Gunnlod", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "662", + Radii = { 4000, 4000, 4000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1175.3, + Kernels = kernel452 + }, + { + Identifier = "Thiazzi", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "663", + Radii = { 4000, 4000, 4000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1361.5, + Kernels = kernel452 + }, + { + Identifier = "S2004S34", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "664", + Radii = { 3000, 3000, 3000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2004 S 34", + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1412.5, + Kernels = kernel452 + }, + { + Identifier = "Alvaldi", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "665", + Radii = { 5000, 5000, 5000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1208.1, + Kernels = kernel452 + }, + { + Identifier = "Geirrod", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "666", + Radii = { 4000, 4000, 4000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1295.8, + Kernels = kernel452 + }, + { + Identifier = "S2004S28", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "65077", + Radii = { 4000, 4000, 4000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2004 S 28", + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1197.2, + Kernels = kernel452 + }, + { + Identifier = "S2004S21", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "65079", + Radii = { 3000, 3000, 3000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2004 S 21", + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1365.1, + Kernels = kernel452 + }, + { + Identifier = "S2004S36", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "65081", + Radii = { 3000, 3000, 3000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2004 S 36", + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1354.2, + Kernels = kernel452 + }, + { + Identifier = "S2004S37", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "65082", + Radii = { 4000, 4000, 4000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2004 S 37", + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 752.88, + Kernels = kernel452 + }, + { + Identifier = "S2004S39", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "65084", + Radii = { 3000, 3000, 3000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2004 S 39", + Path = "/Solar System/Planets/Saturn/Moons/Norse Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1277.5, + Kernels = kernel452 } } diff --git a/data/assets/scene/solarsystem/planets/saturn/minor/other_group.asset b/data/assets/scene/solarsystem/planets/saturn/minor/other_group.asset index 552104b632..af78ba6ad8 100644 --- a/data/assets/scene/solarsystem/planets/saturn/minor/other_group.asset +++ b/data/assets/scene/solarsystem/planets/saturn/minor/other_group.asset @@ -1,8 +1,9 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("../transforms") local kernels = asset.require("../kernels") -local kernel375 = kernels.sat375 -local kernel393 = kernels.sat393 +local kernel415 = kernels.sat415 +local kernel441 = kernels.sat441 +local kernel452 = kernels.sat452 @@ -34,7 +35,7 @@ local otherGroup = { }, TrailColor = trailColor, OrbitPeriod = 0.80812, - Kernels = kernel393 + Kernels = kernel415 }, { Identifier = "Methone", @@ -51,7 +52,7 @@ local otherGroup = { }, TrailColor = trailColor, OrbitPeriod = 1.00957, - Kernels = kernel393 + Kernels = kernel415 }, { Identifier = "Anthe", @@ -68,7 +69,7 @@ local otherGroup = { }, TrailColor = trailColor, OrbitPeriod = 1.05089, - Kernels = kernel393 + Kernels = kernel415 }, { Identifier = "Pallene", @@ -85,7 +86,7 @@ local otherGroup = { }, TrailColor = trailColor, OrbitPeriod = 1.370218, - Kernels = kernel393 + Kernels = kernel415 }, { Identifier = "Telesto", @@ -102,7 +103,7 @@ local otherGroup = { }, TrailColor = trailColor, OrbitPeriod = 1.887802, - Kernels = kernel375 + Kernels = kernel441 }, { Identifier = "Calypso", @@ -119,7 +120,7 @@ local otherGroup = { }, TrailColor = trailColor, OrbitPeriod = 1.887802, - Kernels = kernel375 + Kernels = kernel441 }, { Identifier = "Helene", @@ -136,7 +137,7 @@ local otherGroup = { }, TrailColor = trailColor, OrbitPeriod = 2.736915, - Kernels = kernel375 + Kernels = kernel441 }, { Identifier = "Polydeuces", @@ -153,7 +154,25 @@ local otherGroup = { }, TrailColor = trailColor, OrbitPeriod = 2.736915, - Kernels = kernel393 + Kernels = kernel441 + }, + { + Identifier = "S2004S24", + Parent = { + Identifier = parentIdentifier, + Spice = parentSpice + }, + Spice = "65070", + Radii = { 3000, 3000, 3000 }, + Tags = tags, + TrailTags = trailTags, + GUI = { + Name = "S/2004 S 24", + Path = "/Solar System/Planets/Saturn/Moons/Other Group" + }, + TrailColor = trailColor, + OrbitPeriod = 1293.85, + Kernels = kernel452 } } diff --git a/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset b/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset index b1b441fa04..fed5a94335 100644 --- a/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset +++ b/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 asset.require("./trail") local labelsPath = asset.syncedResource({ diff --git a/data/assets/scene/solarsystem/planets/saturn/rhea/trail.asset b/data/assets/scene/solarsystem/planets/saturn/rhea/trail.asset index a985709375..3cdc35e70d 100644 --- a/data/assets/scene/solarsystem/planets/saturn/rhea/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/rhea/trail.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 diff --git a/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset b/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset index 78f5825189..9e0a1faef7 100644 --- a/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset +++ b/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 asset.require("./trail") local labelsPath = asset.syncedResource({ diff --git a/data/assets/scene/solarsystem/planets/saturn/tethys/trail.asset b/data/assets/scene/solarsystem/planets/saturn/tethys/trail.asset index 7fa5e94717..e3829c1a53 100644 --- a/data/assets/scene/solarsystem/planets/saturn/tethys/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/tethys/trail.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset b/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset index 6cddd13b22..3895ebe763 100644 --- a/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset +++ b/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 asset.require("./trail") local labelsPath = asset.syncedResource({ diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/trail.asset b/data/assets/scene/solarsystem/planets/saturn/titan/trail.asset index 65384fbc8d..2c8699b07c 100644 --- a/data/assets/scene/solarsystem/planets/saturn/titan/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/titan/trail.asset @@ -1,5 +1,5 @@ local transforms = asset.require("../transforms") -local kernel = asset.require("../kernels").sat375 +local kernel = asset.require("../kernels").sat441 diff --git a/data/assets/scene/solarsystem/planets/uranus/inner_moons.asset b/data/assets/scene/solarsystem/planets/uranus/inner_moons.asset index c9cbabebe9..555acbede7 100644 --- a/data/assets/scene/solarsystem/planets/uranus/inner_moons.asset +++ b/data/assets/scene/solarsystem/planets/uranus/inner_moons.asset @@ -1,6 +1,6 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("./transforms") -local kernel = asset.require("./kernels").ura091 +local kernel = asset.require("./kernels").ura115 diff --git a/data/assets/scene/solarsystem/planets/uranus/irregular_prograde_moons.asset b/data/assets/scene/solarsystem/planets/uranus/irregular_prograde_moons.asset index b82b0446b3..bb4a759054 100644 --- a/data/assets/scene/solarsystem/planets/uranus/irregular_prograde_moons.asset +++ b/data/assets/scene/solarsystem/planets/uranus/irregular_prograde_moons.asset @@ -1,6 +1,6 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("./transforms") -local kernel = asset.require("./kernels").ura112 +local kernel = asset.require("./kernels").ura116 diff --git a/data/assets/scene/solarsystem/planets/uranus/irregular_retrograde_moons.asset b/data/assets/scene/solarsystem/planets/uranus/irregular_retrograde_moons.asset index df1e401f53..2d09fd78f7 100644 --- a/data/assets/scene/solarsystem/planets/uranus/irregular_retrograde_moons.asset +++ b/data/assets/scene/solarsystem/planets/uranus/irregular_retrograde_moons.asset @@ -1,6 +1,6 @@ local proceduralGlobes = asset.require("util/procedural_globe") local transforms = asset.require("./transforms") -local kernel = asset.require("./kernels").ura112 +local kernel = asset.require("./kernels").ura116 diff --git a/data/assets/scene/solarsystem/planets/uranus/kernels.asset b/data/assets/scene/solarsystem/planets/uranus/kernels.asset index aaa96e06da..3585fd7832 100644 --- a/data/assets/scene/solarsystem/planets/uranus/kernels.asset +++ b/data/assets/scene/solarsystem/planets/uranus/kernels.asset @@ -2,12 +2,12 @@ local Kernels = asset.syncedResource({ Name = "Uranus Spice Kernels", Type = "HttpSynchronization", Identifier = "uranus_kernels", - Version = 1 + Version = 2 }) -asset.export("ura091", Kernels .. "ura091-rocks-merge.bsp") asset.export("ura111", Kernels .. "ura111.bsp") -asset.export("ura112", Kernels .. "ura112.bsp") +asset.export("ura115", Kernels .. "ura115.bsp") +asset.export("ura116", Kernels .. "ura116.bsp") asset.meta = { diff --git a/data/assets/scene/solarsystem/sun/glare.asset b/data/assets/scene/solarsystem/sun/glare.asset index 6f497ca306..501580dba7 100644 --- a/data/assets/scene/solarsystem/sun/glare.asset +++ b/data/assets/scene/solarsystem/sun/glare.asset @@ -19,8 +19,7 @@ local SunGlare = { Billboard = true, Texture = textures .. "halo.png", BlendMode = "Additive", - Opacity = 0.65, - RenderBinMode = "PreDeferredTransparent" + Opacity = 0.65 }, GUI = { Name = "Sun Glare", diff --git a/include/openspace/rendering/fadeable.h b/include/openspace/rendering/fadeable.h index 907ff7c7a6..5caf218e00 100644 --- a/include/openspace/rendering/fadeable.h +++ b/include/openspace/rendering/fadeable.h @@ -48,7 +48,7 @@ public: virtual bool isVisible() const; /// Returns the full opacity constructed from the _opacity and _fade property values - virtual float opacity() const; + virtual float opacity() const noexcept; protected: properties::FloatProperty _opacity; diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h index 40cbc866fd..181390083a 100644 --- a/include/openspace/rendering/renderable.h +++ b/include/openspace/rendering/renderable.h @@ -55,6 +55,11 @@ class Camera; class Renderable : public properties::PropertyOwner, public Fadeable { public: + struct Settings { + bool automaticallyUpdateRenderBin = true; + bool shouldUpdateIfDisabled = false; + }; + enum class RenderBin : int { Background = 1, Opaque = 2, @@ -67,7 +72,7 @@ public: static ghoul::mm_unique_ptr createFromDictionary( ghoul::Dictionary dictionary); - Renderable(const ghoul::Dictionary& dictionary); + Renderable(const ghoul::Dictionary& dictionary, Settings settings = Settings()); virtual ~Renderable() override = default; virtual void initialize(); @@ -77,12 +82,12 @@ public: virtual bool isReady() const = 0; bool isEnabled() const; - bool shouldUpdateIfDisabled() const; + bool shouldUpdateIfDisabled() const noexcept; - double boundingSphere() const; - double interactionSphere() const; + double boundingSphere() const noexcept; + double interactionSphere() const noexcept; - std::string_view typeAsString() const; + std::string_view typeAsString() const noexcept; virtual void update(const UpdateData& data); virtual void render(const RenderData& data, RendererTasks& rendererTask); @@ -119,15 +124,14 @@ protected: void setInteractionSphere(double interactionSphere); void setRenderBinFromOpacity(); - void registerUpdateRenderBinFromOpacity(); /// Returns the full opacity constructed from the _opacity and _fade property values - float opacity() const override; + float opacity() const noexcept override; + + SceneGraphNode* parent() const noexcept; + + bool automaticallyUpdatesRenderBin() const noexcept; - double _boundingSphere = 0.0; - double _interactionSphere = 0.0; - SceneGraphNode* _parent = nullptr; - bool _shouldUpdateIfDisabled = false; RenderBin _renderBin = RenderBin::Opaque; // An optional renderbin that renderables can use for certain components, in cases @@ -135,6 +139,14 @@ protected: std::optional _secondaryRenderBin; private: + void registerUpdateRenderBinFromOpacity(); + + double _boundingSphere = 0.0; + double _interactionSphere = 0.0; + SceneGraphNode* _parent = nullptr; + const bool _shouldUpdateIfDisabled = false; + bool _automaticallyUpdateRenderBin = true; + // We only want the SceneGraphNode to be able manipulate the parent, so we don't want // to provide a set method for this. Otherwise, anyone might mess around with our // parentage and that's no bueno diff --git a/modules/base/rendering/grids/renderableboxgrid.cpp b/modules/base/rendering/grids/renderableboxgrid.cpp index 3bf8ecd385..5cc398a1c4 100644 --- a/modules/base/rendering/grids/renderableboxgrid.cpp +++ b/modules/base/rendering/grids/renderableboxgrid.cpp @@ -92,7 +92,6 @@ RenderableBoxGrid::RenderableBoxGrid(const ghoul::Dictionary& dictionary) const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); _color = p.color.value_or(_color); _color.setViewOption(properties::Property::ViewOptions::Color); diff --git a/modules/base/rendering/grids/renderablegrid.cpp b/modules/base/rendering/grids/renderablegrid.cpp index 0dcc8e9249..9f5fd7f5cb 100644 --- a/modules/base/rendering/grids/renderablegrid.cpp +++ b/modules/base/rendering/grids/renderablegrid.cpp @@ -135,7 +135,6 @@ RenderableGrid::RenderableGrid(const ghoul::Dictionary& dictionary) const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); _color = p.color.value_or(_color); _color.setViewOption(properties::Property::ViewOptions::Color); diff --git a/modules/base/rendering/grids/renderableradialgrid.cpp b/modules/base/rendering/grids/renderableradialgrid.cpp index d9d1b7d09d..0026495a5b 100644 --- a/modules/base/rendering/grids/renderableradialgrid.cpp +++ b/modules/base/rendering/grids/renderableradialgrid.cpp @@ -117,7 +117,6 @@ RenderableRadialGrid::RenderableRadialGrid(const ghoul::Dictionary& dictionary) const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); _color = p.color.value_or(_color); _color.setViewOption(properties::Property::ViewOptions::Color); diff --git a/modules/base/rendering/grids/renderablesphericalgrid.cpp b/modules/base/rendering/grids/renderablesphericalgrid.cpp index bf58e7a461..8b75307f6d 100644 --- a/modules/base/rendering/grids/renderablesphericalgrid.cpp +++ b/modules/base/rendering/grids/renderablesphericalgrid.cpp @@ -94,7 +94,6 @@ RenderableSphericalGrid::RenderableSphericalGrid(const ghoul::Dictionary& dictio const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); _color = p.color.value_or(_color); _color.setViewOption(properties::Property::ViewOptions::Color); diff --git a/modules/base/rendering/renderablelabel.cpp b/modules/base/rendering/renderablelabel.cpp index cda0245757..072891ee73 100644 --- a/modules/base/rendering/renderablelabel.cpp +++ b/modules/base/rendering/renderablelabel.cpp @@ -238,7 +238,7 @@ documentation::Documentation RenderableLabel::Documentation() { } RenderableLabel::RenderableLabel(const ghoul::Dictionary& dictionary) - : Renderable(dictionary) + : Renderable(dictionary, { .automaticallyUpdateRenderBin = false }) , _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown) , _color(ColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) , _fontSize(FontSizeInfo, 50.f, 1.f, 100.f) @@ -260,11 +260,10 @@ RenderableLabel::RenderableLabel(const ghoul::Dictionary& dictionary) const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); _blendMode.addOptions({ { BlendMode::Normal, "Normal" }, - { BlendMode::Additive, "Additive"} + { BlendMode::Additive, "Additive" } }); _blendMode.onChange([&]() { switch (_blendMode) { diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index d359516e42..b34ab5247d 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -297,7 +297,6 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); if (p.forceRenderInvisible.has_value()) { _forceRenderInvisible = *p.forceRenderInvisible; @@ -634,7 +633,7 @@ void RenderableModel::initializeGL() { setBoundingSphere(_geometry->boundingRadius() * _modelScale); // Set Interaction sphere size to be 10% of the bounding sphere - setInteractionSphere(_boundingSphere * 0.1); + setInteractionSphere(boundingSphere() * 0.1); } void RenderableModel::deinitializeGL() { diff --git a/modules/base/rendering/renderablenodeline.cpp b/modules/base/rendering/renderablenodeline.cpp index 7cb476c62c..26b08ce787 100644 --- a/modules/base/rendering/renderablenodeline.cpp +++ b/modules/base/rendering/renderablenodeline.cpp @@ -181,7 +181,7 @@ RenderableNodeLine::RenderableNodeLine(const ghoul::Dictionary& dictionary) "Trying to use relative offsets for start node '{}' that has no " "bounding sphere. This will result in no offset. Use direct " "values by setting UseRelativeOffsets to false", - _parent->identifier(), _start + parent()->identifier(), _start )); } }); @@ -199,7 +199,7 @@ RenderableNodeLine::RenderableNodeLine(const ghoul::Dictionary& dictionary) "Trying to use relative offsets for end node '{}' that has no " "bounding sphere. This will result in no offset. Use direct " "values by setting UseRelativeOffsets to false", - _parent->identifier(), _end + parent()->identifier(), _end )); } }); @@ -212,7 +212,7 @@ RenderableNodeLine::RenderableNodeLine(const ghoul::Dictionary& dictionary) if (!startNode) { LERROR(fmt::format( "Error when recomputing node line offsets for scene graph node '{}'. " - "Could not find start node '{}'", _parent->identifier(), _start.value() + "Could not find start node '{}'", parent()->identifier(), _start.value() )); return; } @@ -220,7 +220,7 @@ RenderableNodeLine::RenderableNodeLine(const ghoul::Dictionary& dictionary) if (!endNode) { LERROR(fmt::format( "Error when recomputing node line offsets for scene graph node '{}'. " - "Could not find end node '{}'", _parent->identifier(), _end.value() + "Could not find end node '{}'", parent()->identifier(), _end.value() )); return; } @@ -229,8 +229,10 @@ RenderableNodeLine::RenderableNodeLine(const ghoul::Dictionary& dictionary) // Recompute previous offsets to relative values double startBs = startNode->boundingSphere(); double endBs = endNode->boundingSphere(); - _startOffset = startBs > 0.0 ? _startOffset / startBs : 0.0; - _endOffset = endBs > 0.0 ? _endOffset / startBs : 0.0; + _startOffset = + static_cast(startBs > 0.0 ? _startOffset / startBs : 0.0); + _endOffset = + static_cast(endBs > 0.0 ? _endOffset / startBs : 0.0); } else { // Recompute relative values to meters diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp index 647fe4818b..5fdc971f7c 100644 --- a/modules/base/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -113,7 +113,7 @@ documentation::Documentation RenderablePlane::Documentation() { } RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary) - : Renderable(dictionary) + : Renderable(dictionary, { .automaticallyUpdateRenderBin = false }) , _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown) , _billboard(BillboardInfo, false) , _mirrorBackside(MirrorBacksideInfo, false) @@ -123,7 +123,6 @@ RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary) Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); _size = p.size; _billboard = p.billboard.value_or(_billboard); diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index 2db518a6a0..f340951674 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -162,7 +162,6 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); _size = p.size; _segments = p.segments; @@ -208,7 +207,6 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) addProperty(_disableFadeInDistance); setBoundingSphere(_size); - setRenderBinFromOpacity(); } bool RenderableSphere::isReady() const { diff --git a/modules/base/rendering/renderabletimevaryingsphere.cpp b/modules/base/rendering/renderabletimevaryingsphere.cpp index 0a0d488380..3cfd71cac7 100644 --- a/modules/base/rendering/renderabletimevaryingsphere.cpp +++ b/modules/base/rendering/renderabletimevaryingsphere.cpp @@ -164,7 +164,6 @@ RenderableTimeVaryingSphere::RenderableTimeVaryingSphere( const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); _size = p.size; _segments = p.segments; @@ -208,7 +207,6 @@ RenderableTimeVaryingSphere::RenderableTimeVaryingSphere( } setBoundingSphere(_size); - setRenderBinFromOpacity(); } bool RenderableTimeVaryingSphere::isReady() const { diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index 949a155b08..b5eac2f0df 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -433,7 +433,7 @@ void RenderableTrail::render(const RenderData& data, RendererTasks&) { ); const double distance = glm::distance(trailPosWorld, data.camera.eyePositionVec3()); - if (distance > _boundingSphere * DISTANCE_CULLING_RADII) { + if (distance > boundingSphere() * DISTANCE_CULLING_RADII) { // Reset global::renderEngine->openglStateCache().resetBlendState(); global::renderEngine->openglStateCache().resetDepthState(); diff --git a/modules/digitaluniverse/rendering/renderabledumeshes.cpp b/modules/digitaluniverse/rendering/renderabledumeshes.cpp index ae243e0087..7ea15ca523 100644 --- a/modules/digitaluniverse/rendering/renderabledumeshes.cpp +++ b/modules/digitaluniverse/rendering/renderabledumeshes.cpp @@ -189,7 +189,6 @@ RenderableDUMeshes::RenderableDUMeshes(const ghoul::Dictionary& dictionary) const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); _speckFile = absPath(p.file).string(); _hasSpeckFile = true; diff --git a/modules/digitaluniverse/rendering/renderablepoints.cpp b/modules/digitaluniverse/rendering/renderablepoints.cpp index 62db7cda17..9558e33956 100644 --- a/modules/digitaluniverse/rendering/renderablepoints.cpp +++ b/modules/digitaluniverse/rendering/renderablepoints.cpp @@ -130,7 +130,6 @@ RenderablePoints::RenderablePoints(const ghoul::Dictionary& dictionary) const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); _speckFile = absPath(p.file); diff --git a/modules/globebrowsing/CMakeLists.txt b/modules/globebrowsing/CMakeLists.txt index 1bc921acf4..31899a4ff0 100644 --- a/modules/globebrowsing/CMakeLists.txt +++ b/modules/globebrowsing/CMakeLists.txt @@ -58,6 +58,7 @@ set(HEADER_FILES src/tileindex.h src/tileloadjob.h src/tiletextureinitdata.h + src/tilecacheproperties.h src/timequantizer.h src/tileprovider/defaulttileprovider.h src/tileprovider/imagesequencetileprovider.h diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index 20c04f5e60..a0d86ecc73 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -91,43 +91,24 @@ namespace { constexpr std::string_view _loggerCat = "GlobeBrowsingModule"; - constexpr openspace::properties::Property::PropertyInfo WMSCacheEnabledInfo = { - "WMSCacheEnabled", - "WMS Cache Enabled", - "Determines whether automatic caching of WMS servers is enabled. Changing the " - "value of this property will not affect already created WMS datasets" - }; - - constexpr openspace::properties::Property::PropertyInfo OfflineModeInfo = { - "OfflineMode", - "Offline Mode", - "Determines whether loaded WMS servers should be used in offline mode, that is " - "not even try to retrieve images through an internet connection. Please note " - "that this setting is only reasonable, if the caching is enabled and there is " - "available cached data. Changing the value of this property will not affect " - "already created WMS datasets" - }; - - constexpr openspace::properties::Property::PropertyInfo WMSCacheLocationInfo = { - "WMSCacheLocation", - "WMS Cache Location", - "The location of the cache folder for WMS servers. Changing the value of this " - "property will not affect already created WMS datasets" - }; - - constexpr openspace::properties::Property::PropertyInfo WMSCacheSizeInfo = { - "WMSCacheSize", - "WMS Cache Size", - "The maximum size of the cache for each WMS server. Changing the value of this " - "property will not affect already created WMS datasets" - }; - constexpr openspace::properties::Property::PropertyInfo TileCacheSizeInfo = { "TileCacheSize", "Tile Cache Size", "The maximum size of the MemoryAwareTileCache, on the CPU and GPU" }; + constexpr openspace::properties::Property::PropertyInfo MRFCacheEnabledInfo = { + "MRFCacheEnabled", + "MRF Cache Enabled", + "Determines whether automatic caching of globe browsing data is enabled." + }; + + constexpr openspace::properties::Property::PropertyInfo MRFCacheLocationInfo = { + "MRFCacheLocation", + "MRF Cache Location", + "The location of the root folder for the MRF cache of globe browsing data." + }; + openspace::GlobeBrowsingModule::Capabilities parseSubDatasets(char** subDatasets, int nSubdatasets) { @@ -185,25 +166,15 @@ namespace { } struct [[codegen::Dictionary(GlobeBrowsingModule)]] Parameters { - // [[codegen::verbatim(WMSCacheEnabledInfo.description)]] - std::optional cacheEnabled [[codegen::key("WMSCacheEnabled")]]; - - // [[codegen::verbatim(OfflineModeInfo.description)]] - std::optional offlineMode; - - // [[codegen::verbatim(WMSCacheLocationInfo.description)]] - std::optional cacheLocation [[codegen::key("WMSCacheLocation")]]; - - // [[codegen::verbatim(WMSCacheSizeInfo.description)]] - std::optional wmsCacheSize [[codegen::key("WMSCacheSize")]]; // [[codegen::verbatim(TileCacheSizeInfo.description)]] std::optional tileCacheSize; - // If you know what you are doing and you have WMS caching *disabled* but offline - // mode *enabled*, you can set this value to 'true' to silence a warning that you - // would otherwise get at startup - std::optional noWarning; + // [[codegen::verbatim(MRFCacheEnabledInfo.description)]] + std::optional mrfCacheEnabled [[codegen::key("MRFCacheEnabled")]]; + + // [[codegen::verbatim(MRFCacheLocationInfo.description)]] + std::optional mrfCacheLocation [[codegen::key("MRFCacheLocation")]]; }; #include "globebrowsingmodule_codegen.cpp" } // namespace @@ -212,40 +183,22 @@ namespace openspace { GlobeBrowsingModule::GlobeBrowsingModule() : OpenSpaceModule(Name) - , _wmsCacheEnabled(WMSCacheEnabledInfo, false) - , _offlineMode(OfflineModeInfo, false) - , _wmsCacheLocation(WMSCacheLocationInfo, "${BASE}/cache_gdal") - , _wmsCacheSizeMB(WMSCacheSizeInfo, 1024) , _tileCacheSizeMB(TileCacheSizeInfo, 1024) + , _mrfCacheEnabled(MRFCacheEnabledInfo, false) + , _mrfCacheLocation(MRFCacheLocationInfo, "${BASE}/cache_mrf") { - addProperty(_wmsCacheEnabled); - addProperty(_offlineMode); - addProperty(_wmsCacheLocation); - addProperty(_wmsCacheSizeMB); addProperty(_tileCacheSizeMB); + addProperty(_mrfCacheEnabled); + addProperty(_mrfCacheLocation); } void GlobeBrowsingModule::internalInitialize(const ghoul::Dictionary& dict) { using namespace globebrowsing; const Parameters p = codegen::bake(dict); - _wmsCacheEnabled = p.cacheEnabled.value_or(_wmsCacheEnabled); - _offlineMode = p.offlineMode.value_or(_offlineMode); - _wmsCacheLocation = p.cacheLocation.value_or(_wmsCacheLocation); - _wmsCacheSizeMB = p.wmsCacheSize.value_or(_wmsCacheSizeMB); _tileCacheSizeMB = p.tileCacheSize.value_or(_tileCacheSizeMB); - const bool noWarning = p.noWarning.value_or(false); - - if (!_wmsCacheEnabled && _offlineMode && !noWarning) { - LWARNINGC( - "GlobeBrowsingModule", - "WMS caching is disabled, but offline mode is enabled. Unless you know " - "what you are doing, this will probably cause many servers to stop working. " - "If you want to silence this warning, set the 'NoWarning' parameter to " - "'true'" - ); - } - + _mrfCacheEnabled = p.mrfCacheEnabled.value_or(_mrfCacheEnabled); + _mrfCacheLocation = p.mrfCacheLocation.value_or(_mrfCacheLocation); // Initialize global::callback::initializeGL->emplace_back([&]() { @@ -670,21 +623,12 @@ bool GlobeBrowsingModule::hasUrlInfo(const std::string& globe) const { return _urlList.find(globe) != _urlList.end(); } -bool GlobeBrowsingModule::isWMSCachingEnabled() const { - return _wmsCacheEnabled; +bool GlobeBrowsingModule::isMRFCachingEnabled() const { + return _mrfCacheEnabled; } -bool GlobeBrowsingModule::isInOfflineMode() const { - return _offlineMode; -} - -std::string GlobeBrowsingModule::wmsCacheLocation() const { - return _wmsCacheLocation; -} - -uint64_t GlobeBrowsingModule::wmsCacheSize() const { - uint64_t size = _wmsCacheSizeMB; - return size * 1024 * 1024; +const std::string GlobeBrowsingModule::mrfCacheLocation() const { + return _mrfCacheLocation; } scripting::LuaLibrary GlobeBrowsingModule::luaLibrary() const { diff --git a/modules/globebrowsing/globebrowsingmodule.h b/modules/globebrowsing/globebrowsingmodule.h index 3539b6f077..3902e5b663 100644 --- a/modules/globebrowsing/globebrowsingmodule.h +++ b/modules/globebrowsing/globebrowsingmodule.h @@ -92,10 +92,8 @@ public: void removeWMSServer(const std::string& name); - bool isWMSCachingEnabled() const; - bool isInOfflineMode() const; - std::string wmsCacheLocation() const; - uint64_t wmsCacheSize() const; // bytes + bool isMRFCachingEnabled() const; + const std::string mrfCacheLocation() const; protected: void internalInitialize(const ghoul::Dictionary&) override; @@ -113,12 +111,11 @@ private: glm::dquat lookDownCameraRotation(const globebrowsing::RenderableGlobe& globe, glm::dvec3 cameraPositionModelSpace, globebrowsing::Geodetic2 geo2); - properties::BoolProperty _wmsCacheEnabled; - properties::BoolProperty _offlineMode; - properties::StringProperty _wmsCacheLocation; - properties::UIntProperty _wmsCacheSizeMB; properties::UIntProperty _tileCacheSizeMB; + properties::BoolProperty _mrfCacheEnabled; + properties::StringProperty _mrfCacheLocation; + std::unique_ptr _tileCache; // name -> capabilities diff --git a/modules/globebrowsing/globebrowsingmodule_lua.inl b/modules/globebrowsing/globebrowsingmodule_lua.inl index 1085f944d9..9881a65fe0 100644 --- a/modules/globebrowsing/globebrowsingmodule_lua.inl +++ b/modules/globebrowsing/globebrowsingmodule_lua.inl @@ -56,6 +56,9 @@ namespace { throw ghoul::lua::LuaError("Unknown layer group: " + layerGroupName); } + // Add the name of the enclosing globe to layer dict, it is used to identify a cache + layer.setValue("GlobeName", globeName); + // Get the dictionary defining the layer Layer* l = globe->layerManager().addLayer(groupID, layer); if (l) { diff --git a/modules/globebrowsing/src/rawtiledatareader.cpp b/modules/globebrowsing/src/rawtiledatareader.cpp index d7d5a1536e..dfd4e3ad45 100644 --- a/modules/globebrowsing/src/rawtiledatareader.cpp +++ b/modules/globebrowsing/src/rawtiledatareader.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #ifdef _MSC_VER #pragma warning (push) @@ -54,11 +53,13 @@ #include #include +#include +#include namespace openspace::globebrowsing { namespace { - + constexpr std::string_view _loggerCat = "RawTileDataReader"; // These are some locations in memory taken from ESRI's No Data Available tile so that we // can spotcheck these tiles and not present them // The pair is @@ -421,9 +422,11 @@ RawTile::ReadError postProcessErrorCheck(const RawTile& rawTile, RawTileDataReader::RawTileDataReader(std::string filePath, TileTextureInitData initData, + TileCacheProperties cacheProperties, PerformPreprocessing preprocess) : _datasetFilePath(std::move(filePath)) , _initData(std::move(initData)) + , _cacheProperties(std::move(cacheProperties)) , _preprocess(preprocess) { ZoneScoped; @@ -439,83 +442,115 @@ RawTileDataReader::~RawTileDataReader() { } } +std::optional RawTileDataReader::mrfCache() { + // We don't support these formats as they will typically lack + // crucial imformation such as GeoTags. It also makes little sense to + // cache them as they are already local files. + // If it is crucial to cache a dataset of this type, convert it to geotiff. + constexpr std::array Unsupported = { + "jpeg", "jpg", + "png", + "bmp", + "psd", + "tga", + "gif", + "hdr", + "pic", + "ppm", "pgm" + }; + + for (std::string_view fmt : Unsupported) { + if (_datasetFilePath.ends_with(fmt)) { + LWARNING(fmt::format( + "Unsupported file format for MRF caching: {}, Dataset: {}", + fmt, _datasetFilePath + )); + return std::nullopt; + } + } + + GlobeBrowsingModule& module = *global::moduleEngine->module(); + + std::string datasetIdentifier = + std::to_string(std::hash{}(_datasetFilePath)); + std::string path = fmt::format("{}/{}/{}/", + module.mrfCacheLocation(), _cacheProperties.path, datasetIdentifier); + std::string root = absPath(path).string(); + std::string mrf = root + datasetIdentifier + ".mrf"; + std::string cache = root + datasetIdentifier + ".mrfcache"; + + if (!std::filesystem::exists(mrf)) { + std::error_code ec; + if (!std::filesystem::create_directories(root, ec)) { + // Already existing directories causes a 'failure' but no error + if (ec) { + LWARNING(fmt::format( + "Failed to create directories for cache at: {}. Error Code: {}, message: {}", + root, std::to_string(ec.value()), ec.message() + )); + return std::nullopt; + } + } + + GDALDriver* driver = GetGDALDriverManager()->GetDriverByName("MRF"); + if (driver != nullptr) { + GDALDataset* src = static_cast(GDALOpen(_datasetFilePath.c_str(), GA_ReadOnly)); + if (!src) { + LWARNING(fmt::format( + "Failed to load dataset: {}. GDAL Error: {}", + _datasetFilePath, CPLGetLastErrorMsg() + )); + return std::nullopt; + } + + defer{ GDALClose(src); }; + + char** createOpts = nullptr; + createOpts = CSLSetNameValue(createOpts, "CACHEDSOURCE", _datasetFilePath.c_str()); + createOpts = CSLSetNameValue(createOpts, "NOCOPY", "true"); + createOpts = CSLSetNameValue(createOpts, "uniform_scale", "2"); + createOpts = CSLSetNameValue(createOpts, "compress", _cacheProperties.compression.c_str()); + createOpts = CSLSetNameValue(createOpts, "quality", std::to_string(_cacheProperties.quality).c_str()); + createOpts = CSLSetNameValue(createOpts, "blocksize", std::to_string(_cacheProperties.blockSize).c_str()); + createOpts = CSLSetNameValue(createOpts, "indexname", cache.c_str()); + createOpts = CSLSetNameValue(createOpts, "DATANAME", cache.c_str()); + + GDALDataset* dst = static_cast(driver->CreateCopy(mrf.c_str(), src, false, createOpts, nullptr, nullptr)); + if (!dst) { + LWARNING(fmt::format( + "Failed to create MRF Caching dataset dataset: {}. GDAL Error: {}", + mrf, CPLGetLastErrorMsg() + )); + return std::nullopt; + } + GDALClose(dst); + + return mrf; + } + else { + LWARNING("Failed to create MRF driver"); + return std::nullopt; + } + } + else { + return mrf; + } +} + void RawTileDataReader::initialize() { ZoneScoped; if (_datasetFilePath.empty()) { throw ghoul::RuntimeError("File path must not be empty"); } - - GlobeBrowsingModule& module = *global::moduleEngine->module(); - std::string content = _datasetFilePath; - if (module.isWMSCachingEnabled()) { - ZoneScopedN("WMS Caching"); - std::string c; - if (std::filesystem::is_regular_file(_datasetFilePath)) { - // Only replace the 'content' if the dataset is an XML file and we want to do - // caching - std::ifstream t(_datasetFilePath); - c.append( - (std::istreambuf_iterator(t)), - std::istreambuf_iterator() - ); - } - else { - //GDAL input case for configuration string (e.g. temporal data) - c = _datasetFilePath; - } - if (c.size() > 10 && c.substr(0, 10) == "") { - // We know that _datasetFilePath is an XML file, so now we add a Cache line - // into it iff there isn't already one in the XML and if the configuration - // says we should + if (_cacheProperties.enabled) { + ZoneScopedN("MRF Caching"); - // 1. Parse XML - // 2. Inject Cache tag if it isn't already there - // 3. Serialize XML to pass into GDAL - - LDEBUGC(_datasetFilePath, "Inserting caching tag"); - - bool shouldSerializeXml = false; - - CPLXMLNode* root = CPLParseXMLString(c.c_str()); - CPLXMLNode* cache = CPLSearchXMLNode(root, "Cache"); - if (!cache) { - // If there already is a cache, we don't want to modify it - cache = CPLCreateXMLNode(root, CXT_Element, "Cache"); - - CPLCreateXMLElementAndValue( - cache, - "Path", - absPath(module.wmsCacheLocation()).string().c_str() - ); - CPLCreateXMLElementAndValue(cache, "Depth", "4"); - CPLCreateXMLElementAndValue(cache, "Expires", "315576000"); // 10 years - CPLCreateXMLElementAndValue( - cache, - "MaxSize", - std::to_string(module.wmsCacheSize()).c_str() - ); - - // The serialization only needs to be one if the cache didn't exist - // already - shouldSerializeXml = true; - } - - if (module.isInOfflineMode()) { - CPLXMLNode* offlineMode = CPLSearchXMLNode(root, "OfflineMode"); - if (!offlineMode) { - CPLCreateXMLElementAndValue(root, "OfflineMode", "true"); - shouldSerializeXml = true; - } - } - - - if (shouldSerializeXml) { - content = std::string(CPLSerializeXMLTree(root)); - //CPLSerializeXMLTreeToFile(root, (_datasetFilePath + ".xml").c_str()); - } + std::optional cache = mrfCache(); + if (cache.has_value()) { + content = cache.value(); } } diff --git a/modules/globebrowsing/src/rawtiledatareader.h b/modules/globebrowsing/src/rawtiledatareader.h index c58ea2da80..7d23d4bfeb 100644 --- a/modules/globebrowsing/src/rawtiledatareader.h +++ b/modules/globebrowsing/src/rawtiledatareader.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -53,6 +54,7 @@ public: * \param baseDirectory, the base directory to use in future loading operations */ RawTileDataReader(std::string filePath, TileTextureInitData initData, + TileCacheProperties cacheProperties, PerformPreprocessing preprocess = PerformPreprocessing::No); ~RawTileDataReader(); @@ -65,6 +67,8 @@ public: glm::ivec2 fullPixelSize() const; private: + std::optional mrfCache(); + void initialize(); RawTile::ReadError rasterRead(int rasterBand, const IODescription& io, @@ -97,6 +101,7 @@ private: int _maxChunkLevel = -1; const TileTextureInitData _initData; + const TileCacheProperties _cacheProperties; const PerformPreprocessing _preprocess; TileDepthTransform _depthTransform = { .scale = 0.f, .offset = 0.f }; diff --git a/modules/globebrowsing/src/tilecacheproperties.h b/modules/globebrowsing/src/tilecacheproperties.h new file mode 100644 index 0000000000..360d382946 --- /dev/null +++ b/modules/globebrowsing/src/tilecacheproperties.h @@ -0,0 +1,42 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2023 * + * * + * 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_MODULE_GLOBEBROWSING___TILE_CACHE_PROPERTIES___H__ +#define __OPENSPACE_MODULE_GLOBEBROWSING___TILE_CACHE_PROPERTIES___H__ + +#include + +namespace openspace::globebrowsing { + +struct TileCacheProperties { + bool enabled = false; + std::string compression; + std::string path; + int quality; + int blockSize; +}; + +} // namespace openspace::globebrowsing + +#endif // __OPENSPACE_MODULE_GLOBEBROWSING___TILE_CACHE_PROPERTIES___H__ diff --git a/modules/globebrowsing/src/tileprovider/defaulttileprovider.cpp b/modules/globebrowsing/src/tileprovider/defaulttileprovider.cpp index 44635e21e8..4dd907a078 100644 --- a/modules/globebrowsing/src/tileprovider/defaulttileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/defaulttileprovider.cpp @@ -48,10 +48,25 @@ namespace { "complete image if a single image is used" }; + constexpr openspace::properties::Property::PropertyInfo CompressionInfo = { + "Compression", + "Compression Algorithm", + "The compression algorithm to use for MRF cached tiles" + }; + + enum class [[codegen::stringify()]] Compression { + PNG = 0, + JPEG, + LERC + }; + struct [[codegen::Dictionary(DefaultTileProvider)]] Parameters { // User-facing name of this tile provider std::optional name; + // Identifier of the enclosing layer to which tiles are provided + std::optional identifier; + // The path to the file that is loaded by GDAL to produce tiles. Since GDAL // supports it, this can also be the textual representation of the contents of a // loading file @@ -70,6 +85,32 @@ namespace { // Determines if the tiles should be preprocessed before uploading to the GPU std::optional performPreProcessing; + struct CacheSettings { + // Specifies whether to use caching or not + std::optional enabled; + + // [[codegen::verbatim(CompressionInfo.description)]] + enum class [[codegen::map(Compression)]] Compression { + PNG = 0, + JPEG, + LERC + }; + + // The compression algorithm to use for cached tiles + std::optional compression; + + // The quality setting of the compression alogrithm, only valid for JPEG + std::optional quality [[codegen::inrange(0, 100)]]; + + // The block-size of the MRF cache + std::optional blockSize [[codegen::greater(0)]]; + }; + // Specifies the cache settings that should be applied to this layer + std::optional cacheSettings; + + // The name of the enclosing globe + std::optional globeName; + }; #include "defaulttileprovider_codegen.cpp" } // namespace @@ -105,17 +146,53 @@ DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary) _performPreProcessing = _layerGroupID == layers::Group::ID::HeightLayers; _performPreProcessing = p.performPreProcessing.value_or(_performPreProcessing); + // Get the name of the layergroup to which this layer belongs + auto it = std::find_if( + layers::Groups.begin(), + layers::Groups.end(), + [id = _layerGroupID](const layers::Group& gi) { + return gi.id == id; + } + ); + auto layerGroup = it != layers::Groups.end() ? it->name : std::to_string(static_cast(_layerGroupID)); + + std::string identifier = p.identifier.value_or("unspecified"); + std::string enclosing = p.globeName.value_or("unspecified"); + + std::string path = fmt::format("{}/{}/{}/", enclosing, layerGroup, identifier); + + GlobeBrowsingModule& module = *global::moduleEngine->module(); + bool enabled = module.isMRFCachingEnabled(); + Compression compression = + _layerGroupID == layers::Group::ID::HeightLayers ? Compression::LERC : Compression::JPEG; + int quality = 75; + int blockSize = 1024; + if (p.cacheSettings.has_value()) { + enabled = p.cacheSettings->enabled.value_or(enabled); + if (p.cacheSettings->compression.has_value()) { + compression = codegen::map(*p.cacheSettings->compression); + } + quality = p.cacheSettings->quality.value_or(quality); + blockSize = p.cacheSettings->blockSize.value_or(blockSize); + } + + _cacheProperties.enabled = enabled; + _cacheProperties.path = path; + _cacheProperties.quality = quality; + _cacheProperties.blockSize = blockSize; + _cacheProperties.compression = codegen::toString(compression); + TileTextureInitData initData( tileTextureInitData(_layerGroupID, _padTiles, pixelSize) ); _tilePixelSize = initData.dimensions.x; - initAsyncTileDataReader(initData); + initAsyncTileDataReader(initData, _cacheProperties); addProperty(_filePath); addProperty(_tilePixelSize); } -void DefaultTileProvider::initAsyncTileDataReader(TileTextureInitData initData) { +void DefaultTileProvider::initAsyncTileDataReader(TileTextureInitData initData, TileCacheProperties cacheProperties) { ZoneScoped; _asyncTextureDataProvider = std::make_unique( @@ -123,6 +200,7 @@ void DefaultTileProvider::initAsyncTileDataReader(TileTextureInitData initData) std::make_unique( _filePath, initData, + cacheProperties, RawTileDataReader::PerformPreprocessing(_performPreProcessing) ) ); @@ -189,7 +267,8 @@ void DefaultTileProvider::update() { if (_asyncTextureDataProvider->shouldBeDeleted()) { initAsyncTileDataReader( - tileTextureInitData(_layerGroupID, _padTiles, _tilePixelSize) + tileTextureInitData(_layerGroupID, _padTiles, _tilePixelSize), + _cacheProperties ); } } diff --git a/modules/globebrowsing/src/tileprovider/defaulttileprovider.h b/modules/globebrowsing/src/tileprovider/defaulttileprovider.h index 60b96fe6bf..21b659296d 100644 --- a/modules/globebrowsing/src/tileprovider/defaulttileprovider.h +++ b/modules/globebrowsing/src/tileprovider/defaulttileprovider.h @@ -26,7 +26,7 @@ #define __OPENSPACE_MODULE_GLOBEBROWSING___TILEPROVIDER__DEFAULTTILEPROVIDER___H__ #include - +#include #include #include @@ -48,7 +48,7 @@ public: static documentation::Documentation Documentation(); private: - void initAsyncTileDataReader(TileTextureInitData initData); + void initAsyncTileDataReader(TileTextureInitData initData, TileCacheProperties cacheProperties); properties::StringProperty _filePath; properties::IntProperty _tilePixelSize; @@ -57,6 +57,7 @@ private: layers::Group::ID _layerGroupID = layers::Group::ID::Unknown; bool _performPreProcessing = false; bool _padTiles = true; + TileCacheProperties _cacheProperties; }; } // namespace openspace::globebrowsing diff --git a/modules/skybrowser/include/screenspaceskybrowser.h b/modules/skybrowser/include/screenspaceskybrowser.h index dd0a7ed772..9a59fb5d35 100644 --- a/modules/skybrowser/include/screenspaceskybrowser.h +++ b/modules/skybrowser/include/screenspaceskybrowser.h @@ -46,7 +46,7 @@ public: void render() override; void update() override; - float opacity() const; + float opacity() const noexcept; glm::dvec2 fineTuneVector(const glm::dvec2& drag); bool isInitialized() const; bool isPointingSpacecraft() const; diff --git a/modules/skybrowser/src/screenspaceskybrowser.cpp b/modules/skybrowser/src/screenspaceskybrowser.cpp index 85cf3c6eab..0eb7bee4e4 100644 --- a/modules/skybrowser/src/screenspaceskybrowser.cpp +++ b/modules/skybrowser/src/screenspaceskybrowser.cpp @@ -377,7 +377,7 @@ void ScreenSpaceSkyBrowser::setOpacity(float opacity) { _opacity = opacity; } -float ScreenSpaceSkyBrowser::opacity() const { +float ScreenSpaceSkyBrowser::opacity() const noexcept { return _opacity; } diff --git a/modules/space/rendering/renderableconstellationsbase.cpp b/modules/space/rendering/renderableconstellationsbase.cpp index 803ebe21f4..f791badbca 100644 --- a/modules/space/rendering/renderableconstellationsbase.cpp +++ b/modules/space/rendering/renderableconstellationsbase.cpp @@ -96,7 +96,6 @@ RenderableConstellationsBase::RenderableConstellationsBase( const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); // Avoid reading files here, instead do it in multithreaded initialize() if (p.namesFile.has_value()) { diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index 0c55c86114..d9601b2cd0 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -541,7 +541,6 @@ RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary) const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); _dataMapping.bvColor = p.dataMapping.bv.value_or(""); _dataMapping.bvColor.onChange([this]() { _dataIsDirty = true; }); diff --git a/modules/space/rendering/renderabletravelspeed.cpp b/modules/space/rendering/renderabletravelspeed.cpp index 8813c15a4d..8004fcaf7a 100644 --- a/modules/space/rendering/renderabletravelspeed.cpp +++ b/modules/space/rendering/renderabletravelspeed.cpp @@ -259,7 +259,7 @@ void RenderableTravelSpeed::update(const UpdateData& data) { } _targetPosition = _targetNode->worldPosition(); - SceneGraphNode* mySGNPointer = _parent; + SceneGraphNode* mySGNPointer = parent(); ghoul_assert(mySGNPointer, "Renderable have to be owned by scene graph node"); _sourcePosition = mySGNPointer->worldPosition(); diff --git a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp index 42394f9896..b80cfc36c0 100644 --- a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp @@ -204,7 +204,7 @@ void RenderableModelProjection::initializeGL() { setBoundingSphere(_geometry->boundingRadius() * _modelScale); // Set Interaction sphere size to be 10% of the bounding sphere - setInteractionSphere(_boundingSphere * 0.1); + setInteractionSphere(boundingSphere() * 0.1); } void RenderableModelProjection::deinitializeGL() { diff --git a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp index 8e0fa9172e..c548d6d01e 100644 --- a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp +++ b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp @@ -161,7 +161,6 @@ RenderableShadowCylinder::RenderableShadowCylinder(const ghoul::Dictionary& dict const Parameters p = codegen::bake(dictionary); addProperty(_opacity); - registerUpdateRenderBinFromOpacity(); _numberOfPoints = p.numberOfPoints.value_or(_numberOfPoints); addProperty(_numberOfPoints); diff --git a/openspace.cfg b/openspace.cfg index 686c9a106e..5ba0ee4aca 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -137,12 +137,9 @@ Paths = { ModuleConfigurations = { GlobeBrowsing = { - WMSCacheEnabled = false, - -- OfflineMode = true, - -- NoWarning = true, - WMSCacheLocation = "${BASE}/cache_gdal", - WMSCacheSize = 1024, -- in megabytes PER DATASET - TileCacheSize = 2048 -- for all globes (CPU and GPU memory) + TileCacheSize = 2048, -- for all globes (CPU and GPU memory) + MRFCacheEnabled = false, + MRFCacheLocation = "${BASE}/mrf_cache" }, Sync = { SynchronizationRoot = "${SYNC}", diff --git a/src/rendering/fadeable.cpp b/src/rendering/fadeable.cpp index 6342bd50fc..a1439dc086 100644 --- a/src/rendering/fadeable.cpp +++ b/src/rendering/fadeable.cpp @@ -75,7 +75,7 @@ bool Fadeable::isVisible() const { return opacity() > 0.f; } -float Fadeable::opacity() const { +float Fadeable::opacity() const noexcept { float fadeFromParent = 1.f; if (_parentFadeable) { // Note that we only care about the fade here, not the full opacity of the diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index 9dba75a752..8c8c15c4af 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -135,20 +135,29 @@ ghoul::mm_unique_ptr Renderable::createFromDictionary( -Renderable::Renderable(const ghoul::Dictionary& dictionary) +Renderable::Renderable(const ghoul::Dictionary& dictionary, Settings settings) : properties::PropertyOwner({ "Renderable" }) , Fadeable() , _enabled(EnabledInfo, true) , _renderableType(RenderableTypeInfo, "Renderable") , _dimInAtmosphere(DimInAtmosphereInfo, false) + , _shouldUpdateIfDisabled(settings.shouldUpdateIfDisabled) + , _automaticallyUpdateRenderBin(settings.automaticallyUpdateRenderBin) { ZoneScoped; - // I can't come up with a good reason not to do this for all renderables - registerUpdateRenderBinFromOpacity(); - const Parameters p = codegen::bake(dictionary); + if (p.renderBinMode.has_value()) { + _automaticallyUpdateRenderBin = false; + setRenderBin(codegen::map(*p.renderBinMode)); + } + + if (_automaticallyUpdateRenderBin) { + ghoul_assert(!p.renderBinMode.has_value(), "Something misfired in constructor"); + registerUpdateRenderBinFromOpacity(); + } + if (p.tag.has_value()) { if (std::holds_alternative(*p.tag)) { if (!std::get(*p.tag).empty()) { @@ -184,11 +193,6 @@ Renderable::Renderable(const ghoul::Dictionary& dictionary) _renderableType = p.type.value_or(_renderableType); addProperty(_renderableType); - // only used by a few classes such as RenderableTrail and RenderableSphere - if (p.renderBinMode.has_value()) { - setRenderBin(codegen::map(*p.renderBinMode)); - } - _dimInAtmosphere = p.dimInAtmosphere.value_or(_dimInAtmosphere); addProperty(_dimInAtmosphere); } @@ -211,7 +215,7 @@ void Renderable::setBoundingSphere(double boundingSphere) { _boundingSphere = boundingSphere; } -double Renderable::boundingSphere() const { +double Renderable::boundingSphere() const noexcept { return _boundingSphere; } @@ -219,11 +223,11 @@ void Renderable::setInteractionSphere(double interactionSphere) { _interactionSphere = interactionSphere; } -double Renderable::interactionSphere() const { +double Renderable::interactionSphere() const noexcept { return _interactionSphere; } -std::string_view Renderable::typeAsString() const { +std::string_view Renderable::typeAsString() const noexcept { return _renderableType; } @@ -273,7 +277,7 @@ bool Renderable::isEnabled() const { return _enabled; } -bool Renderable::shouldUpdateIfDisabled() const { +bool Renderable::shouldUpdateIfDisabled() const noexcept { return _shouldUpdateIfDisabled; } @@ -300,9 +304,11 @@ void Renderable::setRenderBinFromOpacity() { void Renderable::registerUpdateRenderBinFromOpacity() { _opacity.onChange([this]() { setRenderBinFromOpacity(); }); _fade.onChange([this]() { setRenderBinFromOpacity(); }); + + _automaticallyUpdateRenderBin = true; } -float Renderable::opacity() const { +float Renderable::opacity() const noexcept { // Rendering should depend on if camera is in the atmosphere and if camera is at the // dark part of the globe const float dimming = _dimInAtmosphere ? @@ -311,4 +317,13 @@ float Renderable::opacity() const { return dimming * Fadeable::opacity(); } +SceneGraphNode* Renderable::parent() const noexcept { + ghoul_assert(dynamic_cast(owner()), "Owner is not a SceneGraphNode"); + return static_cast(owner()); +} + +bool Renderable::automaticallyUpdatesRenderBin() const noexcept { + return _automaticallyUpdateRenderBin; +} + } // namespace openspace