diff --git a/data/assets/scene/solarsystem/heliosphere/bastille_day/density_volume.asset b/data/assets/scene/solarsystem/heliosphere/bastille_day/density_volume.asset index b3bd0a6a8b..c1f4f75211 100644 --- a/data/assets/scene/solarsystem/heliosphere/bastille_day/density_volume.asset +++ b/data/assets/scene/solarsystem/heliosphere/bastille_day/density_volume.asset @@ -1,5 +1,6 @@ local propertyHelper = asset.require("util/property_helper") local sunTransforms = asset.require("scene/solarsystem/sun/transforms") +local sunAsset = asset.require("scene/solarsystem/sun/sun") local densityDirectory = asset.syncedResource({ Name = "Bastille Day MAS Density", @@ -12,6 +13,9 @@ local sunRadius = 6.957E8 local densityVolume = { Identifier = "MAS-MHD-Density-bastille-day-2000", + -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale. + -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05, + InteractionSphere = 1/695700000, Parent = sunTransforms.SunIAU.Identifier, Transform = { Scale = { diff --git a/data/assets/scene/solarsystem/heliosphere/bastille_day/fieldlines.asset b/data/assets/scene/solarsystem/heliosphere/bastille_day/fieldlines.asset index 5d0fefa82b..59a6cd4f4a 100644 --- a/data/assets/scene/solarsystem/heliosphere/bastille_day/fieldlines.asset +++ b/data/assets/scene/solarsystem/heliosphere/bastille_day/fieldlines.asset @@ -15,6 +15,9 @@ local sunRadius = 6.957E8 local fieldlines = { Identifier = "MAS-MHD-Fieldlines-bastille-day-2000", Parent = heliosphereTransforms.HEEQ180ReferenceFrame.Identifier, + -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale. + -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05, + InteractionSphere = 1/695700000, Transform = { Scale = { Type = "StaticScale", diff --git a/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodes.asset b/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodes.asset index 7285f5f46d..a70cc0e4d7 100644 --- a/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodes.asset +++ b/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodes.asset @@ -13,6 +13,9 @@ local fluxNodesBinaries = asset.syncedResource({ local fluxNodes = { Identifier = "MAS-MHD-FluxNodes-bastille-day-2000", Parent = heliosphereTransforms.HEEQ180ReferenceFrame.Identifier, + -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale. + -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05, + InteractionSphere = 695700000.0, Transform = { Rotation = rot.CarringtonLongitudeToHEEQ180Rotation }, diff --git a/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane.asset b/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane.asset index 82b43eb7d9..3a0290ec63 100644 --- a/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane.asset +++ b/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane.asset @@ -19,6 +19,9 @@ local TexturesPathMeridial = asset.syncedResource({ local EquatorialCutplane = { Identifier = "EquatorialCutplane-bastille-day-2000", Parent = transforms.HEEQ180ReferenceFrame.Identifier, + -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale. + -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05, + InteractionSphere = 695700000.0, Transform = { Rotation = rot.CarringtonLongitudeToHEEQ180Rotation }, @@ -41,6 +44,9 @@ local EquatorialCutplane = { local MeridialCutplane = { Identifier = "MeridialCutplane-bastille-day-2000", Parent = transforms.HEEQ180ReferenceFrame.Identifier, + -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale. + -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05, + InteractionSphere = 695700000, Transform = { Rotation = { Type = "StaticRotation", diff --git a/data/assets/scene/solarsystem/heliosphere/bastille_day/lightindicator.asset b/data/assets/scene/solarsystem/heliosphere/bastille_day/lightindicator.asset index b2dc819872..5a22526b6a 100644 --- a/data/assets/scene/solarsystem/heliosphere/bastille_day/lightindicator.asset +++ b/data/assets/scene/solarsystem/heliosphere/bastille_day/lightindicator.asset @@ -5,6 +5,9 @@ local travelSpeedIndicator = { Identifier = "TravelSpeedIndicator-2000", --SunIAU adds an extra rotation. Using barycenter, then offsetting to SunIAU Parent = sunTransforms.SolarSystemBarycenter.Identifier, + -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale. + -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05, + InteractionSphere = 695700000.0, Transform = { Translation = { Type = "SpiceTranslation", diff --git a/data/assets/scene/solarsystem/planets/earth/magnetosphere/magnetosphere.asset b/data/assets/scene/solarsystem/planets/earth/magnetosphere/magnetosphere.asset index cb9afd3d94..ffbf81d8ad 100644 --- a/data/assets/scene/solarsystem/planets/earth/magnetosphere/magnetosphere.asset +++ b/data/assets/scene/solarsystem/planets/earth/magnetosphere/magnetosphere.asset @@ -1,5 +1,6 @@ local transforms = asset.require("./transforms_magnetosphere") local transferFunction = asset.localResource("./CMR-illuminance2.txt") +local earthAsset = asset.require("scene/solarsystem/planets/earth/earth") local fieldlinesDirectory = asset.syncedResource({ Name = "Magnetosphere 2012 event", @@ -11,6 +12,8 @@ local fieldlinesDirectory = asset.syncedResource({ local earthMagnetosphere = { Identifier = "EarthMagnetosphere", Parent = transforms.GSMReferenceFrame.Identifier, + -- Grabs a value from earths ellipsoid. 1.05 just to make it somewhat bigger than earth + InteractionSphere = earthAsset.Earth.Renderable.Radii[1] * 1.05, Renderable = { Type = "RenderableFieldlinesSequence", SourceFolder = fieldlinesDirectory, @@ -39,11 +42,11 @@ local earthMagnetosphere = { asset.onInitialize(function() openspace.addSceneGraphNode(earthMagnetosphere) end) - + asset.onDeinitialize(function() openspace.removeSceneGraphNode(earthMagnetosphere) end) - + asset.export(earthMagnetosphere) diff --git a/data/assets/scene/solarsystem/planets/earth/transforms.asset b/data/assets/scene/solarsystem/planets/earth/transforms.asset index d1b196778a..0b509390de 100644 --- a/data/assets/scene/solarsystem/planets/earth/transforms.asset +++ b/data/assets/scene/solarsystem/planets/earth/transforms.asset @@ -1,8 +1,6 @@ local transforms = asset.require("scene/solarsystem/sun/transforms") asset.require("spice/base") - - local EarthBarycenter = { Identifier = "EarthBarycenter", Parent = transforms.SolarSystemBarycenter.Identifier, @@ -78,21 +76,19 @@ asset.onInitialize(function() openspace.addSceneGraphNode(EarthInertial) openspace.addSceneGraphNode(EarthIAU) end) - + asset.onDeinitialize(function() openspace.removeSceneGraphNode(EarthIAU) openspace.removeSceneGraphNode(EarthInertial) openspace.removeSceneGraphNode(EarthCenter) openspace.removeSceneGraphNode(EarthBarycenter) end) - + asset.export(EarthBarycenter) asset.export(EarthCenter) asset.export(EarthInertial) asset.export(EarthIAU) - - asset.meta = { Name = "Earth Transforms", Version = "1.1", diff --git a/data/assets/scene/solarsystem/sun/EUV_layer.asset b/data/assets/scene/solarsystem/sun/EUV_layer.asset index 3bd8eb63cb..88f171310a 100644 --- a/data/assets/scene/solarsystem/sun/EUV_layer.asset +++ b/data/assets/scene/solarsystem/sun/EUV_layer.asset @@ -12,6 +12,9 @@ local textureSourcePath = asset.syncedResource({ local EUVLayer = { Identifier = "EUV-Layer-bastille-day-2000", Parent = transforms.SunIAU.Identifier, + -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale. + -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05, + InteractionSphere = 696000000, Renderable = { Type = "RenderableTimeVaryingSphere", Size = 6.96E8, -- Slightly bigger than the sun renderable, diff --git a/modules/volume/rendering/renderabletimevaryingvolume.cpp b/modules/volume/rendering/renderabletimevaryingvolume.cpp index 1789434a1b..8ffb7864dd 100644 --- a/modules/volume/rendering/renderabletimevaryingvolume.cpp +++ b/modules/volume/rendering/renderabletimevaryingvolume.cpp @@ -106,7 +106,7 @@ namespace { constexpr openspace::properties::Property::PropertyInfo BrightnessInfo = { "Brightness", "Brightness", - "The volumes general brightness." + "The volume renderer's general brightness." }; constexpr openspace::properties::Property::PropertyInfo rNormalizationInfo = { @@ -163,7 +163,7 @@ RenderableTimeVaryingVolume::RenderableTimeVaryingVolume( : Renderable(dictionary) , _gridType(GridTypeInfo, properties::OptionProperty::DisplayType::Dropdown) , _stepSize(StepSizeInfo, 0.02f, 0.001f, 0.1f) - , _brightness(BrightnessInfo, 0.1f, 0.f, 1.f) + , _brightness(BrightnessInfo, 0.33f, 0.f, 1.f) , _rNormalization(rNormalizationInfo, 0.f, 0.f, 2.f) , _rUpperBound(rUpperBoundInfo, 1.f, 0.f, 2.f) , _secondsBefore(SecondsBeforeInfo, 0.f, 0.01f, SecondsInOneDay) @@ -193,10 +193,7 @@ RenderableTimeVaryingVolume::RenderableTimeVaryingVolume( _stepSize = p.stepSize.value_or(_stepSize); - if (p.brightness.has_value()) { - _brightness = *p.brightness; - } - + _brightness = p.brightness.value_or(_brightness); _secondsBefore = p.secondsBefore.value_or(_secondsBefore); _secondsAfter = p.secondsAfter; @@ -211,6 +208,7 @@ RenderableTimeVaryingVolume::RenderableTimeVaryingVolume( } addProperty(_brightness); + addProperty(_opacity); } RenderableTimeVaryingVolume::~RenderableTimeVaryingVolume() {}