diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3e35daafc..81d0833e7c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,9 +27,9 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(OpenSpace)
set(OPENSPACE_VERSION_MAJOR 0)
-set(OPENSPACE_VERSION_MINOR 16)
-set(OPENSPACE_VERSION_PATCH 0)
-set(OPENSPACE_VERSION_STRING "Beta-8")
+set(OPENSPACE_VERSION_MINOR 17)
+set(OPENSPACE_VERSION_PATCH -1)
+set(OPENSPACE_VERSION_STRING "Beta-10 [RC1]")
set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}")
set(OPENSPACE_CMAKE_EXT_DIR "${OPENSPACE_BASE_DIR}/support/cmake")
diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt
index 7622653bf6..c43e141b3f 100644
--- a/apps/OpenSpace/CMakeLists.txt
+++ b/apps/OpenSpace/CMakeLists.txt
@@ -116,13 +116,13 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct)
target_link_libraries(OpenSpace PRIVATE sgct)
set_folder_location(sgct "External")
-set_folder_location(glfw "External/SGCT")
-set_folder_location(miniziplibstatic "External/SGCT")
-set_folder_location(png16_static "External/SGCT")
-set_folder_location(quat "External/SGCT")
-set_folder_location(tinyxml2static "External/SGCT")
-set_folder_location(vrpn "External/SGCT")
-set_folder_location(zlibstatic "External/SGCT")
+set_folder_location(glfw "External")
+set_folder_location(miniziplibstatic "External")
+set_folder_location(png16_static "External")
+set_folder_location(quat "External")
+set_folder_location(tinyxml2static "External")
+set_folder_location(vrpn "External")
+set_folder_location(zlibstatic "External")
if (UNIX AND (NOT APPLE))
target_link_libraries(OpenSpace PRIVATE Xcursor Xinerama X11)
diff --git a/apps/OpenSpace/ext/launcher/include/launcherwindow.h b/apps/OpenSpace/ext/launcher/include/launcherwindow.h
index 2c1b17bb0c..508c0442cc 100644
--- a/apps/OpenSpace/ext/launcher/include/launcherwindow.h
+++ b/apps/OpenSpace/ext/launcher/include/launcherwindow.h
@@ -96,6 +96,7 @@ private:
bool _shouldLaunch = false;
int _userAssetCount = 0;
int _userConfigCount = 0;
+ const std::string _sgctConfigName;
QComboBox* _profileBox = nullptr;
QComboBox* _windowConfigBox = nullptr;
diff --git a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h
index 6ca0c5b209..6533eff4ba 100644
--- a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h
+++ b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h
@@ -82,7 +82,7 @@ private:
QLineEdit* _loadedEdit = nullptr;
QLabel* _notLoadedLabel = nullptr;
QLineEdit* _notLoadedEdit = nullptr;
-
+
QPushButton* _buttonAdd = nullptr;
QPushButton* _buttonRemove = nullptr;
QPushButton* _buttonSave = nullptr;
diff --git a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp
index 7c9f2b0a27..99672c1d57 100644
--- a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp
+++ b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp
@@ -150,6 +150,7 @@ LauncherWindow::LauncherWindow(bool profileEnabled,
absPath(globalConfig.pathTokens.at("USER_PROFILES")).string() + '/'
)
, _readOnlyProfiles(globalConfig.readOnlyProfiles)
+ , _sgctConfigName(sgctConfigName)
{
Q_INIT_RESOURCE(resources);
@@ -177,7 +178,7 @@ LauncherWindow::LauncherWindow(bool profileEnabled,
populateProfilesList(globalConfig.profile);
_profileBox->setEnabled(profileEnabled);
- populateWindowConfigsList(sgctConfigName);
+ populateWindowConfigsList(_sgctConfigName);
_windowConfigBox->setEnabled(sgctConfigEnabled);
@@ -458,7 +459,10 @@ std::string LauncherWindow::selectedProfile() const {
}
std::string LauncherWindow::selectedWindowConfig() const {
- if (_windowConfigBox->currentIndex() > _userAssetCount) {
+ int idx = _windowConfigBox->currentIndex();
+ if (idx == 0) {
+ return _sgctConfigName;
+ } else if (idx > _userAssetCount) {
return "${CONFIG}/" + _windowConfigBox->currentText().toStdString();
}
else {
diff --git a/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp
index baa366a879..273dde9ab6 100644
--- a/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp
+++ b/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp
@@ -460,9 +460,6 @@ void KeybindingsDialog::listItemRemove() {
}
void KeybindingsDialog::transitionToEditMode() {
- _list->setDisabled(true);
- _addButton->setDisabled(true);
- _removeButton->setDisabled(true);
_saveButton->setDisabled(true);
_cancelButton->setDisabled(true);
_buttonBox->setDisabled(true);
diff --git a/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp
index 5f7ad9f7f4..7359026d7e 100644
--- a/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp
+++ b/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp
@@ -297,9 +297,6 @@ void ModulesDialog::listItemRemove() {
}
void ModulesDialog::transitionToEditMode() {
- _list->setDisabled(true);
- _buttonAdd->setDisabled(true);
- _buttonRemove->setDisabled(true);
_buttonSave->setDisabled(true);
_buttonCancel->setDisabled(true);
_buttonBox->setDisabled(true);
diff --git a/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp
index 8e1f9477f9..3a9441154e 100644
--- a/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp
+++ b/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp
@@ -302,9 +302,6 @@ void PropertiesDialog::listItemRemove() {
}
void PropertiesDialog::transitionToEditMode() {
- _list->setDisabled(true);
- _addButton->setDisabled(true);
- _removeButton->setDisabled(true);
_saveButton->setDisabled(true);
_cancelButton->setDisabled(true);
_buttonBox->setDisabled(true);
diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp
index 65dbd607a0..dfd8b32c52 100644
--- a/apps/OpenSpace/main.cpp
+++ b/apps/OpenSpace/main.cpp
@@ -976,14 +976,6 @@ std::string setWindowConfigPresetForGui(const std::string labelFromCfgFile,
}
else {
preset = config.windowConfiguration;
- if (preset.find('/') != std::string::npos) {
- preset.erase(0, preset.find_last_of('/') + 1);
- }
- if (preset.length() >= xmlExt.length()) {
- if (preset.substr(preset.length() - xmlExt.length()) == xmlExt) {
- preset = preset.substr(0, preset.length() - xmlExt.length());
- }
- }
}
return preset;
}
@@ -1005,7 +997,14 @@ std::string selectedSgctProfileFromLauncher(LauncherWindow& lw, bool hasCliSGCTC
}
}
else {
- config += xmlExt;
+ if ( (config.length() >= xmlExt.length())
+ && (0 == config.compare(config.length() - xmlExt.length(), xmlExt.length(), xmlExt)) ) {
+ //user customzied sgct config
+ }
+ else {
+ config += xmlExt;
+ }
+
}
global::configuration->windowConfiguration = config;
}
diff --git a/config/equirectangular_gui.xml b/config/equirectangular_gui.xml
new file mode 100644
index 0000000000..98c6d545bb
--- /dev/null
+++ b/config/equirectangular_gui.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/assets/base_blank.asset b/data/assets/base_blank.asset
index 571724ac09..b318dcf2fd 100644
--- a/data/assets/base_blank.asset
+++ b/data/assets/base_blank.asset
@@ -10,7 +10,6 @@ asset.require('spice/base')
-- Load default key bindings applicable to most scenes
asset.require('dashboard/default_dashboard')
asset.require('util/default_keybindings')
-asset.require('util/default_joystick')
-- Load web gui
local webGui = asset.require('util/webgui')
diff --git a/data/assets/customization/globebrowsing.asset b/data/assets/customization/globebrowsing.asset
index f5ad4193cd..fe03f650af 100644
--- a/data/assets/customization/globebrowsing.asset
+++ b/data/assets/customization/globebrowsing.asset
@@ -4,6 +4,7 @@ local CreateFocusNodes = false
local AddMarsLayers = true
local AddMoonLayers = true
local AddMercuryLayers = true
+local DataFolder = openspace.absPath('${BASE}/../OpenSpaceData')
----------------------------------------
-- If you add layers for different planets than listed here, be sure to add an
@@ -25,11 +26,11 @@ local vrt_folders = {
-- example: 'C:/OpenSpace/GlobeBrowsingData/Mars/CTX'
-- We recommend using this folder for CTX
- openspace.absPath('${BASE}/../OpenSpaceData/Mars/CTX'),
+ DataFolder .. '/Mars/CTX',
-- if not and you have a custom path for CTX layers, enter it below
'',
-- We recommend using this folder for HiRISE
- openspace.absPath('${BASE}/../OpenSpaceData/Mars/HiRISE'),
+ DataFolder .. '/Mars/HiRISE',
-- if not and you have a custom path for HiRISE layers, enter it below
''
},
@@ -39,8 +40,8 @@ local vrt_folders = {
-- if areas overlap, images from the lower results will overwrite the images from former
-- results
-- example: 'C:/OpenSpace/GlobeBrowsingData/Moon'
- openspace.absPath('${BASE}/../OpenSpaceData/Moon'),
- openspace.absPath('${BASE}/../OpenSpaceData/Apollo'),
+ DataFolder .. '/Moon',
+ DataFolder .. '/Apollo',
''
},
Mercury = {
@@ -49,7 +50,7 @@ local vrt_folders = {
-- if areas overlap, images from the lower results will overwrite the images from former
-- results
-- example: 'C:/OpenSpace/GlobeBrowsingData/Mercury'
- openspace.absPath('${BASE}/../OpenSpaceData/Mercury'),
+ DataFolder .. '/Mercury',
''
}
}
diff --git a/data/assets/examples/basic.scene b/data/assets/examples/basic.scene
index 71fdb1b98a..b8c3eba619 100644
--- a/data/assets/examples/basic.scene
+++ b/data/assets/examples/basic.scene
@@ -8,7 +8,6 @@ asset.require('spice/base')
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
-asset.require('util/default_joystick')
asset.require('util/webgui')
local spheres = asset.require('examples/spheres')
diff --git a/data/assets/examples/grids.asset b/data/assets/examples/grids.asset
index 55468bd399..37ebad89e2 100644
--- a/data/assets/examples/grids.asset
+++ b/data/assets/examples/grids.asset
@@ -17,8 +17,7 @@ local radialGrid = {
Color = { 0.6, 1.0, 0.7 },
LineWidth = 3.0,
GridSegments = { 3, 4 },
- OuterRadius = 1.0,
- InnerRadius = 0.2,
+ Radii = { 0.2, 1.0 },
Enabled = false
},
GUI = {
diff --git a/data/assets/examples/primitives.asset b/data/assets/examples/primitives.asset
index d30014306d..23a64b1a0b 100644
--- a/data/assets/examples/primitives.asset
+++ b/data/assets/examples/primitives.asset
@@ -16,7 +16,7 @@ local circle = {
LineWidth = 3.0,
GridSegments = { 1, 1 },
CircleSegments = 64,
- OuterRadius = 1.0
+ Radii = { 0.0, 1.0 }
},
GUI = {
Name = "Example Circle",
@@ -29,7 +29,7 @@ local ellipse = {
Transform = {
Scale = {
Type = "NonUniformStaticScale",
- Scale = {1.5, 1.0, 1.0}
+ Scale = { 1.5, 1.0, 1.0 }
}
},
Renderable = {
@@ -38,7 +38,7 @@ local ellipse = {
LineWidth = 3.0,
GridSegments = { 1, 1 },
CircleSegments = 64,
- OuterRadius = scale
+ Radii = { 0.0, scale }
},
GUI = {
Name = "Example Ellipse",
diff --git a/data/assets/global/openspacebookmarks.asset b/data/assets/global/openspacebookmarks.asset
index 1f6e91e96f..2d3893d1a3 100644
--- a/data/assets/global/openspacebookmarks.asset
+++ b/data/assets/global/openspacebookmarks.asset
@@ -15,7 +15,7 @@ local bookmarksCSV = asset.syncedResource({
local nodes = {}
asset.onInitialize(function ()
- nodes = bookmarkHelper.getBookmarks('OpenSpace Bookmarks', bookmarksCSV .. '/bookmarks.csv.txt')
+ nodes = bookmarkHelper.getBookmarks('OpenSpace Bookmarks', bookmarksCSV .. '/bookmarks.csv')
for _, n in ipairs(nodes) do
openspace.addSceneGraphNode(n);
end
diff --git a/data/assets/scene/digitaluniverse/2dF.asset b/data/assets/scene/digitaluniverse/2dF.asset
index 23f44a447c..4c881fe192 100644
--- a/data/assets/scene/digitaluniverse/2dF.asset
+++ b/data/assets/scene/digitaluniverse/2dF.asset
@@ -24,13 +24,13 @@ local object = {
Color = { 1.0, 1.0, 1.0 },
Opacity = 1.0,
File = speck .. "/2dF.speck",
+ Unit = "Mpc",
Texture = textures .. "/point3A.png",
ColorMap = speck .. "/2dF.cmap",
ColorOption = { "redshift", "proximity" },
ColorRange = { { 0.0, 0.075 }, { 1.0, 25.0 } },
- Unit = "Mpc",
ScaleFactor = 520.0,
- BillboardMaxSize = 4.7,
+ BillboardMinMaxSize = { 0.0, 4.7 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/2mass.asset b/data/assets/scene/digitaluniverse/2mass.asset
index f69905f48c..5e5cfa091d 100644
--- a/data/assets/scene/digitaluniverse/2mass.asset
+++ b/data/assets/scene/digitaluniverse/2mass.asset
@@ -24,15 +24,15 @@ local object = {
Color = { 1.0, 0.4, 0.2 },
Opacity = 1.0,
File = speck .. "/2MASS.speck",
+ Unit = "Mpc",
Texture = textures .. "/point3A.png",
ColorMap = speck .. "/lss.cmap",
ColorOption = { "redshift", "prox5Mpc" },
ColorRange = { { 0.0, 0.075 }, { 1.0, 50.0 } },
- Unit = "Mpc",
CorrectionSizeEndDistance = 20.6,
CorrectionSizeFactor = 15.0,
ScaleFactor = 510.78,
- BillboardMaxSize = 11.15,
+ BillboardMinMaxSize = { 0.0, 11.15 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/6dF.asset b/data/assets/scene/digitaluniverse/6dF.asset
index 8e45fad8b5..90f9ed8634 100644
--- a/data/assets/scene/digitaluniverse/6dF.asset
+++ b/data/assets/scene/digitaluniverse/6dF.asset
@@ -24,14 +24,14 @@ local object = {
Color = { 1.0, 1.0, 0.0 },
Opacity = 1.0,
File = speck .. "/6dF.speck",
+ Unit = "Mpc",
Texture = textures .. "/point3A.png",
ColorMap = speck .. "/6dF.cmap",
ColorOption = { "redshift", "proximity" },
ColorRange = { { 0.0, 0.075 }, { 1.0, 10.0 } },
- Unit = "Mpc",
ScaleFactor = 534.0,
- BillboardMaxSize = 9.0,
- EnablePixelSizeControl = true,
+ BillboardMinMaxSize = { 0.0, 9.0 },
+ EnablePixelSizeControl = true
},
GUI = {
Name = "6dF Galaxies",
diff --git a/data/assets/scene/digitaluniverse/abell.asset b/data/assets/scene/digitaluniverse/abell.asset
index da0a05fd02..38863eba9d 100644
--- a/data/assets/scene/digitaluniverse/abell.asset
+++ b/data/assets/scene/digitaluniverse/abell.asset
@@ -27,10 +27,10 @@ local object = {
File = speck .. "/abell.speck",
Texture = textures .. "/point3A.png",
LabelFile = speck .. "/abell.label",
+ Unit = "Mpc",
TextColor = { 0.0, 0.8, 0.0 },
TextSize = 22,
- TextMinSize = 10.0,
- Unit = "Mpc",
+ TextMinMaxSize = { 10, 12 },
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
@@ -38,7 +38,7 @@ local object = {
0.0, 0.0, 0.0, 1.0
},
ScaleFactor = 520.0,
- BillboardMaxSize = 7.0,
+ BillboardMinMaxSize = { 0.0, 7.0 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/alternatestarlabels.asset b/data/assets/scene/digitaluniverse/alternatestarlabels.asset
index 2a58510736..5e19b98207 100644
--- a/data/assets/scene/digitaluniverse/alternatestarlabels.asset
+++ b/data/assets/scene/digitaluniverse/alternatestarlabels.asset
@@ -17,11 +17,11 @@ local object = {
Color = { 1.0, 1.0, 1.0 },
Opacity = 0.65,
LabelFile = speck .. "/stars-altlbl.label",
+ Unit = "pc",
TextColor = { 0.4, 0.4, 0.4 },
DrawLabels = true,
TextSize = 14.7,
- TextMinSize = 6.0,
- Unit = "pc"
+ TextMinMaxSize = { 6, 20 }
},
GUI = {
Name = "Stars Labels - Alternate",
diff --git a/data/assets/scene/digitaluniverse/clusters.asset b/data/assets/scene/digitaluniverse/clusters.asset
index 6b8ef0e794..03c232a957 100644
--- a/data/assets/scene/digitaluniverse/clusters.asset
+++ b/data/assets/scene/digitaluniverse/clusters.asset
@@ -17,11 +17,11 @@ local object = {
Color = { 1.0, 1.0, 1.0 },
Opacity = 0.65,
LabelFile = speck .. "/galclust.label",
+ Unit = "Mpc",
TextColor = { 1.0, 0.44, 0.0 },
DrawLabels = true,
TextSize = 22,
- TextMinSize = 8.0,
- Unit = "Mpc",
+ TextMinMaxSize = { 8, 20 },
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
diff --git a/data/assets/scene/digitaluniverse/constellations.asset b/data/assets/scene/digitaluniverse/constellations.asset
index e043c1734e..a96db07f75 100644
--- a/data/assets/scene/digitaluniverse/constellations.asset
+++ b/data/assets/scene/digitaluniverse/constellations.asset
@@ -20,8 +20,7 @@ local constellationsExtragalactic = {
TextColor = { 0.8, 0.8, 0.8 },
TextOpacity = 0.4,
TextSize = 20.0,
- TextMinSize = 20.0,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 20, 30 },
MeshColor = { { 0.6, 0.4, 0.4 }, { 0.8, 0.0, 0.0 }, { 0.0, 0.3, 0.8 } },
Unit = "Mpc"
},
@@ -42,8 +41,7 @@ local constellations = {
TextColor = { 0.8, 0.8, 0.8 },
TextOpacity = 0.3,
TextSize = 14.5,
- TextMaxSize = 170.0,
- TextMinSize = 8.0,
+ TextMinMaxSize = { 8, 170 },
MeshColor = { { 0.6, 0.4, 0.4 }, { 0.8, 0.0, 0.0 }, { 0.0, 0.3, 0.8 } },
Unit = "pc"
},
diff --git a/data/assets/scene/digitaluniverse/deepsky.asset b/data/assets/scene/digitaluniverse/deepsky.asset
index 7272af3a06..b8d91282b0 100644
--- a/data/assets/scene/digitaluniverse/deepsky.asset
+++ b/data/assets/scene/digitaluniverse/deepsky.asset
@@ -30,15 +30,12 @@ local deepSkyPoints = {
--ColorOption = { "prox5Mpc" },
--ColorRange = { { 1.0, 30.0 } },
LabelFile = speck .. "/dso.label",
+ Unit = "pc",
TextColor = { 0.1, 0.4, 0.6 },
TextSize = 20.50,
- TextMinSize = 16.0,
- Unit = "pc",
- -- Fade in value in the same unit as "Unit"
- --FadeInDistances = { 0.05, 1.0 },
- -- Max size in pixels
- BillboardMaxSize = 8.22,
- BillboardMinSize = 0.0,
+ TextMinMaxSize = { 16, 20 },
+ --FadeInDistances = { 0.05, 1.0 }, -- Fade in value in the same unit as "Unit"
+ BillboardMinMaxSize = { 0.0, 8.22 }, -- in pixels
--CorrectionSizeEndDistance = 22.0,
--CorrectionSizeFactor = 10.45
EnablePixelSizeControl = true
diff --git a/data/assets/scene/digitaluniverse/dwarfs.asset b/data/assets/scene/digitaluniverse/dwarfs.asset
index 7919dc2038..c4922feb04 100644
--- a/data/assets/scene/digitaluniverse/dwarfs.asset
+++ b/data/assets/scene/digitaluniverse/dwarfs.asset
@@ -26,18 +26,18 @@ local object = {
File = speck .. "/dwarfs.speck",
Texture = textures .. "/point3.png",
LabelFile = speck .. "/dwarfs.label",
+ Unit = "pc",
ColorMap = speck .. "/dwarfs.cmap",
ColorOption = { "typeindex" },
--ColorRange = { { 1.0, 4.0} },
TextColor = { 0.5, 0.1, 0.2 },
TextSize = 14.6,
- TextMinSize = 10.0,
+ TextMinMaxSize = { 10, 20 },
ScaleFactor = 372.1,
--CorrectionSizeEndDistance = 16.1,
--CorrectionSizeFactor = 7.75,
- BillboardMaxSize = 20.0,
- EnablePixelSizeControl = true,
- Unit = "pc"
+ BillboardMinMaxSize = { 0.0, 20.0 },
+ EnablePixelSizeControl = true
},
GUI = {
Name = "Brown Dwarfs",
diff --git a/data/assets/scene/digitaluniverse/exoplanets.asset b/data/assets/scene/digitaluniverse/exoplanets.asset
index 4fb990c4e4..27ccda1a29 100644
--- a/data/assets/scene/digitaluniverse/exoplanets.asset
+++ b/data/assets/scene/digitaluniverse/exoplanets.asset
@@ -27,15 +27,14 @@ local object = {
Texture = textures .. "/target-blue.png",
File = speck .. "/expl.speck",
LabelFile = speck .. "/expl.label",
+ Unit = "pc",
ScaleFactor = 388.67923,
TextColor = { 0.3, 0.3, 0.8 },
TextSize = 14.8,
- TextMaxSize = 200.0,
- TextMinSize = 10.0,
+ TextMinMaxSize = { 10, 100 },
CorrectionSizeEndDistance = 15.23,
CorrectionSizeFactor = 13.3,
- Unit = "pc",
- BillboardMaxSize = 75.0,
+ BillboardMinMaxSize = { 0.0, 75.0 },
EnablePixelSizeControl = true,
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/globularclusters.asset b/data/assets/scene/digitaluniverse/globularclusters.asset
index 179fe2cbc9..77e85d35c5 100644
--- a/data/assets/scene/digitaluniverse/globularclusters.asset
+++ b/data/assets/scene/digitaluniverse/globularclusters.asset
@@ -27,13 +27,12 @@ local object = {
Texture = textures .. "/point4.png",
PolygonSides = 5,
LabelFile = speck .. "/gc.label",
+ Unit = "pc",
TextColor = { 0.5, 0.5, 0.0 },
ScaleFactor = 431.0,
TextSize = 16.7,
- TextMinSize = 4.0,
- TextMaxSize = 20,
- Unit = "pc",
- BillboardMaxSize = 500,
+ TextMinMaxSize = { 4, 20 },
+ BillboardMinMaxSize = { 0.0, 500.0 },
EnablePixelSizeControl = true,
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/grids.asset b/data/assets/scene/digitaluniverse/grids.asset
index 56caaca447..9ba8ad9a53 100644
--- a/data/assets/scene/digitaluniverse/grids.asset
+++ b/data/assets/scene/digitaluniverse/grids.asset
@@ -110,12 +110,11 @@ local eclipticLabels = {
Color = { 1.0, 1.0, 1.0 },
Opacity = 0.65,
LabelFile = speck .. "/eclip.label",
+ Unit = "pc",
DrawLabels = true,
TextColor = { 0.5, 0.5, 0.5 },
TextSize = 14.75,
- TextMinSize = 1.3,
- TextMaxSize = 50.0,
- Unit = "pc",
+ TextMinMaxSize = { 1, 50 },
TransformationMatrix = {
-0.05487554, 0.4941095, -0.8676661, 0.0,
-0.9938214 , -0.1109906, -0.0003515167, 0.0,
@@ -164,12 +163,11 @@ local equatorialLabels = {
Color = { 1.0, 1.0, 1.0 },
Opacity = 0.65,
LabelFile = speck .. "/radec.label",
+ Unit = "pc",
DrawLabels = true,
TextColor = { 0.5, 0.5, 0.5 },
TextSize = 14.5,
- TextMinSize = 1.7,
- TextMaxSize = 70.0,
- Unit = "pc",
+ TextMinMaxSize = { 2, 70 },
TransformationMatrix = {
-0.05487554, 0.4941095, -0.8676661, 0.0,
-0.8734371 , -0.4448296, -0.1980764, 0.0,
@@ -214,12 +212,11 @@ local galacticLabels = {
Color = { 1.0, 1.0, 1.0 },
Opacity = 0.65,
LabelFile = speck .. "/galac.label",
+ Unit = "pc",
DrawLabels = true,
TextColor = { 0.5, 0.5, 0.5 },
TextSize = 15.8,
- TextMinSize = 0.5,
- TextMaxSize = 100.0,
- Unit = "pc"
+ TextMinMaxSize = { 1, 100 }
},
GUI = {
Name = "Galactic Sphere Labels",
@@ -245,8 +242,7 @@ local plane1ld = {
LabelFile = speck .. "/1ld.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 10.3,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 0, 30 },
Unit = "Km"
},
GUI = {
@@ -273,8 +269,7 @@ local plane1lm = {
LabelFile = speck .. "/1lm.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 11.8,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
@@ -301,8 +296,7 @@ local plane1ly = {
LabelFile = speck .. "/1ly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 13.0,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
@@ -329,8 +323,7 @@ local plane10ly = {
LabelFile = speck .. "/10ly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 14.17,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
@@ -357,8 +350,7 @@ local plane100ly = {
LabelFile = speck .. "/100ly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 15.0,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
@@ -385,8 +377,7 @@ local plane1kly = {
LabelFile = speck .. "/1kly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 16.0,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
@@ -413,8 +404,7 @@ local plane10kly = {
LabelFile = speck .. "/10kly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 17.25,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
@@ -434,8 +424,7 @@ local plane100kly = {
LabelFile = speck .. "/100kly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 18.6,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 0, 30 },
Unit = "Mpc"
},
GUI = {
@@ -455,8 +444,7 @@ local plane1Mly = {
LabelFile = speck .. "/1Mly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 19.6,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 0, 30 },
Unit = "Mpc"
},
GUI = {
@@ -476,8 +464,7 @@ local plane10Mly = {
LabelFile = speck .. "/10Mly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 20.6,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 0, 30 },
Unit = "Mpc"
},
GUI = {
@@ -497,8 +484,7 @@ local plane100Mly = {
LabelFile = speck .. "/100Mly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 21.6,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 0, 30 },
Unit = "Mpc"
},
GUI = {
@@ -518,8 +504,7 @@ local plane20Gly = {
LabelFile = speck .. "/20Gly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 23.6,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ TextMinMaxSize = { 0, 30 },
Unit = "Mpc"
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/groups.asset b/data/assets/scene/digitaluniverse/groups.asset
index 3653225819..ed426cbdd2 100644
--- a/data/assets/scene/digitaluniverse/groups.asset
+++ b/data/assets/scene/digitaluniverse/groups.asset
@@ -18,10 +18,10 @@ local object = {
Opacity = 0.65,
--ScaleFactor = 10.0,
LabelFile = speck .. "/groups.label",
+ Unit = "Mpc",
TextColor = { 0.1, 0.6, 0.2 },
TextSize = 21.5,
- TextMinSize = 8.0,
- Unit = "Mpc",
+ TextMinMaxSize = { 8, 20 },
DrawLabels = true,
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
diff --git a/data/assets/scene/digitaluniverse/h2regions.asset b/data/assets/scene/digitaluniverse/h2regions.asset
index 946c1fb9ca..9648f7d088 100644
--- a/data/assets/scene/digitaluniverse/h2regions.asset
+++ b/data/assets/scene/digitaluniverse/h2regions.asset
@@ -27,13 +27,12 @@ local object = {
Texture = textures .."/point4.png",
PolygonSides = 6,
LabelFile = speck .. "/h2.label",
+ Unit = "pc",
TextColor = { 0.5, 0.5, 0.5 },
ScaleFactor = 420,
TextSize = 16.24,
- TextMinSize = 4.0,
- TextMaxSize = 20.0,
- Unit = "pc",
- BillboardMaxSize = 300.0,
+ TextMinMaxSize = { 4, 20 },
+ BillboardMinMaxSize = { 0.0, 300.0 },
EnablePixelSizeControl = false
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/hdf.asset b/data/assets/scene/digitaluniverse/hdf.asset
new file mode 100644
index 0000000000..353ae96fdc
--- /dev/null
+++ b/data/assets/scene/digitaluniverse/hdf.asset
@@ -0,0 +1,84 @@
+local assetHelper = asset.require('util/asset_helper')
+local circle = asset.require('util/circle').circle
+
+local HUDFSpeck = asset.syncedResource({
+ Name = "HUDF Speck",
+ Type = "HttpSynchronization",
+ Identifier = "digitaluniverse_hudf_speck",
+ Version = 1
+})
+
+local ColorMap = asset.syncedResource({
+ Name = "HUDF color map",
+ Type = "HttpSynchronization",
+ Identifier = "digitaluniverse_hudf_textures",
+ Version = 1
+})
+
+local object = {
+ Identifier = "HubbleDeepField",
+ Renderable = {
+ Type = "RenderableBillboardsCloud",
+ Enabled = false,
+ Color = { 1.0, 1.0, 1.0 },
+ Opacity = 1.0,
+ File = HUDFSpeck .. "/hudf.speck",
+ Texture = circle .. "/circle.png",
+ ColorMap = ColorMap .. "/hudf.cmap",
+ ColorOption = { "redshift", "proximity" },
+ ColorRange = { { 0.0, 0.075 }, { 1.0, 25.0 } },
+ Unit = "Mpc",
+ ScaleFactor = 505.0,
+ BillboardMaxSize = 4.7,
+ EnablePixelSizeControl = true
+ },
+ GUI = {
+ Name = "Hubble Deep Field",
+ Path = "/Universe/Galaxies",
+ Description = [[
+ Hubble Ultra Deep Field galaxy survey
+ Data Reference: Hubble Ultra Deep Field 2012 program (Ellis+, Koekemoer+, 2013)
+ ]],
+ }
+}
+
+assetHelper.registerSceneGraphNodesAndExport(asset, { object })
+
+asset.meta = {
+ Name = "Hubble Ultra Deep Field",
+ Version = "1.1",
+ Description = "Hubble Ultra Deep Field galaxy survey",
+ Author = "Frank Summers (STScI), Brian Abbott (AMNH)",
+ Identifiers = {"HubbleDeepField"},
+ URL = "http://www.haydenplanetarium.org/universe",
+ License = [[
+ Copyright (c) American Museum of Natural History. All rights reserved.
+
+ Downloading the Atlas:
+ AMNH offers the Atlas free of charge via our website, http://www.haydenplanetarium.org/.
+ The User is free to download and/or duplicate verbatim copies of the Atlas provided this
+ license and copyright information accompany the Atlas.
+
+ Modifying the Atlas:
+ The user is free to modify the Atlas by either adding data or altering existing data,
+ provided it is for personal use only. Once the user modifies the Atlas, it is no longer
+ part of AMNH's Atlas and cannot be used publicly alongside or within the Atlas without
+ written permission from AMNH.
+
+ Distributing the Atlas:
+ The user is forbidden to distribute and use the Atlas for profit, as part of a software
+ and/or production system that will subsequently be redistributed, or for public consumption
+ (via print, electronic media, or broadcast/produced pieces) without written permission
+ from AMNH.
+
+ Neither the names of American Museum of Natural History and Hayden Planetarium nor the names
+ of their contributors may be used to endorse or promote products derived from this Atlas
+ without specific, prior written permission.
+
+ The Atlas is free but is offered WITHOUT ANY WARRANTY of any kind. We provide the Atlas as
+ is and take no responsibility for any damage resulting from the use of this Atlas. The entire
+ risk as to the quality and performance of this product is with the user.
+
+ For more information, please visit http://www.haydenplanetarium.org/universe
+ ]]
+}
diff --git a/data/assets/scene/digitaluniverse/kepler.asset b/data/assets/scene/digitaluniverse/kepler.asset
index 38ce9309a9..d07868db17 100644
--- a/data/assets/scene/digitaluniverse/kepler.asset
+++ b/data/assets/scene/digitaluniverse/kepler.asset
@@ -25,11 +25,11 @@ local object = {
Opacity = 0.99,
ScaleFactor = 410.0,
File = speck .. "/kepler.speck",
+ Unit = "pc",
Texture = textures .. "/halo.png",
CorrectionSizeEndDistance = 15.86,
CorrectionSizeFactor = 8.59,
- Unit = "pc",
- BillboardMaxSize = 30.0,
+ BillboardMinMaxSize = { 0.0, 30.0 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/localdwarfs.asset b/data/assets/scene/digitaluniverse/localdwarfs.asset
index 8bd7fddce6..ac23ad0dc6 100644
--- a/data/assets/scene/digitaluniverse/localdwarfs.asset
+++ b/data/assets/scene/digitaluniverse/localdwarfs.asset
@@ -29,12 +29,12 @@ local object = {
Texture = textures .. "/point4.png",
PolygonSides = 12,
LabelFile = speck .. "/localgroup.label",
+ Unit = "Mpc",
TextColor = { 0.3, 0.3, 1.0 },
ScaleFactor = 465,
TextSize = 18.3,
- TextMinSize = 7.3,
- Unit = "Mpc",
- BillboardMaxSize = 20.0,
+ TextMinMaxSize = { 7, 20 },
+ BillboardMinMaxSize = { 0.0, 20.0 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/milkyway_label.asset b/data/assets/scene/digitaluniverse/milkyway_label.asset
index 20fb25276e..60908e0a35 100644
--- a/data/assets/scene/digitaluniverse/milkyway_label.asset
+++ b/data/assets/scene/digitaluniverse/milkyway_label.asset
@@ -20,19 +20,18 @@ local homeLabel = {
ScaleFactor = 500.0,
DrawLabels = true,
LabelFile = homespeck .. "/home.label",
+ Unit = "Mpc",
TextColor = { 0.8, 0.8, 0.8 },
TextSize = 20.50,
- TextMinSize = 16.0,
+ TextMinMaxSize = { 16, 20 },
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
},
- Unit = "Mpc",
FadeInDistances = { 0.05, 1.0 },
- BillboardMaxSize = 8.22,
- BillboardMinSize = 0.0,
+ BillboardMinMaxSize = { 0.0, 8.22 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/obassociations.asset b/data/assets/scene/digitaluniverse/obassociations.asset
index 3814638db9..1339706042 100644
--- a/data/assets/scene/digitaluniverse/obassociations.asset
+++ b/data/assets/scene/digitaluniverse/obassociations.asset
@@ -24,20 +24,19 @@ local object = {
Color = { 1.0, 1.0, 1.0 },
ColorMap = speck .. "/ob.cmap",
ColorOption = { "arm" },
- SizeOption = {"diameter"},
+ SizeOption = { "diameter" },
ExactColorMap = true,
Opacity = 0.7,
File = speck .. "/ob.speck",
+ Unit = "pc",
Texture = textures .. "/point4.png",
PolygonSides = 7,
LabelFile = speck .. "/ob.label",
TextColor = { 0.4, 0.5, 1.0 },
ScaleFactor = 390.0,
TextSize = 16.24,
- TextMinSize = 4.50,
- TextMaxSize = 25,
- Unit = "pc",
- BillboardMaxSize = 450.0,
+ TextMinMaxSize = { 4, 25 },
+ BillboardMinMaxSize = { 0.0, 450.0 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/openclusters.asset b/data/assets/scene/digitaluniverse/openclusters.asset
index 86bbc5b5c9..bb4ae711e5 100644
--- a/data/assets/scene/digitaluniverse/openclusters.asset
+++ b/data/assets/scene/digitaluniverse/openclusters.asset
@@ -24,16 +24,15 @@ local object = {
Color = { 0.1, 0.8, 0.4 },
Opacity = 0.5,
File = speck .. "/oc.speck",
+ Unit = "pc",
Texture = textures .. "/point4.png",
PolygonSides = 12,
TextColor = { 0.05, 0.4, 0.2 },
LabelFile = speck .. "/oc.label",
ScaleFactor = 405.75,
TextSize = 15.5,
- TextMinSize = 4.5,
- TextMaxSize = 30.0,
- Unit = "pc",
- BillboardMaxSize = 604,
+ TextMinMaxSize = { 4, 30 },
+ BillboardMinMaxSize = { 0.0, 604.0 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/planetarynebulae.asset b/data/assets/scene/digitaluniverse/planetarynebulae.asset
index 7fb7d217ad..c2a0c107d2 100644
--- a/data/assets/scene/digitaluniverse/planetarynebulae.asset
+++ b/data/assets/scene/digitaluniverse/planetarynebulae.asset
@@ -27,13 +27,12 @@ local object = {
Texture = textures .. "/point4.png",
PolygonSides = 3,
LabelFile = speck .. "/pn.label",
+ Unit = "pc",
TextColor = { 0.25, 0.25, 0.65 },
ScaleFactor = 425.0,
TextSize = 16.24,
- TextMinSize = 4.5,
- TextMaxSize = 25.0,
- Unit = "pc",
- BillboardMaxSize = 500,
+ TextMinMaxSize = { 4, 25 },
+ BillboardMinMaxSize = { 0.0, 500.0 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/pulsars.asset b/data/assets/scene/digitaluniverse/pulsars.asset
index 8defe08274..6e122a3336 100644
--- a/data/assets/scene/digitaluniverse/pulsars.asset
+++ b/data/assets/scene/digitaluniverse/pulsars.asset
@@ -27,13 +27,12 @@ local object = {
Texture = textures .. "/point4.png",
PolygonSides = 4,
LabelFile = speck .. "/pulsar.label",
+ Unit = "pc",
TextColor = { 0.7, 0.2, 0.2 },
ScaleFactor = 424,
TextSize = 15.77,
- TextMinSize = 4,
- TextMaxSize = 20.0,
- Unit = "pc",
- BillboardMaxSize = 500,
+ TextMinMaxSize = { 4, 20 },
+ BillboardMinMaxSize = { 0.0, 500.0 },
EnablePixelSizeControl = false
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/quasars.asset b/data/assets/scene/digitaluniverse/quasars.asset
index 69336ed468..3ec14ef05b 100644
--- a/data/assets/scene/digitaluniverse/quasars.asset
+++ b/data/assets/scene/digitaluniverse/quasars.asset
@@ -27,11 +27,8 @@ local object = {
Texture = textures .. "/point3A.png",
Unit = "Mpc",
ScaleFactor = 540.9,
- -- Fade in value in the same unit as "Unit"
- FadeInDistances = { 1000.0, 10000.0 },
- BillboardMaxSize = 30.0,
- BillboardMinSize = 0.0,
- BillboardMaxSize = 11.1,
+ FadeInDistances = { 1000.0, 10000.0 }, -- Fade in value in the same unit as "Unit"
+ BillboardMinMaxSize = { 0.0, 11.1 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/sdss.asset b/data/assets/scene/digitaluniverse/sdss.asset
index 61914b1951..de7391eba0 100644
--- a/data/assets/scene/digitaluniverse/sdss.asset
+++ b/data/assets/scene/digitaluniverse/sdss.asset
@@ -30,16 +30,12 @@ local object = {
ColorRange = { { 0.0, 0.075 }, { 1.0, 50.0 } },
Texture = textures .. "/point3A.png",
Unit = "Mpc",
- -- Fade in value in the same unit as "Unit"
- FadeInDistances = { 220.0, 650.0 },
- BillboardMaxSize = 50.0,
- BillboardMinSize = 0.0,
+ FadeInDistances = { 220.0, 650.0 }, -- Fade in value in the same unit as "Unit"
+ BillboardMinMaxSize = { 0.0, 5.5 },
CorrectionSizeEndDistance = 20.65,
CorrectionSizeFactor = 10.41,
TextSize = 14.8,
- TextMinSize = 10.0,
- TextMaxSize = 50.0,
- BillboardMaxSize = 5.5,
+ TextMinMaxSize = { 10, 50 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/starlabels.asset b/data/assets/scene/digitaluniverse/starlabels.asset
index 8a8c99105f..387975abbd 100644
--- a/data/assets/scene/digitaluniverse/starlabels.asset
+++ b/data/assets/scene/digitaluniverse/starlabels.asset
@@ -17,12 +17,11 @@ local object = {
Color = { 1.0, 1.0, 1.0 },
Opacity = 0.65,
LabelFile = speck .. "/stars.label",
+ Unit = "pc",
TextColor = { 0.4, 0.4, 0.4 },
DrawLabels = true,
TextSize = 14.7,
- TextMinSize = 6.0,
- TextMaxSize = 50.0,
- Unit = "pc"
+ TextMinMaxSize = { 6, 50 }
},
GUI = {
Name = "Stars Labels",
diff --git a/data/assets/scene/digitaluniverse/starorbits.asset b/data/assets/scene/digitaluniverse/starorbits.asset
index 4287107301..d79d96d2fa 100644
--- a/data/assets/scene/digitaluniverse/starorbits.asset
+++ b/data/assets/scene/digitaluniverse/starorbits.asset
@@ -20,10 +20,8 @@ local sunOrbit = {
File = speck .. "/starorbits-Sun.speck",
MeshColor = {{ 1.0, 0.65, 0.0 }},
--LabelFile = speck .. "/1ld.label",
- TextColor = { 0.0, 0.2, 0.5 },
- TextSize = 10.3,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ -- TextColor = { 0.0, 0.2, 0.5 },
+ -- TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
@@ -43,10 +41,9 @@ local barnardsOrbit = {
File = speck .. "/starorbits-BarnardsStar.speck",
MeshColor = {{0.39, 0.58, 0.93}},
--LabelFile = speck .. "/1ld.label",
- TextColor = { 0.0, 0.2, 0.5 },
- TextSize = 10.3,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ -- TextColor = { 0.0, 0.2, 0.5 },
+ -- TextSize = 10.3,
+ -- TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
@@ -66,10 +63,9 @@ local kapteynsOrbit = {
File = speck .. "/starorbits-KapteynsStar.speck",
MeshColor = {{0.6, 0.6, 0.6}},
--LabelFile = speck .. "/1ld.label",
- TextColor = { 0.0, 0.2, 0.5 },
- TextSize = 10.3,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ -- TextColor = { 0.0, 0.2, 0.5 },
+ -- TextSize = 10.3,
+ -- TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
@@ -89,10 +85,9 @@ local lacaille9352Orbit = {
File = speck .. "/starorbits-Lacaille9352.speck",
MeshColor = {{0.58, 0.0, 0.83}},
--LabelFile = speck .. "/1ld.label",
- TextColor = { 0.0, 0.2, 0.5 },
- TextSize = 10.3,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ -- TextColor = { 0.0, 0.2, 0.5 },
+ -- TextSize = 10.3,
+ -- TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
@@ -112,10 +107,9 @@ local lSR1826Orbit = {
File = speck .. "/starorbits-LSR1826+3014.speck",
MeshColor = {{0.0, 0.39, 0.0}},
--LabelFile = speck .. "/1ld.label",
- TextColor = { 0.0, 0.2, 0.5 },
- TextSize = 10.3,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ -- TextColor = { 0.0, 0.2, 0.5 },
+ -- TextSize = 10.3,
+ -- TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
@@ -135,10 +129,9 @@ local lSRJ0822Orbit = {
File = speck .. "/starorbits-LSRJ0822+1700.speck",
MeshColor = {{0.5, 1.0, 0.0}},
--LabelFile = speck .. "/1ld.label",
- TextColor = { 0.0, 0.2, 0.5 },
- TextSize = 10.3,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ -- TextColor = { 0.0, 0.2, 0.5 },
+ -- TextSize = 10.3,
+ -- TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
@@ -158,10 +151,9 @@ local pM_J13420Orbit = {
File = speck .. "/starorbits-PM_J13420-3415.speck",
MeshColor = {{0.70, 0.13, 0.13}},
--LabelFile = speck .. "/1ld.label",
- TextColor = { 0.0, 0.2, 0.5 },
- TextSize = 10.3,
- TextMinSize = 0.5,
- TextMaxSize = 30.0,
+ -- TextColor = { 0.0, 0.2, 0.5 },
+ -- TextSize = 10.3,
+ -- TextMinMaxSize = { 0, 30 },
Unit = "pc"
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/stars.asset b/data/assets/scene/digitaluniverse/stars.asset
index 35a3565535..db0ac4adb7 100644
--- a/data/assets/scene/digitaluniverse/stars.asset
+++ b/data/assets/scene/digitaluniverse/stars.asset
@@ -1,13 +1,7 @@
local assetHelper = asset.require('util/asset_helper')
local colormaps = asset.require('./stars_colormap').ColorMaps
-
-local textures = asset.syncedResource({
- Name = "Stars Textures",
- Type = "HttpSynchronization",
- Identifier = "stars_textures",
- Version = 1
-})
+local textures = asset.require('./stars_textures').textures
local speck = asset.syncedResource({
Name = "Stars Speck Files",
diff --git a/data/assets/scene/digitaluniverse/stars_textures.asset b/data/assets/scene/digitaluniverse/stars_textures.asset
new file mode 100644
index 0000000000..d57f6d0907
--- /dev/null
+++ b/data/assets/scene/digitaluniverse/stars_textures.asset
@@ -0,0 +1,20 @@
+local assetHelper = asset.require('util/asset_helper')
+
+local textures = asset.syncedResource({
+ Name = "Stars Textures",
+ Type = "HttpSynchronization",
+ Identifier = "stars_textures",
+ Version = 1
+})
+
+asset.export("textures", textures)
+
+asset.meta = {
+ Name = "Star Textures",
+ Version = "1.0",
+ Description = [[Square textures used to represent stars when applied to camera-facing bil;board]],
+ Author = "OpenSpace Team",
+ URL = "http://openspaceproject.com",
+ License = "MIT License"
+}
+
diff --git a/data/assets/scene/digitaluniverse/superclusters.asset b/data/assets/scene/digitaluniverse/superclusters.asset
index 85546e608e..facc29d313 100644
--- a/data/assets/scene/digitaluniverse/superclusters.asset
+++ b/data/assets/scene/digitaluniverse/superclusters.asset
@@ -27,13 +27,13 @@ local object = {
File = speck .. "/superclust.speck",
Texture = textures .. "/point3A.png",
LabelFile = speck .. "/superclust.label",
+ Unit = "Mpc",
TextColor = { 0.9, 0.9, 0.9 },
ScaleFactor = 531.0,
TextSize = 22.44,
- TextMinSize = 8.0,
- Unit = "Mpc",
+ TextMinMaxSize = { 8, 20 },
DrawLabels = true,
- --BillboardMaxSize = 7.2,
+ --BillboardMinMaxSize = { 0.0, 7.2 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/supernovaremnants.asset b/data/assets/scene/digitaluniverse/supernovaremnants.asset
index 20a4f8f557..efa2c2844f 100644
--- a/data/assets/scene/digitaluniverse/supernovaremnants.asset
+++ b/data/assets/scene/digitaluniverse/supernovaremnants.asset
@@ -27,15 +27,14 @@ local object = {
Texture = textures .. "/point4.png",
PolygonSides = 7,
LabelFile = speck .. "/snr.label",
+ Unit = "pc",
TextColor = { 0.6, 0.46, 0.0 },
ScaleFactor = 424,
TextSize = 16.44,
- TextMinSize = 4.0,
- TextMaxSize = 200.0,
+ TextMinMaxSize = { 4, 100 },
--CorrectionSizeEndDistance = 17.5,
--CorrectionSizeFactor = 13.96,
- Unit = "pc",
- BillboardMaxSize = 500,
+ BillboardMinMaxSize = { 0.0, 500.0 },
EnablePixelSizeControl = true
},
GUI = {
diff --git a/data/assets/scene/digitaluniverse/tully.asset b/data/assets/scene/digitaluniverse/tully.asset
index 21e65f5ed5..d06deb8a4c 100644
--- a/data/assets/scene/digitaluniverse/tully.asset
+++ b/data/assets/scene/digitaluniverse/tully.asset
@@ -33,21 +33,18 @@ local tullyPoints = {
ColorRange = { { 1.0, 30.0 } },
LabelFile = speck .. "/tully.label",
DrawLabels = false,
+ Unit = "Mpc",
TextColor = { 0.7, 0.7, 0.7 },
TextSize = 19.36,
- TextMinSize = 8.2,
+ TextMinMaxSize = { 8, 20 },
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
},
- Unit = "Mpc",
- -- Fade in value in the same unit as "Unit"
- FadeInDistances = { 0.001, 1.0 },
- -- Max size in pixels
- BillboardMaxSize = 7,
- BillboardMinSize = 0,
+ FadeInDistances = { 0.001, 1.0 }, -- Fade in value in the same unit as "Unit"
+ BillboardMinMaxSize = { 0.0, 7.0 }, -- in pixels
--CorrectionSizeEndDistance = 22.0,
--CorrectionSizeFactor = 10.45
EnablePixelSizeControl = true
diff --git a/data/assets/scene/digitaluniverse/voids.asset b/data/assets/scene/digitaluniverse/voids.asset
index 20538ee161..269ae7c7e7 100644
--- a/data/assets/scene/digitaluniverse/voids.asset
+++ b/data/assets/scene/digitaluniverse/voids.asset
@@ -19,10 +19,10 @@ local object = {
Color = { 1.0, 1.0, 1.0 },
Opacity = 0.65,
LabelFile = speck .. "/voids.label",
+ Unit = "Mpc",
TextColor = { 0.296, 0.629, 1.0 },
TextSize = 20.9,
- TextMinSize = 8.0,
- Unit = "Mpc"
+ TextMinMaxSize = { 8, 20 }
},
GUI = {
Name = "Voids",
diff --git a/data/assets/scene/milkyway/gaia/apogee.asset b/data/assets/scene/milkyway/gaia/apogee.asset
index 12c495264a..b6abe3159a 100644
--- a/data/assets/scene/milkyway/gaia/apogee.asset
+++ b/data/assets/scene/milkyway/gaia/apogee.asset
@@ -1,14 +1,9 @@
local assetHelper = asset.require('util/asset_helper')
+local colorLUT = asset.require('scene/digitaluniverse/stars_colormap').ColorMaps
+local textures = asset.require('scene/digitaluniverse/stars_textures').textures
-local textures = asset.syncedResource({
- Name = "Stars Textures",
- Type = "HttpSynchronization",
- Identifier = "stars_textures",
- Version = 1
-})
-
local speck = asset.syncedResource({
Name = "Apogee Speck Files",
Type = "HttpSynchronization",
@@ -16,13 +11,6 @@ local speck = asset.syncedResource({
Version = 1
})
-local colorLUT = asset.syncedResource({
- Name = "Stars Color Table",
- Type = "HttpSynchronization",
- Identifier = "stars_colormap",
- Version = 2
-})
-
local gaia_abundance_apogee = {
Identifier = "Gaia Abundance Apogee",
Renderable = {
diff --git a/data/assets/scene/milkyway/gaia/gaiastars.asset b/data/assets/scene/milkyway/gaia/gaiastars.asset
index 997eaa55e5..5eeeb15162 100644
--- a/data/assets/scene/milkyway/gaia/gaiastars.asset
+++ b/data/assets/scene/milkyway/gaia/gaiastars.asset
@@ -1,18 +1,7 @@
local assetHelper = asset.require("util/asset_helper")
-local textures = asset.syncedResource({
- Name = "Stars Textures",
- Type = "HttpSynchronization",
- Identifier = "stars_textures",
- Version = 1
-})
-
-local colorLUT = asset.syncedResource({
- Name = "Stars Color Table",
- Type = "HttpSynchronization",
- Identifier = "stars_colormap",
- Version = 1
-})
+local colorLUT = asset.require('scene/digitaluniverse/stars_colormap').ColorMaps
+local textures = asset.require('scene/digitaluniverse/stars_textures').textures
-- Download a preprocessed binary octree of Radial Velocity subset values per star (preprocessed into 8 binary files).
local starsFolder = asset.syncedResource({
diff --git a/data/assets/scene/milkyway/gaia/galah.asset b/data/assets/scene/milkyway/gaia/galah.asset
index 121ee8f510..f4c814c20a 100644
--- a/data/assets/scene/milkyway/gaia/galah.asset
+++ b/data/assets/scene/milkyway/gaia/galah.asset
@@ -1,13 +1,7 @@
local assetHelper = asset.require('util/asset_helper')
-
-
-local textures = asset.syncedResource({
- Name = "Stars Textures",
- Type = "HttpSynchronization",
- Identifier = "stars_textures",
- Version = 1
-})
+local colorLUT = asset.require('scene/digitaluniverse/stars_colormap').ColorMaps
+local textures = asset.require('scene/digitaluniverse/stars_textures').textures
local speck = asset.syncedResource({
Name = "Galah Speck Files",
@@ -16,12 +10,6 @@ local speck = asset.syncedResource({
Version = 1
})
-local colorLUT = asset.syncedResource({
- Name = "Stars Color Table",
- Type = "HttpSynchronization",
- Identifier = "stars_colormap",
- Version = 2
-})
local gaia_abundance_galah = {
Identifier = "Gaia Abundance Galah",
diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon.asset
index fdf60a27e6..e2411ef264 100644
--- a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon.asset
+++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon.asset
@@ -27,21 +27,16 @@ local Charon = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/charon.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 40.0,
- LabelsSize = 8.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 2000000.0,
- FadeOutStartingDistance = 800000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 250000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 9.0,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ Distances = { 800000.0, 2000000.0 },
+ DistanceEPS = 250000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "planet_solarSystem", "planet_terrestrial" },
diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/layers/colorlayers/greyscale_usgs.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/layers/colorlayers/greyscale_usgs.asset
index 0284eda58d..05aeb630a3 100644
--- a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/layers/colorlayers/greyscale_usgs.asset
+++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/layers/colorlayers/greyscale_usgs.asset
@@ -14,7 +14,7 @@ asset.export("layer", layer)
asset.meta = {
- Name = "Charon Black & White & White [USGS]",
+ Name = "Charon Black & White [USGS]",
Version = "1.0",
Description = [[ Charon New Horizons LORRI MVIC Global Mosaic 300m v1. This detailed,
high-quality global mosaic of Pluto’s largest moon, Charon, was assembled from nearly
diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/layers/colorlayers/greyscale_usgs.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/layers/colorlayers/greyscale_usgs.asset
index de63a8a609..0bf0135776 100644
--- a/data/assets/scene/solarsystem/dwarf_planets/pluto/layers/colorlayers/greyscale_usgs.asset
+++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/layers/colorlayers/greyscale_usgs.asset
@@ -14,7 +14,7 @@ asset.export("layer", layer)
asset.meta = {
- Name = "Pluto Black & White & White [USGS]",
+ Name = "Pluto Black & White [USGS]",
Version = "1.0",
Description = [[ This detailed, high-quality global mosaic of Pluto was assembled from
nearly all of the highest-resolution images obtained by the Long-Range
diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto.asset
index ee44ed93de..947b762858 100644
--- a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto.asset
+++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto.asset
@@ -27,21 +27,16 @@ local Pluto = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/pluto.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 28.0,
- LabelsSize = 8.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 4000000.0,
- FadeOutStartingDistance = 650000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 500000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 8.5,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 650000.0, 4000000.0 },
+ DistanceEPS = 500000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "planet_solarSystem", "planet_terrestrial" },
@@ -56,13 +51,12 @@ local PlutoLabel = {
Renderable = {
Enabled = false,
Type = "RenderableLabels",
- LabelText = "Pluto",
- FontSize = 100.0,
- LabelSize = 8.9,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
+ Text = "Pluto",
+ FontSize = 70.0,
+ Size = 9.05,
+ MinMaxSize = { 1, 100 },
BlendMode = "Additive",
- LabelOrientationOption = "Camera View Direction"
+ OrientationOption = "Camera View Direction"
},
Tag = { "solarsystem_labels" },
GUI = {
diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail.asset
index fc9f456e51..42e1e9dfd2 100644
--- a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail.asset
+++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail.asset
@@ -20,7 +20,8 @@ local PlutoTrailBarycentric = {
Tag = { "planetTrail_solarSystem", "planetTrail_dwarf" },
GUI = {
Name = "Pluto Barycentric Trail",
- Path = "/Solar System/Dwarf Planets/Pluto"
+ Path = "/Solar System/Dwarf Planets/Pluto",
+ Description = [[Orbit of Pluto around it's Barycenter.]]
}
}
@@ -34,5 +35,6 @@ asset.meta = {
NASA Spice (see base spice asset)]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
- License = "MIT license"
+ License = "MIT license",
+ Identifiers = {"PlutoBarycentricTrail"}
}
diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail_kepler.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail_kepler.asset
new file mode 100644
index 0000000000..95cc754503
--- /dev/null
+++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail_kepler.asset
@@ -0,0 +1,62 @@
+local assetHelper = asset.require('util/asset_helper')
+local transforms = asset.require('scene/solarsystem/sun/transforms')
+asset.require("spice/base")
+local kernels = asset.require('./kernels').PlutoKernels
+local OneAU = 1.496e+8
+local PlutoKeplerianTrail = {
+ Identifier = "PlutoKeplerianTrail",
+ Parent = transforms.SunECLIPJ2000.Identifier,
+ Renderable = {
+ Type = "RenderableTrailOrbit",
+ Translation = {
+ Type = "KeplerTranslation",
+ Eccentricity = 2.543033082909471E-01,
+ SemiMajorAxis = 3.974407237841206E+01 * OneAU,
+ Inclination = 1.736609481151430E+01,
+ AscendingNode = 1.102099981996057E+02,
+ ArgumentOfPeriapsis = 1.142248569189779E+02,
+ MeanAnomaly = 14.53,
+ Epoch = '2000 01 01 00:00',
+ Period = 7.82438e+9
+ },
+ Color = { 0.2, 0.8, 0.3 },
+ Period = 90487.27692706819,
+ Resolution = 1000,
+ Enabled = false
+ },
+ Tag = { "planetTrail_dwarf" },
+ GUI = {
+ Name = "Pluto Keplerian Trail",
+ Path = "/Solar System/Dwarf Planets/Pluto",
+ Description = "Keplerian trail of Pluto. Contains full orbit."
+ }
+}
+assetHelper.registerSceneGraphNodesAndExport(asset, { PlutoKeplerianTrail })
+
+
+asset.meta = {
+ Name = "Pluto Keplerian Trail",
+ Version = "1.0",
+ Description = [[ Full Keplerian trail of Pluto as observed by the Sun. Data from
+ JPL Horizons.]],
+ Author = "OpenSpace Team",
+ URL = "https://ssd.jpl.nasa.gov/sbdb.cgi?sstr=pluto",
+ License = "JPL/NASA",
+ Identifiers = {"PlutoKeplerianTrail"}
+}
+
+
+
+-- Double AscendingNode
+-- In range: ( 0.000000,360.000000 )
+-- This value determines the right ascension of the ascending node in degrees, that is the location of position along the orbit where the inclined plane and the horizonal reference plane intersect.
+-- Double ArgumentOfPeriapsis
+-- In range: ( 0.000000,360.000000 )
+-- This value determines the argument of periapsis in degrees, that is the position on the orbit that is closest to the orbiting body.
+-- Double MeanAnomaly
+-- In range: ( 0.000000,360.000000 )
+-- This value determines the mean anomaly at the epoch in degrees, which determines the initial location of the object along the orbit at epoch.
+-- EPOCH= 2457217.500000000 ! 2015-Jul-14 00:00 (TDB)
+-- EC= 2.543033082909471E-01 QR= 2.963702328762702E+01 IN= 1.736609481151430E+01
+-- OM= 1.102099981996057E+02 W = 1.142248569189779E+02 Tp= 2447885.610187903512
+-- A = 3.974407237841206E+01 AD= 4.985112146919710E+01 PR= 9.151809533192721E+04
diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/system.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/system.asset
index 0a99b94527..0df3c771b8 100644
--- a/data/assets/scene/solarsystem/dwarf_planets/pluto/system.asset
+++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/system.asset
@@ -1,6 +1,7 @@
asset.require('./trail')
asset.require('./pluto')
asset.require('./pluto_trail')
+asset.require('./pluto_trail_kepler')
asset.require('./charon/charon')
asset.require('./charon/charon_trail')
asset.require('./minor/hydra')
diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/trail.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/trail.asset
index 689500df90..129aeea4ea 100644
--- a/data/assets/scene/solarsystem/dwarf_planets/pluto/trail.asset
+++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/trail.asset
@@ -13,7 +13,7 @@ local PlutoBarycenterTrail = {
Translation = {
Type = "SpiceTranslation",
Target = "PLUTO BARYCENTER",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = kernels
},
Color = { 0.3, 0.7, 0.3 },
@@ -23,7 +23,9 @@ local PlutoBarycenterTrail = {
Tag = { "planetTrail_solarSystem", "planetTrail_dwarf" },
GUI = {
Name = "Pluto Barycenter Trail",
- Path = "/Solar System/Dwarf Planets/Pluto"
+ Path = "/Solar System/Dwarf Planets/Pluto",
+ Description = [[Precise trail of Pluto from NASA SPICE data. Not
+ containing full orbit.]]
}
}
@@ -33,7 +35,7 @@ assetHelper.registerSceneGraphNodesAndExport(asset, { PlutoBarycenterTrail })
asset.meta = {
Name = "Pluto Barycenter Trail",
Version = "1.0",
- Description = [[ Trail of Pluto as observed by the Sun. Data from
+ Description = [[ Trail of Pluto Barycenter as observed by the Sun. Data from
NASA Spice (see base spice asset)]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/transforms.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/transforms.asset
index e190435fd3..475a73286b 100644
--- a/data/assets/scene/solarsystem/dwarf_planets/pluto/transforms.asset
+++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/transforms.asset
@@ -12,7 +12,7 @@ local PlutoBarycenter = {
Translation = {
Type = "SpiceTranslation",
Target = "PLUTO BARYCENTER",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = kernels
}
},
diff --git a/data/assets/scene/solarsystem/heliosphere/bastille_day/fieldlines.asset b/data/assets/scene/solarsystem/heliosphere/bastille_day/fieldlines.asset
index 933d1c7241..9974559c6b 100644
--- a/data/assets/scene/solarsystem/heliosphere/bastille_day/fieldlines.asset
+++ b/data/assets/scene/solarsystem/heliosphere/bastille_day/fieldlines.asset
@@ -53,7 +53,7 @@ local fieldlines = {
Type = "StaticScale",
Scale = sunRadius
},
- Rotation = {
+ Rotation = {
--This is a rotation matrix to go from Carrington longitude referens frame to HEEQ180
--which is what the renderables paretn transforms.HNMReferenceFrame.Identifier is
--refering to. At the referens time, MAS_seq = 0, 2000-07-14T08:33:37.105 the Carrington
diff --git a/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane.asset b/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane.asset
index 222490c988..78ac66fd43 100644
--- a/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane.asset
+++ b/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane.asset
@@ -20,7 +20,7 @@ local Cutplane = {
Parent = transforms.HNMReferenceFrame.Identifier,
--Parent = transforms.SunIAU.Identifier,
Transform = {
- Rotation = {
+ --Rotation = {
--This is a rotation matrix to go from Carrington longitude referens frame to HEEQ180
--which is what the renderables paretn transforms.HNMReferenceFrame.Identifier is
--refering to. At the referens time, MAS_seq = 0, 2000-07-14T08:33:37.105 the Carrington
@@ -30,11 +30,11 @@ local Cutplane = {
--Since OpenSpace supports HEEQ180 and not HEEQ, 180 was added or subtracted
-- => a1 = -129.3 and a2 = 230.7
--Rotation matrix: (cos a, -sin a, 0)(sin a, cos a, 0)(0, 0, 1) leads to the result.
- Type = "FixedRotation",
+--[[ Type = "FixedRotation",
XAxis = {-0.63338087262755016203262119192353, -0.77384020972650618518999944537717, 0.0},
YAxis = {0.77384020972650618518999944537717, -0.63338087262755016203262119192353, 0.0},
ZAxis = {0.0, 0.0, 1.0}
- }
+ }--]]
},
Renderable = {
Type = "RenderablePlaneTimeVaryingImage",
diff --git a/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset b/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset
index 01e7a4183f..349ad80572 100644
--- a/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset
+++ b/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset
@@ -49,7 +49,7 @@ local Apollo15 = {
},
Renderable = {
Type = "RenderableModel",
- GeometryFile = models .. "/ApolloCSM.fbx",
+ GeometryFile = models .. "/ApolloCSM.osmodel",
LightSources = {
{
Type = "SceneGraphLightSource",
diff --git a/data/assets/scene/solarsystem/missions/apollo/8/launch_model.asset b/data/assets/scene/solarsystem/missions/apollo/8/launch_model.asset
index f1f8660e8e..19a8084f4e 100644
--- a/data/assets/scene/solarsystem/missions/apollo/8/launch_model.asset
+++ b/data/assets/scene/solarsystem/missions/apollo/8/launch_model.asset
@@ -50,7 +50,7 @@ local Apollo8LaunchModel = {
},
Renderable = {
Type = "RenderableModel",
- GeometryFile = models .. "/ApolloCSM.fbx",
+ GeometryFile = models .. "/ApolloCSM.osmodel",
LightSources = {
{
Type = "SceneGraphLightSource",
diff --git a/data/assets/scene/solarsystem/missions/apollo/8/model.asset b/data/assets/scene/solarsystem/missions/apollo/8/model.asset
index ee208139d8..4399deb973 100644
--- a/data/assets/scene/solarsystem/missions/apollo/8/model.asset
+++ b/data/assets/scene/solarsystem/missions/apollo/8/model.asset
@@ -62,7 +62,7 @@ local Apollo8Model = {
},
Renderable = {
Type = "RenderableModel",
- GeometryFile = models .. "/ApolloCSM.fbx",
+ GeometryFile = models .. "/ApolloCSM.osmodel",
LightSources = {
{
Type = "SceneGraphLightSource",
diff --git a/data/assets/scene/solarsystem/missions/apollo/csm_model.asset b/data/assets/scene/solarsystem/missions/apollo/csm_model.asset
index 048332b7d7..fb8c6b2165 100644
--- a/data/assets/scene/solarsystem/missions/apollo/csm_model.asset
+++ b/data/assets/scene/solarsystem/missions/apollo/csm_model.asset
@@ -2,7 +2,7 @@ local models = asset.syncedResource({
Name = "Apollo Models",
Type = "HttpSynchronization",
Identifier = "apollo_models",
- Version = 2
+ Version = 3
})
asset.export('models', models)
diff --git a/data/assets/scene/solarsystem/missions/dawn/ceres.asset b/data/assets/scene/solarsystem/missions/dawn/ceres.asset
index 900df2e071..3b5bcc41f9 100644
--- a/data/assets/scene/solarsystem/missions/dawn/ceres.asset
+++ b/data/assets/scene/solarsystem/missions/dawn/ceres.asset
@@ -28,7 +28,7 @@ local Ceres = {
Translation = {
Type = "SpiceTranslation",
Target = "CERES",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = {
kernels .. "/dawn_ceres_v01.tpc",
kernels .. "/sb_ceres_140724.bsp",
@@ -65,7 +65,7 @@ local CeresTrail = {
Translation = {
Type = "SpiceTranslation",
Target = "CERES",
- Observer = "SUN"
+ Observer = "SSB"
},
Color = { 0.7, 0.8, 0.7 },
StartTime = "2010 JAN 01 00:00:00.000",
diff --git a/data/assets/scene/solarsystem/missions/dawn/dawn.asset b/data/assets/scene/solarsystem/missions/dawn/dawn.asset
index 96d8464328..5887fb10d0 100644
--- a/data/assets/scene/solarsystem/missions/dawn/dawn.asset
+++ b/data/assets/scene/solarsystem/missions/dawn/dawn.asset
@@ -637,7 +637,7 @@ local Dawn = {
Translation = {
Type = "SpiceTranslation",
Target = "DAWN",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = KernelFiles
},
Rotation = {
@@ -722,7 +722,7 @@ local DawnTrail = {
Translation = {
Type = "SpiceTranslation",
Target = "DAWN",
- Observer = "SUN"
+ Observer = "SSB"
},
Color = { 1.0, 0.8, 0.4 },
ShowFullTrail = false,
diff --git a/data/assets/scene/solarsystem/missions/dawn/vesta.asset b/data/assets/scene/solarsystem/missions/dawn/vesta.asset
index 99f3b082ff..247e009502 100644
--- a/data/assets/scene/solarsystem/missions/dawn/vesta.asset
+++ b/data/assets/scene/solarsystem/missions/dawn/vesta.asset
@@ -31,7 +31,7 @@ local Vesta = {
Translation = {
Type = "SpiceTranslation",
Target = "VESTA",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = {
--kernels .. "/dawn_vesta_v06.tpc",
kernels .. "/sb_vesta_071107.bsp"
@@ -118,7 +118,7 @@ local VestaTrail = {
Translation = {
Type = "SpiceTranslation",
Target = "VESTA",
- Observer = "SUN"
+ Observer = "SSB"
},
Color = { 0.7, 0.8, 0.7 },
StartTime = "2007 JUL 20 12:00:00",
diff --git a/data/assets/scene/solarsystem/missions/insight/edl.asset b/data/assets/scene/solarsystem/missions/insight/edl.asset
index 6a2b046a66..8231084142 100644
--- a/data/assets/scene/solarsystem/missions/insight/edl.asset
+++ b/data/assets/scene/solarsystem/missions/insight/edl.asset
@@ -60,33 +60,118 @@ local legDeployTime = "2018 NOV 26 19:43:06.68" -- entry + 243s
local landerSeperationTime = "2018 NOV 26 19:44:51.68" -- entry + 348s
local touchdownTime = "2018 NOV 26 19:45:32.68" -- entry + 389s
local panelDeployTime = "2018 NOV 26 19:45:33.68" -- entry + 390s
-local foreverTime = "2018 NOV 26 20:17:50.68" -- entry + 2327s
local kernelTouchdownTime = "2018 NOV 26 19:45:32.3"
local spiceRotationEndTime = "2018 NOV 26 19:51:39"
-local InsightParent = {
- Identifier = "InsightParent",
- Parent = "MarsBarycenter",
- Transform = {
- Translation = {
+local TranslationKeyframes = {
+ ['1850 JAN 01 00:00:00'] = {
Type = "SpiceTranslation",
Target = "INSIGHT",
Observer = "MARS",
- Frame = "GALACTIC",
- Kernels = iKernels
+ Frame = "IAU_MARS",
+ Kernels = iKernels,
+ FixedDate = '2018 NOV 26 19:39:03'
+ },
+ ['2018 NOV 26 19:39:02'] = {
+ Type = "SpiceTranslation",
+ Target = "INSIGHT",
+ Observer = "MARS",
+ Frame = "IAU_MARS",
+ Kernels = iKernels,
+ FixedDate = '2018 NOV 26 19:39:03'
+ },
+ ['2018 NOV 26 19:39:03'] = {
+ Type = "SpiceTranslation",
+ Target = "INSIGHT",
+ Observer = "MARS",
+ Frame = "IAU_MARS",
+ Kernels = iKernels
+ },
+ ['2018 NOV 26 19:39:04'] = {
+ Type = "SpiceTranslation",
+ Target = "INSIGHT",
+ Observer = "MARS",
+ Frame = "IAU_MARS",
+ Kernels = iKernels
+ },
+ ['2018 NOV 26 19:45:34'] = {
+ Type = "SpiceTranslation",
+ Target = "INSIGHT",
+ Observer = "MARS",
+ Frame = "IAU_MARS",
+ Kernels = iKernels
+ },
+ ['2018 NOV 26 19:45:35'] = {
+ Type = "SpiceTranslation",
+ Target = "INSIGHT",
+ Observer = "MARS",
+ Frame = "IAU_MARS",
+ Kernels = iKernels,
+ FixedDate = '2018 NOV 26 19:45:34'
+ },
+}
+
+local RotationKeyframes = {
+ ['1850 JAN 01 00:00:00'] = {
+ Type = "SpiceRotation",
+ SourceFrame = "INSIGHT_LANDER_CRUISE",
+ DestinationFrame = "IAU_MARS",
+ FixedDate = '2018 NOV 26 19:39:02',
+ Kernels = iKernels
+ },
+ ['2018 NOV 26 19:39:02'] = {
+ Type = "SpiceRotation",
+ SourceFrame = "INSIGHT_LANDER_CRUISE",
+ DestinationFrame = "IAU_MARS",
+ FixedDate = '2018 NOV 26 19:39:02',
+ Kernels = iKernels
+ },
+ ['2018 NOV 26 19:39:03'] = {
+ Type = "SpiceRotation",
+ SourceFrame = "INSIGHT_LANDER_CRUISE",
+ DestinationFrame = "IAU_MARS",
+ Kernels = iKernels
+ },
+ ['2018 NOV 26 19:39:04'] = {
+ Type = "SpiceRotation",
+ SourceFrame = "INSIGHT_LANDER_CRUISE",
+ DestinationFrame = "IAU_MARS",
+ Kernels = iKernels
+ },
+ ['2018 NOV 26 19:45:34'] = {
+ Type = "SpiceRotation",
+ SourceFrame = "INSIGHT_LANDER_CRUISE",
+ DestinationFrame = "IAU_MARS",
+ Kernels = iKernels
+ },
+ ['2018 NOV 26 19:45:35'] = {
+ Type = "SpiceRotation",
+ SourceFrame = "INSIGHT_LANDER_CRUISE",
+ DestinationFrame = "IAU_MARS",
+ FixedDate = '2018 NOV 26 19:45:34'
+ },
+}
+
+
+local InsightParent = {
+ Identifier = "InsightParent",
+ Parent = "Mars",
+ Transform = {
+ Translation ={
+ Type = "TimelineTranslation",
+ Keyframes = TranslationKeyframes,
},
Rotation = {
- Type = "SpiceRotation",
- SourceFrame = "INSIGHT_LANDER_CRUISE",
- DestinationFrame = "GALACTIC"
+ Type = "TimelineRotation",
+ Keyframes = RotationKeyframes,
}
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = spiceRotationEndTime
- },
+ -- TimeFrame = {
+ -- Type = "TimeFrameInterval",
+ -- Start = entryTimeStart,
+ -- End = spiceRotationEndTime
+ -- },
GUI = {
Hidden = true,
Name = "InsightParent",
@@ -121,7 +206,6 @@ local Insight_Entry_CapsuleA = {
},
TimeFrame = {
Type = "TimeFrameInterval",
- Start = entryTimeStart,
End = landerSeperationTime
},
GUI = {
@@ -142,7 +226,6 @@ local Insight_Entry_Capsule_Ring = {
},
TimeFrame = {
Type = "TimeFrameInterval",
- Start = entryTimeStart,
End = landerSeperationTime
},
GUI = {
@@ -163,7 +246,6 @@ local Insight_Entry_Capsule_Plugs = {
},
TimeFrame = {
Type = "TimeFrameInterval",
- Start = entryTimeStart,
End = landerSeperationTime
},
GUI = {
@@ -184,7 +266,6 @@ local Insight_Entry_Heatshield = {
},
TimeFrame = {
Type = "TimeFrameInterval",
- Start = entryTimeStart,
End = heatShieldSeperationTime
},
GUI = {
@@ -329,11 +410,6 @@ local Insight_Lander_A001 = {
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight Lander A001",
@@ -350,11 +426,6 @@ local Insight_Lander_A002 = {
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight Lander A002",
@@ -371,11 +442,6 @@ local Insight_Lander_A003 = {
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight Lander A003",
@@ -392,11 +458,6 @@ local Insight_Lander_A004 = {
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight Lander A004",
@@ -413,11 +474,6 @@ local Insight_Lander_A005 = {
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight Lander A005",
@@ -434,11 +490,6 @@ local Insight_Lander_A006 = {
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight Lander A006",
@@ -455,11 +506,6 @@ local Insight_Lander_A007 = {
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight Lander A007",
@@ -476,11 +522,6 @@ local Insight_Lander_A008 = {
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight Lander A008",
@@ -497,11 +538,6 @@ local Insight_Lander_foil1 = {
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight Lander foil",
@@ -518,11 +554,6 @@ local Insight_Lander_Tex01 = {
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight Lander Tex01",
@@ -539,11 +570,6 @@ local Insight_Lander_Tex02 = {
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight Lander Tex02",
@@ -605,7 +631,6 @@ local Insight_Legs_Deployed_tex = {
TimeFrame = {
Type = "TimeFrameInterval",
Start = legDeployTime,
- End = foreverTime
},
GUI = {
Hidden = true,
@@ -626,7 +651,6 @@ local Insight_Legs_Deployed_AO06 = {
TimeFrame = {
Type = "TimeFrameInterval",
Start = legDeployTime,
- End = foreverTime
},
GUI = {
Hidden = true,
@@ -644,11 +668,6 @@ local Insight_Panels_Stowed_tex = {
ModelTransform = RotationMatrix,
LightSources = LightSources
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight panels_stow_tex",
@@ -665,11 +684,6 @@ local Insight_Panels_Stowed_tex2 = {
ModelTransform = RotationMatrix,
LightSources = LightSources
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight panels_stow_tex2",
@@ -686,11 +700,6 @@ local Insight_Panels_Stowed_AO01 = {
ModelTransform = RotationMatrix,
LightSources = LightSources
},
- TimeFrame = {
- Type = "TimeFrameInterval",
- Start = entryTimeStart,
- End = foreverTime
- },
GUI = {
Hidden = true,
Name = "Insight panels_stow_AO",
@@ -710,7 +719,6 @@ local Insight_Panels_Deployed_tex = {
TimeFrame = {
Type = "TimeFrameInterval",
Start = panelDeployTime,
- End = foreverTime
},
GUI = {
Hidden = true,
@@ -731,7 +739,6 @@ local Insight_Panels_Deployed_tex2 = {
TimeFrame = {
Type = "TimeFrameInterval",
Start = panelDeployTime,
- End = foreverTime
},
GUI = {
Hidden = true,
@@ -752,7 +759,6 @@ local Insight_Panels_Deployed_AO06 = {
TimeFrame = {
Type = "TimeFrameInterval",
Start = panelDeployTime,
- End = foreverTime
},
GUI = {
Hidden = true,
diff --git a/data/assets/scene/solarsystem/missions/jwst/HUDFImage.asset b/data/assets/scene/solarsystem/missions/jwst/HUDFImage.asset
new file mode 100644
index 0000000000..7f45814a94
--- /dev/null
+++ b/data/assets/scene/solarsystem/missions/jwst/HUDFImage.asset
@@ -0,0 +1,77 @@
+local assetHelper = asset.require('util/asset_helper')
+local transforms = asset.require('scene/solarsystem/planets/earth/transforms')
+local jwstTransforms = asset.require('scene/solarsystem/missions/jwst/jwst')
+local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
+
+local image = asset.syncedResource({
+ Name = "HUDF image",
+ Type = "HttpSynchronization",
+ Identifier = "hudf_image",
+ Version = 1
+})
+
+local DISTANCE = 9.2E15;
+
+-- ra = 3h32m38.92s
+-- dec = -27d47m29.37s
+-- distance = 9.2E15 m (set to size of view sphere)
+local HUDFPosition = {
+ Identifier = "HUDFPosition",
+ Parent = transforms.EarthInertial.Identifier,
+ Transform = {
+ Translation = {
+ Type = "StaticTranslation",
+ Position = {
+ 0.53039024 * DISTANCE,
+ 0.70802069 * DISTANCE,
+ -0.46625412 * DISTANCE
+ }
+ }
+ },
+ GUI = {
+ Name = "Hubble Ultra Deep field",
+ Path = "/Solar System/Missions/JWST",
+ Hidden = true
+ }
+}
+
+local HUDFImage = {
+ Identifier = "HUDFImage",
+ Enabled = false,
+ Type = "ScreenSpaceImageLocal",
+ Name = "Hubble Ultra Deep field",
+ UseRadiusAzimuthElevation = true,
+ FaceCamera = false,
+ RadiusAzimuthElevation = { 200.0, 0.5, 0.15 },
+ UsePerspectiveProjection = false,
+ Opacity = 1.0,
+ TexturePath = image .. "/Hubble_ultra_deep_field.jpg",
+ Tag = { "mission_jwst_hudf" },
+}
+
+local HUDFJWSTLine = {
+ Identifier = "HUDFJWSTLine",
+ Parent = sunTransforms.SolarSystemBarycenter.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderableNodeLine",
+ StartNode = HUDFPosition.Identifier,
+ EndNode = jwstTransforms.JWSTPosition.Identifier,
+ Color = { 0.5, 0.5, 0.5 },
+ LineWidth = 2
+ },
+ Tag = { "mission_jwst_hudf" },
+ GUI = {
+ Name = "JWST to HUDF Line",
+ Path = "/Solar System/Missions/JWST",
+ }
+}
+
+assetHelper.registerSceneGraphNodesAndExport(asset, { HUDFPosition, HUDFImage, HUDFJWSTLine })
+
+asset.onInitialize(function()
+ openspace.addScreenSpaceRenderable(HUDFImage)
+end)
+asset.onDeinitialize(function()
+ openspace.removeScreenSpaceRenderable(HUDFImage.Identifier)
+end)
diff --git a/data/assets/scene/solarsystem/missions/jwst/jwst.asset b/data/assets/scene/solarsystem/missions/jwst/jwst.asset
new file mode 100644
index 0000000000..6909b74699
--- /dev/null
+++ b/data/assets/scene/solarsystem/missions/jwst/jwst.asset
@@ -0,0 +1,304 @@
+local assetHelper = asset.require('util/asset_helper')
+local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
+
+asset.require('spice/base')
+asset.require('scene/solarsystem/planets/earth/lagrange_points/lagrange_points')
+local transforms = asset.require('scene/solarsystem/planets/earth/lagrange_points/L2')
+
+local JWSTKernel = asset.syncedResource({
+ Name = "JWST Kernel",
+ Type = "HttpSynchronization",
+ Identifier = "jwst_kernels",
+ Version = 1
+})
+
+--[[local JWSTHorizons = asset.syncedResource({
+ Name = "JWST Horizons",
+ Type = "HttpSynchronization",
+ Identifier = "jwst_horizons",
+ Version = 1
+})]]--
+
+local model = asset.syncedResource({
+ Name = "JWST Model",
+ Type = "HttpSynchronization",
+ Identifier = "jwst_model",
+ Version = 1
+})
+
+local band = asset.syncedResource({
+ Name = "JWST band texture",
+ Type = "HttpSynchronization",
+ Identifier = "jwst_band_texture",
+ Version = 1
+})
+
+local JWSTPosition = {
+ Identifier = "JWSTPosition",
+ Parent = transforms.L2.Identifier,
+ Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "JWST",
+ Observer = "392", -- L2
+ Kernels = JWSTKernel .. "/jwst_horizons_20200101_20240101_v01.bsp"
+ },
+ },
+ GUI = {
+ Name = "JWST Position",
+ Path = "/Solar System/Missions/JWST",
+ Hidden = true,
+ }
+}
+
+local JWSTRotation = {
+ Identifier = "JWSTRotation",
+ Parent = JWSTPosition.Identifier,
+ Transform = {
+ Rotation = {
+ Type = "FixedRotation",
+ Attached = "JWSTRotation",
+ XAxis = { 1, 0, 0 },
+ XAxisOrthogonal = true,
+ YAxisInvert = true,
+ YAxis = sunTransforms.SolarSystemBarycenter.Identifier
+ }
+ },
+ GUI = {
+ Name = "JWST Rotation",
+ Path = "/Solar System/Missions/JWST",
+ Hidden = true,
+ }
+}
+
+local JWSTBand = {
+ Identifier = "JWSTBand",
+ Parent = JWSTPosition.Identifier,
+ Transform = {
+ Rotation = {
+ Type = "FixedRotation",
+ Attached = "JWSTBand",
+ XAxis = { 1, 0, 0 },
+ XAxisOrthogonal = true,
+ ZAxis = sunTransforms.SolarSystemBarycenter.Identifier
+ }
+ },
+ Renderable = {
+ Enabled = false,
+ Type = "RenderableSphere",
+ Texture = band .. "/JWST-band.png",
+ Size = 9.2E15,
+ Segments = 50,
+ DisableFadeInOut = true,
+ Orientation = "Inside",
+ Opacity = 0.05,
+ UseAdditiveBlending = true,
+ },
+ Tag = { "mission_jwst_fov" },
+ GUI = {
+ Name = "JWST Safe Viewing Band",
+ Path = "/Solar System/Missions/JWST"
+ }
+}
+
+local JWSTModel = {
+ Identifier = "JWSTModel",
+ Parent = JWSTRotation.Identifier,
+ TimeFrame = {
+ Type = "TimeFrameInterval",
+ Start = "2020 JAN 01",
+ End = "2024 JAN 01"
+ },
+ Renderable = {
+ Type = "RenderableModel",
+ GeometryFile = model .. "/JWSTFBX.osmodel",
+ ModelScale = "Foot",
+ InvertModelScale = true,
+ EnableAnimation = true,
+ --TODO: Update theese when the new animation is finished
+ AnimationStartTime = "2018 10 01 15:00:00",
+ AnimationMode = "Once",
+ LightSources = {
+ {
+ Type = "SceneGraphLightSource",
+ Identifier = "Sun",
+ Node = sunTransforms.SolarSystemBarycenter.Identifier,
+ Intensity = 1.0
+ }
+ },
+ PerformShading = true,
+ DisableFaceCulling = true
+ },
+ GUI = {
+ Name = "James Webb Space Telescope",
+ Path = "/Solar System/Missions/JWST",
+ }
+}
+
+local JWSTTrail = {
+ Identifier = "JWSTTrail",
+ Parent = transforms.L2.Identifier,
+ Renderable = {
+ Type = "RenderableTrailOrbit",
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "JWST",
+ Observer = "392", -- L2
+ Kernels = JWSTKernel .. "/jwst_horizons_20200101_20240101_v01.bsp"
+ },
+ Color = { 0.9, 0.9, 0.0 },
+ Period = 91.3105,
+ Resolution = 100
+ },
+ GUI = {
+ Name = "JWST Trail",
+ Path = "/Solar System/Missions/JWST"
+ }
+}
+
+local JWSTSunTrail = {
+ Identifier = "JWSTSunTrail",
+ Parent = sunTransforms.SolarSystemBarycenter.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderableTrailOrbit",
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "JWST",
+ Observer = "SSB",
+ Kernels = JWSTKernel .. "/jwst_horizons_20200101_20240101_v01.bsp"
+ },
+ Color = { 0.0, 0.9, 0.9 },
+ Period = 365.242,
+ Resolution = 1000
+ },
+ GUI = {
+ Name = "JWST Sun Trail",
+ Path = "/Solar System/Missions/JWST"
+ }
+}
+
+local JWSTFov = {
+ Identifier = "JWSTFov",
+ Parent = JWSTModel.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderablePrism",
+ Segments = 6,
+ Lines = 3,
+ Radius = 3.25,
+ LineWidth = 1.0,
+ Color = { 1.0, 1.0, 1.0 },
+ Length = 9.2E15
+ },
+ Transform = {
+ Rotation = {
+ Type = "StaticRotation",
+ Rotation = { 0, 0, math.rad(30) }
+ },
+ },
+ Tag = { "mission_jwst_fov" },
+ GUI = {
+ Name = "JWST Field of View",
+ Path = "/Solar System/Missions/JWST",
+ }
+}
+
+-- Launch, coming soon
+--[[local JWSTLaunchPosition = {
+ Identifier = "JWSTLaunchPosition",
+ Parent = transforms.L2.Identifier,
+ Transform = {
+ Translation = {
+ Type = "HorizonsTranslation",
+ HorizonsTextFile = JWSTHorizons .. "/horizons_jwst_launch.dat",
+ },
+ },
+ GUI = {
+ Name = "JWST Launch Position",
+ Path = "/Solar System/Missions/JWST",
+ Hidden = true,
+ }
+}
+
+local JWSTLaunchModel = {
+ Identifier = "JWSTLaunchModel",
+ Parent = JWSTLaunchPosition.Identifier,
+ TimeFrame = {
+ Type = "TimeFrameInterval",
+ Start = "2018 OCT 01 13:18:00",
+ End = "2019 OCT 01"
+ },
+ Transform = {
+ Rotation = {
+ Type = "FixedRotation",
+ Attached = "JWSTRotation",
+ XAxis = { 1, 0, 0 },
+ XAxisOrthogonal = true,
+ YAxisInvert = true,
+ YAxis = sunTransforms.SolarSystemBarycenter.Identifier
+ }
+ },
+ Renderable = {
+ Type = "RenderableModel",
+ GeometryFile = model .. "/JWSTFBX.osmodel",
+ ModelScale = "Foot",
+ InvertModelScale = true,
+ EnableAnimation = true,
+ --TODO: Update theese when the new animation is finished
+ AnimationStartTime = "2018 10 01 15:00:00",
+ AnimationMode = "Once",
+ LightSources = {
+ {
+ Type = "SceneGraphLightSource",
+ Identifier = "Sun",
+ Node = sunTransforms.SolarSystemBarycenter.Identifier,
+ Intensity = 1.0
+ }
+ },
+ PerformShading = true,
+ DisableFaceCulling = true
+ },
+ GUI = {
+ Name = "JWST Launch Model",
+ Path = "/Solar System/Missions/JWST",
+ }
+}
+
+local JWSTLaunchTrail = {
+ Identifier = "JWSTLaunchTrail",
+ Parent = transforms.L2.Identifier,
+ TimeFrame = {
+ Type = "TimeFrameInterval",
+ Start = "2018 OCT 01 13:18:00",
+ End = "2019 OCT 01"
+ },
+ Renderable = {
+ Type = "RenderableTrailTrajectory",
+ Translation = {
+ Type = "HorizonsTranslation",
+ HorizonsTextFile = JWSTHorizons .. "/horizons_jwst_launch.dat",
+ },
+ Color = { 0.9, 0.9, 0.0 },
+ StartTime = "2018 OCT 01 13:18:00",
+ EndTime = "2019 OCT 01",
+ SampleInterval = 600
+ },
+ GUI = {
+ Name = "JWST Launch Trail",
+ Path = "/Solar System/Missions/JWST"
+ }
+}]]--
+
+assetHelper.registerSceneGraphNodesAndExport(asset, {
+ JWSTTrail,
+ JWSTSunTrail,
+ --JWSTLaunchTrail,
+ JWSTPosition,
+ --JWSTLaunchPosition,
+ JWSTRotation,
+ JWSTBand,
+ JWSTModel,
+ --JWSTLaunchModel,
+ JWSTFov
+})
diff --git a/data/assets/scene/solarsystem/missions/messenger/messengerSC.asset b/data/assets/scene/solarsystem/missions/messenger/messengerSC.asset
index 7b46f16645..b5cadee6e1 100644
--- a/data/assets/scene/solarsystem/missions/messenger/messengerSC.asset
+++ b/data/assets/scene/solarsystem/missions/messenger/messengerSC.asset
@@ -67,7 +67,7 @@ local Messenger = {
Translation = {
Type = "SpiceTranslation",
Target = "MESSENGER",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = LocalKernels
},
Rotation = {
diff --git a/data/assets/scene/solarsystem/missions/newhorizons/model.asset b/data/assets/scene/solarsystem/missions/newhorizons/model.asset
index fcd476e2d8..255319f9f0 100644
--- a/data/assets/scene/solarsystem/missions/newhorizons/model.asset
+++ b/data/assets/scene/solarsystem/missions/newhorizons/model.asset
@@ -16,7 +16,7 @@ local NewHorizons = {
Type = "RenderableModel",
Body = "NEW HORIZONS",
GeometryFile = models .. "/NewHorizonsCleanModel.obj",
- AmbientIntensity = 0.0,
+ AmbientIntensity = 0.2,
DiffuseIntensity = 1.0,
SpecularIntensity = 1.0,
LightSources = {
@@ -25,11 +25,6 @@ local NewHorizons = {
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
- },
- {
- Identifier = "Camera",
- Type = "CameraLightSource",
- Intensity = 0.5
}
}
},
diff --git a/data/assets/scene/solarsystem/missions/newhorizons/transforms.asset b/data/assets/scene/solarsystem/missions/newhorizons/transforms.asset
index 5238428c17..ff3965ba14 100644
--- a/data/assets/scene/solarsystem/missions/newhorizons/transforms.asset
+++ b/data/assets/scene/solarsystem/missions/newhorizons/transforms.asset
@@ -14,7 +14,7 @@ local PlutoBarycenterAccurate = {
Translation = {
Type = "SpiceTranslation",
Target = "PLUTO BARYCENTER",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = kernels.PlutoKernels
}
},
diff --git a/data/assets/scene/solarsystem/missions/osirisrex/bennu.asset b/data/assets/scene/solarsystem/missions/osirisrex/bennu.asset
index ea0377a3a9..5ebbea22e2 100644
--- a/data/assets/scene/solarsystem/missions/osirisrex/bennu.asset
+++ b/data/assets/scene/solarsystem/missions/osirisrex/bennu.asset
@@ -1,16 +1,18 @@
local assetHelper = asset.require('util/asset_helper')
local transforms = asset.require('./transforms')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
-
-local models = asset.syncedResource({
- Name = "Bennu Models",
- Type = "HttpSynchronization",
- Identifier = "bennu_models",
- Version = 1
-})
+local models = asset.require('./models').models
local BENNU_BODY = "2101955"
+local LightSources = {
+ {
+ Type = "SceneGraphLightSource",
+ Identifier = "Sun",
+ Node = sunTransforms.SolarSystemBarycenter.Identifier,
+ Intensity = 1.0
+ },
+}
local Bennu = {
Identifier = "Bennu",
@@ -20,81 +22,19 @@ local Bennu = {
Type = "SpiceRotation",
SourceFrame = "IAU_BENNU",
DestinationFrame = "GALACTIC"
- }
- },
- Renderable = {
- Type = "RenderableModelProjection",
- Body = BENNU_BODY,
- GeometryFile = models .. "/BennuUntextured.obj",
- Projection = {
- Sequence = asset.localResource('InstrumentTimes'),
- SequenceType = "instrument-times",
- Observer = "OSIRIS-REX",
- Target = BENNU_BODY,
- Aberration = "NONE",
- AspectRatio = 2,
-
- DataInputTranslation = {
- Instruments = {
- ORX_OCAMS_POLYCAM = {
- DetectorType = "Camera",
- Spice = { "ORX_OCAMS_POLYCAM" },
- Files = {
- "BaseballDiamond_PolyCam.txt",
- --"OrbitalB_Site08_PolyCamImages.txt",
- "Recon_225m_Equatorial_PolyCam.txt"
- }
- },
- ORX_REXIS = {
- DetectorType = "Camera",
- Spice = { "ORX_REXIS" },
- Files = {
- "DetailedSurvey_EquatorialStations_Spectrometers.txt",
- "Recon_225m_Equatorial_spectrometers.txt",
- "Recon_525m_Equatorial_spectrometers.txt"
- }
- }
- },
- Target = {
- Body = BENNU_BODY
- },
- },
-
- Instrument = { -- INVALID DATA - JUST FOR TESTING
- Name = "ORX_OCAMS_POLYCAM",
- Method = "ELLIPSOID",
- Aberration = "NONE",
- Fovy = 0.792,
- Aspect = 1,
- Near = 0.01,
- Far = 1000000
- }
- }
- },
- GUI = {
- Path = "/Solar System/Asteroid"
- }
-}
-
-local BennuTrail = {
- Identifier = "BennuTrail",
- Parent = sunTransforms.SolarSystemBarycenter.Identifier,
- Renderable = {
- Type = "RenderableTrailTrajectory",
- Translation = {
- Type = "SpiceTranslation",
- Target = BENNU_BODY,
- Observer = "SUN"
},
- Color = { 0.4, 0.0, 0.7 },
- StartTime = "2015 JAN 01 00:00:00.000",
- EndTime = "2023 MAY 31 00:00:00.000",
- SampleInterval = 3600
+ },
+ Renderable = {
+ Enabled = false,
+ Type = "RenderableModel",
+ Body = BENNU_BODY,
+ GeometryFile = models .. "/Bennu_v20_200k_an.obj",
+ LightSources = LightSources,
+ SpecularIntensity = 0.0
},
GUI = {
- Name = "Bennu Trail",
Path = "/Solar System/Asteroid"
}
}
-assetHelper.registerSceneGraphNodesAndExport(asset, { Bennu, BennuTrail })
+assetHelper.registerSceneGraphNodesAndExport(asset, {Bennu})
diff --git a/data/assets/scene/solarsystem/missions/osirisrex/bennu_projection.asset b/data/assets/scene/solarsystem/missions/osirisrex/bennu_projection.asset
new file mode 100644
index 0000000000..afcfb529a7
--- /dev/null
+++ b/data/assets/scene/solarsystem/missions/osirisrex/bennu_projection.asset
@@ -0,0 +1,104 @@
+local assetHelper = asset.require('util/asset_helper')
+local transforms = asset.require('./transforms')
+local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
+
+local models = asset.require('./models').models
+
+local BENNU_BODY = "2101955"
+
+local images = asset.syncedResource({
+ Name = "Bennu Images Approach",
+ Type = "HttpSynchronization",
+ Identifier = "osirisrex_bennu_images_approach",
+ Version = 1
+})
+
+local imagesA = asset.syncedResource({
+ Name = "Bennu Images A",
+ Type = "HttpSynchronization",
+ Identifier = "osirisrex_bennu_images_orbit_a",
+ Version = 1
+})
+
+local BennuProjection = {
+ Identifier = "BennuProjection",
+ Parent = transforms.BennuBarycenter.Identifier,
+ Transform = {
+ Rotation = {
+ Type = "SpiceRotation",
+ SourceFrame = "IAU_BENNU",
+ DestinationFrame = "GALACTIC"
+ },
+ },
+ Renderable = {
+ Enabled = true,
+ Type = "RenderableModelProjection",
+ Body = BENNU_BODY,
+ GeometryFile = models .. "/BennuTextured.obj",
+ Projection = {
+ Sequence = { images, imagesA },
+ SequenceType = "image-sequence",
+ Observer = "OSIRIS-REX",
+ Target = BENNU_BODY,
+ Aberration = "NONE",
+ TextureMap = true,
+ DataInputTranslation = {
+ Instruments = {
+ ORX_OCAMS_POLYCAM = {
+ DetectorType = "Camera",
+ Spice = { "ORX_OCAMS_POLYCAM" },
+ },
+ },
+ Target = {
+ Read = {
+ "TARGET_NAME",
+ "INSTRUMENT_HOST_NAME",
+ "INSTRUMENT_ID",
+ "START_TIME",
+ "STOP_TIME"
+ },
+ Convert = {
+ ["2101955"] = { "2101955" },
+ ["OSIRIS-REX"] = { "OSIRIS-REX" },
+ ["ORX_OCAMS_POLYCAM"] = { "ORX_OCAMS_POLYCAM" },
+ }
+ }
+ },
+ Instrument = { -- INVALID DATA - JUST FOR TESTING
+ Name = "ORX_OCAMS_POLYCAM",
+ Method = "ELLIPSOID",
+ Aberration = "NONE",
+ Fovy = 0.792,
+ Aspect = 1,
+ Near = 0.01,
+ Far = 1000000
+ }
+ }
+ },
+ GUI = {
+ Path = "/Solar System/Asteroid"
+ }
+}
+
+local BennuTrail = {
+ Identifier = "BennuTrail",
+ Parent = sunTransforms.SolarSystemBarycenter.Identifier,
+ Renderable = {
+ Type = "RenderableTrailTrajectory",
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = BENNU_BODY,
+ Observer = "SSB"
+ },
+ Color = { 0.4, 0.0, 0.7 },
+ StartTime = "2015 JAN 01 00:00:00.000",
+ EndTime = "2023 MAY 31 00:00:00.000",
+ SampleInterval = 3600
+ },
+ GUI = {
+ Name = "Bennu Trail",
+ Path = "/Solar System/Asteroid"
+ }
+}
+
+assetHelper.registerSceneGraphNodesAndExport(asset, { BennuProjection, BennuTrail })
diff --git a/data/assets/scene/solarsystem/missions/osirisrex/imageplane.asset b/data/assets/scene/solarsystem/missions/osirisrex/imageplane.asset
new file mode 100644
index 0000000000..bb4f1ffca2
--- /dev/null
+++ b/data/assets/scene/solarsystem/missions/osirisrex/imageplane.asset
@@ -0,0 +1,43 @@
+local assetHelper = asset.require('util/asset_helper')
+local transforms = asset.require('./transforms')
+
+local textures = asset.syncedResource({
+ Name = "Bennu Textures",
+ Type = "HttpSynchronization",
+ Identifier = "bennu_textures",
+ Version = 1
+})
+
+local BENNU_BODY = "2101955"
+
+local ImagePlane = {
+ Identifier = "ImagePlaneBennu",
+ Parent = transforms.BennuBarycenter.Identifier,
+ Transform = {
+ -- Translation = {
+ -- Type = "StaticTranslation",
+ -- Position = { -0.2476, 0.2710, 0.3364 }
+ -- },
+ -- Rotation = {
+ -- Type = "SpiceRotation",
+ -- SourceFrame = "ORX_OCAMS_POLYCAM",
+ -- DestinationFrame = "ORX_SPACECRAFT"
+ -- }
+ },
+ Renderable = {
+ Type = "RenderablePlaneProjection",
+ Frame = "IAU_BENNU",
+ DefaultTarget = BENNU_BODY,
+ Spacecraft = "OSIRIS-REX",
+ Instrument = "ORX_OCAMS_POLYCAM",
+ Moving = false,
+ Texture = textures .. "/defaultProj.png"
+ },
+ GUI = {
+ Name = "OsirisREx Image Plane",
+ Path = "/Solar System/Missions/OSIRIS REx"
+ }
+}
+
+
+assetHelper.registerSceneGraphNodesAndExport(asset, { ImagePlane })
diff --git a/data/assets/scene/solarsystem/missions/osirisrex/kernels.asset b/data/assets/scene/solarsystem/missions/osirisrex/kernels.asset
new file mode 100644
index 0000000000..85e56d5fa1
--- /dev/null
+++ b/data/assets/scene/solarsystem/missions/osirisrex/kernels.asset
@@ -0,0 +1,91 @@
+local kernels = asset.syncedResource({
+ Name = "Osiris Rex Kernels",
+ Type = "HttpSynchronization",
+ Identifier = "osirisrex_kernels",
+ Version = 2
+})
+
+local OsirisRexKernels = {
+ kernels .. "/orx_v14.tf",
+ kernels .. "/orx_ocams_v07.ti",
+ kernels .. "/orx_rexis_v01.ti",
+ kernels .. "/ORX_SCLKSCET.00061.tsc",
+ kernels .. "/bennu_v17.tpc",
+ kernels .. "/orx_struct_v04.bsp",
+ kernels .. "/orx_sa_red_200106_v02.bc",
+ kernels .. "/orx_sa_red_200107_v02.bc",
+ kernels .. "/orx_sa_red_200108_v02.bc",
+ kernels .. "/orx_sa_red_200109_v02.bc",
+ kernels .. "/orx_sa_red_200110_v02.bc",
+ kernels .. "/orx_sa_rel_200106_200112_v01.bc",
+ kernels .. "/orx_sc_rel_160909_160911_v01.bc",
+ kernels .. "/orx_sc_rel_160912_160918_v01.bc",
+ kernels .. "/orx_sc_rel_160919_160925_v01.bc",
+ kernels .. "/orx_sc_rel_160926_161002_v01.bc",
+ kernels .. "/orx_sc_rel_181029_181104_v02.bc",
+ kernels .. "/orx_sc_rel_190218_190224_v02.bc",
+ kernels .. "/orx_sc_rel_200106_200112_v01.bc",
+ kernels .. "/orx_sc_rel_201019_201025_v01.bc",
+ kernels .. "/orx_sc_rel_201012_201018_v01.bc",
+ kernels .. "/orx_sc_red_200106_v02.bc",
+ kernels .. "/orx_sc_red_200107_v02.bc",
+ kernels .. "/orx_sc_red_200108_v02.bc",
+ kernels .. "/orx_sc_red_200109_v02.bc",
+ kernels .. "/orx_sc_red_201020_v02.bc",
+ kernels .. "/orx_sc_red_201017_v03.bc",
+ kernels .. "/orx_sc_red_201018_v02.bc",
+ kernels .. "/orx_sc_red_201019_v02.bc",
+ kernels .. "/orx_r_160909_160910_v01.bc",
+ kernels .. "/orx_r_160910_160913_v01.bc",
+ kernels .. "/orx_r_160913_160915_v01.bc",
+ kernels .. "/orx_r_160915_160919_v01.bc",
+ kernels .. "/orx_r_160918_160922_v01.bc",
+ kernels .. "/orx_r_160919_160922_v01.bc",
+ kernels .. "/orx_r_200105_200107_v02.bc",
+ kernels .. "/orx_r_200106_200108_v02.bc",
+ kernels .. "/orx_r_200107_200109_v02.bc",
+ kernels .. "/orx_r_200107_200112_v01.bc",
+ kernels .. "/orx_r_200108_200110_v02.bc",
+ kernels .. "/orx_r_200109_200111_v02.bc",
+ kernels .. "/orx_r_201019_201021_v06.bc",
+ kernels .. "/orx_r_201018_201021_v02.bc",
+ kernels .. "/orx_r_201018_201020_v03.bc",
+ kernels .. "/orx_r_201017_201019_v03.bc",
+ kernels .. "/orx_p_160910_161005_xc001b_v01.bc",
+ kernels .. "/orx_p_200106_200113_2002_od205_v01.bc",
+ kernels .. "/orx_p_200106_200113_2002_od209_v01.bc",
+ kernels .. "/orx_p_200106_200113_2002_od210_v01.bc",
+ kernels .. "/orx_p_201019_201026_2043tag_od293_v03.bc",
+ kernels .. "/orx_p_201012_201019_2042_od291_v04.bc",
+ kernels .. "/orx_p_210411_210510_xq006_od297_v05.bc",
+ kernels .. "/orx_p_210509_210513_xr001_adm_final_mod_od311_v01.bc",
+ kernels .. "/orx_p_210509_210607_xr001_od298_v00.bc",
+ kernels .. "/orx_p_230824_231008_src_release_od298_v00.bc",
+ kernels .. "/OREX_20160904_M45_complete.bsp",
+ kernels .. "/OREX_20160908_M60_complete.bsp",
+ kernels .. "/orx_struct_polycam_v01.bc",
+ kernels .. "/de424.bsp",
+ kernels .. "/bennu_refdrmc_v1.bsp",
+ kernels .. "/orx_160908_231024_pgaa2_day06m60.bsp",
+ kernels .. "/orx_160908_231024_pgaa3_day06m60_v1.bsp",
+ kernels .. "/orx_160909_161228_160919_od005_tcm1_v2.bsp",
+ kernels .. "/orx_160909_161228_160930_od006_tcm1_v1.bsp",
+ kernels .. "/orx_160909_170101_160912_od004_v1.bsp",
+ kernels .. "/orx_160909_170101_161010_od008_v1.bsp",
+ kernels .. "/spk_orx_160908_231024_pgaa2_day06m60_v3.bsp",
+ kernels .. "/orx_160909_231024_refod009_v2.bsp",
+ kernels .. "/orx_171006_231024_171005_refod027_v1.bsp",
+ kernels .. "/orx_180301_200101_180711_od037-R-AM1-P-M17B_v2.bsp",
+ kernels .. "/orx_180801_181219_181128_od066-N-M0P-L-VC1_v1.bsp",
+ kernels .. "/orx_191101_200407_191202_od204-R-R1P1-P-R3R_v1.bsp",
+ kernels .. "/orx_201020_210524_210103_od297-N-PTO1-F_v1.bsp",
+ kernels .. "/orx_201020_210601_201109_od295-R_v1.bsp",
+ kernels .. "/orx_201020_201110_201021_od293-N_v1.bsp",
+ kernels .. "/orx_201005_201201_200615_od258-R-T1P1-P-T1R1_v1.bsp",
+ kernels .. "/orx_201005_201201_200615_od258-C-T1P1-P-T1R5_v2.bsp",
+ kernels .. "/orx_210115_210701_210426_od310-N-ADM-P_v1.bsp",
+ kernels .. "/orx_210408_210701_210503_od311-N-ADM-F_v1.bsp",
+ kernels .. "/orx_210509_231025_210119_od298-R-ADM1-P-DB1_v1.bsp"
+}
+
+asset.export('kernels', OsirisRexKernels)
diff --git a/data/assets/scene/solarsystem/missions/osirisrex/model.asset b/data/assets/scene/solarsystem/missions/osirisrex/model.asset
index 454d4462e3..aab64ada66 100644
--- a/data/assets/scene/solarsystem/missions/osirisrex/model.asset
+++ b/data/assets/scene/solarsystem/missions/osirisrex/model.asset
@@ -3,173 +3,17 @@ local transforms = asset.require('./transforms')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local earthTransforms = asset.require('scene/solarsystem/planets/earth/transforms')
-
-
-local kernels = asset.syncedResource({
- Name = "Osiris Rex Kernels",
- Type = "HttpSynchronization",
- Identifier = "osirisrex_kernels",
- Version = 1
-})
+local OsirisRexKernels = asset.require('./kernels').kernels
local models = asset.syncedResource({
Name = "Osiris Rex Models",
Type = "HttpSynchronization",
Identifier = "osirisrex_models",
- Version = 2
+ Version = 3
})
local BENNU_BODY = "2101955"
-KernelCase = 2 -- Right now we only have the image times for case 2
-
-local CaseDependentKernels
-if KernelCase == 2 then
- CaseDependentKernels = {
- kernels .. "/ORX_Recon_525mSortie_Case02.bsp",
- kernels .. "/Recon_525mSortie_Case02_0Latitude.bc",
- kernels .. "/Recon_525mSortie_Case02_atl_19145_04.atf",
-
- kernels .. "/ORX_Recon_225mSortie_Case02.bsp",
- kernels .. "/Recon_225mSortie_Case02_0Latitude.bc"
- }
-elseif KernelCase == 5 then
- CaseDependentKernels = {
- kernels .. "/ORX_Recon_525mSortie_Case05.bsp",
- kernels .. "/Recon_525mSortie_Case05_20negLatitude.bc",
- kernels .. "/Recon_525mSortie_Case05_atl_19145_04.atf",
- kernels .. "/Recon_525mSortie_Case05_NominalProfile.bc",
-
- kernels .. "/ORX_Recon_225mSortie_Case05.bsp",
- kernels .. "/Recon_225mSortie_Case05_20negLatitude.bc"
- }
-elseif KernelCase == 8 then
- CaseDependentKernels = {
- kernels .. "/Recon_525mSortie_Case08_NominalProfile.bc",
- kernels .. "/ORX_Recon_225mSortie_Case08.bsp",
- kernels .. "/Recon_225mSortie_Case08_40negLatitude.bc"
- }
-elseif KernelCase == 11 then
- CaseDependentKernels = {
- kernels .. "/ORX_Recon_225mSortie_Case11.bsp",
- kernels .. "/Recon_225mSortie_Case11_60negLatitude.bc"
- }
-end
-
-local OsirisRexKernels = {
- -- background
- -- SCLK kernels needs to be loaded before CK kernels (and generally first)
- kernels .. "/ORX_SCLKSCET.00000.tsc",
-
- -- This cannot be loaded correctly for some reason!
- --openspace.spice.loadKernel(kernels .. "/OsirisRexKernels/background/dsk/RQ36mod.oct12_CCv0001.bds")
-
- kernels .. "/orx_v04.tf",
- kernels .. "/orx_lidar_v00.ti",
- kernels .. "/orx_ocams_v03.ti",
- kernels .. "/orx_otes_v00.ti",
- kernels .. "/orx_rexis_v00.ti",
- kernels .. "/orx_struct_v00.ti",
- kernels .. "/orx_navcam_v00.ti",
- kernels .. "/orx_ola_v00.ti",
- kernels .. "/orx_ovirs_v00.ti",
- kernels .. "/orx_stowcam_v00.ti",
- -- kernels .. "/naif0011.tls",
- kernels .. "/bennu_SPH250m.tpc",
- kernels .. "/bennu_v10.tpc",
-
- -- Low res SPK
- kernels .. "/orx_160917_231024_pgaa3_day15m60_v1.bsp",
- kernels .. "/orx_160914_231024_pgaa3_day12m60_v1.bsp",
-
- kernels .. "/orx_160908_231024_pgaa3_day06m60_v1.bsp",
- kernels .. "/spk_orx_160908_231024_pgaa2_day06m60_v3.bsp",
- kernels .. "/orx_160908_231024_pgaa2_day06m60.bsp",
-
- kernels .. "/OREX_20160908_M60_complete.bsp",
- kernels .. "/OREX_20160904_M45_complete.bsp",
-
- -- SPK
- kernels .. "/de421.bsp",
- kernels .. "/sb-101955-76.bsp",
-
- -- Nominal_Profile_LowRes
- kernels .. "/Approach_600s_20180816T230000_20181119T010000.bsp",
- kernels .. "/Approach_NominalProfile_600s_20180816T230000_20181119T010000.bc",
- kernels .. "/DetailedSurvey_600s_20190108T000000_20190317T000000.bsp",
- kernels .. "/OrbitalA_600s_20181203T230000_20190109T000000.bsp",
- kernels .. "/OrbitalA_NominalProfile_600s_20181203T230000_20190109T000000.bc",
- kernels .. "/OrbitalB_600s_20190316T000000_20190521T000000.bsp",
- kernels .. "/DetailedSurvey_NominalProfile_600s_20190108T000000_20190317T000000.bc",
- kernels .. "/OrbitalB_NominalProfile600s_20190316T000000_20190521T000000.bc",
- kernels .. "/PrelimSurvey_600s_20181119T230000_20181204T010000.bsp",
- kernels .. "/PrelimSurvey_NominalProfile_600s_20181119T230000_20181204T010000.bc",
- kernels .. "/Recon_600s_20190519T000000_20190830T000000.bsp",
- kernels .. "/Recon_NominalProfile_600s_20190519T000000_20190830T000000.bc",
-
- -- Nominal_Observations_Science
- kernels .. "/Phase03_AP_DustSearch_1.bc",
- kernels .. "/Phase03_AP_LightCurve_1.bc",
- kernels .. "/Phase03_AP_LightCurve_2.bc",
- kernels .. "/Phase03_AP_SatSearch_1.bc",
- kernels .. "/Phase03_AP_SatSearch_2.bc",
- kernels .. "/Phase03_AP_PhaseFunction_1.bc",
- kernels .. "/Phase03_AP_ShapeModel_1.bc",
- kernels .. "/Phase03_AP_ShapeModel_2.bc",
- kernels .. "/Phase03_AP_ShapeModel_3.bc",
- kernels .. "/Phase03_AP_ShapeModel_4.bc",
- kernels .. "/Phase03_AP_ShapeModel_5.bc",
- kernels .. "/Phase03_AP_ShapeModel_6.bc",
- kernels .. "/Phase03_AP_ShapeModel_7.bc",
- kernels .. "/Phase03_AP_ShapeModel_8.bc",
- kernels .. "/Phase03_AP_ShapeModel_9_Forced4x4.bc",
- kernels .. "/Phase03_AP_SpectraMap_1.bc",
- kernels .. "/Phase04_PS_MC_1_v1_1a.bc",
- kernels .. "/Phase04_PS_MC_2_v1_1a.bc",
- kernels .. "/Phase04_PS_OLA_Nominal_1.bc",
- kernels .. "/Phase04_PS_OLA_Nominal_2.bc",
- kernels .. "/Phase04_PS_OLA_Nominal_3.bc",
- kernels .. "/Phase04_PS_OLA_Nominal_4.bc",
- kernels .. "/Phase04_PS_PolyCam_1.bc",
- kernels .. "/Phase04_PS_PolyCam_2.bc",
- kernels .. "/Phase04_PS_PolyCam_3.bc",
- kernels .. "/Phase04_PS_PolyCam_4.bc",
- kernels .. "/Phase04_PS_PolyCam_5.bc",
- kernels .. "/Phase04_PS_PolyCam_6.bc",
-
- --openspace.spice.loadKernel(kernels .. "/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/atl_19013_18_BBD1_info.TXT")
- --openspace.spice.loadKernel(kernels .. "/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/atl_19014_16_BBD2_info.TXT")
- --openspace.spice.loadKernel(kernels .. "/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/atl_19020_18_BBD3_info.TXT")
- --openspace.spice.loadKernel(kernels .. "/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/atl_19021_19_BBD4_info.TXT")
- --openspace.spice.loadKernel(kernels .. "/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/README.txt")
-
- kernels .. "/atl_19013_18_BBD1_v2.bc",
- kernels .. "/atl_19014_16_BBD2_v2.bc",
- kernels .. "/atl_19020_18_BBD3_v2.bc",
- kernels .. "/atl_19021_19_BBD4_v2.bc",
-
-
- kernels .. "/Phase06_DS_Equatorial_Stations_1.bc",
- kernels .. "/Phase06_DS_Equatorial_Stations_2.bc",
- kernels .. "/Phase06_DS_Equatorial_Stations_3.bc",
- kernels .. "/Phase06_DS_Equatorial_Stations_4.bc",
- kernels .. "/Phase06_DS_Equatorial_Stations_5.bc",
- kernels .. "/Phase06_DS_Equatorial_Stations_6.bc",
- kernels .. "/Phase06_DS_Equatorial_Stations_7.bc",
- kernels .. "/Phase06_DS_Plume_Search_1.bc",
- kernels .. "/Phase06_DS_Plume_Search_2.bc",
- kernels .. "/Phase07_OB_CSS_Mapping_1.bc",
- kernels .. "/Phase07_OB_CSS_Mapping_2.bc",
- kernels .. "/Phase07_OB_CSS_Mapping_3.bc",
- kernels .. "/CSS_Mapping_1.a",
- kernels .. "/CSS_Mapping_2.a",
- kernels .. "/CSS_Mapping_3.a",
-
- --openspace.spice.loadKernel(kernels .. "/Case02_0Latitude.wmv")
- --openspace.spice.loadKernel(kernels .. "/Case05_20negLatitude.wmv")
- --openspace.spice.loadKernel(kernels .. "/Case08_40negLatitude.wmv")
- --openspace.spice.loadKernel(kernels .. "/Case11_60negLatitude.wmv")
-}
local LightSources = {
{
@@ -185,11 +29,6 @@ local LightSources = {
}
}
--- Append the CaseDependentKernels at the end of the OsirisRexKernels set
-for i = 0, #CaseDependentKernels do
- OsirisRexKernels[#OsirisRexKernels + 1] = CaseDependentKernels[i]
-end
-
local OsirisRex = {
Identifier = "OsirisRex",
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
@@ -197,14 +36,14 @@ local OsirisRex = {
Translation = {
Type = "SpiceTranslation",
Target = "OSIRIS-REX",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = OsirisRexKernels
},
Rotation = {
Type = "SpiceRotation",
SourceFrame = "ORX_SPACECRAFT",
DestinationFrame = "GALACTIC"
- }
+ },
},
Renderable = {
Type = "RenderableModel",
@@ -262,7 +101,7 @@ local Rexis = {
Type = "SpiceRotation",
SourceFrame = "ORX_REXIS",
DestinationFrame = "ORX_SPACECRAFT"
- }
+ },
},
GUI = {
Name = "REXIS",
@@ -274,13 +113,13 @@ local PolyCamFov = {
Identifier = "POLYCAM FOV",
Parent = PolyCam.Identifier,
Renderable = {
- Type = "RenderableFov",
- Body = "OSIRIS-REX",
+ Type = "RenderableFov",
+ Body = "OSIRIS-REX",
Frame = "ORX_OCAMS_POLYCAM",
- RGB = { 0.8, 0.7, 0.7 },
+ RGB = { 0.8, 0.7, 0.7 },
Instrument = {
- Name = "ORX_OCAMS_POLYCAM",
- Method = "ELLIPSOID",
+ Name = "ORX_OCAMS_POLYCAM",
+ Method = "ELLIPSOID",
Aberration = "NONE"
},
PotentialTargets = { BENNU_BODY }
@@ -295,13 +134,13 @@ local RexisFov = {
Identifier = "REXIS FOV",
Parent = Rexis.Identifier,
Renderable = {
- Type = "RenderableFov",
- Body = "OSIRIS-REX",
+ Type = "RenderableFov",
+ Body = "OSIRIS-REX",
Frame = "ORX_REXIS",
- RGB = { 0.8, 0.7, 0.7 },
+ RGB = { 0.8, 0.7, 0.7 },
Instrument = {
- Name = "ORX_REXIS",
- Method = "ELLIPSOID",
+ Name = "ORX_REXIS",
+ Method = "ELLIPSOID",
Aberration = "NONE"
},
PotentialTargets = { BENNU_BODY },
@@ -316,5 +155,9 @@ local RexisFov = {
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
- OsirisRex, PolyCam, Rexis, PolyCamFov, RexisFov
+ OsirisRex,
+ PolyCam,
+ Rexis,
+ PolyCamFov,
+ RexisFov
})
diff --git a/data/assets/scene/solarsystem/missions/osirisrex/models.asset b/data/assets/scene/solarsystem/missions/osirisrex/models.asset
new file mode 100644
index 0000000000..cdd95678ff
--- /dev/null
+++ b/data/assets/scene/solarsystem/missions/osirisrex/models.asset
@@ -0,0 +1,8 @@
+local models = asset.syncedResource({
+ Name = "Bennu Models",
+ Type = "HttpSynchronization",
+ Identifier = "bennu_models",
+ Version = 2
+})
+
+asset.export('models', models)
diff --git a/data/assets/scene/solarsystem/missions/osirisrex/osirisrex.asset b/data/assets/scene/solarsystem/missions/osirisrex/osirisrex.asset
index ff5d7658b6..0ba307b51d 100644
--- a/data/assets/scene/solarsystem/missions/osirisrex/osirisrex.asset
+++ b/data/assets/scene/solarsystem/missions/osirisrex/osirisrex.asset
@@ -1,4 +1,5 @@
asset.require('./bennu')
+asset.require('./bennu_projection')
asset.require('./model')
asset.require('./trail')
asset.require('scene/solarsystem/sun/marker')
diff --git a/data/assets/scene/solarsystem/missions/osirisrex/trail.asset b/data/assets/scene/solarsystem/missions/osirisrex/trail.asset
index 4d152a2bf7..01b33183bc 100644
--- a/data/assets/scene/solarsystem/missions/osirisrex/trail.asset
+++ b/data/assets/scene/solarsystem/missions/osirisrex/trail.asset
@@ -37,7 +37,7 @@ local OsirisRexTrailSolarSystem = {
Translation = {
Type = "SpiceTranslation",
Target = "OSIRIS-REX",
- Observer = "SUN"
+ Observer = "SSB"
},
Color = { 0.2, 0.9, 0.2 },
StartTime = "2016 SEP 8 23:05:00.50",
diff --git a/data/assets/scene/solarsystem/missions/osirisrex/transforms.asset b/data/assets/scene/solarsystem/missions/osirisrex/transforms.asset
index e8266beadf..ca481d5b1b 100644
--- a/data/assets/scene/solarsystem/missions/osirisrex/transforms.asset
+++ b/data/assets/scene/solarsystem/missions/osirisrex/transforms.asset
@@ -12,7 +12,7 @@ local BennuBarycenter = {
Translation = {
Type = "SpiceTranslation",
Target = BENNU_BODY,
- Observer = "SUN"
+ Observer = "SSB"
}
},
GUI = {
diff --git a/data/assets/scene/solarsystem/missions/perseverance/model.asset b/data/assets/scene/solarsystem/missions/perseverance/model.asset
index f11c247d21..cbe8099d9f 100644
--- a/data/assets/scene/solarsystem/missions/perseverance/model.asset
+++ b/data/assets/scene/solarsystem/missions/perseverance/model.asset
@@ -1,6 +1,6 @@
--perseverance/model.asset
local assetHelper = asset.require('util/asset_helper')
-local transforms = asset.require('./transforms')
+local trail = asset.require('./trail')
local marsTransforms = asset.require('scene/solarsystem/planets/mars/transforms')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
-- asset.require('./fov')
@@ -29,7 +29,7 @@ local models = asset.syncedResource({
-- Perseverance Model --
local Perseverance = {
Identifier = "Perseverance",
- Parent = transforms.MSL_Body.Identifier,
+ Parent = trail.PerseveranceNode.Identifier,
GUI = {
Name = "Perseverance",
Path = "/Solar System/Missions/Perseverance"
@@ -56,7 +56,8 @@ local Body = {
Body = "MARS SCIENCE LABORATORY",
GeometryFile = models .. "/Perseverance.obj",
LightSources = LightSources,
- PerformShading = false
+ PerformShading = false,
+ RotationVector = {65.940000,201.389999,263.980011}
},
GUI = {
Name = "Perseverance Model Body",
diff --git a/data/assets/scene/solarsystem/missions/perseverance/trail.asset b/data/assets/scene/solarsystem/missions/perseverance/trail.asset
index 79ccffb602..cd7fffdb30 100644
--- a/data/assets/scene/solarsystem/missions/perseverance/trail.asset
+++ b/data/assets/scene/solarsystem/missions/perseverance/trail.asset
@@ -35,7 +35,7 @@ local PerseveranceNode = {
Translation = {
Type = "SpiceTranslation",
Target = perseverance_id,
- Observer = "SUN",
+ Observer = "SSB",
Kernels = m2020_kernels
}
},
@@ -54,16 +54,17 @@ local PerseveranceTrailSun = {
Translation = {
Type = "SpiceTranslation",
Target = perseverance_id,
- Observer = "SUN",
+ Observer = "SSB",
Kernels = m2020_kernels
},
Color = { 0.2, 0.7, 0.1 },
StartTime = startTime,
EndTime = endTime,
- SampleInterval = 100
+ SampleInterval = 100,
+ Enabled = false
},
GUI = {
- Name = "Perseverance Trail",
+ Name = "Perseverance Trail (Sun)",
Path = "/Solar System/Missions/Perseverance"
}
}
@@ -82,7 +83,8 @@ local PerseveranceTrailMars = {
Color = { 0.7, 0.9, 0.6 },
StartTime = approachMars,
EndTime = endTime,
- SampleInterval = 100
+ SampleInterval = 100,
+ Enabled = false
},
GUI = {
Name = "Perseverance Trail (Mars)",
diff --git a/data/assets/scene/solarsystem/missions/perseverance/transforms.asset b/data/assets/scene/solarsystem/missions/perseverance/transforms.asset
deleted file mode 100644
index c4caed35ac..0000000000
--- a/data/assets/scene/solarsystem/missions/perseverance/transforms.asset
+++ /dev/null
@@ -1,503 +0,0 @@
-local assetHelper = asset.require('util/asset_helper')
-local marsTransforms = asset.require('scene/solarsystem/planets/mars/transforms')
-local marsAsset = asset.require('scene/solarsystem/planets/mars/mars')
-local trailAsset = asset.require('./trail')
-
-
-local MSL_Body = {
- Identifier = "MSL_Body",
- Parent = trailAsset.PerseveranceNode.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0, 0.0, 2.8 }
- },
- Rotation = {
- Type = "StaticRotation",
- Rotation = { -0.521593,0.648407,2.888407 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
----- ROBOTIC ARM RA ----
-local RA_Base_Location = {
- Identifier = "RA_Base_Location",
- Parent = MSL_Body.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 1.111, -0.4525, -0.106 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
---AZ
-local RA_Shoulder_AZ_Location = {
- Identifier = "RA_Shoulder_AZ_Location",
- Parent = RA_Base_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.0, 0.0, -0.08 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-----EL
-local RA_Shoulder_EL_Location = {
- Identifier = "RA_Shoulder_EL_Location",
- Parent = RA_Shoulder_AZ_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.17, 0.2, -0.005 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
---ELBOW
-local RA_Elbow_Location = {
- Identifier = "RA_Elbow_Location",
- Parent = RA_Shoulder_EL_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.83, -0.2, 0.0 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
---WRIST
-local RA_Wrist_Location = {
- Identifier = "RA_Wrist_Location",
- Parent = RA_Elbow_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.77, 0.13, 0.035 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
---TURRET
-local RA_Turret_Location = {
- Identifier = "RA_Turret_Location",
- Parent = RA_Wrist_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.0, 0.04, -0.15 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
---MAHLI
-local RA_Mahli_Location = {
- Identifier = "RA_Mahli_Location",
- Parent = RA_Turret_Location.Identifier
-}
-
----- MASTCAM RSM ----
-local RSM_ROOT_Location = {
- Identifier = "RSM_ROOT_Location",
- Parent = MSL_Body.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.7039, 0.5769, -0.563 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local RSM_AZ_Location = {
- Identifier = "RSM_AZ_Location",
- Parent = RSM_ROOT_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.0, 0.008, 0.0 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local RSM_ZERO_EL_Location = {
- Identifier = "RSM_ZERO_EL_Location",
- Parent = RSM_AZ_Location.Identifier,
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local RSM_EL_Location = {
- Identifier = "RSM_EL_Location",
- Parent = RSM_AZ_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- --Position = {0.0, 0.0, -0.664}
- Position = { 0.002, 0.007, -0.688 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
----- HIGH GAIN ANTENNA HGA ----
-local HGA_AZ_Location = {
- Identifier = "HGA_AZ_Location",
- Parent = MSL_Body.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { -0.46, -0.47, -0.55 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local HGA_EL_Location = {
- Identifier = "HGA_EL_Location",
- Parent = HGA_AZ_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.0, 0.0, -0.17 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
----- SAM & HEMIN ----
-local SAM_Cover_1_Location = {
- Identifier = "SAM_Cover_1_Location",
- Parent = MSL_Body.Identifier,
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local SAM_Cover_2_Location = {
- Identifier = "SAM_Cover_2_Location",
- Parent = MSL_Body.Identifier,
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local CHEMIN_Location = {
- Identifier = "CHEMIN_Location",
- Parent = MSL_Body.Identifier,
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
----- Wheels ----
-local Wheel_base_Location = {
- Identifier = "Wheel_base_Location",
- Parent = MSL_Body.Identifier,
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
--- Left side --
-local Leg_1_L_Location = {
- Identifier = "Leg_1_L_Location",
- Parent = Wheel_base_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.217, -0.812, -0.215 } --for the right side
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local Leg_2_L_Location = {
- Identifier = "Leg_2_L_Location",
- Parent = Leg_1_L_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { -0.74, -0.00380, 0.223 } --CORRECT, DONT CHANGE
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local Wrist_F_L_Location = {
- Identifier = "Wrist_F_L_Location",
- Parent = Leg_1_L_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.8839, -0.2659, 0.2 } --CORRECT, DONT TOUCH
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local Wheel_F_L_Location = {
- Identifier = "Wheel_F_L_Location",
- Parent = Wrist_F_L_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.0, 0.0, 0.426 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local Wheel_C_L_Location = {
- Identifier = "Wheel_C_L_Location",
- Parent = Leg_2_L_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.45, -0.4, 0.403 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local Wrist_B_L_Location = {
- Identifier = "Wrist_B_L_Location",
- Parent = Leg_2_L_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { -0.627, -0.2635, -0.022 } --CORRECT, DONT CHANGE
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local Wheel_B_L_Location = {
- Identifier = "Wheel_B_L_Location",
- Parent = Wrist_B_L_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.0, -0.0, 0.426 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
--- wheels, Right Side --
-local Leg_1_R_Location = {
- Identifier = "Leg_1_R_Location",
- Parent = Wheel_base_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.217, 0.812, -0.215 } --Check with caroline!!!
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local Leg_2_R_Location = {
- Identifier = "Leg_2_R_Location",
- Parent = Leg_1_R_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- --Position = {-0.74, 0.0, 0.24}
- Position = { -0.74, 0.00380, 0.223 } --want to use this one, once the center point is changed in maya
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local Wrist_F_R_Location = {
- Identifier = "Wrist_F_R_Location",
- Parent = Leg_1_R_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.882, 0.259, 0.215 }
- --Position = {0.8839, 0.2659, 0.2} --position for the Wrist_F_L
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local Wheel_F_R_Location = {
- Identifier = "Wheel_F_R_Location",
- Parent = Wrist_F_R_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.0, 0.0, 0.426 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local Wheel_C_R_Location = {
- Identifier = "Wheel_C_R_Location",
- Parent = Leg_2_R_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.45, 0.4, 0.403 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local Wrist_B_R_Location = {
- Identifier = "Wrist_B_R_Location",
- Parent = Leg_2_R_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { -0.6208, 0.2759, -0.025 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-local Wheel_B_R_Location = {
- Identifier = "Wheel_B_R_Location",
- Parent = Wrist_B_R_Location.Identifier,
- Transform = {
- Translation = {
- Type = "StaticTranslation",
- Position = { 0.0, -0.0005, 0.426 }
- }
- },
- GUI = {
- Path = "/Solar System/Missions/Perseverance/Transforms",
- Hidden = true
- }
-}
-
-assetHelper.registerSceneGraphNodesAndExport(asset, {
- MSL_Body,
- RA_Base_Location,
- RA_Shoulder_AZ_Location,
- RA_Shoulder_EL_Location,
- RA_Elbow_Location,
- RA_Wrist_Location,
- RA_Turret_Location,
- RA_Mahli_Location,
- RSM_ROOT_Location,
- RSM_AZ_Location,
- RSM_ZERO_EL_Location,
- RSM_EL_Location,
-
- HGA_AZ_Location,
- HGA_EL_Location,
- SAM_Cover_1_Location,
- SAM_Cover_2_Location,
- CHEMIN_Location,
-
- Wheel_base_Location,
- Leg_1_L_Location,
- Leg_2_L_Location,
- Wrist_F_L_Location,
- Wheel_F_L_Location,
- Wheel_C_L_Location,
- Wrist_B_L_Location,
- Wheel_B_L_Location,
-
- Leg_1_R_Location,
- Leg_2_R_Location,
- Wrist_F_R_Location,
- Wheel_F_R_Location,
- Wheel_C_R_Location,
- Wrist_B_R_Location,
- Wheel_B_R_Location
-})
diff --git a/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset b/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset
index 5ff94818de..bf147bbf71 100644
--- a/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset
+++ b/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset
@@ -21,7 +21,7 @@ local Pioneer10 = {
Translation = {
Type = "SpiceTranslation",
Target = Pioneer10NAIF,
- Observer = "SUN",
+ Observer = "SSB",
Kernels = kernelsList
}
},
@@ -41,7 +41,7 @@ local Pioneer10Trail = {
Translation = {
Type = "SpiceTranslation",
Target = Pioneer10NAIF,
- Observer = "SUN",
+ Observer = "SSB",
Kernels = kernelsList
},
Color = { 0.70, 0.50, 0.20 },
diff --git a/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset b/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset
index c9f5a6355c..dad188e997 100644
--- a/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset
+++ b/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset
@@ -24,7 +24,7 @@ local Pioneer11 = {
Translation = {
Type = "SpiceTranslation",
Target = Pioneer11NAIF,
- Observer = "SUN",
+ Observer = "SSB",
Kernels = kernelsList
}
},
@@ -44,7 +44,7 @@ local Pioneer11Trail = {
Translation = {
Type = "SpiceTranslation",
Target = Pioneer11NAIF,
- Observer = "SUN",
+ Observer = "SSB",
Kernels = kernelsList
},
Color = { 0.70, 0.50, 0.20 },
diff --git a/data/assets/scene/solarsystem/missions/rosetta/67p.asset b/data/assets/scene/solarsystem/missions/rosetta/67p.asset
index cf41bc2a91..76d84cb4fa 100644
--- a/data/assets/scene/solarsystem/missions/rosetta/67p.asset
+++ b/data/assets/scene/solarsystem/missions/rosetta/67p.asset
@@ -33,7 +33,7 @@ local Barycenter = {
Translation = {
Type = "SpiceTranslation",
Target = "CHURYUMOV-GERASIMENKO",
- Observer = "SUN"
+ Observer = "SSB"
}
},
GUI = {
@@ -118,7 +118,7 @@ local Trail67P = {
Translation = {
Type = "SpiceTranslation",
Target = "CHURYUMOV-GERASIMENKO",
- Observer = "SUN"
+ Observer = "SSB"
},
Color = { 0.1, 0.9, 0.2 },
StartTime = "2014 JAN 01 00:00:00.000",
diff --git a/data/assets/scene/solarsystem/missions/rosetta/rosetta.asset b/data/assets/scene/solarsystem/missions/rosetta/rosetta.asset
index 189d22ca49..b33c412cde 100644
--- a/data/assets/scene/solarsystem/missions/rosetta/rosetta.asset
+++ b/data/assets/scene/solarsystem/missions/rosetta/rosetta.asset
@@ -94,7 +94,7 @@ local Rosetta = {
Translation = {
Type = "SpiceTranslation",
Target = "ROSETTA",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = RosettaKernels
},
Rotation = {
diff --git a/data/assets/scene/solarsystem/missions/voyager/voyager1.asset b/data/assets/scene/solarsystem/missions/voyager/voyager1.asset
index 922dfa6c03..a0d0d4ae22 100644
--- a/data/assets/scene/solarsystem/missions/voyager/voyager1.asset
+++ b/data/assets/scene/solarsystem/missions/voyager/voyager1.asset
@@ -47,7 +47,7 @@ local Voyager1 = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 1",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
Rotation = {
@@ -83,7 +83,7 @@ local Voyager1Main = {
}
local Voyager1Antenna = {
- Identifier = "Voyager_1_Antanna",
+ Identifier = "Voyager_1_Antenna",
Parent = Voyager1.Identifier,
Renderable = {
Type = "RenderableModel",
@@ -92,7 +92,7 @@ local Voyager1Antenna = {
LightSources = LightSources
},
GUI = {
- Name = "Voyager 1 Antanna",
+ Name = "Voyager 1 Antenna",
Path = "/Solar System/Missions/Voyager 1"
}
}
@@ -108,7 +108,7 @@ local VoyagerTrailCruiseEarthJupiter = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 1",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
Color = { 0.70, 0.50, 0.20 },
@@ -130,7 +130,7 @@ local VoyagerTrailEncounterJupiter = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 1",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
Color = { 0.70, 0.50, 0.20 },
@@ -153,7 +153,7 @@ local VoyagerTrailCruiseJupiterSaturn = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 1",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
EnableFade = false,
@@ -176,7 +176,7 @@ local VoyagerTrailEncounterSaturn = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 1",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
EnableFade = false,
@@ -199,7 +199,7 @@ local VoyagerTrailCruiseSaturnInf = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 1",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
EnableFade = false,
diff --git a/data/assets/scene/solarsystem/missions/voyager/voyager2.asset b/data/assets/scene/solarsystem/missions/voyager/voyager2.asset
index 8cbe9dcbac..d2e7e80a17 100644
--- a/data/assets/scene/solarsystem/missions/voyager/voyager2.asset
+++ b/data/assets/scene/solarsystem/missions/voyager/voyager2.asset
@@ -37,7 +37,7 @@ local LightSources = {
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
-{
+ {
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
@@ -51,7 +51,7 @@ local Voyager2 = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 2",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
Rotation = {
@@ -87,7 +87,7 @@ local Voyager2Main = {
}
local Voyager2Antenna = {
- Identifier = "Voyager_2_Antanna",
+ Identifier = "Voyager_2_Antenna",
Parent = Voyager2.Identifier,
Renderable = {
Type = "RenderableModel",
@@ -96,7 +96,7 @@ local Voyager2Antenna = {
LightSources = LightSources
},
GUI = {
- Name = "Voyager 2 Antanna",
+ Name = "Voyager 2 Antenna",
Path = "/Solar System/Missions/Voyager 2"
}
}
@@ -112,11 +112,11 @@ local VoyagerTrailCruiseEarthJupiter = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 2",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
Color = { 0.70, 0.50, 0.20 },
- StartTime = "1977 SEP 05",
+ StartTime = "1977-AUG-20 16:07:06.535",
EndTime = "1979 JUL 06",
SampleInterval = 669 * 2 -- 669 is the number of days between the Start and End time
},
@@ -134,7 +134,7 @@ local VoyagerTrailEncounterJupiter = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 2",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
Color = { 0.70, 0.50, 0.20 },
@@ -157,7 +157,7 @@ local VoyagerTrailCruiseJupiterSaturn = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 2",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
EnableFade = false,
@@ -180,7 +180,7 @@ local VoyagerTrailEncounterSaturn = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 2",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
EnableFade = false,
@@ -203,7 +203,7 @@ local VoyagerTrailCruiseSaturnUranus = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 2",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
EnableFade = false,
@@ -226,7 +226,7 @@ local VoyagerTrailEncounterUranus = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 2",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
EnableFade = false,
@@ -249,7 +249,7 @@ local VoyagerTrailCruiseUranusNeptune = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 2",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
EnableFade = false,
@@ -272,7 +272,7 @@ local VoyagerTrailEncounterNeptune = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 2",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
EnableFade = false,
@@ -295,7 +295,7 @@ local VoyagerTrailCruiseNeptuneInf = {
Translation = {
Type = "SpiceTranslation",
Target = "VOYAGER 2",
- Observer = "SUN",
+ Observer = "SSB",
Kernels = Kernels
},
EnableFade = false,
diff --git a/data/assets/scene/solarsystem/planets/earth/earth.asset b/data/assets/scene/solarsystem/planets/earth/earth.asset
index fb34cd82d1..ef29f8c1f3 100644
--- a/data/assets/scene/solarsystem/planets/earth/earth.asset
+++ b/data/assets/scene/solarsystem/planets/earth/earth.asset
@@ -23,21 +23,16 @@ local Earth = {
}
},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/Earth.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 40.0,
- LabelsSize = 4.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 300000.0,
- FadeOutStartingDistance = 10000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 1500000.0,
- LabelsColor = { 1.0, 0.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 5.0,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 10000.0, 300000.0 },
+ DistanceEPS = 1500000.0,
+ Color = { 1.0, 0.0, 0.0 }
}
},
Tag = { "planet_solarSystem", "planet_terrestrial" },
@@ -54,20 +49,16 @@ local EarthLabel = {
Renderable = {
Enabled = false,
Type = "RenderableLabels",
- LabelText = "Earth",
- FontSize = 100.0,
- LabelSize = 8.6,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
- LabelOrientationOption = "Camera View Direction",
+ Text = "Earth",
+ FontSize = 70.0,
+ Size = 8.77,
+ MinMaxSize = { 1, 100 },
+ OrientationOption = "Camera View Direction",
BlendMode = "Additive",
EnableFading = true,
- FadeStartUnit = "au",
- FadeStartDistance = 1.5,
- FadeStartSpeed = 1.0,
- FadeEndUnit = "au",
- FadeEndDistance = 15.0,
- FadeEndSpeed = 25.0
+ FadeUnit = "au",
+ FadeDistances = { 1.5, 15.0 },
+ FadeWidths = { 1.0, 25.0 }
},
Tag = { "solarsystem_labels" },
GUI = {
diff --git a/data/assets/scene/solarsystem/planets/earth/lagrange_points/L1.asset b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L1.asset
new file mode 100644
index 0000000000..3d9905bf89
--- /dev/null
+++ b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L1.asset
@@ -0,0 +1,59 @@
+local assetHelper = asset.require('util/asset_helper')
+local transforms = asset.require('scene/solarsystem/sun/transforms')
+local circle = asset.require('util/circle').circle
+local kernels = asset.require('scene/solarsystem/planets/earth/lagrange_points/lagrange_kernels').kernels
+asset.require('spice/base')
+
+local L1 = {
+ Identifier = "L1",
+ Parent = transforms.SolarSystemBarycenter.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderablePlaneImageLocal",
+ RenderableType = "Opaque",
+ Billboard = true,
+ Size = 700E5,
+ Texture = circle .. "/circle.png",
+ BlendMode = "Additive"
+ },
+ Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "391", -- L1
+ Observer = "SSB",
+ Kernels = kernels .. "/L1_de431.bsp"
+ }
+ },
+ Tag = { "lagrange_points_earth" , "lagrange_points_earth_l1" },
+ GUI = {
+ Name = "L1",
+ Path = "/Solar System/Planets/Earth/Lagrange points",
+ }
+}
+
+local L1Label = {
+ Identifier = "L1Label",
+ Parent = L1.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderableLabels",
+ Text = "L1",
+ FontSize = 20,
+ Size = 7.5,
+ MinMaxSize = { 1.0, 100.0},
+ OrientationOption = "Camera View Direction",
+ BlendMode = "Normal",
+ EnableFading = false
+ },
+ Tag = { "lagrange_points_earth", "lagrange_points_earth_l1" },
+ GUI = {
+ Name = "L1 Label",
+ Path = "/Solar System/Planets/Earth/Lagrange points",
+ Description = "Main label for L1"
+ }
+}
+
+assetHelper.registerSceneGraphNodesAndExport(asset, {
+ L1,
+ L1Label
+})
diff --git a/data/assets/scene/solarsystem/planets/earth/lagrange_points/L2.asset b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L2.asset
new file mode 100644
index 0000000000..0d3741f2de
--- /dev/null
+++ b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L2.asset
@@ -0,0 +1,127 @@
+local assetHelper = asset.require('util/asset_helper')
+local transforms = asset.require('scene/solarsystem/sun/transforms')
+local circle = asset.require('util/circle').circle
+local kernels = asset.require('scene/solarsystem/planets/earth/lagrange_points/lagrange_kernels').kernels
+asset.require('spice/base')
+
+local L2Small = {
+ Identifier = "L2Small",
+ Parent = transforms.SolarSystemBarycenter.Identifier,
+ Renderable = {
+ Type = "RenderablePlaneImageLocal",
+ RenderableType = "Opaque",
+ Billboard = true,
+ Size = 400E4,
+ Texture = circle .. "/circle.png",
+ BlendMode = "Additive"
+ },
+ Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "392", -- L2
+ Observer = "SSB",
+ Kernels = kernels .. "/L2_de431.bsp"
+ }
+ },
+ Tag = { "lagrange_points_earth_l2_small" },
+ GUI = {
+ Name = "Small L2",
+ Path = "/Solar System/Planets/Earth/Lagrange points",
+ }
+}
+
+local L2 = {
+ Identifier = "L2",
+ Parent = transforms.SolarSystemBarycenter.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderablePlaneImageLocal",
+ RenderableType = "Opaque",
+ Billboard = true,
+ Size = 700E5,
+ Texture = circle .. "/circle.png",
+ BlendMode = "Additive"
+ },
+ Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "392", -- L2
+ Observer = "SSB",
+ Kernels = kernels .. "/L2_de431.bsp"
+ }
+ },
+ Tag = { "lagrange_points_earth", "lagrange_points_earth_l2" },
+ GUI = {
+ Name = "L2",
+ Path = "/Solar System/Planets/Earth/Lagrange points",
+ }
+}
+
+local L2SmallLabel = {
+ Identifier = "L2SmallLabel",
+ Parent = L2.Identifier,
+ Renderable = {
+ Enabled = true,
+ Type = "RenderableLabels",
+ Text = "L2",
+ FontSize = 20.0,
+ Size = 6.0,
+ MinMaxSize = { 1.0, 100.0 },
+ OrientationOption = "Camera View Direction",
+ BlendMode = "Normal",
+ EnableFading = false
+ },
+ Tag = { "lagrange_points_earth_l2_small" },
+ GUI = {
+ Name = "Small L2 Label",
+ Path = "/Solar System/Planets/Earth/Lagrange points",
+ Description = "Small label for L2"
+ }
+}
+
+local L2Label = {
+ Identifier = "L2Label",
+ Parent = L2.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderableLabels",
+ Text = "L2",
+ FontSize = 20,
+ Size = 7.5,
+ MinMaxSize = { 1.0, 100.0},
+ OrientationOption = "Camera View Direction",
+ BlendMode = "Normal",
+ EnableFading = false
+ },
+ Tag = { "lagrange_points_earth", "lagrange_points_earth_l2" },
+ GUI = {
+ Name = "L2 Label",
+ Path = "/Solar System/Planets/Earth/Lagrange points",
+ Description = "Main label for L2"
+ }
+}
+
+local L2SunLine = {
+ Identifier = "L2SunLine",
+ Parent = transforms.SolarSystemBarycenter.Identifier,
+ Renderable = {
+ Type = "RenderableNodeLine",
+ StartNode = "Sun",
+ EndNode = "L2Small",
+ Color = { 0.5, 0.5, 0.5 },
+ LineWidth = 2
+ },
+ Tag = { "lagrange_points_earth_l2_small" },
+ GUI = {
+ Name = "Sun to L2 Line",
+ Path = "/Solar System/Planets/Earth/Lagrange points",
+ }
+}
+
+assetHelper.registerSceneGraphNodesAndExport(asset, {
+ L2Small,
+ L2,
+ L2SunLine,
+ L2SmallLabel,
+ L2Label
+})
diff --git a/data/assets/scene/solarsystem/planets/earth/lagrange_points/L4.asset b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L4.asset
new file mode 100644
index 0000000000..5ed34bcb8a
--- /dev/null
+++ b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L4.asset
@@ -0,0 +1,59 @@
+local assetHelper = asset.require('util/asset_helper')
+local transforms = asset.require('scene/solarsystem/sun/transforms')
+local circle = asset.require('util/circle').circle
+local kernels = asset.require('scene/solarsystem/planets/earth/lagrange_points/lagrange_kernels').kernels
+asset.require('spice/base')
+
+local L4 = {
+ Identifier = "L4",
+ Parent = transforms.SolarSystemBarycenter.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderablePlaneImageLocal",
+ RenderableType = "Opaque",
+ Billboard = true,
+ Size = 800E6,
+ Texture = circle .. "/circle.png",
+ BlendMode = "Additive"
+ },
+ Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "394", -- L4
+ Observer = "SSB",
+ Kernels = kernels .. "/L4_de431.bsp"
+ }
+ },
+ Tag = { "lagrange_points_earth", "lagrange_points_earth_l4" },
+ GUI = {
+ Name = "L4",
+ Path = "/Solar System/Planets/Earth/Lagrange points",
+ }
+}
+
+local L4Label = {
+ Identifier = "L4Label",
+ Parent = L4.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderableLabels",
+ Text = "L4",
+ FontSize = 20,
+ Size = 8.5,
+ MinMaxSize = { 1.0, 100.0 },
+ OrientationOption = "Camera View Direction",
+ BlendMode = "Normal",
+ EnableFading = false
+ },
+ Tag = { "lagrange_points_earth", "lagrange_points_earth_l4" },
+ GUI = {
+ Name = "L4 Label",
+ Path = "/Solar System/Planets/Earth/Lagrange points",
+ Description = "Main label for L4"
+ }
+}
+
+assetHelper.registerSceneGraphNodesAndExport(asset, {
+ L4,
+ L4Label
+})
diff --git a/data/assets/scene/solarsystem/planets/earth/lagrange_points/L5.asset b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L5.asset
new file mode 100644
index 0000000000..1fffca80db
--- /dev/null
+++ b/data/assets/scene/solarsystem/planets/earth/lagrange_points/L5.asset
@@ -0,0 +1,59 @@
+local assetHelper = asset.require('util/asset_helper')
+local transforms = asset.require('scene/solarsystem/sun/transforms')
+local circle = asset.require('util/circle').circle
+local kernels = asset.require('scene/solarsystem/planets/earth/lagrange_points/lagrange_kernels').kernels
+asset.require('spice/base')
+
+local L5 = {
+ Identifier = "L5",
+ Parent = transforms.SolarSystemBarycenter.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderablePlaneImageLocal",
+ RenderableType = "Opaque",
+ Billboard = true,
+ Size = 800E6,
+ Texture = circle .. "/circle.png",
+ BlendMode = "Additive"
+ },
+ Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "395", -- L5
+ Observer = "SSB",
+ Kernels = kernels .. "/L5_de431.bsp"
+ }
+ },
+ Tag = { "lagrange_points_earth", "lagrange_points_earth_l5" },
+ GUI = {
+ Name = "L5",
+ Path = "/Solar System/Planets/Earth/Lagrange points",
+ }
+}
+
+local L5Label = {
+ Identifier = "L5Label",
+ Parent = L5.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderableLabels",
+ Text = "L5",
+ FontSize = 20,
+ Size = 8.5,
+ MinMaxSize = { 1.0, 100.0 },
+ OrientationOption = "Camera View Direction",
+ BlendMode = "Normal",
+ EnableFading = false
+ },
+ Tag = { "lagrange_points_earth", "lagrange_points_earth_l5" },
+ GUI = {
+ Name = "L5 Label",
+ Path = "/Solar System/Planets/Earth/Lagrange points",
+ Description = "Main label for L5"
+ }
+}
+
+assetHelper.registerSceneGraphNodesAndExport(asset, {
+ L5,
+ L5Label
+})
diff --git a/data/assets/scene/solarsystem/planets/earth/lagrange_points/lagrange_kernels.asset b/data/assets/scene/solarsystem/planets/earth/lagrange_points/lagrange_kernels.asset
new file mode 100644
index 0000000000..b78370a3a8
--- /dev/null
+++ b/data/assets/scene/solarsystem/planets/earth/lagrange_points/lagrange_kernels.asset
@@ -0,0 +1,8 @@
+local kernels = asset.syncedResource({
+ Name = "Lagrange Kernels",
+ Type = "HttpSynchronization",
+ Identifier = "earth_lagrange_kernels",
+ Version = 1
+})
+
+asset.export('kernels', kernels)
diff --git a/data/assets/scene/solarsystem/planets/earth/lagrange_points/lagrange_points.asset b/data/assets/scene/solarsystem/planets/earth/lagrange_points/lagrange_points.asset
new file mode 100644
index 0000000000..8c4d507ca0
--- /dev/null
+++ b/data/assets/scene/solarsystem/planets/earth/lagrange_points/lagrange_points.asset
@@ -0,0 +1,4 @@
+asset.require('scene/solarsystem/planets/earth/lagrange_points/L1')
+asset.require('scene/solarsystem/planets/earth/lagrange_points/L2')
+asset.require('scene/solarsystem/planets/earth/lagrange_points/L4')
+asset.require('scene/solarsystem/planets/earth/lagrange_points/L5')
diff --git a/data/assets/scene/solarsystem/planets/earth/moon/moon.asset b/data/assets/scene/solarsystem/planets/earth/moon/moon.asset
index f24995d8bd..f3cd2cea9a 100644
--- a/data/assets/scene/solarsystem/planets/earth/moon/moon.asset
+++ b/data/assets/scene/solarsystem/planets/earth/moon/moon.asset
@@ -34,21 +34,16 @@ local Moon = {
}
},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/moon.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 14.0,
- LabelsSize = 8.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 500000.0,
- FadeOutStartingDistance = 100000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 1350000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 7.6,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 100000.0, 500000.0 },
+ DistanceEPS = 1350000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
GUI = {
diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset
index 2012885e73..3c12782da0 100644
--- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset
+++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset
@@ -103,34 +103,29 @@ local initializeAndAddNodes = function()
}
}
+ -- @TODO (emmbr, 2021-05-27) add to scene when label rendering issues have been fixed
local IssLabel = {
Identifier = "IssLabel",
Parent = iss.Identifier,
-
Renderable = {
Enabled = false,
Type = "RenderableLabels",
- LabelText = "ISS",
- FontSize = 100.0,
- LabelSize = 3.4,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
- LabelOrientationOption = "Camera View Direction",
+ Text = "ISS",
+ FontSize = 70.0,
+ Size = 3.4,
+ MinMaxSize = { 1, 100 },
+ OrientationOption = "Camera View Direction",
BlendMode = "Additive",
EnableFading = true,
- FadeStartUnit = "au",
- FadeStartDistance = 0.15,
- FadeStartSpeed = 1.0,
- FadeEndUnit = "au",
- FadeEndDistance = 15.0,
- FadeEndSpeed = 25.0
+ FadeDistances = { 0.15, 15.0 },
+ FadeWidths = { 1.0, 25.0 }
},
Tag = { "solarsystem_labels" },
GUI = {
Name = "ISS Label",
Path = "/Solar System/Planets/Earth/Satellites"
}
-}
+ }
return { iss, parentNode, issTrail }
end
diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset
index 96c6e5561b..0713514a18 100644
--- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset
+++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset
@@ -59,38 +59,35 @@ asset.onInitialize(function ()
},
Tag = { "earth_satellite", "Aqua" },
GUI = {
- Name = "Terra Trail",
+ Name = "Aqua Trail",
Path = "/Solar System/Planets/Earth/Satellites/Aqua"
}
}
+ -- @TODO (emmbr, 2021-05-27) this label is not visible. Too large fade distances?
+ -- Might also be affected by the rendering issues for labels
local AquaLabel = {
- Identifier = "AquaLabel",
- Parent = Aqua.Identifier,
-
- Renderable = {
- Enabled = false,
- Type = "RenderableLabels",
- LabelText = "SNPP",
- FontSize = 100.0,
- LabelSize = 4.0,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
- LabelOrientationOption = "Camera View Direction",
- BlendMode = "Additive",
- EnableFading = true,
- FadeStartUnit = "au",
- FadeStartDistance = 0.15,
- FadeStartSpeed = 1.0,
- FadeEndUnit = "au",
- FadeEndDistance = 15.0,
- FadeEndSpeed = 25.0
- },
- Tag = { "solarsystem_labels" },
- GUI = {
- Name = "Aqua Label",
- Path = "/Solar System/Planets/Earth"
- }
+ Identifier = "AquaLabel",
+ Parent = Aqua.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderableLabels",
+ Text = "Aqua",
+ FontSize = 70.0,
+ Size = 4.0,
+ MinMaxSize = { 1, 100 },
+ OrientationOption = "Camera View Direction",
+ BlendMode = "Additive",
+ EnableFading = true,
+ FadeUnit = "au",
+ FadeDistances = { 1.5, 15.0 },
+ FadeWidths = { 1.0, 25.0 }
+ },
+ Tag = { "solarsystem_labels" },
+ GUI = {
+ Name = "Aqua Label",
+ Path = "/Solar System/Planets/Earth"
+ }
}
table.insert(nodes, Aqua)
diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset
index 9564cd31d6..56a3146324 100644
--- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset
+++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset
@@ -67,32 +67,28 @@ asset.onInitialize(function ()
}
local SNPPLabel = {
- Identifier = "SNPPLabel",
- Parent = SNPP.Identifier,
+ Identifier = "SNPPLabel",
+ Parent = SNPP.Identifier,
- Renderable = {
- Enabled = false,
- Type = "RenderableLabels",
- LabelText = "SNPP",
- FontSize = 100.0,
- LabelSize = 4.0,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
- LabelOrientationOption = "Camera View Direction",
- BlendMode = "Additive",
- EnableFading = true,
- FadeStartUnit = "au",
- FadeStartDistance = 0.15,
- FadeStartSpeed = 1.0,
- FadeEndUnit = "au",
- FadeEndDistance = 15.0,
- FadeEndSpeed = 25.0
- },
- Tag = { "solarsystem_labels" },
- GUI = {
- Name = "SNPP Label",
- Path = "/Solar System/Planets/Earth"
- }
+ Renderable = {
+ Enabled = false,
+ Type = "RenderableLabels",
+ Text = "SNPP",
+ FontSize = 70.0,
+ Size = 4.0,
+ MinMaxSize = { 1, 100 },
+ OrientationOption = "Camera View Direction",
+ BlendMode = "Additive",
+ EnableFading = true,
+ FadeUnit = "au",
+ FadeDistances = { 1.5, 15.0 },
+ FadeWidths = { 1.0, 25.0 }
+ },
+ Tag = { "solarsystem_labels" },
+ GUI = {
+ Name = "SNPP Label",
+ Path = "/Solar System/Planets/Earth"
+ }
}
table.insert(nodes, SNPP)
diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset
index 9065e44536..49c0fc93d1 100644
--- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset
+++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset
@@ -66,33 +66,30 @@ asset.onInitialize(function ()
}
}
+ -- @TODO (emmbr, 2021-05-27) this label is not visible. Too large fade distances?
+ -- Might also be affected by the rendering issues for labels
local TerraLabel = {
- Identifier = "TerraLabel",
- Parent = Terra.Identifier,
-
- Renderable = {
- Enabled = false,
- Type = "RenderableLabels",
- LabelText = "SNPP",
- FontSize = 100.0,
- LabelSize = 4.0,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
- LabelOrientationOption = "Camera View Direction",
- BlendMode = "Additive",
- EnableFading = true,
- FadeStartUnit = "au",
- FadeStartDistance = 0.15,
- FadeStartSpeed = 1.0,
- FadeEndUnit = "au",
- FadeEndDistance = 15.0,
- FadeEndSpeed = 25.0
- },
- Tag = { "solarsystem_labels" },
- GUI = {
- Name = "Terra Label",
- Path = "/Solar System/Planets/Earth"
- }
+ Identifier = "TerraLabel",
+ Parent = Terra.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderableLabels",
+ Text = "Terra",
+ FontSize = 70.0,
+ Size = 4.0,
+ MinMaxSize = { 1, 100 },
+ OrientationOption = "Camera View Direction",
+ BlendMode = "Additive",
+ EnableFading = true,
+ FadeUnit = "au",
+ FadeDistances = { 1.5, 15.0 },
+ FadeWidths = { 1.0, 25.0 }
+ },
+ Tag = { "solarsystem_labels" },
+ GUI = {
+ Name = "Terra Label",
+ Path = "/Solar System/Planets/Earth"
+ }
}
table.insert(nodes, Terra)
diff --git a/data/assets/scene/solarsystem/planets/earth/trail.asset b/data/assets/scene/solarsystem/planets/earth/trail.asset
index 39870cc5af..2f91712bde 100644
--- a/data/assets/scene/solarsystem/planets/earth/trail.asset
+++ b/data/assets/scene/solarsystem/planets/earth/trail.asset
@@ -12,7 +12,7 @@ local EarthTrail = {
Translation = {
Type = "SpiceTranslation",
Target = "EARTH",
- Observer = "SUN"
+ Observer = "SSB"
},
Color = { 0.5, 0.8, 1.0 },
Period = 365.242,
diff --git a/data/assets/scene/solarsystem/planets/earth/transforms.asset b/data/assets/scene/solarsystem/planets/earth/transforms.asset
index 797234ba15..db6f818310 100644
--- a/data/assets/scene/solarsystem/planets/earth/transforms.asset
+++ b/data/assets/scene/solarsystem/planets/earth/transforms.asset
@@ -9,7 +9,7 @@ local EarthBarycenter = {
Translation = {
Type = "SpiceTranslation",
Target = "EARTH BARYCENTER",
- Observer = "SUN"
+ Observer = "SSB"
}
},
GUI = {
diff --git a/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset b/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset
index f62b20513d..c4503abea0 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset
@@ -28,21 +28,17 @@ local Callisto = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/callisto.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 40.0,
- LabelsSize = 10.5,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 15000000.0,
- FadeOutStartingDistance = 5000000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 1350000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 11.5,
+ MinMaxSize = { 1, 100 },
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 5000000.0, 15000000.0 },
+ DistanceEPS = 1350000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "moon_solarSystem", "moon_giants", "moon_jupiter" },
diff --git a/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto_textures.asset b/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto_textures.asset
index 80621e6bee..c6cc74bb68 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto_textures.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto_textures.asset
@@ -2,6 +2,6 @@ local TexturesPath = asset.syncedResource({
Name = "Callisto Textures",
Type = "HttpSynchronization",
Identifier = "callisto_textures",
- Version = 1
+ Version = 2
})
asset.export("TexturesPath", TexturesPath)
diff --git a/data/assets/scene/solarsystem/planets/jupiter/callisto/layers/colorlayers/callisto_texture.asset b/data/assets/scene/solarsystem/planets/jupiter/callisto/layers/colorlayers/callisto_texture.asset
index 9cd2d1cf52..21653cde87 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/callisto/layers/colorlayers/callisto_texture.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/callisto/layers/colorlayers/callisto_texture.asset
@@ -3,7 +3,7 @@ local globeIdentifier = asset.require("./../../callisto").Callisto.Identifier
local layer = {
Identifier = "Texture",
- FilePath = texturesPath .. "/callisto.jpg",
+ FilePath = texturesPath .. "/callisto_os.tif",
}
asset.onInitialize(function ()
@@ -15,8 +15,8 @@ asset.export("layer", layer)
asset.meta = {
Name = "Callisto Texutre",
- Version = "1.0",
- Description = [[ Default jpg texture for Callisto]],
+ Version = "2.0",
+ Description = [[ Default texture for Callisto]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/default_layers.asset
index 926c4cc1fa..efb6a7510b 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/europa/default_layers.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/europa/default_layers.asset
@@ -1,7 +1,7 @@
local colorLayersPath = "./layers/colorlayers"
asset.require(colorLayersPath .. "/europa_texture")
-local colorLayer = asset.require(colorLayersPath .. "/voyager_global_mosaic")
+local colorLayer = asset.require(colorLayersPath .. "/voyager_global_mosaic_local")
-- Set enabled layers (temporary solution)
-- @TODO: do this using a boolean that's passed to the 'asset.require' instead
diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset
index 670ee9c7c8..1ecfb93b34 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset
@@ -28,21 +28,16 @@ local Europa = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/europa.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 40.0,
- LabelsSize = 10.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 8000000.0,
- FadeOutStartingDistance = 5000000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 700000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 11.0,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 500000.0, 8000000.0 },
+ DistanceEPS = 700000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "moon_solarSystem", "moon_giants", "moon_jupiter" },
diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/europa_textures.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/europa_textures.asset
index a1eb48b59e..259bec7da5 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/europa/europa_textures.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/europa/europa_textures.asset
@@ -2,6 +2,6 @@ local TexturesPath = asset.syncedResource({
Name = "Europa Textures",
Type = "HttpSynchronization",
Identifier = "europa_textures",
- Version = 1
+ Version = 2
})
asset.export("TexturesPath", TexturesPath)
diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/europa_texture.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/europa_texture.asset
index ed5e691509..1e690211b2 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/europa_texture.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/europa_texture.asset
@@ -3,7 +3,8 @@ local globeIdentifier = asset.require("./../../europa").Europa.Identifier
local layer = {
Identifier = "Texture",
- FilePath = texturesPath .. "/europa.jpg",
+ FilePath = texturesPath .. "/europa_os.tif",
+ Enabled = true
}
asset.onInitialize(function ()
@@ -15,8 +16,8 @@ asset.export("layer", layer)
asset.meta = {
Name = "Europa Texutre",
- Version = "1.0",
- Description = [[ Default jpg texture for Europa]],
+ Version = "2.0",
+ Description = [[ Default texture for Europa]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/voyager_global_mosaic_local.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/voyager_global_mosaic_local.asset
new file mode 100644
index 0000000000..36e08d3c16
--- /dev/null
+++ b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/voyager_global_mosaic_local.asset
@@ -0,0 +1,36 @@
+local texturesPath = asset.require("./../../europa_textures").TexturesPath
+local globeIdentifier = asset.require("./../../europa").Europa.Identifier
+
+local layer = {
+ Identifier = "Voyager_Global_Mosaic_Local",
+ Name = "Voyager Global Mosaic [Local]",
+ FilePath = texturesPath .. "/evgos.vrt",
+ BlendMode = "Color"
+}
+
+asset.onInitialize(function ()
+ openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
+end)
+
+asset.export("layer", layer)
+
+
+asset.meta = {
+ Name = "Voyager Global Mosaic",
+ Version = "1.0",
+ Description = [[ Europa Voyager - Galileo SSI Global Mosaic 500m v2. This global map
+ base of Europa utilizes the best image quality and moderate resolution coverage
+ supplied by the Galileo SSI (Solid-State Imaging) instrument and Voyager 1 and 2.
+ The image data was selected on the basis of overall image quality, reasonable
+ input resolution (from 20 km/pixel for gap fill to as high as 200 meters per
+ pixel[m]), and availability of moderate viewing and sun angles for topography.
+ The map projections are based on a sphere having a radius of 1,562.09 kilometers.
+ A Simple Cylindrical projection was used at a resolution of 500 m. (Description
+ from URL)]],
+ Author = "USGS",
+ URL = "https://astrogeology.usgs.gov/search/map/Europa/Voyager-Galileo/" ..
+ "Europa_Voyager_GalileoSSI_global_mosaic_500m",
+ License = "NASA/PDS",
+ Identifiers = {"Voyager_Global_Mosaic_Local"}
+}
+
diff --git a/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset b/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset
index 182b8751e9..ccda9c129a 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset
@@ -28,21 +28,16 @@ local Ganymede = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/ganymede.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 40.0,
- LabelsSize = 10.5,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 8000000.0,
- FadeOutStartingDistance = 2250000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 1750000.0,
- LabelsColor = {1.0, 1.0, 0.0}
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 11.5,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 2250000.0, 8000000.0 },
+ DistanceEPS = 1750000.0,
+ Color = {1.0, 1.0, 0.0}
}
},
Tag = { "moon_solarSystem", "moon_giants", "moon_jupiter" },
diff --git a/data/assets/scene/solarsystem/planets/jupiter/io/io.asset b/data/assets/scene/solarsystem/planets/jupiter/io/io.asset
index 50e84eaa6a..641cf411f6 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/io/io.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/io/io.asset
@@ -28,21 +28,16 @@ local Io = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/io.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 40.0,
- LabelsSize = 10.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 8500000.0,
- FadeOutStartingDistance = 4000000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 1000000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 11.0,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 4000000.0, 8500000.0 },
+ DistanceEPS = 1000000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "moon_solarSystem", "moon_giants", "moon_jupiter" },
diff --git a/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset b/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset
index c24a8d9789..a7941b8f18 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset
@@ -7,6 +7,11 @@ local Jupiter = {
Identifier = "Jupiter",
Parent = transforms.JupiterBarycenter.Identifier,
Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "JUPITER",
+ Observer = "JUPITER BARYCENTER"
+ },
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_JUPITER",
@@ -42,12 +47,11 @@ local JupiterLabel = {
Renderable = {
Enabled = false,
Type = "RenderableLabels",
- LabelText = "Jupiter",
- FontSize = 100.0,
- LabelSize = 8.6,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
- LabelOrientationOption = "Camera View Direction",
+ Text = "Jupiter",
+ FontSize = 70.0,
+ Size = 8.77,
+ MinMaxSize = { 1, 100 },
+ OrientationOption = "Camera View Direction",
BlendMode = "Additive"
},
Tag = { "solarsystem_labels" },
diff --git a/data/assets/scene/solarsystem/planets/jupiter/jupiter_globelabels.asset b/data/assets/scene/solarsystem/planets/jupiter/jupiter_globelabels.asset
index c13b0b0f4b..9de72c055c 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/jupiter_globelabels.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/jupiter_globelabels.asset
@@ -1,5 +1,5 @@
local LabelsPath = asset.syncedResource({
- Name = "Callisto Labels",
+ Name = "Jupiter Labels",
Type = "HttpSynchronization",
Identifier = "jupiter_labels",
Version = 1
diff --git a/data/assets/scene/solarsystem/planets/jupiter/jupiter_textures.asset b/data/assets/scene/solarsystem/planets/jupiter/jupiter_textures.asset
index c82f34e5a6..c310a1906b 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/jupiter_textures.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/jupiter_textures.asset
@@ -2,6 +2,6 @@ local TexturesPath = asset.syncedResource({
Name = "Jupiter Textures",
Type = "HttpSynchronization",
Identifier = "jupiter_textures",
- Version = 1
+ Version = 2
})
asset.export("TexturesPath", TexturesPath)
diff --git a/data/assets/scene/solarsystem/planets/jupiter/layers/colorlayers/jupiter_texture.asset b/data/assets/scene/solarsystem/planets/jupiter/layers/colorlayers/jupiter_texture.asset
index 0a9de27073..98b2d1543d 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/layers/colorlayers/jupiter_texture.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/layers/colorlayers/jupiter_texture.asset
@@ -3,7 +3,7 @@ local globeIdentifier = asset.require("./../../jupiter").Jupiter.Identifier
local layer = {
Identifier = "Texture",
- FilePath = texturesPath .. "/jupiter.jpg",
+ FilePath = texturesPath .. "/jupiter_os.tif",
}
asset.onInitialize(function ()
@@ -15,8 +15,8 @@ asset.export("layer", layer)
asset.meta = {
Name = "Jupiter Texutre",
- Version = "1.0",
- Description = [[ Default jpg texture for Jupiter]],
+ Version = "2.0",
+ Description = [[ Default texture for Jupiter]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
diff --git a/data/assets/scene/solarsystem/planets/jupiter/trail.asset b/data/assets/scene/solarsystem/planets/jupiter/trail.asset
index 7f5c7347b1..ef0ea4dc2a 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/trail.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/trail.asset
@@ -11,8 +11,8 @@ local JupiterTrail = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "JUPITER BARYCENTER",
- Observer = "SUN"
+ Target = "JUPITER",
+ Observer = "SSB"
},
Color = { 0.8, 0.7, 0.7 },
Period = 4330.595,
diff --git a/data/assets/scene/solarsystem/planets/jupiter/trail_earth.asset b/data/assets/scene/solarsystem/planets/jupiter/trail_earth.asset
index 50dd1cf706..e89618469b 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/trail_earth.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/trail_earth.asset
@@ -12,7 +12,7 @@ local JupiterTrailEarth = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "JUPITER BARYCENTER",
+ Target = "JUPITER",
Observer = "EARTH"
},
Color = { 1.0, 0.5, 0.2 },
@@ -36,7 +36,7 @@ asset.meta = {
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
- Identifiers = {"VenusTrailEarth"}
+ Identifiers = {"JupiterTrailEarth"}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { JupiterTrailEarth })
diff --git a/data/assets/scene/solarsystem/planets/jupiter/transforms.asset b/data/assets/scene/solarsystem/planets/jupiter/transforms.asset
index 28db943e93..510b1db636 100644
--- a/data/assets/scene/solarsystem/planets/jupiter/transforms.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/transforms.asset
@@ -11,7 +11,7 @@ local JupiterBarycenter = {
Translation = {
Type = "SpiceTranslation",
Target = "JUPITER BARYCENTER",
- Observer = "SUN"
+ Observer = "SSB"
}
},
GUI = {
@@ -27,7 +27,7 @@ assetHelper.registerSceneGraphNodesAndExport(asset, { JupiterBarycenter })
asset.meta = {
Name = "Jupiter Transforms",
Version = "1.0",
- Description = [[ Jupiter Barycenter transform]],
+ Description = [[ Jupiter Barycenter transform ]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
diff --git a/data/assets/scene/solarsystem/planets/mars/default_layers.asset b/data/assets/scene/solarsystem/planets/mars/default_layers.asset
index db06a922b2..54354cbafd 100644
--- a/data/assets/scene/solarsystem/planets/mars/default_layers.asset
+++ b/data/assets/scene/solarsystem/planets/mars/default_layers.asset
@@ -23,7 +23,8 @@ asset.require(colorLayersPath .. "/hirisels")
-- Height layers
asset.require(heightLayersPath .. "/mola_europe")
-local heightLayer = asset.require(heightLayersPath .. "/mola_utah")
+asset.require(heightLayersPath .. "/mola_utah")
+local heightLayer = asset.require(heightLayersPath .. "/MDEM200M")
asset.require(heightLayersPath .. "/hirisels")
-- Overlays
diff --git a/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/MDEM200M.asset b/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/MDEM200M.asset
new file mode 100644
index 0000000000..fefc177186
--- /dev/null
+++ b/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/MDEM200M.asset
@@ -0,0 +1,35 @@
+local mapServiceConfigs = asset.localResource("./../../map_service_configs")
+local globeIdentifier = asset.require("./../../mars").Mars.Identifier
+
+local layer = {
+ Identifier = "MDEM200M",
+ Name = "HRSC MOLA Blended DEM Global 200m v2",
+ FilePath = mapServiceConfigs .. "/ESRI/MDEM200M.tif",
+ Description = [[ Blend of data derived from the Mars Orbiter Laser Altimeter
+ (MOLA, an instrument aboard NASA’s
+ Mars Global Surveyor spacecraft), and data derived from the High-Resolution
+ Stereo Camera (HRSC, an instrument aboard the European Space Agency’s Mars
+ Express spacecraft). The average accuracy is ~100 meters in horizontal
+ position and the elevation uncertainty is at least ±3 m. This
+ tiled elevation layer, hosted by Esri, is made available using
+ lossless LERC compression.(Description from URL).]],
+}
+
+asset.onInitialize(function ()
+ openspace.globebrowsing.addLayer(globeIdentifier, "HeightLayers", layer)
+end)
+
+asset.export("layer", layer)
+
+
+asset.meta = {
+ Name = "Mars HRSC MOLA Blended DEM Global 200m v2",
+ Version = "1.0",
+ Description = [[ESRI Hosted ars HRSC MOLA Blended DEM.]],
+ Author = "esri_astro",
+ URL = "https://www.arcgis.com/home/item.html?id=225adad86379474ebc3d51a74573c99b",
+ License = "Esri Master License Agreement",
+ Identifiers = {"MDEM200M"}
+}
+
+
diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/MDEM200M.tif b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/MDEM200M.tif
new file mode 100644
index 0000000000..11e11e6d3e
--- /dev/null
+++ b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/MDEM200M.tif
@@ -0,0 +1,17 @@
+
+
+ http://astro.arcgis.com/arcgis/rest/services/OnMars/MDEM200M/ImageServer/tile/${z}/${y}/${x}
+
+
+ -180.0 90.0
+ 180.0 -90.0
+ 131328 65664
+ 7 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]]
+ 513 513
+ 1 Int16
+
+ 5
+ 404,400
+
diff --git a/data/assets/scene/solarsystem/planets/mars/mars.asset b/data/assets/scene/solarsystem/planets/mars/mars.asset
index c169c8a568..38ea1c813f 100644
--- a/data/assets/scene/solarsystem/planets/mars/mars.asset
+++ b/data/assets/scene/solarsystem/planets/mars/mars.asset
@@ -11,6 +11,11 @@ local Mars = {
Identifier = "Mars",
Parent = transforms.MarsBarycenter.Identifier,
Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "MARS",
+ Observer = "MARS BARYCENTER"
+ },
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_MARS",
@@ -23,21 +28,16 @@ local Mars = {
SegmentsPerPatch = 90,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/mars.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 14.0,
- LabelsSize = 9.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 2000000.0,
- FadeOutStartingDistance = 750000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 2500000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 8.7,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 750000.0, 2000000.0 },
+ DistanceEPS = 2500000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "planet_solarSystem", "planet_terrestrial" },
@@ -54,12 +54,11 @@ local MarsLabel = {
Renderable = {
Enabled = false,
Type = "RenderableLabels",
- LabelText = "Mars",
- FontSize = 100.0,
- LabelSize = 8.5,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
- LabelOrientationOption = "Camera View Direction",
+ Text = "Mars",
+ FontSize = 70.0,
+ Size = 8.66,
+ MinMaxSize = { 1, 100 },
+ OrientationOption = "Camera View Direction",
BlendMode = "Additive",
TransformationMatrix = {
1.0, 0.0, 0.0, -8.0E6,
diff --git a/data/assets/scene/solarsystem/planets/mars/trail.asset b/data/assets/scene/solarsystem/planets/mars/trail.asset
index 1922c582ea..78e8eea805 100644
--- a/data/assets/scene/solarsystem/planets/mars/trail.asset
+++ b/data/assets/scene/solarsystem/planets/mars/trail.asset
@@ -11,8 +11,8 @@ local MarsTrail = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "MARS BARYCENTER",
- Observer = "SUN"
+ Target = "MARS",
+ Observer = "SSB"
},
Color = { 0.814, 0.305, 0.220 },
Period = 686.973,
diff --git a/data/assets/scene/solarsystem/planets/mars/trail_earth.asset b/data/assets/scene/solarsystem/planets/mars/trail_earth.asset
index 62286cbae2..0863042ef5 100644
--- a/data/assets/scene/solarsystem/planets/mars/trail_earth.asset
+++ b/data/assets/scene/solarsystem/planets/mars/trail_earth.asset
@@ -12,7 +12,7 @@ local MarsTrailEarth = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "MARS BARYCENTER",
+ Target = "MARS",
Observer = "EARTH"
},
Color = { 1.0, 0.5, 0.2 },
diff --git a/data/assets/scene/solarsystem/planets/mars/transforms.asset b/data/assets/scene/solarsystem/planets/mars/transforms.asset
index 1ec160733b..7b8fb79dbf 100644
--- a/data/assets/scene/solarsystem/planets/mars/transforms.asset
+++ b/data/assets/scene/solarsystem/planets/mars/transforms.asset
@@ -9,7 +9,7 @@ local MarsBarycenter = {
Translation = {
Type = "SpiceTranslation",
Target = "MARS BARYCENTER",
- Observer = "SUN"
+ Observer = "SSB"
}
},
GUI = {
diff --git a/data/assets/scene/solarsystem/planets/mercury/mercury.asset b/data/assets/scene/solarsystem/planets/mercury/mercury.asset
index f1ea2d6c06..f6e8465910 100644
--- a/data/assets/scene/solarsystem/planets/mercury/mercury.asset
+++ b/data/assets/scene/solarsystem/planets/mercury/mercury.asset
@@ -9,6 +9,11 @@ local Mercury = {
Identifier = "Mercury",
Parent = transforms.MercuryBarycenter.Identifier,
Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "MERCURY",
+ Observer = "MERCURY BARYCENTER"
+ },
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_MERCURY",
@@ -24,21 +29,16 @@ local Mercury = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/Mercury.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 22.0,
- LabelsSize = 10.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 5000000.0,
- FadeOutStartingDistance = 1800000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 1500000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 10.1,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 1800000.0, 5000000.0 },
+ DistanceEPS = 1500000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "planet_solarSystem", "planet_terrestrial" },
@@ -53,12 +53,11 @@ local MercuryLabel = {
Renderable = {
Enabled = false,
Type = "RenderableLabels",
- LabelText = "Mercury",
- FontSize = 100.0,
- LabelSize = 8.3,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
- LabelOrientationOption = "Camera View Direction",
+ Text = "Mercury",
+ FontSize = 70.0,
+ Size = 8.46,
+ MinMaxSize = { 1, 100 },
+ OrientationOption = "Camera View Direction",
BlendMode = "Additive"
},
Tag = { "solarsystem_labels" },
diff --git a/data/assets/scene/solarsystem/planets/mercury/trail.asset b/data/assets/scene/solarsystem/planets/mercury/trail.asset
index 40628994a2..2514f0ca70 100644
--- a/data/assets/scene/solarsystem/planets/mercury/trail.asset
+++ b/data/assets/scene/solarsystem/planets/mercury/trail.asset
@@ -12,7 +12,7 @@ local MercuryTrail = {
Translation = {
Type = "SpiceTranslation",
Target = "MERCURY",
- Observer = "SUN"
+ Observer = "SSB"
},
Color = { 0.6, 0.5, 0.5 },
Period = 87.968,
diff --git a/data/assets/scene/solarsystem/planets/mercury/trail_earth.asset b/data/assets/scene/solarsystem/planets/mercury/trail_earth.asset
index 1b0a35d935..1d44518f34 100644
--- a/data/assets/scene/solarsystem/planets/mercury/trail_earth.asset
+++ b/data/assets/scene/solarsystem/planets/mercury/trail_earth.asset
@@ -12,7 +12,7 @@ local MercuryTrailEarth = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "MERCURY BARYCENTER",
+ Target = "MERCURY",
Observer = "EARTH"
},
Color = { 1.0, 0.5, 0.2 },
diff --git a/data/assets/scene/solarsystem/planets/mercury/transforms.asset b/data/assets/scene/solarsystem/planets/mercury/transforms.asset
index 21b85f696b..0b85348f9b 100644
--- a/data/assets/scene/solarsystem/planets/mercury/transforms.asset
+++ b/data/assets/scene/solarsystem/planets/mercury/transforms.asset
@@ -8,8 +8,8 @@ local MercuryBarycenter = {
Transform = {
Translation = {
Type = "SpiceTranslation",
- Target = "MERCURY",
- Observer = "SUN"
+ Target = "MERCURY BARYCENTER",
+ Observer = "SSB"
}
},
GUI = {
diff --git a/data/assets/scene/solarsystem/planets/neptune/major_moons.asset b/data/assets/scene/solarsystem/planets/neptune/major_moons.asset
index df57e32d64..698924a3e3 100644
--- a/data/assets/scene/solarsystem/planets/neptune/major_moons.asset
+++ b/data/assets/scene/solarsystem/planets/neptune/major_moons.asset
@@ -2,7 +2,7 @@ asset.require('./triton')
asset.meta = {
- Name = "Neptune Minor Moons",
+ Name = "Neptune Major Moons",
Version = "1.0",
Description = [[ Meta asset containing Neptune's major moon: Triton]],
Author = "OpenSpace Team",
diff --git a/data/assets/scene/solarsystem/planets/neptune/neptune.asset b/data/assets/scene/solarsystem/planets/neptune/neptune.asset
index 1b53920d46..e4e226a339 100644
--- a/data/assets/scene/solarsystem/planets/neptune/neptune.asset
+++ b/data/assets/scene/solarsystem/planets/neptune/neptune.asset
@@ -7,6 +7,11 @@ local Neptune = {
Identifier = "Neptune",
Parent = transforms.NeptuneBarycenter.Identifier,
Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "NEPTUNE",
+ Observer = "NEPTUNE BARYCENTER"
+ },
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_NEPTUNE",
@@ -33,12 +38,11 @@ local NeptuneLabel = {
Renderable = {
Enabled = false,
Type = "RenderableLabels",
- LabelText = "Neptune",
- FontSize = 100.0,
- LabelSize = 8.8,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
- LabelOrientationOption = "Camera View Direction",
+ Text = "Neptune",
+ FontSize = 70.0,
+ Size = 8.96,
+ MinMaxSize = { 1, 100 },
+ OrientationOption = "Camera View Direction",
BlendMode = "Additive"
},
Tag = { "solarsystem_labels" },
diff --git a/data/assets/scene/solarsystem/planets/neptune/trail.asset b/data/assets/scene/solarsystem/planets/neptune/trail.asset
index 86e554b33d..a20febb561 100644
--- a/data/assets/scene/solarsystem/planets/neptune/trail.asset
+++ b/data/assets/scene/solarsystem/planets/neptune/trail.asset
@@ -11,8 +11,8 @@ local NeptuneTrail = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "NEPTUNE BARYCENTER",
- Observer = "SUN"
+ Target = "NEPTUNE",
+ Observer = "SSB"
},
Color = { 0.2, 0.5, 1.0 },
-- Period = 60200,
diff --git a/data/assets/scene/solarsystem/planets/neptune/trail_earth.asset b/data/assets/scene/solarsystem/planets/neptune/trail_earth.asset
index 93b96735a5..791e8f70dd 100644
--- a/data/assets/scene/solarsystem/planets/neptune/trail_earth.asset
+++ b/data/assets/scene/solarsystem/planets/neptune/trail_earth.asset
@@ -12,7 +12,7 @@ local NeptuneTrailEarth = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "NEPTUNE BARYCENTER",
+ Target = "NEPTUNE",
Observer = "EARTH"
},
Color = { 1.0, 0.5, 0.2 },
@@ -40,5 +40,5 @@ asset.meta = {
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
- Identifiers = {"VenusTrailEarth"}
+ Identifiers = {"NeptuneTrailEarth"}
}
diff --git a/data/assets/scene/solarsystem/planets/neptune/transforms.asset b/data/assets/scene/solarsystem/planets/neptune/transforms.asset
index ede2678dbd..d5f0409737 100644
--- a/data/assets/scene/solarsystem/planets/neptune/transforms.asset
+++ b/data/assets/scene/solarsystem/planets/neptune/transforms.asset
@@ -9,7 +9,7 @@ local NeptuneBarycenter = {
Translation = {
Type = "SpiceTranslation",
Target = "NEPTUNE BARYCENTER",
- Observer = "SUN"
+ Observer = "SSB"
}
},
GUI = {
@@ -26,7 +26,7 @@ assetHelper.registerSceneGraphNodesAndExport(asset, { NeptuneBarycenter })
asset.meta = {
Name = "Neptune Transforms",
Version = "1.0",
- Description = [[ Neptune Barycenter transform]],
+ Description = [[ Neptune Barycenter transform ]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
diff --git a/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset b/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset
index 1cce3d7e20..f91edea8ed 100644
--- a/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset
@@ -26,21 +26,16 @@ local Dione = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/dione.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 32.0,
- LabelsSize = 8.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 3500000.0,
- FadeOutStartingDistance = 1000000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 200000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 8.7,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 500000.0, 3500000.0 },
+ DistanceEPS = 200000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" },
diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset
index 1f16f3f0bb..87d416faea 100644
--- a/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset
@@ -26,21 +26,16 @@ local Enceladus = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/enceladus.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 22.0,
- LabelsSize = 8.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 1000000.0,
- FadeOutStartingDistance = 500000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 100000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 8.1,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 300000.0, 1000000.0 },
+ DistanceEPS = 100000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" },
diff --git a/data/assets/scene/solarsystem/planets/saturn/hyperion/hyperion.asset b/data/assets/scene/solarsystem/planets/saturn/hyperion/hyperion.asset
index 77fe207be1..763123733a 100644
--- a/data/assets/scene/solarsystem/planets/saturn/hyperion/hyperion.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/hyperion/hyperion.asset
@@ -26,20 +26,16 @@ local Hyperion = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ -- @TODO (2021-05-21, emmbr26) These labels do not seem to be visible
+ Enabled = false,
FileName = labelsPath .. "/hyperion.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 14.0,
- LabelsSize = 8.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- FadeInStartingDistance = 500000.0,
- FadeOutStartingDistance = 1000000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 1350000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 8.6,
+ FadeInEnabled = true,
+ FadeDistances = { 500000.0, 1000000.0 },
+ DistanceEPS = 1350000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" },
diff --git a/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset b/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset
index 5a33262237..17c3c89c4b 100644
--- a/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset
@@ -26,21 +26,16 @@ local Iapetus = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/iapetus.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 30.0,
- LabelsSize = 8.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 3500000.0,
- FadeOutStartingDistance = 600000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 250000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 8.7,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 600000.0, 3500000.0 },
+ DistanceEPS = 250000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" },
diff --git a/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset b/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset
index 0b9e83521a..a54c8bc981 100644
--- a/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset
@@ -26,21 +26,16 @@ local Mimas = {
SegmentsPerPatch = 64,
Layers = { },
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/mimas.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 14.0,
- LabelsSize = 8.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 1000000.0,
- FadeOutStartingDistance = 400000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 25000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 7.7,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 400000.0, 1000000.0 },
+ DistanceEPS = 25000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" },
diff --git a/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset b/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset
index 0c2d323efe..48926b0140 100644
--- a/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset
@@ -26,21 +26,16 @@ local Rhea = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/rhea.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 40.0,
- LabelsSize = 8.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 2500000.0,
- FadeOutStartingDistance = 1000000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 250000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 9.0,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 500000.0, 2500000.0 },
+ DistanceEPS = 250000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" },
diff --git a/data/assets/scene/solarsystem/planets/saturn/saturn.asset b/data/assets/scene/solarsystem/planets/saturn/saturn.asset
index 555ac5fc63..77d44acf2a 100644
--- a/data/assets/scene/solarsystem/planets/saturn/saturn.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/saturn.asset
@@ -9,6 +9,11 @@ local Saturn = {
Identifier = "Saturn",
Parent = transforms.SaturnBarycenter.Identifier,
Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "SATURN",
+ Observer = "SATURN BARYCENTER"
+ },
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_SATURN",
@@ -56,13 +61,12 @@ local SaturnLabel = {
Renderable = {
Enabled = false,
Type = "RenderableLabels",
- LabelText = "Saturn",
- FontSize = 100.0,
- LabelSize = 8.7,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
+ Text = "Saturn",
+ FontSize = 70.0,
+ Size = 8.85,
+ MinMaxSize = { 1, 100 },
BlendMode = "Additive",
- LabelOrientationOption = "Camera View Direction"
+ OrientationOption = "Camera View Direction"
},
Tag = { "solarsystem_labels" },
GUI = {
diff --git a/data/assets/scene/solarsystem/planets/saturn/saturn_globelabels.asset b/data/assets/scene/solarsystem/planets/saturn/saturn_globelabels.asset
index cca9ae611b..be23aa78c1 100644
--- a/data/assets/scene/solarsystem/planets/saturn/saturn_globelabels.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/saturn_globelabels.asset
@@ -1,5 +1,5 @@
local LabelsPath = asset.syncedResource({
- Name = "Dione Labels",
+ Name = "Saturn Labels",
Type = "HttpSynchronization",
Identifier = "saturn_labels",
Version = 1
diff --git a/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset b/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset
index 636081f8af..a87015d37d 100644
--- a/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset
@@ -26,21 +26,16 @@ local Tethys = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/tethys.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 24.0,
- LabelsSize = 8.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 1500000.0,
- FadeOutStartingDistance = 500000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 200000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 8.3,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 500000.0, 1500000.0 },
+ DistanceEPS = 200000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" },
diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/titan/default_layers.asset
index 9159115f6a..faae518b07 100644
--- a/data/assets/scene/solarsystem/planets/saturn/titan/default_layers.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/titan/default_layers.asset
@@ -1,7 +1,6 @@
local colorLayersPath = "./layers/colorlayers"
-colorLayer = asset.require(colorLayersPath .. "/titan_texture")
-local colorLayer = asset.require(colorLayersPath .. "/cassini_iss_global_mosaic_4km_liu")
+local colorLayer = asset.require(colorLayersPath .. "/cassini_iss_global_mosaic_4km_local")
-- Set enabled layers (temporary solution)
-- @TODO: do this using a boolean that's passed to the 'asset.require' instead
@@ -14,7 +13,7 @@ end)
asset.meta = {
Name = "Default Titan Layers",
Version = "1.0",
- Description = [[ Default Titan layers are: Titan Texture and Cassini ISS Global
+ Description = [[ Default Titan layers are: Cassini ISS Global
Mosaic]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/layers/colorlayers/cassini_iss_global_mosaic_4km_local.asset b/data/assets/scene/solarsystem/planets/saturn/titan/layers/colorlayers/cassini_iss_global_mosaic_4km_local.asset
new file mode 100644
index 0000000000..0356317b58
--- /dev/null
+++ b/data/assets/scene/solarsystem/planets/saturn/titan/layers/colorlayers/cassini_iss_global_mosaic_4km_local.asset
@@ -0,0 +1,34 @@
+local texturesPath = asset.require("./../../titan_textures").TexturesPath
+local globeIdentifier = asset.require("./../../titan").Titan.Identifier
+
+local layer = {
+ Identifier = "Cassini_ISS_Global_Mosaic_4km_Local",
+ Name = "Cassini ISS Global Mosaic 4km",
+ FilePath = texturesPath .. "/Titan_ISS_P19658_Mosaic_Global_4km_os.tif",
+ Description = [[ This global digital map of Saturn's moon Titan was created using
+ images taken by the Cassini spacecraft's Imaging Science Subsystem (ISS). The map
+ was produced in June 2015 using data collected through Cassini's flyby on April 7,
+ 2014, known as "T100". The mean radius of Titan used for projection of this map is
+ 1,600 miles (2,575 kilometers). Pixel resolution is 4005 meters per pixel (m).
+ Titan is assumed to be spherical until a control network -- a model of the moon's
+ shape based on multiple images tied together at defined points on the surface --
+ is created at some point in the future. (Description from URL)]]
+}
+
+asset.onInitialize(function ()
+ openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
+end)
+
+asset.export("layer", layer)
+
+
+asset.meta = {
+ Name = "Cassini ISS Global Mosaic",
+ Version = "1.0",
+ Description = [[ Cassini global image layer for Titan]],
+ Author = "USGS",
+ URL = "https://astrogeology.usgs.gov/search/map/Titan/Cassini/Global-Mosaic/" ..
+ "Titan_ISS_P19658_Mosaic_Global_4km",
+ License = "NASA/PDS",
+ Identifiers = {"Cassini_ISS_Global_Mosaic_4km_Local"}
+}
diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/layers/colorlayers/titan_texture.asset b/data/assets/scene/solarsystem/planets/saturn/titan/layers/colorlayers/titan_texture.asset
deleted file mode 100644
index b9730b43eb..0000000000
--- a/data/assets/scene/solarsystem/planets/saturn/titan/layers/colorlayers/titan_texture.asset
+++ /dev/null
@@ -1,23 +0,0 @@
-local texturesPath = asset.require("./../../titan_textures").TexturesPath
-local globeIdentifier = asset.require("./../../titan").Titan.Identifier
-
-local layer = {
- Identifier = "Texture",
- FilePath = texturesPath .. "/titan.jpg",
-}
-
-asset.onInitialize(function ()
- openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
-end)
-
-asset.export("layer", layer)
-
-
-asset.meta = {
- Name = "Titan Texutre",
- Version = "1.0",
- Description = [[ Default jpg texture for Titan]],
- Author = "OpenSpace Team",
- URL = "http://openspaceproject.com",
- License = "MIT license"
-}
diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset b/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset
index fb52863ec2..25e701052e 100644
--- a/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset
@@ -26,21 +26,16 @@ local Titan = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/titan.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 14.0,
- LabelsSize = 10.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 7500000.0,
- FadeOutStartingDistance = 6000000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 1350000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 9.6,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 5000000.0, 7500000.0 },
+ DistanceEPS = 1350000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" },
diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/titan_textures.asset b/data/assets/scene/solarsystem/planets/saturn/titan/titan_textures.asset
index 6083943b65..d64bdd04f3 100644
--- a/data/assets/scene/solarsystem/planets/saturn/titan/titan_textures.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/titan/titan_textures.asset
@@ -2,6 +2,6 @@ local TexturesPath = asset.syncedResource({
Type = "HttpSynchronization",
Name = "Titan textures",
Identifier = "titan_textures",
- Version = 1
+ Version = 2
})
asset.export("TexturesPath", TexturesPath)
diff --git a/data/assets/scene/solarsystem/planets/saturn/trail.asset b/data/assets/scene/solarsystem/planets/saturn/trail.asset
index 907eb7ae94..d2f09c1362 100644
--- a/data/assets/scene/solarsystem/planets/saturn/trail.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/trail.asset
@@ -10,8 +10,8 @@ local SaturnTrail = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "SATURN BARYCENTER",
- Observer = "SUN"
+ Target = "SATURN",
+ Observer = "SSB"
},
Color = { 0.85, 0.75, 0.51 },
Period = 10746.94,
diff --git a/data/assets/scene/solarsystem/planets/saturn/trail_earth.asset b/data/assets/scene/solarsystem/planets/saturn/trail_earth.asset
index 90a686abbb..545e2e277b 100644
--- a/data/assets/scene/solarsystem/planets/saturn/trail_earth.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/trail_earth.asset
@@ -12,7 +12,7 @@ local SaturnTrailEarth = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "SATURN BARYCENTER",
+ Target = "SATURN",
Observer = "EARTH"
},
Color = { 1.0, 0.5, 0.2 },
@@ -37,8 +37,8 @@ asset.meta = {
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
- Identifiers = {"VenusTrailEarth"}
+ Identifiers = {"SaturnTrailEarth"}
}
-assetHelper.registerSceneGraphNodesAndExport(asset, { UranusTrailEarth })
+assetHelper.registerSceneGraphNodesAndExport(asset, { SaturnTrailEarth })
diff --git a/data/assets/scene/solarsystem/planets/saturn/transforms.asset b/data/assets/scene/solarsystem/planets/saturn/transforms.asset
index cedfe258df..066c700e44 100644
--- a/data/assets/scene/solarsystem/planets/saturn/transforms.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/transforms.asset
@@ -9,7 +9,7 @@ local SaturnBarycenter = {
Translation = {
Type = "SpiceTranslation",
Target = "SATURN BARYCENTER",
- Observer = "SUN"
+ Observer = "SSB"
}
},
GUI = {
diff --git a/data/assets/scene/solarsystem/planets/uranus/trail.asset b/data/assets/scene/solarsystem/planets/uranus/trail.asset
index 76d6996599..ad24d25221 100644
--- a/data/assets/scene/solarsystem/planets/uranus/trail.asset
+++ b/data/assets/scene/solarsystem/planets/uranus/trail.asset
@@ -10,8 +10,8 @@ local UranusTrail = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "URANUS BARYCENTER",
- Observer = "SUN"
+ Target = "URANUS",
+ Observer = "SSB"
},
Color = { 0.60, 0.95, 1.00 },
Period = 30588.740,
diff --git a/data/assets/scene/solarsystem/planets/uranus/trail_earth.asset b/data/assets/scene/solarsystem/planets/uranus/trail_earth.asset
index 5c5d4d775d..a680c5e429 100644
--- a/data/assets/scene/solarsystem/planets/uranus/trail_earth.asset
+++ b/data/assets/scene/solarsystem/planets/uranus/trail_earth.asset
@@ -12,7 +12,7 @@ local UranusTrailEarth = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "URANUS BARYCENTER",
+ Target = "URANUS",
Observer = "EARTH"
},
Color = { 1.0, 0.5, 0.2 },
@@ -40,5 +40,5 @@ asset.meta = {
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
- Identifiers = {"VenusTrailEarth"}
+ Identifiers = {"UranusTrailEarth"}
}
diff --git a/data/assets/scene/solarsystem/planets/uranus/transforms.asset b/data/assets/scene/solarsystem/planets/uranus/transforms.asset
index 99a3274132..a377192913 100644
--- a/data/assets/scene/solarsystem/planets/uranus/transforms.asset
+++ b/data/assets/scene/solarsystem/planets/uranus/transforms.asset
@@ -11,7 +11,7 @@ local UranusBarycenter = {
Translation = {
Type = "SpiceTranslation",
Target = "URANUS BARYCENTER",
- Observer = "SUN"
+ Observer = "SSB"
}
},
GUI = {
@@ -31,5 +31,6 @@ asset.meta = {
Description = [[ Uranus Barycenter transform]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
- License = "MIT license"
+ License = "MIT license",
+ Identifiers = {"UranusBarycenter"}
}
diff --git a/data/assets/scene/solarsystem/planets/uranus/uranus.asset b/data/assets/scene/solarsystem/planets/uranus/uranus.asset
index c08924fd96..e8dadd8be4 100644
--- a/data/assets/scene/solarsystem/planets/uranus/uranus.asset
+++ b/data/assets/scene/solarsystem/planets/uranus/uranus.asset
@@ -7,6 +7,11 @@ local Uranus = {
Identifier = "Uranus",
Parent = transforms.UranusBarycenter.Identifier,
Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "URANUS",
+ Observer = "URANUS BARYCENTER"
+ },
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_URANUS",
@@ -33,12 +38,11 @@ local UranusLabel = {
Renderable = {
Enabled = false,
Type = "RenderableLabels",
- LabelText = "Uranus",
- FontSize = 100.0,
- LabelSize = 8.7,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
- LabelOrientationOption = "Camera View Direction",
+ Text = "Uranus",
+ FontSize = 70.0,
+ Size = 8.86,
+ MinMaxSize = { 1, 100 },
+ OrientationOption = "Camera View Direction",
BlendMode = "Additive"
},
Tag = { "solarsystem_labels" },
diff --git a/data/assets/scene/solarsystem/planets/venus/trail.asset b/data/assets/scene/solarsystem/planets/venus/trail.asset
index 8abf07815f..5d0ad9fc1e 100644
--- a/data/assets/scene/solarsystem/planets/venus/trail.asset
+++ b/data/assets/scene/solarsystem/planets/venus/trail.asset
@@ -11,8 +11,8 @@ local VenusTrail = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "VENUS BARYCENTER",
- Observer = "SUN"
+ Target = "VENUS",
+ Observer = "SSB"
},
Color = { 1.0, 0.5, 0.2 },
Period = 224.695,
diff --git a/data/assets/scene/solarsystem/planets/venus/trail_earth.asset b/data/assets/scene/solarsystem/planets/venus/trail_earth.asset
index 3af7aecaaa..79e78aa2bb 100644
--- a/data/assets/scene/solarsystem/planets/venus/trail_earth.asset
+++ b/data/assets/scene/solarsystem/planets/venus/trail_earth.asset
@@ -11,7 +11,7 @@ local VenusTrailEarth = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
- Target = "VENUS BARYCENTER",
+ Target = "VENUS",
Observer = "EARTH"
},
Color = { 1.0, 0.5, 0.2 },
diff --git a/data/assets/scene/solarsystem/planets/venus/transforms.asset b/data/assets/scene/solarsystem/planets/venus/transforms.asset
index 2db6ea4117..9ae009af03 100644
--- a/data/assets/scene/solarsystem/planets/venus/transforms.asset
+++ b/data/assets/scene/solarsystem/planets/venus/transforms.asset
@@ -9,7 +9,7 @@ local VenusBarycenter = {
Translation = {
Type = "SpiceTranslation",
Target = "VENUS BARYCENTER",
- Observer = "SUN"
+ Observer = "SSB"
}
},
GUI = {
@@ -26,7 +26,7 @@ assetHelper.registerSceneGraphNodesAndExport(asset, { VenusBarycenter })
asset.meta = {
Name = "Venus Transforms",
Version = "1.0",
- Description = [[ Spice translation for Venus Barycenter]],
+ Description = [[ Spice translation for Venus Barycenter ]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
diff --git a/data/assets/scene/solarsystem/planets/venus/venus.asset b/data/assets/scene/solarsystem/planets/venus/venus.asset
index b07ce04f0c..062f58fade 100644
--- a/data/assets/scene/solarsystem/planets/venus/venus.asset
+++ b/data/assets/scene/solarsystem/planets/venus/venus.asset
@@ -8,6 +8,11 @@ local Venus = {
Identifier = "Venus",
Parent = transforms.VenusBarycenter.Identifier,
Transform = {
+ Translation = {
+ Type = "SpiceTranslation",
+ Target = "VENUS",
+ Observer = "VENUS BARYCENTER"
+ },
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_VENUS",
@@ -26,22 +31,16 @@ local Venus = {
SegmentsPerPatch = 64,
Layers = {},
Labels = {
- Enable = false,
+ Enabled = false,
FileName = labelsPath .. "/venus.labels",
- LabelAlignmentOption = "Horizontally", -- or Circularly
- LabelsFontSize = 40.0,
- LabelsSize = 10.0,
- LabelsMinSize = 1.0,
- LabelsMaxSize = 1500.0,
- ProximityEnabled = false,
- LabelsFadeInEnabled = true,
- LabelsFadeInEnabled = true,
- LabelsFadeOutEnabled = true,
- FadeInStartingDistance = 7000000.0,
- FadeOutStartingDistance = 2000000.0,
- LabelsForceDomeRendering = true,
- LabelsDistanceEPS = 4000000.0,
- LabelsColor = { 1.0, 1.0, 0.0 }
+ AlignmentOption = "Horizontally", -- or Circularly
+ FontSize = 20.0,
+ Size = 11.0,
+ FadeInEnabled = true,
+ FadeOutEnabled = true,
+ FadeDistances = { 2000000.0, 7000000.0 },
+ DistanceEPS = 4000000.0,
+ Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "planet_solarSystem", "planet_terrestrial" },
@@ -53,25 +52,24 @@ local Venus = {
}
local VenusLabel = {
- Identifier = "VenusLabel",
- Parent = Venus.Identifier,
- Renderable = {
- Enabled = false,
- Type = "RenderableLabels",
- LabelText = "Venus",
- FontSize = 100.0,
- LabelSize = 8.4,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
- LabelOrientationOption = "Camera View Direction",
- BlendMode = "Additive"
- },
- Tag = { "solarsystem_labels" },
- GUI = {
- Name = "Venus Label",
- Path = "/Solar System/Planets/Venus",
- Description = "Label for Venus, viewable within the solar system."
- }
+ Identifier = "VenusLabel",
+ Parent = Venus.Identifier,
+ Renderable = {
+ Enabled = false,
+ Type = "RenderableLabels",
+ Text = "Venus",
+ FontSize = 70.0,
+ Size = 8.54,
+ MinMaxSize = { 1, 100 },
+ OrientationOption = "Camera View Direction",
+ BlendMode = "Additive"
+ },
+ Tag = { "solarsystem_labels" },
+ GUI = {
+ Name = "Venus Label",
+ Path = "/Solar System/Planets/Venus",
+ Description = "Label for Venus, viewable within the solar system."
+ }
}
assetHelper.registerSceneGraphNodesAndExport(asset, { Venus, VenusLabel })
diff --git a/data/assets/scene/solarsystem/sun/glare.asset b/data/assets/scene/solarsystem/sun/glare.asset
index 827ab90509..a45d80dd82 100644
--- a/data/assets/scene/solarsystem/sun/glare.asset
+++ b/data/assets/scene/solarsystem/sun/glare.asset
@@ -7,7 +7,7 @@ asset.require("spice/base")
local SunGlare = {
Identifier = "SunGlare",
- Parent = transforms.SolarSystemBarycenter.Identifier,
+ Parent = transforms.SunIAU.Identifier,
Renderable = {
Type = "RenderablePlaneImageLocal",
Size = 1.3*10^10.5,
@@ -18,13 +18,6 @@ local SunGlare = {
Opacity = 0.65,
RenderableType = "PreDeferredTransparency"
},
- Transform = {
- Translation = {
- Type = "SpiceTranslation",
- Target = "SUN",
- Observer = "SSB"
- }
- },
GUI = {
Name = "Sun Glare",
Path = "/Solar System/Sun",
diff --git a/data/assets/scene/solarsystem/sun/sun.asset b/data/assets/scene/solarsystem/sun/sun.asset
index 7eae833e2d..de53d4aa1b 100644
--- a/data/assets/scene/solarsystem/sun/sun.asset
+++ b/data/assets/scene/solarsystem/sun/sun.asset
@@ -26,20 +26,16 @@ local SunLabel = {
Renderable = {
Enabled = false,
Type = "RenderableLabels",
- LabelText = "Sun",
- FontSize = 100.0,
- LabelSize = 13.127,
- LabelMaxSize = 100.0,
- LabelMinSize = 1.0,
- LabelOrientationOption = "Camera View Direction",
+ Text = "Sun",
+ FontSize = 70.0,
+ Size = 14.17,
+ MinMaxSize = { 1, 50 },
+ OrientationOption = "Camera View Direction",
BlendMode = "Additive",
EnableFading = true,
- FadeStartUnit = "Pm",
- FadeStartDistance = 2.841,
- FadeStartSpeed = 1.375,
- FadeEndUnit = "pc",
- FadeEndDistance = 1.326,
- FadeEndSpeed = 1.0
+ FadeUnit = "pc",
+ FadeDistances = { 1.33, 15.0 },
+ FadeWidths = { 1.0, 20.0 }
},
Tag = { "solarsystem_labels" },
GUI = {
diff --git a/data/assets/scene/solarsystem/sun/transforms_heliosphere.asset b/data/assets/scene/solarsystem/sun/transforms_heliosphere.asset
index 4e20520e24..92e486fb5c 100644
--- a/data/assets/scene/solarsystem/sun/transforms_heliosphere.asset
+++ b/data/assets/scene/solarsystem/sun/transforms_heliosphere.asset
@@ -5,7 +5,7 @@ local HNMKernel = asset.localResource("./kernels/HNM.tf")
local HNMReferenceFrame = {
Identifier = "HNMReferenceFrame",
- Parent = sunTransforms.SolarSystemBarycenter.Identifier,
+ Parent = sunTransforms.SunIAU.Identifier,
Transform = {
Rotation = {
Type = "SpiceRotation",
diff --git a/data/assets/util/circle.asset b/data/assets/util/circle.asset
new file mode 100644
index 0000000000..4717b87883
--- /dev/null
+++ b/data/assets/util/circle.asset
@@ -0,0 +1,8 @@
+local circle = asset.syncedResource({
+ Name = "Circle",
+ Type = "HttpSynchronization",
+ Identifier = "circle_image",
+ Version = 1
+})
+
+asset.export('circle', circle)
diff --git a/data/assets/util/default_joystick.asset b/data/assets/util/default_joystick.asset
deleted file mode 100644
index 8ecce48410..0000000000
--- a/data/assets/util/default_joystick.asset
+++ /dev/null
@@ -1,228 +0,0 @@
-local propertyHelper = asset.require('./property_helper')
-
--- Allowed values for the second parameter of bindJoystickAxis:
--- "None"
--- "Orbit X"
--- "Orbit Y"
--- "Zoom" -- both in and out
--- "Zoom In"
--- "Zoom Out"
--- "LocalRoll X"
--- "LocalRoll Y"
--- "GlobalRoll X"
--- "GlobalRoll Y"
--- "Pan X"
--- "Pan Y"
--- Third parameter determines whether the axis should be inverted
--- Fourth parameter determines whether the axis should be normalized from [-1,1] to [0,1]
-
-
-local XBoxController = {
- LeftThumbStick = { 0 , 1 },
- RightThumbStick = { 2, 3 },
- LeftTrigger = 4,
- RightTrigger = 5,
- A = 0,
- B = 1,
- X = 2,
- Y = 3,
- LB = 4,
- RB = 5,
- Select = 6,
- Start = 7,
- LeftStick = 8,
- RightStick = 9,
- DPad = {
- Up = 10,
- Right = 11,
- Down = 12,
- Left = 13
- }
-}
-
-local PS4Controller = {
- LeftThumbStick = { 0 , 1 },
- RightThumbStick = { 2, 5 },
- LeftTrigger = 3,
- RightTrigger = 4,
- A = 1, -- Cross
- B = 2, -- Circle
- X = 0, -- Square
- Y = 3, -- Triangle
- LB = 4,
- RB = 5,
- Select = 9, -- options
- Start = 12, -- PS button
- LeftStick = 10,
- RightStick = 11,
- DPad = {
- Up = 14,
- Right = 15,
- Down = 16,
- Left = 17
- }
-}
-
-local SpaceMouse = {
- Push = {0, 1, 2}, -- left/right, back/forth, up/down
- Twist = {5}, -- left/right
- Tilt = {4, 3}, -- left/right, back/forth
- LeftButton = 0,
- RightButton = 1
-}
-
--- Variables to store the state of the joystick between frames
-Joystick = {}
-Joystick.State = {}
-Joystick.State.IsInRollMode = false
-Joystick.State.Axis = {}
-
-local bindLocalRoll = function(axis)
- return [[
- -- We only want to store the current state in the first mode that is enabled, otherwise we will overwrite the backup
- if not Joystick.State.IsInRollMode then
- -- Save current axis state
- Joystick.State.Axis.Type, Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity = openspace.navigation.joystickAxis(]] .. axis .. [[)
- end
-
- -- Set new axis state
- openspace.navigation.bindJoystickAxis(]] .. axis .. [[, "LocalRoll X", Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity);
- Joystick.State.IsInRollMode = true
- ]]
-end
-
-local bindGlobalRoll = function(axis)
- return [[
- -- We only want to store the current state in the first mode that is enabled, otherwise we will overwrite the backup
- if not Joystick.State.IsInRollMode then
- -- Save current axis state
- Joystick.State.Axis.Type, Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity = openspace.navigation.joystickAxis(]] .. axis .. [[)
- end
-
- -- Set new axis state
- openspace.navigation.bindJoystickAxis(]] .. axis .. [[, "GlobalRoll X", Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity);
- Joystick.State.IsInRollMode = true
- ]]
-end
-
-local permaBindLocalRoll = function(axis)
- return [[
- -- Save current axis state
- Joystick.State.Axis.Type, Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity = openspace.navigation.joystickAxis(]] .. axis .. [[)
-
- -- Set new axis state
- openspace.navigation.bindJoystickAxis(]] .. axis .. [[, "LocalRoll X", Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity);
- ]]
-end
-
-local permaBindGlobalRoll = function(axis)
- return [[
- -- Save current axis state
- Joystick.State.Axis.Type, Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity = openspace.navigation.joystickAxis(]] .. axis .. [[)
-
- -- Set new axis state
- openspace.navigation.bindJoystickAxis(]] .. axis .. [[, "GlobalRoll X", Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity);
- ]]
-end
-
-local unbindRoll = function(axis)
- return [[
- -- Reset previous state
- openspace.navigation.bindJoystickAxis(]] .. axis .. [[, Joystick.State.Axis.Type, Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity);
- ]]
-end
-
-asset.onInitialize(function()
- -- Set the controller to the connected controller
- -- Currently: XBoxController, PS4Controller or SpaceMouse
- local controller = XBoxController;
-
- -- Case of XBoxController or PS4Controller
- if(controller.A ~= nil) then
- openspace.navigation.setAxisDeadZone(controller.LeftThumbStick[1], 0.15)
- openspace.navigation.setAxisDeadZone(controller.LeftThumbStick[2], 0.15)
- openspace.navigation.setAxisDeadZone(controller.RightThumbStick[1], 0.15)
- openspace.navigation.setAxisDeadZone(controller.RightThumbStick[2], 0.15)
-
- openspace.navigation.bindJoystickAxis(controller.LeftThumbStick[1], "Orbit X");
- openspace.navigation.bindJoystickAxis(controller.LeftThumbStick[2], "Orbit Y", true);
- openspace.navigation.bindJoystickAxis(controller.RightThumbStick[1], "Pan X", true);
- openspace.navigation.bindJoystickAxis(controller.RightThumbStick[2], "Pan Y", true);
- openspace.navigation.bindJoystickAxis(controller.LeftTrigger, "Zoom Out", false, true);
- openspace.navigation.bindJoystickAxis(controller.RightTrigger, "Zoom In", false, true);
-
- openspace.navigation.bindJoystickButton(
- controller.LB,
- bindLocalRoll(controller.RightThumbStick[1]),
- "Switch to local roll mode"
- )
- openspace.navigation.bindJoystickButton(
- controller.LB,
- unbindRoll(controller.RightThumbStick[1]),
- "Switch back to normal mode",
- "Release"
- )
- openspace.navigation.bindJoystickButton(
- controller.RB,
- bindGlobalRoll(controller.RightThumbStick[1]),
- "Switch to global roll mode"
- )
- openspace.navigation.bindJoystickButton(
- controller.RB,
- unbindRoll(controller.RightThumbStick[1]),
- "Switch back to normal mode",
- "Release"
- )
-
- openspace.navigation.bindJoystickButton(
- controller.A,
- propertyHelper.invert('NavigationHandler.OrbitalNavigator.Friction.ZoomFriction'),
- "Toggle zoom friction"
- )
- openspace.navigation.bindJoystickButton(
- controller.B,
- propertyHelper.invert('NavigationHandler.OrbitalNavigator.Friction.RotationalFriction'),
- "Toggle rotational friction"
- )
- openspace.navigation.bindJoystickButton(
- controller.DPad.Left,
- propertyHelper.invert('NavigationHandler.OrbitalNavigator.Friction.RollFriction'),
- "Toggle roll friction"
- )
-
- openspace.navigation.bindJoystickButton(
- controller.X,
- "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '');" ..
- "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Earth');" ..
- "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);",
- "Switch target to Earth"
- )
- openspace.navigation.bindJoystickButton(
- controller.Y,
- "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '');" ..
- "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Mars');" ..
- "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);",
- "Switch target to Mars"
- )
- -- Case of SpaceMouse
- elseif (controller.LeftButton ~= nil) then
- openspace.navigation.bindJoystickAxis(controller.Push[1], "Orbit X", false, false, true, 40.0);
- openspace.navigation.bindJoystickAxis(controller.Push[2], "Orbit Y", false, false, true, 40.0);
- openspace.navigation.bindJoystickAxis(controller.Twist[1], "Pan X", true, false, true, 40.0);
- openspace.navigation.bindJoystickAxis(controller.Tilt[2], "Pan Y", false, false, true, 35.0);
- openspace.navigation.bindJoystickAxis(controller.Push[3], "Zoom", false, false, true, 40.0);
- openspace.navigation.bindJoystickAxis(controller.Tilt[1], "LocalRoll X", false, false, true, 35.0);
-
- openspace.navigation.bindJoystickButton(
- controller.LeftButton,
- permaBindLocalRoll(controller.Tilt[1]),
- "Switch to local roll mode"
- )
-
- openspace.navigation.bindJoystickButton(
- controller.RightButton,
- permaBindGlobalRoll(controller.Tilt[1]),
- "Switch to global roll mode"
- )
- end
-end)
diff --git a/data/assets/util/joysticks/joystick_helper.asset b/data/assets/util/joysticks/joystick_helper.asset
new file mode 100644
index 0000000000..106c9dc901
--- /dev/null
+++ b/data/assets/util/joysticks/joystick_helper.asset
@@ -0,0 +1,66 @@
+-- Variables to store the state of the joystick between frames
+Joystick = {}
+Joystick.State = {}
+Joystick.State.IsInRollMode = false
+Joystick.State.Axis = {}
+
+local bindLocalRoll = function(axis)
+ return [[
+ -- We only want to store the current state in the first mode that is enabled, otherwise we will overwrite the backup
+ if not Joystick.State.IsInRollMode then
+ -- Save current axis state
+ Joystick.State.Axis.Type, Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity = openspace.navigation.joystickAxis(]] .. axis .. [[)
+ end
+
+ -- Set new axis state
+ openspace.navigation.bindJoystickAxis(]] .. axis .. [[, "LocalRoll X", Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity);
+ Joystick.State.IsInRollMode = true
+ ]]
+end
+
+local bindGlobalRoll = function(axis)
+ return [[
+ -- We only want to store the current state in the first mode that is enabled, otherwise we will overwrite the backup
+ if not Joystick.State.IsInRollMode then
+ -- Save current axis state
+ Joystick.State.Axis.Type, Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity = openspace.navigation.joystickAxis(]] .. axis .. [[)
+ end
+
+ -- Set new axis state
+ openspace.navigation.bindJoystickAxis(]] .. axis .. [[, "GlobalRoll X", Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity);
+ Joystick.State.IsInRollMode = true
+ ]]
+end
+
+local permaBindLocalRoll = function(axis)
+ return [[
+ -- Save current axis state
+ Joystick.State.Axis.Type, Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity = openspace.navigation.joystickAxis(]] .. axis .. [[)
+
+ -- Set new axis state
+ openspace.navigation.bindJoystickAxis(]] .. axis .. [[, "LocalRoll X", Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity);
+ ]]
+end
+
+local permaBindGlobalRoll = function(axis)
+ return [[
+ -- Save current axis state
+ Joystick.State.Axis.Type, Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity = openspace.navigation.joystickAxis(]] .. axis .. [[)
+
+ -- Set new axis state
+ openspace.navigation.bindJoystickAxis(]] .. axis .. [[, "GlobalRoll X", Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity);
+ ]]
+end
+
+local unbindRoll = function(axis)
+ return [[
+ -- Reset previous state
+ openspace.navigation.bindJoystickAxis(]] .. axis .. [[, Joystick.State.Axis.Type, Joystick.State.Axis.Inverted, Joystick.State.Axis.Normalized, Joystick.State.Axis.Sticky, Joystick.State.Axis.Sensitivity);
+ ]]
+end
+
+asset.export("bindLocalRoll", bindLocalRoll)
+asset.export("bindGlobalRoll", bindGlobalRoll)
+asset.export("permaBindLocalRoll", permaBindLocalRoll)
+asset.export("permaBindGlobalRoll", permaBindGlobalRoll)
+asset.export("unbindRoll", unbindRoll)
diff --git a/data/assets/util/joysticks/ps4.asset b/data/assets/util/joysticks/ps4.asset
new file mode 100644
index 0000000000..e9f7aab684
--- /dev/null
+++ b/data/assets/util/joysticks/ps4.asset
@@ -0,0 +1,118 @@
+local propertyHelper = asset.require('../property_helper')
+local joystickHelper = asset.require('./joystick_helper')
+
+-- Allowed values for the second parameter of bindJoystickAxis:
+-- "None"
+-- "Orbit X"
+-- "Orbit Y"
+-- "Zoom" -- both in and out
+-- "Zoom In"
+-- "Zoom Out"
+-- "LocalRoll X"
+-- "LocalRoll Y"
+-- "GlobalRoll X"
+-- "GlobalRoll Y"
+-- "Pan X"
+-- "Pan Y"
+-- Third parameter determines whether the axis should be inverted
+-- Fourth parameter determines whether the axis should be normalized from [-1,1] to [0,1]
+-- Fifth parameters determins if the axis should be "Sticky" or not.
+-- The axis values can either go back to 0 when the joystick is released or it can
+-- stay at the value it was before the joystick was released.
+-- The latter is called a sticky axis, when the values don't go back to 0.
+-- Sixth parameter is the sensitivity for the axis
+
+local PS4Controller = {
+ LeftThumbStick = { 0 , 1 },
+ RightThumbStick = { 2, 5 },
+ L2 = 3,
+ R2 = 4,
+ Cross = 1,
+ Circle = 2,
+ Square = 0,
+ Triangle = 3,
+ L1 = 4,
+ R1 = 5,
+ Share = 8,
+ Options = 9,
+ PS = 12,
+ LeftStickButton = 10,
+ RightStickButton = 11,
+ TouchPad = 13,
+ DPad = {
+ Up = 14,
+ Right = 15,
+ Down = 16,
+ Left = 17
+ }
+}
+
+asset.onInitialize(function()
+ local controller = PS4Controller;
+
+ openspace.navigation.setAxisDeadZone(controller.LeftThumbStick[1], 0.15)
+ openspace.navigation.setAxisDeadZone(controller.LeftThumbStick[2], 0.15)
+ openspace.navigation.setAxisDeadZone(controller.RightThumbStick[1], 0.15)
+ openspace.navigation.setAxisDeadZone(controller.RightThumbStick[2], 0.15)
+
+ openspace.navigation.bindJoystickAxis(controller.LeftThumbStick[1], "Orbit X");
+ openspace.navigation.bindJoystickAxis(controller.LeftThumbStick[2], "Orbit Y", true);
+ openspace.navigation.bindJoystickAxis(controller.RightThumbStick[1], "Pan X", true);
+ openspace.navigation.bindJoystickAxis(controller.RightThumbStick[2], "Pan Y", true);
+ openspace.navigation.bindJoystickAxis(controller.L2, "Zoom Out", false, true);
+ openspace.navigation.bindJoystickAxis(controller.R2, "Zoom In", false, true);
+
+ openspace.navigation.bindJoystickButton(
+ controller.L1,
+ joystickHelper.bindLocalRoll(controller.RightThumbStick[1]),
+ "Switch to local roll mode"
+ )
+ openspace.navigation.bindJoystickButton(
+ controller.L1,
+ joystickHelper.unbindRoll(controller.RightThumbStick[1]),
+ "Switch back to normal mode",
+ "Release"
+ )
+ openspace.navigation.bindJoystickButton(
+ controller.R1,
+ joystickHelper.bindGlobalRoll(controller.RightThumbStick[1]),
+ "Switch to global roll mode"
+ )
+ openspace.navigation.bindJoystickButton(
+ controller.R1,
+ joystickHelper.unbindRoll(controller.RightThumbStick[1]),
+ "Switch back to normal mode",
+ "Release"
+ )
+
+ openspace.navigation.bindJoystickButton(
+ controller.Cross,
+ propertyHelper.invert('NavigationHandler.OrbitalNavigator.Friction.ZoomFriction'),
+ "Toggle zoom friction"
+ )
+ openspace.navigation.bindJoystickButton(
+ controller.Circle,
+ propertyHelper.invert('NavigationHandler.OrbitalNavigator.Friction.RotationalFriction'),
+ "Toggle rotational friction"
+ )
+ openspace.navigation.bindJoystickButton(
+ controller.DPad.Left,
+ propertyHelper.invert('NavigationHandler.OrbitalNavigator.Friction.RollFriction'),
+ "Toggle roll friction"
+ )
+
+ openspace.navigation.bindJoystickButton(
+ controller.Square,
+ "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '');" ..
+ "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Earth');" ..
+ "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);",
+ "Switch target to Earth"
+ )
+ openspace.navigation.bindJoystickButton(
+ controller.Triangle,
+ "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '');" ..
+ "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Mars');" ..
+ "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);",
+ "Switch target to Mars"
+ )
+end)
diff --git a/data/assets/util/joysticks/space-mouse-not-sticky.asset b/data/assets/util/joysticks/space-mouse-not-sticky.asset
new file mode 100644
index 0000000000..7140adae0b
--- /dev/null
+++ b/data/assets/util/joysticks/space-mouse-not-sticky.asset
@@ -0,0 +1,55 @@
+local propertyHelper = asset.require('../property_helper')
+local joystickHelper = asset.require('./joystick_helper')
+
+-- Allowed values for the second parameter of bindJoystickAxis:
+-- "None"
+-- "Orbit X"
+-- "Orbit Y"
+-- "Zoom" -- both in and out
+-- "Zoom In"
+-- "Zoom Out"
+-- "LocalRoll X"
+-- "LocalRoll Y"
+-- "GlobalRoll X"
+-- "GlobalRoll Y"
+-- "Pan X"
+-- "Pan Y"
+-- Third parameter determines whether the axis should be inverted
+-- Fourth parameter determines whether the axis should be normalized from [-1,1] to [0,1]
+-- Fifth parameters determins if the axis should be "Sticky" or not.
+-- The axis values can either go back to 0 when the joystick is released or it can
+-- stay at the value it was before the joystick was released.
+-- The latter is called a sticky axis, when the values don't go back to 0.
+-- This version of the SpaceMouse is NOT Sticky.
+-- Sixth parameter is the sensitivity for the axis
+
+local SpaceMouse = {
+ Push = {0, 1, 2}, -- left/right, back/forth, up/down
+ Twist = {5}, -- left/right
+ Tilt = {4, 3}, -- left/right, back/forth
+ LeftButton = 0,
+ RightButton = 1
+}
+
+asset.onInitialize(function()
+ local controller = SpaceMouse;
+
+ openspace.navigation.bindJoystickAxis(controller.Push[1], "Orbit X", false);
+ openspace.navigation.bindJoystickAxis(controller.Push[2], "Orbit Y", false);
+ openspace.navigation.bindJoystickAxis(controller.Twist[1], "Pan X", true);
+ openspace.navigation.bindJoystickAxis(controller.Tilt[2], "Pan Y", false);
+ openspace.navigation.bindJoystickAxis(controller.Push[3], "Zoom", false);
+ openspace.navigation.bindJoystickAxis(controller.Tilt[1], "LocalRoll X", false);
+
+ openspace.navigation.bindJoystickButton(
+ controller.LeftButton,
+ joystickHelper.permaBindLocalRoll(controller.Tilt[1]),
+ "Switch to local roll mode"
+ )
+
+ openspace.navigation.bindJoystickButton(
+ controller.RightButton,
+ joystickHelper.permaBindGlobalRoll(controller.Tilt[1]),
+ "Switch to global roll mode"
+ )
+end)
diff --git a/data/assets/util/joysticks/space-mouse.asset b/data/assets/util/joysticks/space-mouse.asset
new file mode 100644
index 0000000000..36152e9b06
--- /dev/null
+++ b/data/assets/util/joysticks/space-mouse.asset
@@ -0,0 +1,55 @@
+local propertyHelper = asset.require('../property_helper')
+local joystickHelper = asset.require('./joystick_helper')
+
+-- Allowed values for the second parameter of bindJoystickAxis:
+-- "None"
+-- "Orbit X"
+-- "Orbit Y"
+-- "Zoom" -- both in and out
+-- "Zoom In"
+-- "Zoom Out"
+-- "LocalRoll X"
+-- "LocalRoll Y"
+-- "GlobalRoll X"
+-- "GlobalRoll Y"
+-- "Pan X"
+-- "Pan Y"
+-- Third parameter determines whether the axis should be inverted
+-- Fourth parameter determines whether the axis should be normalized from [-1,1] to [0,1]
+-- Fifth parameters determins if the axis should be "Sticky" or not.
+-- The axis values can either go back to 0 when the joystick is released or it can
+-- stay at the value it was before the joystick was released.
+-- The latter is called a sticky axis, when the values don't go back to 0.
+-- This version of the SpaceMouse IS Sticky.
+-- Sixth parameter is the sensitivity for the axis
+
+local SpaceMouse = {
+ Push = {0, 1, 2}, -- left/right, back/forth, up/down
+ Twist = {5}, -- left/right
+ Tilt = {4, 3}, -- left/right, back/forth
+ LeftButton = 0,
+ RightButton = 1
+}
+
+asset.onInitialize(function()
+ local controller = SpaceMouse;
+
+ openspace.navigation.bindJoystickAxis(controller.Push[1], "Orbit X", false, false, true, 40.0);
+ openspace.navigation.bindJoystickAxis(controller.Push[2], "Orbit Y", false, false, true, 40.0);
+ openspace.navigation.bindJoystickAxis(controller.Twist[1], "Pan X", true, false, true, 40.0);
+ openspace.navigation.bindJoystickAxis(controller.Tilt[2], "Pan Y", false, false, true, 35.0);
+ openspace.navigation.bindJoystickAxis(controller.Push[3], "Zoom", false, false, true, 40.0);
+ openspace.navigation.bindJoystickAxis(controller.Tilt[1], "LocalRoll X", false, false, true, 35.0);
+
+ openspace.navigation.bindJoystickButton(
+ controller.LeftButton,
+ joystickHelper.permaBindLocalRoll(controller.Tilt[1]),
+ "Switch to local roll mode"
+ )
+
+ openspace.navigation.bindJoystickButton(
+ controller.RightButton,
+ joystickHelper.permaBindGlobalRoll(controller.Tilt[1]),
+ "Switch to global roll mode"
+ )
+end)
diff --git a/data/assets/util/joysticks/xbox.asset b/data/assets/util/joysticks/xbox.asset
new file mode 100644
index 0000000000..d252965ee1
--- /dev/null
+++ b/data/assets/util/joysticks/xbox.asset
@@ -0,0 +1,116 @@
+local propertyHelper = asset.require('../property_helper')
+local joystickHelper = asset.require('./joystick_helper')
+
+-- Allowed values for the second parameter of bindJoystickAxis:
+-- "None"
+-- "Orbit X"
+-- "Orbit Y"
+-- "Zoom" -- both in and out
+-- "Zoom In"
+-- "Zoom Out"
+-- "LocalRoll X"
+-- "LocalRoll Y"
+-- "GlobalRoll X"
+-- "GlobalRoll Y"
+-- "Pan X"
+-- "Pan Y"
+-- Third parameter determines whether the axis should be inverted
+-- Fourth parameter determines whether the axis should be normalized from [-1,1] to [0,1]
+-- Fifth parameters determins if the axis should be "Sticky" or not.
+-- The axis values can either go back to 0 when the joystick is released or it can
+-- stay at the value it was before the joystick was released.
+-- The latter is called a sticky axis, when the values don't go back to 0.
+-- Sixth parameter is the sensitivity for the axis
+
+local XBoxController = {
+ LeftThumbStick = { 0 , 1 },
+ RightThumbStick = { 2, 3 },
+ LeftTrigger = 4,
+ RightTrigger = 5,
+ A = 0,
+ B = 1,
+ X = 2,
+ Y = 3,
+ LB = 4,
+ RB = 5,
+ Select = 6,
+ Start = 7,
+ LeftStickButton = 8,
+ RightStickButton = 9,
+ DPad = {
+ Up = 10,
+ Right = 11,
+ Down = 12,
+ Left = 13
+ }
+}
+
+asset.onInitialize(function()
+ local controller = XBoxController;
+
+ openspace.navigation.setAxisDeadZone(controller.LeftThumbStick[1], 0.15)
+ openspace.navigation.setAxisDeadZone(controller.LeftThumbStick[2], 0.15)
+ openspace.navigation.setAxisDeadZone(controller.RightThumbStick[1], 0.15)
+ openspace.navigation.setAxisDeadZone(controller.RightThumbStick[2], 0.15)
+
+ openspace.navigation.bindJoystickAxis(controller.LeftThumbStick[1], "Orbit X");
+ openspace.navigation.bindJoystickAxis(controller.LeftThumbStick[2], "Orbit Y", true);
+ openspace.navigation.bindJoystickAxis(controller.RightThumbStick[1], "Pan X", true);
+ openspace.navigation.bindJoystickAxis(controller.RightThumbStick[2], "Pan Y", true);
+ openspace.navigation.bindJoystickAxis(controller.LeftTrigger, "Zoom Out", false, true);
+ openspace.navigation.bindJoystickAxis(controller.RightTrigger, "Zoom In", false, true);
+
+ openspace.navigation.bindJoystickButton(
+ controller.LB,
+ joystickHelper.bindLocalRoll(controller.RightThumbStick[1]),
+ "Switch to local roll mode"
+ )
+ openspace.navigation.bindJoystickButton(
+ controller.LB,
+ joystickHelper.unbindRoll(controller.RightThumbStick[1]),
+ "Switch back to normal mode",
+ "Release"
+ )
+ openspace.navigation.bindJoystickButton(
+ controller.RB,
+ joystickHelper.bindGlobalRoll(controller.RightThumbStick[1]),
+ "Switch to global roll mode"
+ )
+ openspace.navigation.bindJoystickButton(
+ controller.RB,
+ joystickHelper.unbindRoll(controller.RightThumbStick[1]),
+ "Switch back to normal mode",
+ "Release"
+ )
+
+ openspace.navigation.bindJoystickButton(
+ controller.A,
+ propertyHelper.invert('NavigationHandler.OrbitalNavigator.Friction.ZoomFriction'),
+ "Toggle zoom friction"
+ )
+ openspace.navigation.bindJoystickButton(
+ controller.B,
+ propertyHelper.invert('NavigationHandler.OrbitalNavigator.Friction.RotationalFriction'),
+ "Toggle rotational friction"
+ )
+ openspace.navigation.bindJoystickButton(
+ controller.DPad.Left,
+ propertyHelper.invert('NavigationHandler.OrbitalNavigator.Friction.RollFriction'),
+ "Toggle roll friction"
+ )
+
+ openspace.navigation.bindJoystickButton(
+ controller.X,
+ "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '');" ..
+ "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Earth');" ..
+ "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);",
+ "Switch target to Earth"
+ )
+ openspace.navigation.bindJoystickButton(
+ controller.Y,
+ "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '');" ..
+ "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Mars');" ..
+ "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);",
+ "Switch target to Mars"
+ )
+end)
diff --git a/data/assets/util/webgui.asset b/data/assets/util/webgui.asset
index fbf66f683c..15195ee953 100644
--- a/data/assets/util/webgui.asset
+++ b/data/assets/util/webgui.asset
@@ -3,7 +3,7 @@ asset.require('./static_server')
local guiCustomization = asset.require('customization/gui')
-- Select which commit hashes to use for the frontend and backend
-local frontendHash = "17b69f29a4a596d488ba8c9de953cc22fb0dce5c"
+local frontendHash = "96b88e6c760e59d143bd29da6f06011eaafce4b1"
local dataProvider = "data.openspaceproject.com/files/webgui"
local frontend = asset.syncedResource({
diff --git a/data/profiles/bastille-day.profile b/data/profiles/bastille-day.profile
index f7593fa673..4da8852ffc 100644
--- a/data/profiles/bastille-day.profile
+++ b/data/profiles/bastille-day.profile
@@ -2,22 +2,22 @@
"assets": [
"base",
"dashboard/default_dashboard",
- "scene/solarsystem/sun/sun_textures",
- "scene/solarsystem/sun/EUV_layer",
"scene/solarsystem/heliosphere/bastille_day/bastille_day_sun_textures",
"scene/solarsystem/heliosphere/bastille_day/density_volume",
"scene/solarsystem/heliosphere/bastille_day/fieldlines",
+ "scene/solarsystem/heliosphere/bastille_day/fluxnodes",
+ "scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane",
+ "scene/solarsystem/heliosphere/bastille_day/fluxnodeslegend",
"scene/solarsystem/heliosphere/bastille_day/focuspoint",
"scene/solarsystem/heliosphere/bastille_day/lightindicator",
"scene/solarsystem/heliosphere/bastille_day/magnetogram",
"scene/solarsystem/heliosphere/bastille_day/magnetogram_textures",
- "scene/solarsystem/heliosphere/bastille_day/fluxnodes",
- "scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane",
- "scene/solarsystem/heliosphere/bastille_day/fluxnodeslegend",
"scene/solarsystem/planets/earth/earth",
"scene/solarsystem/planets/earth/magnetosphere",
+ "scene/solarsystem/planets/earth/satellites/misc/iss",
"scene/solarsystem/planets/earth/satellites/satellites",
- "scene/solarsystem/planets/earth/satellites/misc/iss"
+ "scene/solarsystem/sun/EUV_layer",
+ "scene/solarsystem/sun/sun_textures"
],
"camera": {
"altitude": 3400000000.0,
diff --git a/data/profiles/jwst.profile b/data/profiles/jwst.profile
new file mode 100644
index 0000000000..d273706c84
--- /dev/null
+++ b/data/profiles/jwst.profile
@@ -0,0 +1,112 @@
+{
+ "assets": [
+ "base",
+ "scene/solarsystem/planets/earth/earth",
+ "scene/solarsystem/planets/earth/satellites/satellites",
+ "scene/solarsystem/missions/jwst/jwst",
+ "scene/solarsystem/missions/jwst/HUDFImage",
+ "scene/digitaluniverse/hdf"
+ ],
+ "camera": {
+ "altitude": 17000000.0,
+ "anchor": "Earth",
+ "latitude": 3.5559,
+ "longitude": -53.0515,
+ "type": "goToGeo"
+ },
+ "delta_times": [
+ 1.0,
+ 5.0,
+ 30.0,
+ 60.0,
+ 300.0,
+ 1800.0,
+ 3600.0,
+ 43200.0,
+ 86400.0,
+ 604800.0,
+ 1209600.0,
+ 2592000.0,
+ 5184000.0,
+ 7776000.0,
+ 15552000.0,
+ 31536000.0,
+ 63072000.0,
+ 157680000.0,
+ 315360000.0,
+ 630720000.0
+ ],
+ "keybindings": [
+ {
+ "documentation": "Toggle trails on or off for satellites around Earth",
+ "gui_path": "/Earth",
+ "is_local": false,
+ "key": "S",
+ "name": "Toggle satellite trails",
+ "script": "local list = openspace.getProperty('{earth_satellites}.Renderable.Enabled'); for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end"
+ },
+ {
+ "documentation": "Toggle points and labels for the Lagrangian points for Earth Sun system",
+ "gui_path": "/JWST",
+ "is_local": false,
+ "key": "P",
+ "name": "Toggle Lagrangian points",
+ "script": "local list = openspace.getProperty('{lagrange_points_earth}.Renderable.Enabled'); for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end"
+ },
+ {
+ "documentation": "Toggle Hubble Ultra Deep Field image and line towards its coordinate",
+ "gui_path": "/JWST",
+ "is_local": false,
+ "key": "U",
+ "name": "Toggle Hubble Ultra Deep Field",
+ "script": "local list = openspace.getProperty('{mission_jwst_hudf}.*.Enabled'); for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end"
+ },
+ {
+ "documentation": "Toggle L2 label, point and line",
+ "gui_path": "/JWST",
+ "is_local": false,
+ "key": "O",
+ "name": "Toggle L2",
+ "script": "local list = openspace.getProperty('{lagrange_points_earth_l2_small}.*.Enabled'); for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end"
+ },
+ {
+ "documentation": "Toggle James Webb Space Telecope field of view and view band",
+ "gui_path": "/JWST",
+ "is_local": false,
+ "key": "V",
+ "name": "Toggle JWST field of view and view band",
+ "script": "local list = openspace.getProperty('{mission_jwst_fov}.*.Enabled'); for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end"
+ }
+ ],
+ "mark_nodes": [
+ "JWSTModel",
+ "JWSTTrail",
+ "L2",
+ "Earth",
+ "Moon",
+ "Sun"
+ ],
+ "meta": {
+ "author": "OpenSpace Team",
+ "description": "James Webb Space Telescope Profile. Adds the James Webb Space Telescope model with an estimated trajectery.",
+ "license": "MIT License",
+ "name": "James Webb Space Telescope",
+ "url": "https://www.openspaceproject.com",
+ "version": "1.0"
+ },
+ "properties": [
+ {
+ "name": "{earth_satellites}.Renderable.Enabled",
+ "type": "setPropertyValue",
+ "value": "false"
+ }
+ ],
+ "time": {
+ "type": "absolute",
+ "value": "2021-10-31T00:00:00"
+ },
+ "version": {
+ "major": 1,
+ "minor": 0
+ }
+}
diff --git a/data/profiles/mars.profile b/data/profiles/mars.profile
index 87493a7562..eb730ff151 100644
--- a/data/profiles/mars.profile
+++ b/data/profiles/mars.profile
@@ -39,7 +39,7 @@
"is_local": false,
"key": "I",
"name": "Setup scene for insight EDL",
- "script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', -470.800006);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', true);openspace.time.setPause(true);openspace.time.setTime('2018 NOV 26 19:39:03.68');openspace.navigation.setNavigationState({Anchor = 'Insight',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});"
+ "script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', -470.800006);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', true);openspace.time.setPause(true);openspace.time.setTime('2018 NOV 26 19:39:01.68');openspace.navigation.setNavigationState({Anchor = 'Insight',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});"
},
{
"documentation": "Disable Mars layer settings used for insight EDL",
@@ -55,7 +55,7 @@
"is_local": false,
"key": "P",
"name": "Setup and Goto Perseverance",
- "script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -1677.088867);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', -1677.088867);openspace.time.setPause(true);openspace.time.setTime('2021 FEB 18 20:32:16');openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', true);openspace.navigation.setNavigationState({Anchor = 'Perseverance',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});"
+ "script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -1674.0);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', -1674.0);openspace.time.setPause(true);openspace.time.setTime('2021 FEB 18 20:32:16');openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', true);openspace.navigation.setNavigationState({Anchor = 'Perseverance',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});"
}
],
"mark_nodes": [
@@ -77,6 +77,6 @@
},
"version": {
"major": 1,
- "minor": 1
+ "minor": 2
}
}
\ No newline at end of file
diff --git a/data/profiles/newhorizons.profile b/data/profiles/newhorizons.profile
index 7f30857769..f66c34681d 100644
--- a/data/profiles/newhorizons.profile
+++ b/data/profiles/newhorizons.profile
@@ -216,7 +216,7 @@
"license": "MIT License",
"name": "New Horizons",
"url": "https://www.openspaceproject.com",
- "version": "1.0"
+ "version": "1.1"
},
"properties": [
{
@@ -233,6 +233,11 @@
"name": "Scene.PlutoBarycenterTrail.Renderable.Enabled",
"type": "setPropertyValue",
"value": "false"
+ },
+ {
+ "name": "Scene.PlutoProjection.Renderable.ColorTexturePaths",
+ "type": "setPropertyValue",
+ "value": "1.000000"
}
],
"time": {
diff --git a/data/profiles/osirisrex.profile b/data/profiles/osirisrex.profile
index 94aebc6939..a6b9399bcb 100644
--- a/data/profiles/osirisrex.profile
+++ b/data/profiles/osirisrex.profile
@@ -3,7 +3,8 @@
"base",
"scene/solarsystem/missions/osirisrex/dashboard",
"scene/solarsystem/missions/osirisrex/model",
- "scene/solarsystem/missions/osirisrex/osirisrex"
+ "scene/solarsystem/missions/osirisrex/osirisrex",
+ "scene/solarsystem/missions/osirisrex/imageplane"
],
"camera": {
"aim": "",
diff --git a/data/web/documentation/toplevel.hbs b/data/web/documentation/toplevel.hbs
index 3701dd057a..2fe96f3313 100644
--- a/data/web/documentation/toplevel.hbs
+++ b/data/web/documentation/toplevel.hbs
@@ -22,7 +22,7 @@
{{/with}}
{{#if reference}}
{{#if reference.found}}
-
An object of type '{{reference.name}}'
+ An object of type '{{reference.name}}'
{{else}}
Missing reference
{{/if}}
diff --git a/ext/ghoul b/ext/ghoul
index 5bc318245d..528bc4e87d 160000
--- a/ext/ghoul
+++ b/ext/ghoul
@@ -1 +1 @@
-Subproject commit 5bc318245db24ed93ed48b72d6eaab3c0b88346c
+Subproject commit 528bc4e87d6bc7a81ec62f5338e2b7d9fe706057
diff --git a/include/openspace/interaction/joystickcamerastates.h b/include/openspace/interaction/joystickcamerastates.h
index 15188faf26..f8f86f239b 100644
--- a/include/openspace/interaction/joystickcamerastates.h
+++ b/include/openspace/interaction/joystickcamerastates.h
@@ -130,6 +130,7 @@ inline std::string to_string(
case T::OrbitY: return "Orbit Y";
case T::ZoomIn: return "Zoom In";
case T::ZoomOut: return "Zoom Out";
+ case T::Zoom: return "Zoom In and Out";
case T::LocalRollX: return "LocalRoll X";
case T::LocalRollY: return "LocalRoll Y";
case T::GlobalRollX: return "GlobalRoll X";
@@ -149,9 +150,9 @@ from_string(std::string_view string)
if (string == "None") { return T::None; }
if (string == "Orbit X") { return T::OrbitX; }
if (string == "Orbit Y") { return T::OrbitY; }
- if (string == "Zoom") { return T::Zoom; }
if (string == "Zoom In") { return T::ZoomIn; }
if (string == "Zoom Out") { return T::ZoomOut; }
+ if (string == "Zoom") { return T::Zoom; }
if (string == "LocalRoll X") { return T::LocalRollX; }
if (string == "LocalRoll Y") { return T::LocalRollY; }
if (string == "GlobalRoll X") { return T::GlobalRollX; }
diff --git a/include/openspace/properties/numericalproperty.inl b/include/openspace/properties/numericalproperty.inl
index 6540ddf9f3..3f5696f17a 100644
--- a/include/openspace/properties/numericalproperty.inl
+++ b/include/openspace/properties/numericalproperty.inl
@@ -25,6 +25,7 @@
#include
#include
#include
+#include
namespace openspace::properties {
@@ -88,6 +89,7 @@ float NumericalProperty::exponent() const {
template
void NumericalProperty::setExponent(float exponent) {
+ ghoul_assert(std::abs(exponent) > 0.f, "Exponent for property input cannot be zero");
_exponent = exponent;
}
diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h
index b900cf8335..52de1629f9 100644
--- a/include/openspace/properties/property.h
+++ b/include/openspace/properties/property.h
@@ -381,12 +381,13 @@ public:
/**
* Default view options that can be used in the Property::setViewOption method. The
- * values are: Property::ViewOptions::Color = \c Color,
- * Property::ViewOptions::Logarithmic = \c Logarithmic
+ * values are:
+ * - Property::ViewOptions::Color = \c Color (Intended for Vec3 and Vec4),
+ * - Property::ViewOptions::MinMaxRange = \c MinMaxRange (Intended for Vec2)
*/
struct ViewOptions {
static const char* Color;
- static const char* Logarithmic;
+ static const char* MinMaxRange;
};
/**
diff --git a/include/openspace/rendering/framebufferrenderer.h b/include/openspace/rendering/framebufferrenderer.h
index ce4c00fb86..d76c2c5d88 100644
--- a/include/openspace/rendering/framebufferrenderer.h
+++ b/include/openspace/rendering/framebufferrenderer.h
@@ -83,8 +83,10 @@ public:
void setDisableHDR(bool disable) override;
void update() override;
- void performRaycasterTasks(const std::vector& tasks);
- void performDeferredTasks(const std::vector& tasks);
+ void performRaycasterTasks(const std::vector& tasks,
+ const glm::ivec4& viewport);
+ void performDeferredTasks(const std::vector& tasks,
+ const glm::ivec4& viewport);
void render(Scene* scene, Camera* camera, float blackoutFactor) override;
/**
@@ -109,11 +111,11 @@ private:
>;
void resolveMSAA(float blackoutFactor);
- void applyTMO(float blackoutFactor);
- void applyFXAA();
+ void applyTMO(float blackoutFactor, const glm::ivec4& viewport);
+ void applyFXAA(const glm::ivec4& viewport);
void updateDownscaleTextures();
void updateExitVolumeTextures();
- void writeDownscaledVolume();
+ void writeDownscaledVolume(const glm::ivec4& viewport);
std::map _raycastData;
RaycasterProgObjMap _exitPrograms;
@@ -129,10 +131,11 @@ private:
std::unique_ptr _downscaledVolumeProgram;
UniformCache(hdrFeedingTexture, blackoutFactor, hdrExposure, gamma,
- Hue, Saturation, Value) _hdrUniformCache;
- UniformCache(renderedTexture, inverseScreenSize) _fxaaUniformCache;
- UniformCache(downscaledRenderedVolume, downscaledRenderedVolumeDepth)
- _writeDownscaledVolumeUniformCache;
+ Hue, Saturation, Value, Viewport, Resolution) _hdrUniformCache;
+ UniformCache(renderedTexture, inverseScreenSize, Viewport,
+ Resolution) _fxaaUniformCache;
+ UniformCache(downscaledRenderedVolume, downscaledRenderedVolumeDepth, viewport,
+ resolution) _writeDownscaledVolumeUniformCache;
GLint _defaultFBO;
GLuint _screenQuad;
diff --git a/include/openspace/scene/profile.h b/include/openspace/scene/profile.h
index e1565b1dc7..28a3a360eb 100644
--- a/include/openspace/scene/profile.h
+++ b/include/openspace/scene/profile.h
@@ -92,7 +92,7 @@ public:
Relative
};
- Type type = Type::Absolute;
+ Type type;
std::string value;
};
struct CameraNavState {
diff --git a/modules/atmosphere/rendering/atmospheredeferredcaster.cpp b/modules/atmosphere/rendering/atmospheredeferredcaster.cpp
index b26103a2fd..33bb35fab1 100644
--- a/modules/atmosphere/rendering/atmospheredeferredcaster.cpp
+++ b/modules/atmosphere/rendering/atmospheredeferredcaster.cpp
@@ -348,7 +348,7 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData& renderData,
double lt;
glm::dvec3 sunPosWorld = SpiceManager::ref().targetPosition(
"SUN",
- "SUN",
+ "SSB",
"GALACTIC",
{},
_time,
@@ -386,7 +386,7 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData& renderData,
// Getting source and caster:
glm::dvec3 sourcePos = SpiceManager::ref().targetPosition(
shadowConf.source.first,
- "SUN",
+ "SSB",
"GALACTIC",
{},
_time,
@@ -395,7 +395,7 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData& renderData,
sourcePos *= KM_TO_M; // converting to meters
glm::dvec3 casterPos = SpiceManager::ref().targetPosition(
shadowConf.caster.first,
- "SUN",
+ "SSB",
"GALACTIC",
{},
_time,
@@ -682,7 +682,7 @@ void AtmosphereDeferredcaster::loadComputationPrograms() {
);
}
_irradianceSupTermsProgramObject->setIgnoreUniformLocationError(IgnoreError::Yes);
-
+
//
// InScattering S
if (!_inScatteringProgramObject) {
diff --git a/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl b/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl
index 22e861c107..9be329d940 100644
--- a/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl
+++ b/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl
@@ -76,6 +76,9 @@ uniform dmat4 dModelTransformMatrix;
uniform dmat4 dSGCTViewToWorldMatrix;
uniform dmat4 dSgctProjectionToModelTransformMatrix;
+uniform vec4 viewport;
+uniform vec2 resolution;
+
uniform dvec4 dCamPosObj;
uniform dvec3 sunDirectionObj;
@@ -207,8 +210,8 @@ bool atmosphereIntersection(Ray ray, double atmRadius, out double offset,
* NDC from the interpolated positions from the screen quad. This method avoids matrices
* multiplications wherever is possible.
*/
-Ray calculateRayRenderableGlobe() {
- vec2 interpolatedNDCPos = (texCoord - 0.5) * 2.0;
+Ray calculateRayRenderableGlobe(vec2 st) {
+ vec2 interpolatedNDCPos = (st - 0.5) * 2.0;
dvec4 clipCoords = dvec4(interpolatedNDCPos, 1.0, 1.0);
// Clip to Object Coords
@@ -467,8 +470,19 @@ vec3 sunColor(vec3 v, vec3 s, float r, float mu, float irradianceFactor) {
}
void main() {
+ // Modify the texCoord based on the Viewport and Resolution. This modification is
+ // necessary in case of side-by-side stereo as we only want to access the part of the
+ // feeding texture that we are currently responsible for. Otherwise we would map the
+ // entire feeding texture into our half of the result texture, leading to a doubling
+ // of the "missing" half. If you don't believe me, load a configuration file with the
+ // side_by_side stereo mode enabled, disable FXAA, and remove this modification.
+ // The same calculation is done in the FXAA shader and the HDR resolving
+ vec2 st = texCoord;
+ st.x = st.x / (resolution.x / viewport[2]) + (viewport[0] / resolution.x);
+ st.y = st.y / (resolution.y / viewport[3]) + (viewport[1] / resolution.y);
+
if (cullAtmosphere == 1) {
- renderTarget = texture(mainColorTexture, texCoord);
+ renderTarget = texture(mainColorTexture, st);
return;
}
@@ -476,10 +490,10 @@ void main() {
int nSamples = 1;
// Color from G-Buffer
- vec4 color = texture(mainColorTexture, texCoord);
+ vec4 color = texture(mainColorTexture, st);
// Get the ray from camera to atm in object space
- Ray ray = calculateRayRenderableGlobe();
+ Ray ray = calculateRayRenderableGlobe(texCoord);
double offset = 0.0; // in KM
double maxLength = 0.0; // in KM
@@ -499,7 +513,7 @@ void main() {
// Get data from G-Buffer
// Normal is stored in SGCT View Space and transformed to the current object space
- vec4 normalViewSpaceAndWaterReflectance = texture(mainNormalTexture, texCoord);
+ vec4 normalViewSpaceAndWaterReflectance = texture(mainNormalTexture, st);
dvec4 normalViewSpace = vec4(normalViewSpaceAndWaterReflectance.xyz, 0.0);
dvec4 normalWorldSpace = dSGCTViewToWorldMatrix * normalViewSpace;
vec4 normal = vec4(dInverseModelTransformMatrix * normalWorldSpace);
@@ -507,7 +521,7 @@ void main() {
normal.w = normalViewSpaceAndWaterReflectance.w;
// Data in the mainPositionTexture are written in view space (view plus camera rig)
- vec4 position = texture(mainPositionTexture, texCoord);
+ vec4 position = texture(mainPositionTexture, st);
// OS Eye to World coords
dvec4 positionWorldCoords = dSGCTViewToWorldMatrix * position;
diff --git a/modules/base/CMakeLists.txt b/modules/base/CMakeLists.txt
index 1bc9136999..18353ada1a 100644
--- a/modules/base/CMakeLists.txt
+++ b/modules/base/CMakeLists.txt
@@ -51,6 +51,7 @@ set(HEADER_FILES
rendering/renderableplaneimagelocal.h
rendering/renderableplaneimageonline.h
rendering/renderableplanetimevaryingimage.h
+ rendering/renderableprism.h
rendering/renderablesphere.h
rendering/renderabletimevaryingsphere.h
rendering/renderabletrail.h
@@ -104,6 +105,7 @@ set(SOURCE_FILES
rendering/renderableplaneimagelocal.cpp
rendering/renderableplaneimageonline.cpp
rendering/renderableplanetimevaryingimage.cpp
+ rendering/renderableprism.cpp
rendering/renderablesphere.cpp
rendering/renderabletimevaryingsphere.cpp
rendering/renderabletrail.cpp
@@ -145,6 +147,8 @@ set(SHADER_FILES
shaders/model_vs.glsl
shaders/plane_fs.glsl
shaders/plane_vs.glsl
+ shaders/prism_fs.glsl
+ shaders/prism_vs.glsl
shaders/renderabletrail_fs.glsl
shaders/renderabletrail_vs.glsl
shaders/screenspace_fs.glsl
diff --git a/modules/base/basemodule.cpp b/modules/base/basemodule.cpp
index 095618aa18..b7657b3447 100644
--- a/modules/base/basemodule.cpp
+++ b/modules/base/basemodule.cpp
@@ -52,6 +52,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -134,6 +135,7 @@ void BaseModule::internalInitialize(const ghoul::Dictionary&) {
fRenderable->registerClass("RenderablePlaneImageLocal");
fRenderable->registerClass("RenderablePlaneImageOnline");
fRenderable->registerClass("RenderablePlaneTimeVaryingImage");
+ fRenderable->registerClass("RenderablePrism");
fRenderable->registerClass("RenderableTimeVaryingSphere");
fRenderable->registerClass("RenderableRadialGrid");
fRenderable->registerClass("RenderableSphere");
diff --git a/modules/base/rendering/grids/renderablegrid.cpp b/modules/base/rendering/grids/renderablegrid.cpp
index 6162afc5a6..a3065666cf 100644
--- a/modules/base/rendering/grids/renderablegrid.cpp
+++ b/modules/base/rendering/grids/renderablegrid.cpp
@@ -90,7 +90,7 @@ RenderableGrid::RenderableGrid(const ghoul::Dictionary& dictionary)
, _color(ColorInfo, glm::vec3(0.5f), glm::vec3(0.f), glm::vec3(1.f))
, _segments(SegmentsInfo, glm::uvec2(10), glm::uvec2(1), glm::uvec2(200))
, _lineWidth(LineWidthInfo, 0.5f, 1.f, 20.f)
- , _size(SizeInfo, glm::vec2(1e10f), glm::vec2(1.f), glm::vec2(1e20f))
+ , _size(SizeInfo, glm::vec2(1.f), glm::vec2(1.f), glm::vec2(1e11f))
{
const Parameters p = codegen::bake(dictionary);
@@ -108,7 +108,7 @@ RenderableGrid::RenderableGrid(const ghoul::Dictionary& dictionary)
_lineWidth = p.lineWidth.value_or(_lineWidth);
addProperty(_lineWidth);
- _size.setViewOption(properties::Property::ViewOptions::Logarithmic);
+ _size.setExponent(10.f);
_size = p.size.value_or(_size);
_size.onChange([&]() { _gridIsDirty = true; });
addProperty(_size);
diff --git a/modules/base/rendering/grids/renderableradialgrid.cpp b/modules/base/rendering/grids/renderableradialgrid.cpp
index d5d4dac54d..eda326d974 100644
--- a/modules/base/rendering/grids/renderableradialgrid.cpp
+++ b/modules/base/rendering/grids/renderableradialgrid.cpp
@@ -65,17 +65,12 @@ namespace {
"This value specifies the line width of the spherical grid."
};
- constexpr openspace::properties::Property::PropertyInfo OuterRadiusInfo = {
- "OuterRadius",
- "Outer Radius",
- "The outer radius of the circular grid, i.e. its size."
- };
-
- constexpr openspace::properties::Property::PropertyInfo InnerRadiusInfo = {
- "InnerRadius",
- "Inner Radius",
- "The inner radius of the circular grid, that is the radius of the inmost ring. "
- "Must be smaller than the outer radius."
+ constexpr openspace::properties::Property::PropertyInfo RadiiInfo = {
+ "Radii",
+ "Inner and Outer Radius",
+ "The radii values that determine the size of the circular grid. The first value "
+ "is the radius of the inmost ring and the second is the radius of the outmost "
+ "ring."
};
struct [[codegen::Dictionary(RenderableRadialGrid)]] Parameters {
@@ -91,11 +86,8 @@ namespace {
// [[codegen::verbatim(LineWidthInfo.description)]]
std::optional lineWidth;
- // [[codegen::verbatim(OuterRadiusInfo.description)]]
- std::optional outerRadius;
-
- // [[codegen::verbatim(InnerRadiusInfo.description)]]
- std::optional innerRadius;
+ // [[codegen::verbatim(RadiiInfo.description)]]
+ std::optional radii;
};
#include "renderableradialgrid_codegen.cpp"
} // namespace
@@ -112,8 +104,7 @@ RenderableRadialGrid::RenderableRadialGrid(const ghoul::Dictionary& dictionary)
, _gridSegments(GridSegmentsInfo, glm::ivec2(1), glm::ivec2(1), glm::ivec2(200))
, _circleSegments(CircleSegmentsInfo, 36, 4, 200)
, _lineWidth(LineWidthInfo, 0.5f, 1.f, 20.f)
- , _maxRadius(OuterRadiusInfo, 1.f, 0.f, 20.f)
- , _minRadius(InnerRadiusInfo, 0.f, 0.f, 20.f)
+ , _radii(RadiiInfo, glm::vec2(0.f, 1.f), glm::vec2(0.f), glm::vec2(20.f))
{
const Parameters p = codegen::bake(dictionary);
@@ -140,24 +131,11 @@ RenderableRadialGrid::RenderableRadialGrid(const ghoul::Dictionary& dictionary)
_lineWidth = p.lineWidth.value_or(_lineWidth);
addProperty(_lineWidth);
- _minRadius = p.innerRadius.value_or(_minRadius);
- _maxRadius = p.outerRadius.value_or(_maxRadius);
+ _radii = p.radii.value_or(_radii);
+ _radii.setViewOption(properties::Property::ViewOptions::MinMaxRange);
+ _radii.onChange([&]() { _gridIsDirty = true; });
- _maxRadius.setMinValue(_minRadius);
- _minRadius.setMaxValue(_maxRadius);
-
- _maxRadius.onChange([&]() {
- _gridIsDirty = true;
- _minRadius.setMaxValue(_maxRadius);
- });
-
- _minRadius.onChange([&]() {
- _gridIsDirty = true;
- _maxRadius.setMinValue(_minRadius);
- });
-
- addProperty(_maxRadius);
- addProperty(_minRadius);
+ addProperty(_radii);
}
bool RenderableRadialGrid::isReady() const {
@@ -236,12 +214,15 @@ void RenderableRadialGrid::update(const UpdateData&) {
return;
}
+ const float innerRadius = _radii.value().x;
+ const float outerRadius = _radii.value().y;
+
// Circles
const int nRadialSegments = _gridSegments.value()[0];
const float fnCircles = static_cast(nRadialSegments);
- const float deltaRadius = (_maxRadius - _minRadius) / fnCircles;
+ const float deltaRadius = (outerRadius - innerRadius) / fnCircles;
- const bool hasInnerRadius = _minRadius > 0;
+ const bool hasInnerRadius = innerRadius > 0.f;
const int nCircles = hasInnerRadius ? nRadialSegments : nRadialSegments + 1;
_circles.clear();
@@ -258,11 +239,11 @@ void RenderableRadialGrid::update(const UpdateData&) {
// add an extra inmost circle
if (hasInnerRadius) {
- addRing(_circleSegments, _minRadius);
+ addRing(_circleSegments, innerRadius);
}
for (int i = 0; i < nRadialSegments; ++i) {
- const float ri = static_cast(i + 1) * deltaRadius + _minRadius;
+ const float ri = static_cast(i + 1) * deltaRadius + innerRadius;
addRing(_circleSegments, ri);
}
@@ -275,10 +256,10 @@ void RenderableRadialGrid::update(const UpdateData&) {
if (nLines > 1) {
std::vector outerVertices =
- rendering::helper::createRing(nLines, _maxRadius);
+ rendering::helper::createRing(nLines, outerRadius);
std::vector innerVertices =
- rendering::helper::createRing(nLines, _minRadius);
+ rendering::helper::createRing(nLines, innerRadius);
for (int i = 0; i < nLines; ++i) {
const rendering::helper::VertexXYZ vOut =
diff --git a/modules/base/rendering/grids/renderableradialgrid.h b/modules/base/rendering/grids/renderableradialgrid.h
index f719808f3d..0c5b1270e3 100644
--- a/modules/base/rendering/grids/renderableradialgrid.h
+++ b/modules/base/rendering/grids/renderableradialgrid.h
@@ -30,6 +30,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -78,8 +79,7 @@ protected:
properties::IVec2Property _gridSegments;
properties::IntProperty _circleSegments;
properties::FloatProperty _lineWidth;
- properties::FloatProperty _maxRadius;
- properties::FloatProperty _minRadius;
+ properties::Vec2Property _radii;
bool _gridIsDirty = true;
diff --git a/modules/base/rendering/renderabledisc.cpp b/modules/base/rendering/renderabledisc.cpp
index 37d1e4b116..52a733131c 100644
--- a/modules/base/rendering/renderabledisc.cpp
+++ b/modules/base/rendering/renderabledisc.cpp
@@ -97,7 +97,7 @@ RenderableDisc::RenderableDisc(const ghoul::Dictionary& dictionary)
_texturePath.onChange([&]() { _texture->loadFromFile(_texturePath.value()); });
addProperty(_texturePath);
- _size.setViewOption(properties::Property::ViewOptions::Logarithmic);
+ _size.setExponent(13.f);
_size = p.size.value_or(_size);
setBoundingSphere(_size);
_size.onChange([&]() { _planeIsDirty = true; });
diff --git a/modules/base/rendering/renderablelabels.cpp b/modules/base/rendering/renderablelabels.cpp
index 8c4b483efc..5125e2bed7 100644
--- a/modules/base/rendering/renderablelabels.cpp
+++ b/modules/base/rendering/renderablelabels.cpp
@@ -75,105 +75,78 @@ namespace {
constexpr openspace::properties::Property::PropertyInfo BlendModeInfo = {
"BlendMode",
"Blending Mode",
- "This determines the blending mode that is applied to this plane."
+ "This determines the blending mode that is applied to the renderable."
};
- constexpr openspace::properties::Property::PropertyInfo LabelColorInfo = {
- "LabelColor",
- "Label Color",
- "The label color for the astronomical object."
+ constexpr openspace::properties::Property::PropertyInfo ColorInfo = {
+ "Color",
+ "Color",
+ "The label text color."
};
constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = {
"FontSize",
"Font Size",
- "The font size for the astronomical object labels."
+ "The font size (in points) for the label."
};
- constexpr openspace::properties::Property::PropertyInfo LabelSizeInfo = {
- "LabelSize",
- "Label Size",
- "The label size for the astronomical object labels."
+ constexpr openspace::properties::Property::PropertyInfo SizeInfo = {
+ "Size",
+ "Size",
+ "This value affects the size scale of the label."
};
- constexpr openspace::properties::Property::PropertyInfo LabelTextInfo = {
- "LabelText",
- "Label Text",
+ constexpr openspace::properties::Property::PropertyInfo TextInfo = {
+ "Text",
+ "Text",
"The text that will be displayed on screen."
};
- constexpr openspace::properties::Property::PropertyInfo LabelMinSizeInfo = {
- "LabelMinSize",
- "Label Min Size",
- "The minimal size (in pixels) of the labels for the astronomical "
- "objects being rendered."
- };
-
- constexpr openspace::properties::Property::PropertyInfo LabelMaxSizeInfo = {
- "LabelMaxSize",
- "Label Max Size",
- "The maximum size (in pixels) of the labels for the astronomical "
- "objects being rendered."
+ constexpr openspace::properties::Property::PropertyInfo MinMaxSizeInfo = {
+ "MinMaxSize",
+ "Min and Max Size",
+ "The minimum and maximum size (in pixels) of the label."
};
constexpr openspace::properties::Property::PropertyInfo TransformationMatrixInfo = {
"TransformationMatrix",
"Transformation Matrix",
- "Transformation matrix to be applied to each astronomical object."
+ "Transformation matrix to be applied to the label."
};
- constexpr openspace::properties::Property::PropertyInfo LabelOrientationOptionInfo = {
- "LabelOrientationOption",
- "Label Orientation Option",
+ constexpr openspace::properties::Property::PropertyInfo OrientationOptionInfo = {
+ "OrientationOption",
+ "Orientation Option",
"Label orientation rendering mode."
};
constexpr openspace::properties::Property::PropertyInfo EnableFadingEffectInfo = {
"EnableFading",
- "Enable/Disable Fade-in effect",
+ "Enable/Disable Fade-in Effect",
"Enable/Disable the Fade-in effect."
};
- constexpr openspace::properties::Property::PropertyInfo PixelSizeControlInfo = {
- "EnablePixelSizeControl",
- "Enable pixel size control.",
- "Enable pixel size control for rectangular projections."
+ constexpr openspace::properties::Property::PropertyInfo FadeWidthsInfo = {
+ "FadeWidths",
+ "Fade Widths",
+ "The distances over which the fading takes place, given in the specified unit. "
+ "The first value is the distance before the closest distance and the second "
+ "the one after the furthest distance. For example, with the unit Parsec (pc), "
+ "a value of {1, 2} will make the label being fully faded out 1 Parsec before "
+ "the closest distance and 2 Parsec away from the furthest distance."
};
- constexpr openspace::properties::Property::PropertyInfo FadeStartUnitOptionInfo = {
- "FadeStartUnit",
- "Fade-In/-Out Start Unit.",
- "Unit for fade-in/-out starting position calculation."
+ constexpr openspace::properties::Property::PropertyInfo FadeDistancesInfo = {
+ "FadeDistances",
+ "Fade Distances",
+ "The distance range in which the labels should be fully opaque, specified in "
+ "the chosen unit. The distance from the position of the label to the camera."
};
- constexpr openspace::properties::Property::PropertyInfo FadeEndUnitOptionInfo = {
- "FadeEndUnit",
- "Fade-In/-Out End Unit.",
- "Unit for fade-in/-out ending position calculation."
- };
-
- constexpr openspace::properties::Property::PropertyInfo FadeStartDistInfo = {
- "FadeStartDistance",
- "Fade-In/-Out starting distance.",
- "Fade-In/-Out starting distance."
- };
-
- constexpr openspace::properties::Property::PropertyInfo FadeEndDistInfo = {
- "FadeEndDistance",
- "Fade-In/-Out ending distance.",
- "Fade-In/-Out ending distance."
- };
-
- constexpr openspace::properties::Property::PropertyInfo FadeStartSpeedInfo = {
- "FadeStartSpeed",
- "Fade-In/-Out starting speed.",
- "Fade-In/-Out starting speed."
- };
-
- constexpr openspace::properties::Property::PropertyInfo FadeEndSpeedInfo = {
- "FadeEndSpeed",
- "Fade-In/-Out ending speed.",
- "Fade-In/-Out ending speed."
+ constexpr openspace::properties::Property::PropertyInfo FadeUnitOptionInfo = {
+ "FadeUnit",
+ "Fade Distance Unit",
+ "Distance unit for fade-in/-out distance calculations. Defaults to \"au\"."
};
struct [[codegen::Dictionary(RenderableLabels)]] Parameters {
@@ -190,33 +163,27 @@ namespace {
PositionNormal [[codegen::key("Camera Position Normal")]]
};
- // [[codegen::verbatim(LabelOrientationOptionInfo.description)]]
- std::optional labelOrientationOption;
+ // [[codegen::verbatim(OrientationOptionInfo.description)]]
+ std::optional orientationOption;
- // [[codegen::verbatim(LabelColorInfo.description)]]
- std::optional labelColor [[codegen::color()]];
+ // [[codegen::verbatim(ColorInfo.description)]]
+ std::optional color [[codegen::color()]];
- // [[codegen::verbatim(LabelTextInfo.description)]]
- std::optional labelText;
+ // [[codegen::verbatim(TextInfo.description)]]
+ std::optional text;
// [[codegen::verbatim(FontSizeInfo.description)]]
std::optional fontSize;
- // [[codegen::verbatim(LabelSizeInfo.description)]]
- std::optional labelSize;
+ // [[codegen::verbatim(SizeInfo.description)]]
+ std::optional size;
- // [[codegen::verbatim(LabelMinSizeInfo.description)]]
- std::optional labelMinSize;
-
- // [[codegen::verbatim(LabelMaxSizeInfo.description)]]
- std::optional labelMaxSize;
+ // [[codegen::verbatim(MinMaxSizeInfo.description)]]
+ std::optional minMaxSize;
// [[codegen::verbatim(EnableFadingEffectInfo.description)]]
std::optional enableFading;
- // [[codegen::verbatim(PixelSizeControlInfo.description)]]
- std::optional enablePixelControl;
-
// [[codegen::verbatim(TransformationMatrixInfo.description)]]
std::optional transformationMatrix;
@@ -230,28 +197,19 @@ namespace {
AstronomicalUnit [[codegen::key("au")]],
Parsec [[codegen::key("pc")]],
KiloParsec [[codegen::key("Kpc")]],
- MegaParsec [[codgen::key("Mpc")]],
+ MegaParsec [[codegen::key("Mpc")]],
GigaParsec [[codegen::key("Gpc")]],
GigaLightyear [[codegen::key("Gly")]]
};
- // [[codegen::verbatim(FadeStartUnitOptionInfo.description)]]
- std::optional fadeStartUnit;
+ // [[codegen::verbatim(FadeUnitOptionInfo.description)]]
+ std::optional fadeUnit;
- // [[codegen::verbatim(FadeEndUnitOptionInfo.description)]]
- std::optional fadeEndUnit;
+ // [[codegen::verbatim(FadeDistancesInfo.description)]]
+ std::optional fadeDistances;
- // [[codegen::verbatim(FadeStartDistInfo.description)]]
- std::optional fadeStartDistance;
-
- // [[codegen::verbatim(FadeEndDistInfo.description)]]
- std::optional fadeEndDistance;
-
- // [[codegen::verbatim(FadeStartSpeedInfo.description)]]
- std::optional fadeStartSpeed;
-
- // [[codegen::verbatim(FadeEndSpeedInfo.description)]]
- std::optional fadeEndSpeed;
+ // [[codegen::verbatim(FadeWidthsInfo.description)]]
+ std::optional fadeWidths;
};
#include "renderablelabels_codegen.cpp"
} // namespace
@@ -265,33 +223,20 @@ documentation::Documentation RenderableLabels::Documentation() {
RenderableLabels::RenderableLabels(const ghoul::Dictionary& dictionary)
: Renderable(dictionary)
, _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown)
- , _labelColor(
- LabelColorInfo,
- glm::vec3(1.f, 1.f, 1.f),
- glm::vec3(0.f),
- glm::vec3(1.f)
- )
- , _labelSize(LabelSizeInfo, 8.f, 0.5f, 30.f)
+ , _color(ColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f))
+ , _size(SizeInfo, 8.f, 0.5f, 30.f)
, _fontSize(FontSizeInfo, 50.f, 1.f, 100.f)
- , _labelMinSize(LabelMinSizeInfo, 8.f, 0.5f, 24.f)
- , _labelMaxSize(LabelMaxSizeInfo, 20.f, 0.5f, 100.f)
- , _pixelSizeControl(PixelSizeControlInfo, false)
+ , _minMaxSize(MinMaxSizeInfo, glm::ivec2(8, 20), glm::ivec2(0), glm::ivec2(100))
, _enableFadingEffect(EnableFadingEffectInfo, false)
- , _labelText(LabelTextInfo, "")
- , _fadeStartDistance(FadeStartDistInfo, 1.f, 0.f, 100.f)
- , _fadeEndDistance(FadeEndDistInfo, 1.f, 0.f, 100.f)
- , _fadeStartSpeed(FadeStartSpeedInfo, 1.f, 1.f, 100.f)
- , _fadeEndSpeed(FadeEndSpeedInfo, 1.f, 1.f, 100.f)
- , _labelOrientationOption(
- LabelOrientationOptionInfo,
+ , _text(TextInfo, "")
+ , _fadeDistances(FadeDistancesInfo, glm::vec2(1.f), glm::vec2(0.f), glm::vec2(100.f))
+ , _fadeWidths(FadeWidthsInfo, glm::vec2(1.f), glm::vec2(0.f), glm::vec2(100.f))
+ , _orientationOption(
+ OrientationOptionInfo,
properties::OptionProperty::DisplayType::Dropdown
)
- , _fadeStartUnitOption(
- FadeStartUnitOptionInfo,
- properties::OptionProperty::DisplayType::Dropdown
- )
- , _fadeEndUnitOption(
- FadeEndUnitOptionInfo,
+ , _fadeUnitOption(
+ FadeUnitOptionInfo,
properties::OptionProperty::DisplayType::Dropdown
)
{
@@ -330,28 +275,28 @@ RenderableLabels::RenderableLabels(const ghoul::Dictionary& dictionary)
addProperty(_blendMode);
- _labelOrientationOption.addOption(ViewDirection, "Camera View Direction");
- _labelOrientationOption.addOption(NormalDirection, "Camera Position Normal");
+ _orientationOption.addOption(ViewDirection, "Camera View Direction");
+ _orientationOption.addOption(NormalDirection, "Camera Position Normal");
- _labelOrientationOption = NormalDirection;
- if (p.labelOrientationOption.has_value()) {
- switch (*p.labelOrientationOption) {
+ _orientationOption = NormalDirection;
+ if (p.orientationOption.has_value()) {
+ switch (*p.orientationOption) {
case Parameters::Orientation::ViewDirection:
- _labelOrientationOption = ViewDirection;
+ _orientationOption = ViewDirection;
break;
case Parameters::Orientation::PositionNormal:
- _labelOrientationOption = NormalDirection;
+ _orientationOption = NormalDirection;
break;
}
}
- addProperty(_labelOrientationOption);
+ addProperty(_orientationOption);
- _labelText = p.labelText.value_or(_labelText);
- addProperty(_labelText);
+ _text = p.text.value_or(_text);
+ addProperty(_text);
- _labelColor = p.labelColor.value_or(_labelColor);
- _labelColor.setViewOption(properties::Property::ViewOptions::Color);
- addProperty(_labelColor);
+ _color = p.color.value_or(_color);
+ _color.setViewOption(properties::Property::ViewOptions::Color);
+ addProperty(_color);
_fontSize = p.fontSize.value_or(_fontSize);
_fontSize.onChange([&]() {
@@ -364,156 +309,86 @@ RenderableLabels::RenderableLabels(const ghoul::Dictionary& dictionary)
});
addProperty(_fontSize);
- _labelSize = p.labelSize.value_or(_labelSize);
- addProperty(_labelSize);
+ // @TODO (emmbr, 2021-05-31): Temporarily set as read only, to avoid errors from font
+ // rendering/loading
+ _fontSize.setReadOnly(true);
- _labelMinSize = p.labelMinSize.value_or(_labelMinSize);
- addProperty(_labelMinSize);
+ _size = p.size.value_or(_size);
+ addProperty(_size);
- _labelMaxSize = p.labelMaxSize.value_or(_labelMaxSize);
- addProperty(_labelMaxSize);
+ _minMaxSize = p.minMaxSize.value_or(_minMaxSize);
+ _minMaxSize.setViewOption(properties::Property::ViewOptions::MinMaxRange);
+ addProperty(_minMaxSize);
_transformationMatrix = p.transformationMatrix.value_or(_transformationMatrix);
- _pixelSizeControl = p.enablePixelControl.value_or(_pixelSizeControl);
- if (_pixelSizeControl) {
- // @TODO (abock, 2021-01-28) I don't know why we only add the property if the
- // pixel control is enabled, but I think this is an error
- addProperty(_pixelSizeControl);
- }
-
_enableFadingEffect = p.enableFading.value_or(_enableFadingEffect);
addProperty(_enableFadingEffect);
- _fadeStartDistance = p.fadeStartDistance.value_or(_fadeStartDistance);
- addProperty(_fadeStartDistance);
+ _fadeUnitOption.addOption(Meter, MeterUnit);
+ _fadeUnitOption.addOption(Kilometer, KilometerUnit);
+ _fadeUnitOption.addOption(Megameter, MegameterUnit);
+ _fadeUnitOption.addOption(Gigameter, GigameterUnit);
+ _fadeUnitOption.addOption(AU, AstronomicalUnit);
+ _fadeUnitOption.addOption(Terameter, TerameterUnit);
+ _fadeUnitOption.addOption(Petameter, PetameterUnit);
+ _fadeUnitOption.addOption(Parsec, ParsecUnit);
+ _fadeUnitOption.addOption(Kiloparsec, KiloparsecUnit);
+ _fadeUnitOption.addOption(Megaparsec, MegaparsecUnit);
+ _fadeUnitOption.addOption(Gigaparsec, GigaparsecUnit);
+ _fadeUnitOption.addOption(GigalightYears, GigalightyearUnit);
- _fadeStartUnitOption.addOption(Meter, MeterUnit);
- _fadeStartUnitOption.addOption(Kilometer, KilometerUnit);
- _fadeStartUnitOption.addOption(Megameter, MegameterUnit);
- _fadeStartUnitOption.addOption(Gigameter, GigameterUnit);
- _fadeStartUnitOption.addOption(AU, AstronomicalUnit);
- _fadeStartUnitOption.addOption(Terameter, TerameterUnit);
- _fadeStartUnitOption.addOption(Petameter, PetameterUnit);
- _fadeStartUnitOption.addOption(Parsec, ParsecUnit);
- _fadeStartUnitOption.addOption(Kiloparsec, KiloparsecUnit);
- _fadeStartUnitOption.addOption(Megaparsec, MegaparsecUnit);
- _fadeStartUnitOption.addOption(Gigaparsec, GigaparsecUnit);
- _fadeStartUnitOption.addOption(GigalightYears, GigalightyearUnit);
-
-
- if (p.fadeStartUnit.has_value()) {
- switch (*p.fadeStartUnit) {
+ if (p.fadeUnit.has_value()) {
+ switch (*p.fadeUnit) {
case Parameters::Unit::Meter:
- _fadeStartUnitOption = Meter;
+ _fadeUnitOption = Meter;
break;
case Parameters::Unit::Kilometer:
- _fadeStartUnitOption = Kilometer;
+ _fadeUnitOption = Kilometer;
break;
case Parameters::Unit::Megameter:
- _fadeStartUnitOption = Megameter;
+ _fadeUnitOption = Megameter;
break;
case Parameters::Unit::Gigameter:
- _fadeStartUnitOption = Gigameter;
+ _fadeUnitOption = Gigameter;
break;
case Parameters::Unit::Terameter:
- _fadeStartUnitOption = Terameter;
+ _fadeUnitOption = Terameter;
break;
case Parameters::Unit::Petameter:
- _fadeStartUnitOption = Petameter;
+ _fadeUnitOption = Petameter;
break;
case Parameters::Unit::AstronomicalUnit:
- _fadeStartUnitOption = AU;
+ _fadeUnitOption = AU;
break;
case Parameters::Unit::Parsec:
- _fadeStartUnitOption = Parsec;
+ _fadeUnitOption = Parsec;
break;
case Parameters::Unit::KiloParsec:
- _fadeStartUnitOption = Kiloparsec;
+ _fadeUnitOption = Kiloparsec;
break;
case Parameters::Unit::MegaParsec:
- _fadeStartUnitOption = Megaparsec;
+ _fadeUnitOption = Megaparsec;
break;
case Parameters::Unit::GigaParsec:
- _fadeStartUnitOption = Gigaparsec;
+ _fadeUnitOption = Gigaparsec;
break;
case Parameters::Unit::GigaLightyear:
- _fadeStartUnitOption = GigalightYears;
+ _fadeUnitOption = GigalightYears;
break;
}
}
else {
- _fadeStartUnitOption = AU;
+ _fadeUnitOption = AU;
}
- addProperty(_fadeStartUnitOption);
+ addProperty(_fadeUnitOption);
- _fadeStartSpeed = p.fadeStartSpeed.value_or(_fadeStartSpeed);
- addProperty(_fadeStartSpeed);
+ _fadeDistances = p.fadeDistances.value_or(_fadeDistances);
+ _fadeDistances.setViewOption(properties::Property::ViewOptions::MinMaxRange);
+ addProperty(_fadeDistances);
- _fadeEndDistance = p.fadeEndDistance.value_or(_fadeEndDistance);
- addProperty(_fadeEndDistance);
-
- _fadeEndUnitOption.addOption(Meter, MeterUnit);
- _fadeEndUnitOption.addOption(Kilometer, KilometerUnit);
- _fadeEndUnitOption.addOption(Megameter, MegameterUnit);
- _fadeEndUnitOption.addOption(Gigameter, GigameterUnit);
- _fadeEndUnitOption.addOption(AU, AstronomicalUnit);
- _fadeEndUnitOption.addOption(Terameter, TerameterUnit);
- _fadeEndUnitOption.addOption(Petameter, PetameterUnit);
- _fadeEndUnitOption.addOption(Parsec, ParsecUnit);
- _fadeEndUnitOption.addOption(Kiloparsec, KiloparsecUnit);
- _fadeEndUnitOption.addOption(Megaparsec, MegaparsecUnit);
- _fadeEndUnitOption.addOption(Gigaparsec, GigaparsecUnit);
- _fadeEndUnitOption.addOption(GigalightYears, GigalightyearUnit);
-
-
- if (p.fadeEndUnit.has_value()) {
- switch (*p.fadeEndUnit) {
- case Parameters::Unit::Meter:
- _fadeStartUnitOption = Meter;
- break;
- case Parameters::Unit::Kilometer:
- _fadeStartUnitOption = Kilometer;
- break;
- case Parameters::Unit::Megameter:
- _fadeStartUnitOption = Megameter;
- break;
- case Parameters::Unit::Gigameter:
- _fadeStartUnitOption = Gigameter;
- break;
- case Parameters::Unit::Terameter:
- _fadeStartUnitOption = Terameter;
- break;
- case Parameters::Unit::Petameter:
- _fadeStartUnitOption = Petameter;
- break;
- case Parameters::Unit::AstronomicalUnit:
- _fadeStartUnitOption = AU;
- break;
- case Parameters::Unit::Parsec:
- _fadeStartUnitOption = Parsec;
- break;
- case Parameters::Unit::KiloParsec:
- _fadeEndUnitOption = Kiloparsec;
- break;
- case Parameters::Unit::MegaParsec:
- _fadeEndUnitOption = Megaparsec;
- break;
- case Parameters::Unit::GigaParsec:
- _fadeEndUnitOption = Gigaparsec;
- break;
- case Parameters::Unit::GigaLightyear:
- _fadeEndUnitOption = GigalightYears;
- break;
- }
- }
- else {
- _fadeEndUnitOption = AU;
- }
- addProperty(_fadeEndUnitOption);
-
- _fadeEndSpeed = p.fadeEndSpeed.value_or(_fadeEndSpeed);
- addProperty(_fadeEndSpeed);
+ _fadeWidths = p.fadeWidths.value_or(_fadeWidths);
+ addProperty(_fadeWidths);
}
bool RenderableLabels::isReady() const {
@@ -528,7 +403,6 @@ void RenderableLabels::initialize() {
void RenderableLabels::initializeGL() {
if (_font == nullptr) {
- //size_t _fontSize = 50;
_font = global::fontManager->font(
"Mono",
_fontSize,
@@ -554,17 +428,7 @@ void RenderableLabels::render(const RenderData& data, RendererTasks&) {
float distanceNodeToCamera = static_cast(
glm::distance(data.camera.positionVec3(), data.modelTransform.translation)
);
- float sUnit = unit(_fadeStartUnitOption);
- float eUnit = unit(_fadeEndUnitOption);
- float startX = _fadeStartDistance * sUnit;
- float endX = _fadeEndDistance * eUnit;
- fadeInVariable = linearSmoothStepFunc(
- distanceNodeToCamera,
- startX,
- endX,
- sUnit,
- eUnit
- );
+ fadeInVariable = computeFadeFactor(distanceNodeToCamera);
}
glm::dmat4 modelMatrix(1.0);
@@ -598,7 +462,7 @@ void RenderableLabels::render(const RenderData& data, RendererTasks&) {
void RenderableLabels::setLabelText(const std::string & newText) {
- _labelText = newText;
+ _text = newText;
}
void RenderableLabels::renderLabels(const RenderData& data,
@@ -606,23 +470,23 @@ void RenderableLabels::renderLabels(const RenderData& data,
const glm::dvec3& orthoRight,
const glm::dvec3& orthoUp, float fadeInVariable)
{
- glm::vec4 textColor = glm::vec4(glm::vec3(_labelColor), 1.f);
+ glm::vec4 textColor = glm::vec4(glm::vec3(_color), 1.f);
textColor.a *= fadeInVariable;
textColor.a *= _opacity;
ghoul::fontrendering::FontRenderer::ProjectedLabelsInformation labelInfo;
- labelInfo.orthoRight = orthoRight;
- labelInfo.orthoUp = orthoUp;
- labelInfo.minSize = static_cast(_labelMinSize);
- labelInfo.maxSize = static_cast(_labelMaxSize);
- labelInfo.cameraPos = data.camera.positionVec3();
- labelInfo.cameraLookUp = data.camera.lookUpVectorWorldSpace();
- labelInfo.renderType = _labelOrientationOption;
- labelInfo.mvpMatrix = modelViewProjectionMatrix;
- labelInfo.scale = powf(10.f, _labelSize);
- labelInfo.enableDepth = true;
+ labelInfo.orthoRight = orthoRight;
+ labelInfo.orthoUp = orthoUp;
+ labelInfo.minSize = _minMaxSize.value().x;
+ labelInfo.maxSize = _minMaxSize.value().y;
+ labelInfo.cameraPos = data.camera.positionVec3();
+ labelInfo.cameraLookUp = data.camera.lookUpVectorWorldSpace();
+ labelInfo.renderType = _orientationOption;
+ labelInfo.mvpMatrix = modelViewProjectionMatrix;
+ labelInfo.scale = powf(10.f, _size);
+ labelInfo.enableDepth = true;
labelInfo.enableFalseDepth = false;
// We don't use spice rotation and scale
@@ -633,52 +497,34 @@ void RenderableLabels::renderLabels(const RenderData& data,
ghoul::fontrendering::FontRenderer::defaultProjectionRenderer().render(
*_font,
transformedPos,
- _labelText.value(),
+ _text.value(),
textColor,
labelInfo
);
}
-float RenderableLabels::changedPerlinSmoothStepFunc(float x, float startX,
- float endX) const
-{
- float f1 = 6.f * powf((x - startX), 5.f) - 15.f * powf((x - startX), 4.f) +
- 10.f * powf((x - startX), 3.f);
- float f2 = -6.f * powf((x - endX), 5.f) + 15.f * powf((x - endX), 4.f) -
- 10.f * powf((x - endX), 3.f) + 1.f;
- float f3 = 1.f;
+float RenderableLabels::computeFadeFactor(float distanceNodeToCamera) const {
+ float distanceUnit = unit(_fadeUnitOption);
+
+ float x = distanceNodeToCamera;
+ float startX = _fadeDistances.value().x * distanceUnit;
+ float endX = _fadeDistances.value().y * distanceUnit;
+
+ // The distances over which the fading should happen
+ float fadingStartDistance = _fadeWidths.value().x * distanceUnit;
+ float fadingEndDistance = _fadeWidths.value().y * distanceUnit;
if (x <= startX) {
+ float f1 = 1.f - (startX - x) / fadingStartDistance;
return std::clamp(f1, 0.f, 1.f);
}
else if (x > startX && x < endX) {
- return f3;
+ return 1.f; // not faded
}
- else if (x >= endX) {
+ else { // x >= endX
+ float f2 = 1.f - (x - endX) / fadingEndDistance;
return std::clamp(f2, 0.f, 1.f);
}
- return x;
-}
-
-float RenderableLabels::linearSmoothStepFunc(float x, float startX, float endX,
- float sUnit, float eUnit) const
-{
- float sdiv = 1.f / (sUnit * _fadeStartSpeed);
- float ediv = -1.f / (eUnit * _fadeEndSpeed);
- float f1 = sdiv * (x - startX) + 1.f;
- float f2 = ediv * (x - endX) + 1.f;
- float f3 = 1.f;
-
- if (x <= startX) {
- return std::clamp(f1, 0.f, 1.f);
- }
- else if (x > startX && x < endX) {
- return f3;
- }
- else if (x >= endX) {
- return std::clamp(f2, 0.f, 1.f);
- }
- return x;
}
float RenderableLabels::unit(int unit) const {
diff --git a/modules/base/rendering/renderablelabels.h b/modules/base/rendering/renderablelabels.h
index cdc29dad88..d1cff72716 100644
--- a/modules/base/rendering/renderablelabels.h
+++ b/modules/base/rendering/renderablelabels.h
@@ -31,6 +31,7 @@
#include
#include
#include
+#include
#include
#include
@@ -77,7 +78,7 @@ protected:
std::string toString(int unit) const;
// Data may require some type of transformation prior the spice transformation being
- // applied.
+ // applied
glm::dmat4 _transformationMatrix = glm::dmat4(1.0);
enum Unit {
@@ -99,27 +100,21 @@ private:
void renderLabels(const RenderData& data, const glm::dmat4& modelViewProjectionMatrix,
const glm::dvec3& orthoRight, const glm::dvec3& orthoUp, float fadeInVariable);
- float changedPerlinSmoothStepFunc(float x, float startX, float endX) const;
+ float computeFadeFactor(float distanceNodeToCamera) const;
- float linearSmoothStepFunc(float x, float startX, float endX, float sUnit,
- float eUnit) const;
-
- properties::Vec3Property _labelColor;
- properties::FloatProperty _labelSize;
+ properties::Vec3Property _color;
properties::FloatProperty _fontSize;
- properties::FloatProperty _labelMinSize;
- properties::FloatProperty _labelMaxSize;
- properties::BoolProperty _pixelSizeControl;
- properties::BoolProperty _enableFadingEffect;
- properties::StringProperty _labelText;
- properties::FloatProperty _fadeStartDistance;
- properties::FloatProperty _fadeEndDistance;
- properties::FloatProperty _fadeStartSpeed;
- properties::FloatProperty _fadeEndSpeed;
+ properties::FloatProperty _size;
+ properties::IVec2Property _minMaxSize;
- properties::OptionProperty _labelOrientationOption;
- properties::OptionProperty _fadeStartUnitOption;
- properties::OptionProperty _fadeEndUnitOption;
+ properties::StringProperty _text;
+
+ properties::BoolProperty _enableFadingEffect;
+ properties::Vec2Property _fadeWidths;
+ properties::Vec2Property _fadeDistances;
+ properties::OptionProperty _fadeUnitOption;
+
+ properties::OptionProperty _orientationOption;
std::shared_ptr _font;
diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp
index 67db6e27ec..9b33abab36 100644
--- a/modules/base/rendering/renderablemodel.cpp
+++ b/modules/base/rendering/renderablemodel.cpp
@@ -157,13 +157,27 @@ namespace {
Centimeter,
Decimeter,
Meter,
- Kilometer
+ Kilometer,
+
+ // Weird units
+ Thou,
+ Inch,
+ Foot,
+ Yard,
+ Chain,
+ Furlong,
+ Mile
};
// The scale of the model. For example if the model is in centimeters
// then ModelScale = Centimeter or ModelScale = 0.01
std::optional> modelScale;
+ // By default the given ModelScale is used to scale the model down,
+ // by setting this setting to true the model is instead scaled up with the
+ // given ModelScale
+ std::optional invertModelScale;
+
// Set if invisible parts (parts with no textures or materials) of the model
// should be forced to render or not.
std::optional forceRenderInvisible;
@@ -290,6 +304,8 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
ghoul::io::ModelReader::NotifyInvisibleDropped(_notifyInvisibleDropped)
);
+ _invertModelScale = p.invertModelScale.value_or(_invertModelScale);
+
if (p.modelScale.has_value()) {
if (std::holds_alternative(*p.modelScale)) {
Parameters::ScaleUnit scaleUnit =
@@ -318,10 +334,33 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
case Parameters::ScaleUnit::Kilometer:
distanceUnit = DistanceUnit::Kilometer;
break;
+
+ // Weired units
+ case Parameters::ScaleUnit::Thou:
+ distanceUnit = DistanceUnit::Thou;
+ break;
+ case Parameters::ScaleUnit::Inch:
+ distanceUnit = DistanceUnit::Inch;
+ break;
+ case Parameters::ScaleUnit::Foot:
+ distanceUnit = DistanceUnit::Foot;
+ break;
+ case Parameters::ScaleUnit::Yard:
+ distanceUnit = DistanceUnit::Yard;
+ break;
+ case Parameters::ScaleUnit::Chain:
+ distanceUnit = DistanceUnit::Chain;
+ break;
+ case Parameters::ScaleUnit::Furlong:
+ distanceUnit = DistanceUnit::Furlong;
+ break;
+ case Parameters::ScaleUnit::Mile:
+ distanceUnit = DistanceUnit::Mile;
+ break;
default:
throw ghoul::MissingCaseException();
}
- _modelScale = convertUnit(distanceUnit, DistanceUnit::Meter);
+ _modelScale = toMeter(distanceUnit);
}
else if (std::holds_alternative(*p.modelScale)) {
_modelScale = std::get(*p.modelScale);
@@ -329,6 +368,10 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
else {
throw ghoul::MissingCaseException();
}
+
+ if (_invertModelScale) {
+ _modelScale = 1.0 / _modelScale;
+ }
}
if (p.animationStartTime.has_value()) {
@@ -532,7 +575,6 @@ void RenderableModel::initializeGL() {
_geometry->initialize();
_geometry->calculateBoundingRadius();
- setBoundingSphere(_geometry->boundingRadius() * _modelScale);
}
void RenderableModel::deinitializeGL() {
@@ -674,6 +716,10 @@ void RenderableModel::update(const UpdateData& data) {
ghoul::opengl::updateUniformLocations(*_program, _uniformCache, UniformNames);
}
+ setBoundingSphere(_geometry->boundingRadius() * _modelScale *
+ glm::compMax(data.modelTransform.scale)
+ );
+
if (_geometry->hasAnimation() && !_animationStart.empty()) {
double relativeTime;
double now = data.time.j2000Seconds();
diff --git a/modules/base/rendering/renderablemodel.h b/modules/base/rendering/renderablemodel.h
index 39b9d3200d..1de33afe5b 100644
--- a/modules/base/rendering/renderablemodel.h
+++ b/modules/base/rendering/renderablemodel.h
@@ -81,6 +81,7 @@ private:
std::unique_ptr _geometry;
double _modelScale = 1.0;
+ bool _invertModelScale = false;
bool _forceRenderInvisible = false;
bool _notifyInvisibleDropped = true;
std::string _animationStart;
diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp
index a71c62b055..988db0bd9e 100644
--- a/modules/base/rendering/renderableplane.cpp
+++ b/modules/base/rendering/renderableplane.cpp
@@ -168,7 +168,7 @@ RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary)
addProperty(_billboard);
- _size.setViewOption(properties::Property::ViewOptions::Logarithmic);
+ _size.setExponent(15.f);
addProperty(_size);
_size.onChange([this](){ _planeIsDirty = true; });
diff --git a/modules/base/rendering/renderableprism.cpp b/modules/base/rendering/renderableprism.cpp
new file mode 100644
index 0000000000..7c96247b21
--- /dev/null
+++ b/modules/base/rendering/renderableprism.cpp
@@ -0,0 +1,348 @@
+/*****************************************************************************************
+ * *
+ * OpenSpace *
+ * *
+ * Copyright (c) 2014-2021 *
+ * *
+ * 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. *
+ ****************************************************************************************/
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace {
+ constexpr const char _loggerCat[] = "RenderablePrism";
+
+ constexpr const std::array UniformNames = {
+ "modelViewProjectionTransform", "vs_color"
+ };
+
+ constexpr openspace::properties::Property::PropertyInfo SegmentsInfo = {
+ "Segments",
+ "Segments",
+ "The number of segments the shape of the prism should have."
+ };
+
+ constexpr openspace::properties::Property::PropertyInfo LinesInfo = {
+ "NumLines",
+ "Number of Lines",
+ "The number of lines connecting the two shapes of the prism."
+ };
+
+ static const openspace::properties::Property::PropertyInfo RadiusInfo = {
+ "Radius",
+ "Radius",
+ "The radius of the prism's shape in meters."
+ };
+
+ constexpr openspace::properties::Property::PropertyInfo LineWidthInfo = {
+ "LineWidth",
+ "Line Width",
+ "This value specifies the line width."
+ };
+
+ constexpr openspace::properties::Property::PropertyInfo LineColorInfo = {
+ "Color",
+ "Color",
+ "This value determines the RGB color for the line."
+ };
+
+ constexpr openspace::properties::Property::PropertyInfo LengthInfo = {
+ "Length",
+ "Length",
+ "The length of the prism in meters."
+ };
+
+ // Generate vertices around the unit circle on the XY-plane
+ std::vector unitCircleVertices(int sectorCount) {
+ std::vector vertices;
+ vertices.reserve(2 * sectorCount);
+ float sectorStep = glm::two_pi() / sectorCount;
+
+ for (int i = 0; i < sectorCount; ++i) {
+ float sectorAngle = i * sectorStep;
+ vertices.push_back(cos(sectorAngle)); // x
+ vertices.push_back(sin(sectorAngle)); // y
+ }
+ return vertices;
+ }
+
+ struct [[codegen::Dictionary(RenderablePrism)]] Parameters {
+ // [[codegen::verbatim(SegmentsInfo.description)]]
+ int segments;
+
+ // [[codegen::verbatim(LinesInfo.description)]]
+ std::optional lines;
+
+ // [[codegen::verbatim(RadiusInfo.description)]]
+ std::optional radius;
+
+ // [[codegen::verbatim(LineWidthInfo.description)]]
+ std::optional lineWidth;
+
+ // [[codegen::verbatim(LineColorInfo.description)]]
+ std::optional color [[codegen::color()]];
+
+ // [[codegen::verbatim(LengthInfo.description)]]
+ std::optional length;
+ };
+#include "renderableprism_codegen.cpp"
+} // namespace
+
+namespace openspace {
+
+documentation::Documentation RenderablePrism::Documentation() {
+ documentation::Documentation doc = codegen::doc("base_renderable_prism");
+ return doc;
+}
+
+RenderablePrism::RenderablePrism(const ghoul::Dictionary& dictionary)
+ : Renderable(dictionary)
+ , _nShapeSegments(SegmentsInfo, 6, 3, 32)
+ , _nLines(LinesInfo, 6, 0, 32)
+ , _radius(RadiusInfo, 10.f, 0.f, 3.0e12f)
+ , _lineWidth(LineWidthInfo, 1.f, 1.f, 20.f)
+ , _lineColor(LineColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f))
+ , _length(LengthInfo, 20.f, 1.f, 3.0e12f)
+{
+ const Parameters p = codegen::bake(dictionary);
+
+ _nShapeSegments.onChange([&]() { _prismIsDirty = true; });
+ _nShapeSegments = p.segments;
+ addProperty(_nShapeSegments);
+
+ _nLines.onChange([&]() { _prismIsDirty = true; });
+ _nLines = p.lines.value_or(_nShapeSegments);
+ addProperty(_nLines);
+
+ _radius.setExponent(10.f);
+ _radius.onChange([&]() { _prismIsDirty = true; });
+ _radius = p.radius.value_or(_radius);
+ addProperty(_radius);
+
+ _lineWidth = p.lineWidth.value_or(_lineWidth);
+ addProperty(_lineWidth);
+
+ _lineColor.setViewOption(properties::Property::ViewOptions::Color);
+ _lineColor = p.color.value_or(_lineColor);
+ addProperty(_lineColor);
+
+ _length.setExponent(12.f);
+ _length.onChange([&]() { _prismIsDirty = true; });
+ _length = p.length.value_or(_length);
+ addProperty(_length);
+
+ addProperty(_opacity);
+}
+
+bool RenderablePrism::isReady() const {
+ return _shader != nullptr;
+}
+
+void RenderablePrism::initialize() {
+ updateVertexData();
+}
+
+void RenderablePrism::initializeGL() {
+ _shader = global::renderEngine->buildRenderProgram(
+ "PrismProgram",
+ absPath("${MODULE_BASE}/shaders/prism_vs.glsl"),
+ absPath("${MODULE_BASE}/shaders/prism_fs.glsl")
+ );
+ ghoul::opengl::updateUniformLocations(*_shader, _uniformCache, UniformNames);
+
+ glGenVertexArrays(1, &_vaoId);
+ glGenBuffers(1, &_vboId);
+ glGenBuffers(1, &_iboId);
+
+ glBindVertexArray(_vaoId);
+
+ updateBufferData();
+
+ glEnableVertexAttribArray(0);
+ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), nullptr);
+ glBindVertexArray(0);
+}
+
+void RenderablePrism::deinitializeGL() {
+ global::renderEngine->removeRenderProgram(_shader.get());
+ _shader = nullptr;
+
+ glDeleteVertexArrays(1, &_vaoId);
+ _vaoId = 0;
+
+ glDeleteBuffers(1, &_vboId);
+ _vboId = 0;
+
+ glDeleteBuffers(1, &_iboId);
+ _iboId = 0;
+}
+
+void RenderablePrism::updateVertexData() {
+ _vertexArray.clear();
+ _indexArray.clear();
+
+ // Get unit circle vertices on the XY-plane
+ std::vector unitVertices = unitCircleVertices(_nShapeSegments);
+ std::vector unitVerticesLines = unitCircleVertices(_nLines);
+
+ // Put base and top shape vertices into array
+ for (int i = 0; i < 2; ++i) {
+ float h = i * _length; // z value, 0 to _length
+
+ for (int j = 0, k = 0; j < _nShapeSegments && k < unitVertices.size(); ++j, k += 2) {
+ float ux = unitVertices[k];
+ float uy = unitVertices[k + 1];
+
+ _vertexArray.push_back(ux * _radius); // x
+ _vertexArray.push_back(uy * _radius); // y
+ _vertexArray.push_back(h); // z
+ }
+ }
+
+ // Put the vertices for the connecting lines into array
+ if (_nLines == 1) {
+ // In the case of just one line then connect the center points instead
+ // Center for base shape
+ _vertexArray.push_back(0.f);
+ _vertexArray.push_back(0.f);
+ _vertexArray.push_back(0.f);
+
+ // Center for top shape
+ _vertexArray.push_back(0.f);
+ _vertexArray.push_back(0.f);
+ _vertexArray.push_back(_length);
+ }
+ else {
+ for (int j = 0, k = 0; j < _nLines && k < unitVerticesLines.size(); ++j, k += 2) {
+ float ux = unitVerticesLines[k];
+ float uy = unitVerticesLines[k + 1];
+
+ // Base
+ _vertexArray.push_back(ux * _radius); // x
+ _vertexArray.push_back(uy * _radius); // y
+ _vertexArray.push_back(0.f); // z
+
+ // Top
+ _vertexArray.push_back(ux * _radius); // x
+ _vertexArray.push_back(uy * _radius); // y
+ _vertexArray.push_back(_length); // z
+ }
+ }
+
+ // Indices for Base shape
+ ghoul_assert(
+ _nShapeSegments.value() <= std::numeric_limits::max(),
+ "Too many shape segments"
+ );
+ for (uint8_t i = 0; i < _nShapeSegments; ++i) {
+ _indexArray.push_back(i);
+ }
+
+ // Reset
+ _indexArray.push_back(255);
+
+ // Indices for Top shape
+ for (uint8_t i = _nShapeSegments; i < 2 * _nShapeSegments; ++i) {
+ _indexArray.push_back(i);
+ }
+
+ // Indices for connecting lines
+ for (int i = 0, k = 0; i < _nLines; ++i, k += 2) {
+ // Reset
+ _indexArray.push_back(255);
+
+ _indexArray.push_back(2 * _nShapeSegments + k);
+ _indexArray.push_back(2 * _nShapeSegments + k + 1);
+ }
+}
+
+void RenderablePrism::updateBufferData() {
+ glBindBuffer(GL_ARRAY_BUFFER, _vboId);
+ glBufferData(
+ GL_ARRAY_BUFFER,
+ _vertexArray.size() * sizeof(float),
+ _vertexArray.data(),
+ GL_STREAM_DRAW
+ );
+
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _iboId);
+ glBufferData(
+ GL_ELEMENT_ARRAY_BUFFER,
+ _indexArray.size() * sizeof(uint8_t),
+ _indexArray.data(),
+ GL_STREAM_DRAW
+ );
+}
+
+void RenderablePrism::render(const RenderData& data, RendererTasks&) {
+ _shader->activate();
+
+ // Model transform and view transform needs to be in double precision
+ glm::dmat4 modelTransform =
+ glm::translate(glm::dmat4(1.0), data.modelTransform.translation) *
+ glm::dmat4(data.modelTransform.rotation) *
+ glm::scale(glm::dmat4(1.0), glm::dvec3(data.modelTransform.scale));
+
+ glm::mat4 modelViewProjectionTransform =
+ data.camera.projectionMatrix() *
+ glm::mat4(data.camera.combinedViewMatrix() * modelTransform);
+
+ // Uniforms
+ _shader->setUniform(_uniformCache.modelViewProjection, modelViewProjectionTransform);
+ _shader->setUniform(_uniformCache.color, glm::vec4(_lineColor.value(), _opacity));
+
+ // Render
+ glEnable(GL_PRIMITIVE_RESTART);
+ glPrimitiveRestartIndex(255);
+ glLineWidth(_lineWidth);
+ glBindVertexArray(_vaoId);
+
+ glDrawElements(GL_LINE_LOOP, static_cast(_indexArray.size()), GL_UNSIGNED_BYTE, nullptr);
+
+ glBindVertexArray(0);
+ global::renderEngine->openglStateCache().resetLineState();
+ glDisable(GL_PRIMITIVE_RESTART);
+
+ _shader->deactivate();
+}
+
+void RenderablePrism::update(const UpdateData& data) {
+ if (_shader->isDirty()) {
+ _shader->rebuildFromFile();
+ ghoul::opengl::updateUniformLocations(*_shader, _uniformCache, UniformNames);
+ }
+ if (_prismIsDirty) {
+ updateVertexData();
+ updateBufferData();
+ setBoundingSphere(_length * glm::compMax(data.modelTransform.scale));
+ _prismIsDirty = false;
+ }
+}
+
+} // namespace openspace
diff --git a/modules/base/rendering/renderableprism.h b/modules/base/rendering/renderableprism.h
new file mode 100644
index 0000000000..3acfb6953f
--- /dev/null
+++ b/modules/base/rendering/renderableprism.h
@@ -0,0 +1,83 @@
+/*****************************************************************************************
+ * *
+ * OpenSpace *
+ * *
+ * Copyright (c) 2014-2021 *
+ * *
+ * 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_BASE___RENDERABLEPRISM___H__
+#define __OPENSPACE_MODULE_BASE___RENDERABLEPRISM___H__
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace ghoul::opengl { class ProgramObject; }
+
+namespace openspace {
+
+namespace documentation { struct Documentation; }
+
+class RenderablePrism : public Renderable {
+public:
+ RenderablePrism(const ghoul::Dictionary& dictionary);
+
+ void initialize() override;
+ void initializeGL() override;
+ void deinitializeGL() override;
+
+ bool isReady() const override;
+
+ void render(const RenderData& data, RendererTasks& rendererTask) override;
+ void update(const UpdateData& data) override;
+
+ static documentation::Documentation Documentation();
+
+private:
+ void updateVertexData();
+ void updateBufferData();
+
+ // Properties
+ properties::IntProperty _nShapeSegments;
+ properties::IntProperty _nLines;
+ properties::FloatProperty _radius;
+ properties::FloatProperty _lineWidth;
+ properties::Vec3Property _lineColor;
+ properties::FloatProperty _length;
+ UniformCache(modelViewProjection, color) _uniformCache;
+
+ std::unique_ptr _shader;
+ GLuint _vaoId = 0;
+ GLuint _vboId = 0;
+ GLuint _iboId = 0;
+ std::vector _vertexArray;
+ std::vector _indexArray;
+
+ bool _prismIsDirty = false;
+};
+
+} // namespace openspace
+
+#endif // __OPENSPACE_MODULE_BASE___RENDERABLEPRISM___H__
diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp
index 0aebf68d93..e6b32389be 100644
--- a/modules/base/rendering/renderablesphere.cpp
+++ b/modules/base/rendering/renderablesphere.cpp
@@ -169,7 +169,7 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary)
: Renderable(dictionary)
, _texturePath(TextureInfo)
, _orientation(OrientationInfo, properties::OptionProperty::DisplayType::Dropdown)
- , _size(SizeInfo, 1.f, 0.f, 1e35f)
+ , _size(SizeInfo, 1.f, 0.f, 1e25f)
, _segments(SegmentsInfo, 8, 4, 1000)
, _mirrorTexture(MirrorTextureInfo, false)
, _useAdditiveBlending(UseAdditiveBlendingInfo, false)
@@ -213,7 +213,7 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary)
}
addProperty(_orientation);
- _size.setViewOption(properties::Property::ViewOptions::Logarithmic);
+ _size.setExponent(15.f);
_size.onChange([this]() {
setBoundingSphere(_size);
_sphereIsDirty = true;
diff --git a/modules/base/rendering/renderabletimevaryingsphere.cpp b/modules/base/rendering/renderabletimevaryingsphere.cpp
index 8b5f965b9f..362b641ce6 100644
--- a/modules/base/rendering/renderabletimevaryingsphere.cpp
+++ b/modules/base/rendering/renderabletimevaryingsphere.cpp
@@ -215,7 +215,7 @@ RenderableTimeVaryingSphere::RenderableTimeVaryingSphere(
}
addProperty(_orientation);
- _size.setViewOption(properties::Property::ViewOptions::Logarithmic);
+ _size.setViewOption(properties::Property::ViewOptions::MinMaxRange);
_size.onChange([this]() {
setBoundingSphere(_size);
_sphereIsDirty = true;
diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp
index 44d04d553e..63e7d99764 100644
--- a/modules/base/rendering/renderabletrail.cpp
+++ b/modules/base/rendering/renderabletrail.cpp
@@ -33,6 +33,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -51,7 +52,7 @@ namespace {
constexpr const std::array UniformNames = {
"opacity", "modelViewTransform", "projectionTransform", "color", "useLineFade",
"lineFade", "vertexSortingMethod", "idOffset", "nVertices", "stride", "pointSize",
- "renderPhase", "resolution", "lineWidth"
+ "renderPhase", "viewport", "lineWidth"
};
#endif
@@ -338,12 +339,20 @@ void RenderableTrail::internalRender(bool renderLines, bool renderPoints,
#if !defined(__APPLE__)
glm::ivec2 resolution = global::renderEngine->renderingResolution();
- _programObject->setUniform(_uniformCache.resolution, resolution);
+ GLint viewport[4];
+ global::renderEngine->openglStateCache().viewport(viewport);
+ _programObject->setUniform(
+ _uniformCache.viewport,
+ static_cast(viewport[0]),
+ static_cast(viewport[1]),
+ static_cast(viewport[2]),
+ static_cast(viewport[3])
+ );
_programObject->setUniform(
_uniformCache.lineWidth,
std::ceil((2.f * 1.f + _appearance.lineWidth) * std::sqrt(2.f))
);
-#endif
+#endif // !defined(__APPLE__)
if (renderPoints) {
// The stride parameter determines the distance between larger points and
diff --git a/modules/base/rendering/renderabletrail.h b/modules/base/rendering/renderabletrail.h
index a65fc7fa18..6d9a6450c4 100644
--- a/modules/base/rendering/renderabletrail.h
+++ b/modules/base/rendering/renderabletrail.h
@@ -178,8 +178,8 @@ private:
pointSize, renderPhase) _uniformCache;
#else
UniformCache(opacity, modelView, projection, color, useLineFade, lineFade,
- vertexSorting, idOffset, nVertices, stride, pointSize, renderPhase,
- resolution, lineWidth) _uniformCache;
+ vertexSorting, idOffset, nVertices, stride, pointSize, renderPhase, viewport,
+ lineWidth) _uniformCache;
#endif
};
diff --git a/modules/base/shaders/prism_fs.glsl b/modules/base/shaders/prism_fs.glsl
new file mode 100644
index 0000000000..e659f56f6a
--- /dev/null
+++ b/modules/base/shaders/prism_fs.glsl
@@ -0,0 +1,36 @@
+/*****************************************************************************************
+ * *
+ * OpenSpace *
+ * *
+ * Copyright (c) 2014-2021 *
+ * *
+ * 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. *
+ ****************************************************************************************/
+
+#include "fragment.glsl"
+
+in float vs_depth;
+
+uniform vec4 vs_color;
+
+Fragment getFragment() {
+ Fragment frag;
+ frag.color = vs_color;
+ frag.depth = vs_depth;
+ return frag;
+}
diff --git a/modules/base/shaders/prism_vs.glsl b/modules/base/shaders/prism_vs.glsl
new file mode 100644
index 0000000000..bb8d4f68b0
--- /dev/null
+++ b/modules/base/shaders/prism_vs.glsl
@@ -0,0 +1,41 @@
+/*****************************************************************************************
+ * *
+ * OpenSpace *
+ * *
+ * Copyright (c) 2014-2021 *
+ * *
+ * 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. *
+ ****************************************************************************************/
+
+#version __CONTEXT__
+
+#include "PowerScaling/powerScaling_vs.hglsl"
+
+layout (location = 0) in vec3 in_position;
+
+out float vs_depth;
+
+uniform mat4 modelViewProjectionTransform;
+
+void main() {
+ vec4 position = vec4(in_position, 1.0);
+ vec4 positionClipSpace = modelViewProjectionTransform * position;
+ vec4 positionScreenSpace = z_normalization(positionClipSpace);
+ gl_Position = positionScreenSpace;
+ vs_depth = positionScreenSpace.w;
+}
diff --git a/modules/base/shaders/renderabletrail_fs.glsl b/modules/base/shaders/renderabletrail_fs.glsl
index 27e1402b06..c5c370c108 100644
--- a/modules/base/shaders/renderabletrail_fs.glsl
+++ b/modules/base/shaders/renderabletrail_fs.glsl
@@ -34,12 +34,13 @@ uniform int renderPhase;
uniform float opacity = 1.0;
uniform float lineWidth;
+uniform vec4 viewport;
+
// Fragile! Keep in sync with RenderableTrail::render::RenderPhase
-#define RenderPhaseLines 0
-#define RenderPhasePoints 1
-
-#define Delta 0.25
+const int RenderPhaseLines = 0;
+const int RenderPhasePoints = 1;
+const float Delta = 0.25;
Fragment getFragment() {
Fragment frag;
@@ -61,18 +62,21 @@ Fragment getFragment() {
frag.color.a = transparencyCorrection;
}
- double distanceCenter = length(mathLine - vec2(gl_FragCoord.xy));
+ // We can't expect a viewport of the form (0, 0, res.x, res.y) used to convert the
+ // window coordinates from gl_FragCoord into [0, 1] coordinates, so we need to use
+ // this more complicated method that is also used in the FXAA and HDR rendering steps
+ vec2 xy = vec2(gl_FragCoord.xy);
+ xy -= viewport.xy;
+
+ double distanceCenter = length(mathLine - xy);
double dLW = double(lineWidth);
- float blendFactor = 20;
+ const float blendFactor = 20.0;
if (distanceCenter > dLW) {
frag.color.a = 0.0;
- //discard;
}
else {
frag.color.a *= pow(float((dLW - distanceCenter) / dLW), blendFactor);
- // if (frag.color.a < 0.4)
- // discard;
}
frag.gPosition = vs_gPosition;
diff --git a/modules/base/shaders/renderabletrail_vs.glsl b/modules/base/shaders/renderabletrail_vs.glsl
index 3a6b56ce62..f2615fa74c 100644
--- a/modules/base/shaders/renderabletrail_vs.glsl
+++ b/modules/base/shaders/renderabletrail_vs.glsl
@@ -43,14 +43,13 @@ uniform int vertexSortingMethod;
uniform int pointSize;
uniform int stride;
-uniform ivec2 resolution;
+uniform vec4 viewport;
// Fragile! Keep in sync with RenderableTrail::render
#define VERTEX_SORTING_NEWESTFIRST 0
#define VERTEX_SORTING_OLDESTFIRST 1
#define VERTEX_SORTING_NOSORTING 2
-
void main() {
int modId = gl_VertexID;
@@ -83,5 +82,5 @@ void main() {
float(pointSize) : float(pointSize) / 2;
gl_Position = z_normalization(vs_positionClipSpace);
- mathLine = 0.5 * (vs_positionNDC.xy + vec2(1.0)) * vec2(resolution);
+ mathLine = 0.5 * (vs_positionNDC.xy + vec2(1.0)) * viewport.zw;
}
diff --git a/modules/base/translation/statictranslation.cpp b/modules/base/translation/statictranslation.cpp
index 54c8513dcf..228d6a7d62 100644
--- a/modules/base/translation/statictranslation.cpp
+++ b/modules/base/translation/statictranslation.cpp
@@ -56,7 +56,7 @@ StaticTranslation::StaticTranslation()
glm::dvec3(std::numeric_limits::max())
)
{
- _position.setViewOption(properties::Property::ViewOptions::Logarithmic);
+ _position.setExponent(20.f);
addProperty(_position);
_position.onChange([this]() {
diff --git a/modules/debugging/rendering/renderabledebugplane.cpp b/modules/debugging/rendering/renderabledebugplane.cpp
index f2308c7ecd..57f6958257 100644
--- a/modules/debugging/rendering/renderabledebugplane.cpp
+++ b/modules/debugging/rendering/renderabledebugplane.cpp
@@ -115,7 +115,7 @@ RenderableDebugPlane::RenderableDebugPlane(const ghoul::Dictionary& dictionary)
_texture = p.texture.value_or(_texture);
addProperty(_texture);
- _size.setViewOption(properties::Property::ViewOptions::Logarithmic);
+ _size.setExponent(15.f);
_size.onChange([this](){ _planeIsDirty = true; });
_size = p.size.value_or(_size);
setBoundingSphere(_size);
diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp
index bc9df03ce1..4113d606ff 100644
--- a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp
+++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp
@@ -33,23 +33,23 @@
#include
#include
#include
-#include
-#include
+#include
+#include
+#include
#include
#include
+#include
+#include
#include
#include
#include
#include
#include
-#include
-#include
-#include
#include
#include
+#include
#include
#include
-#include
#include
#include
#include
@@ -116,18 +116,11 @@ namespace {
"The text size for the astronomical object labels."
};
- constexpr openspace::properties::Property::PropertyInfo LabelMinSizeInfo = {
- "TextMinSize",
- "Text Min Size",
- "The minimal size (in pixels) of the text for the labels for the astronomical "
- "objects being rendered."
- };
-
- constexpr openspace::properties::Property::PropertyInfo LabelMaxSizeInfo = {
- "TextMaxSize",
- "Text Max Size",
- "The maximum size (in pixels) of the text for the labels for the astronomical "
- "objects being rendered."
+ constexpr openspace::properties::Property::PropertyInfo LabelMinMaxSizeInfo = {
+ "TextMinMaxSize",
+ "Text Min/Max Size",
+ "The minimal and maximal size (in pixels) of the text for the labels for the "
+ "astronomical objects being rendered."
};
constexpr openspace::properties::Property::PropertyInfo DrawElementsInfo = {
@@ -178,48 +171,43 @@ namespace {
constexpr openspace::properties::Property::PropertyInfo DisableFadeInInfo = {
"DisableFadeIn",
- "Disable Fade-in effect",
+ "Disable Fade-in Effect",
"Enables/Disables the Fade-in effect."
};
- constexpr openspace::properties::Property::PropertyInfo BillboardMaxSizeInfo = {
- "BillboardMaxSize",
- "Billboard Max Size in Pixels",
- "The max size (in pixels) for the billboard representing the astronomical "
- "object."
+ constexpr openspace::properties::Property::PropertyInfo PixelSizeControlInfo = {
+ "EnablePixelSizeControl",
+ "Enable Pixel Size Control",
+ "Enable pixel size control for rectangular projections. If set to true, the "
+ "billboard size is restricted by the min/max size in pixels property."
};
- constexpr openspace::properties::Property::PropertyInfo BillboardMinSizeInfo = {
- "BillboardMinSize",
- "Billboard Min Size in Pixels",
- "The min size (in pixels) for the billboard representing the astronomical "
- "object."
+ constexpr openspace::properties::Property::PropertyInfo BillboardMinMaxSizeInfo = {
+ "BillboardMinMaxSize",
+ "Billboard Min/Max Size in Pixels",
+ "The minimum and maximum size (in pixels) for the billboard representing the "
+ "astronomical object."
};
constexpr openspace::properties::Property::PropertyInfo
- CorrectionSizeEndDistanceInfo = {
+ CorrectionSizeEndDistanceInfo =
+ {
"CorrectionSizeEndDistance",
- "Distance in 10^X meters where correction size stops acting.",
+ "Distance in 10^X meters where correction size stops acting",
"Distance in 10^X meters where correction size stops acting."
};
constexpr openspace::properties::Property::PropertyInfo CorrectionSizeFactorInfo = {
"CorrectionSizeFactor",
- "Control variable for distance size.",
+ "Control variable for distance size",
""
};
- constexpr openspace::properties::Property::PropertyInfo PixelSizeControlInfo = {
- "EnablePixelSizeControl",
- "Enable pixel size control.",
- "Enable pixel size control for rectangular projections."
- };
-
constexpr openspace::properties::Property::PropertyInfo UseLinearFiltering = {
"UseLinearFiltering",
"Use Linear Filtering",
"Determines whether the provided color map should be sampled nearest neighbor "
- "(=off) or linearly (=on"
+ "(=off) or linearly (=on)"
};
constexpr openspace::properties::Property::PropertyInfo SetRangeFromData = {
@@ -258,6 +246,8 @@ namespace {
Gigaparsec [[codegen::key("Gpc")]],
GigalightYears [[codegen::key("Gly")]]
};
+ // The unit used for all distances. Must match the unit of any
+ // distances/positions in the data files
std::optional unit;
// [[codegen::verbatim(ScaleFactorInfo.description)]]
@@ -289,11 +279,8 @@ namespace {
// objects being rendered
std::optional labelFile;
- // [[codegen::verbatim(LabelMinSizeInfo.description)]]
- std::optional textMinSize;
-
- // [[codegen::verbatim(LabelMaxSizeInfo.description)]]
- std::optional textMaxSize;
+ // [[codegen::verbatim(LabelMinMaxSizeInfo.description)]]
+ std::optional textMinMaxSize;
// [[codegen::verbatim(ColorOptionInfo.description)]]
std::optional> colorOption;
@@ -314,11 +301,8 @@ namespace {
// [[codegen::verbatim(DisableFadeInInfo.description)]]
std::optional disableFadeIn;
- // [[codegen::verbatim(BillboardMaxSizeInfo.description)]]
- std::optional billboardMaxSize;
-
- // [[codegen::verbatim(BillboardMinSizeInfo.description)]]
- std::optional billboardMinSize;
+ // [[codegen::verbatim(BillboardMinMaxSizeInfo.description)]]
+ std::optional billboardMinMaxSize;
// [[codegen::verbatim(CorrectionSizeEndDistanceInfo.description)]]
std::optional correctionSizeEndDistance;
@@ -349,27 +333,34 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di
, _textColor(TextColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f))
, _textOpacity(TextOpacityInfo, 1.f, 0.f, 1.f)
, _textSize(TextSizeInfo, 8.f, 0.5f, 24.f)
- , _textMinSize(LabelMinSizeInfo, 8.f, 0.5f, 24.f)
- , _textMaxSize(LabelMaxSizeInfo, 20.f, 0.5f, 100.f)
+ , _textMinMaxSize(
+ LabelMinMaxSizeInfo,
+ glm::ivec2(8, 20),
+ glm::ivec2(0),
+ glm::ivec2(100)
+ )
, _drawElements(DrawElementsInfo, true)
, _drawLabels(DrawLabelInfo, false)
, _pixelSizeControl(PixelSizeControlInfo, false)
, _colorOption(ColorOptionInfo, properties::OptionProperty::DisplayType::Dropdown)
, _optionColorRangeData(OptionColorRangeInfo, glm::vec2(0.f))
-
, _datavarSizeOption(
SizeOptionInfo,
properties::OptionProperty::DisplayType::Dropdown
)
- , _fadeInDistance(
+ , _fadeInDistances(
FadeInDistancesInfo,
glm::vec2(0.f),
glm::vec2(0.f),
glm::vec2(100.f)
)
, _disableFadeInDistance(DisableFadeInInfo, true)
- , _billboardMaxSize(BillboardMaxSizeInfo, 400.f, 0.f, 1000.f)
- , _billboardMinSize(BillboardMinSizeInfo, 0.f, 0.f, 100.f)
+ , _billboardMinMaxSize(
+ BillboardMinMaxSizeInfo,
+ glm::vec2(0.f, 400.f),
+ glm::vec2(0.f),
+ glm::vec2(1000.f)
+ )
, _correctionSizeEndDistance(CorrectionSizeEndDistanceInfo, 17.f, 12.f, 25.f)
, _correctionSizeFactor(CorrectionSizeFactorInfo, 8.f, 0.f, 20.f)
, _useLinearFiltering(UseLinearFiltering, false)
@@ -441,6 +432,7 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di
// @TODO (abock, 2021-01-31) I don't know why we only add this property if the
// texture is given, but I think it's a bug
+ // @TODO (emmbr, 2021-05-24) This goes for several properties in this renderable
addProperty(_spriteTexturePath);
}
_hasSpriteTexture = p.texture.has_value();
@@ -528,28 +520,28 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di
_textSize = p.textSize.value_or(_textSize);
addProperty(_textSize);
- _textMinSize = p.textMinSize.value_or(_textMinSize);
- addProperty(_textMinSize);
-
- _textMaxSize = p.textMaxSize.value_or(_textMaxSize);
- addProperty(_textMaxSize);
+ _textMinMaxSize = p.textMinMaxSize.value_or(_textMinMaxSize);
+ _textMinMaxSize.setViewOption(properties::Property::ViewOptions::MinMaxRange);
+ addProperty(_textMinMaxSize);
}
_transformationMatrix = p.transformationMatrix.value_or(_transformationMatrix);
if (p.fadeInDistances.has_value()) {
- _fadeInDistance = *p.fadeInDistances;
- addProperty(_fadeInDistance);
+ _fadeInDistances = *p.fadeInDistances;
+ _fadeInDistances.setViewOption(properties::Property::ViewOptions::MinMaxRange);
+ addProperty(_fadeInDistances);
_disableFadeInDistance = false;
addProperty(_disableFadeInDistance);
}
- _billboardMaxSize = p.billboardMaxSize.value_or(_billboardMaxSize);
- addProperty(_billboardMaxSize);
+ _pixelSizeControl = p.enablePixelSizeControl.value_or(_pixelSizeControl);
+ addProperty(_pixelSizeControl);
- _billboardMinSize = p.billboardMinSize.value_or(_billboardMinSize);
- addProperty(_billboardMinSize);
+ _billboardMinMaxSize = p.billboardMinMaxSize.value_or(_billboardMinMaxSize);
+ _billboardMinMaxSize.setViewOption(properties::Property::ViewOptions::MinMaxRange);
+ addProperty(_billboardMinMaxSize);
_correctionSizeEndDistance =
p.correctionSizeEndDistance.value_or(_correctionSizeEndDistance);
@@ -560,11 +552,6 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di
addProperty(_correctionSizeFactor);
}
- _pixelSizeControl = p.enablePixelSizeControl.value_or(_pixelSizeControl);
- if (p.enablePixelSizeControl.has_value()) {
- addProperty(_pixelSizeControl);
- }
-
_setRangeFromData.onChange([this]() {
const int colorMapInUse =
_hasColorMapFile ? _dataset.index(_colorOptionString) : 0;
@@ -720,8 +707,11 @@ void RenderableBillboardsCloud::renderBillboards(const RenderData& data,
glm::dmat4(data.camera.projectionMatrix()) * data.camera.combinedViewMatrix()
)
);
- _program->setUniform(_uniformCache.minBillboardSize, _billboardMinSize); // in pixels
- _program->setUniform(_uniformCache.maxBillboardSize, _billboardMaxSize); // in pixels
+
+ const float minBillboardSize = _billboardMinMaxSize.value().x; // in pixels
+ const float maxBillboardSize = _billboardMinMaxSize.value().y; // in pixels
+ _program->setUniform(_uniformCache.minBillboardSize, minBillboardSize);
+ _program->setUniform(_uniformCache.maxBillboardSize, maxBillboardSize);
_program->setUniform(_uniformCache.color, _pointColor);
_program->setUniform(_uniformCache.alphaValue, _opacity);
_program->setUniform(_uniformCache.scaleFactor, _scaleFactor);
@@ -774,8 +764,8 @@ void RenderableBillboardsCloud::renderLabels(const RenderData& data,
ghoul::fontrendering::FontRenderer::ProjectedLabelsInformation labelInfo;
labelInfo.orthoRight = orthoRight;
labelInfo.orthoUp = orthoUp;
- labelInfo.minSize = static_cast(_textMinSize);
- labelInfo.maxSize = static_cast(_textMaxSize);
+ labelInfo.minSize = _textMinMaxSize.value().x;
+ labelInfo.maxSize = _textMinMaxSize.value().y;
labelInfo.cameraPos = data.camera.positionVec3();
labelInfo.cameraLookUp = data.camera.lookUpVectorWorldSpace();
labelInfo.renderType = _renderOption;
@@ -801,7 +791,7 @@ void RenderableBillboardsCloud::render(const RenderData& data, RendererTasks&) {
float fadeInVar = 1.f;
if (!_disableFadeInDistance) {
float distCamera = static_cast(glm::length(data.camera.positionVec3()));
- const glm::vec2 fadeRange = _fadeInDistance;
+ const glm::vec2 fadeRange = _fadeInDistances;
const float a = static_cast(
1.f / ((fadeRange.y - fadeRange.x) * unitToMeter(_unit))
);
@@ -1034,9 +1024,14 @@ std::vector RenderableBillboardsCloud::createDataSlice() {
float minColorIdx = std::numeric_limits::max();
float maxColorIdx = -std::numeric_limits::max();
for (const speck::Dataset::Entry& e : _dataset.entries) {
- float color = e.data[colorMapInUse];
- minColorIdx = std::min(color, minColorIdx);
- maxColorIdx = std::max(color, maxColorIdx);
+ if (e.data.size() > 0) {
+ float color = e.data[colorMapInUse];
+ minColorIdx = std::min(color, minColorIdx);
+ maxColorIdx = std::max(color, maxColorIdx);
+ } else {
+ minColorIdx = 0;
+ maxColorIdx = 0;
+ }
}
double maxRadius = 0.0;
@@ -1136,7 +1131,7 @@ std::vector RenderableBillboardsCloud::createDataSlice() {
}
}
setBoundingSphere(maxRadius);
- _fadeInDistance.setMaxValue(glm::vec2(10.f * biggestCoord));
+ _fadeInDistances.setMaxValue(glm::vec2(10.f * biggestCoord));
return result;
}
diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.h b/modules/digitaluniverse/rendering/renderablebillboardscloud.h
index 2d0ab0582f..abc3d5d30f 100644
--- a/modules/digitaluniverse/rendering/renderablebillboardscloud.h
+++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.h
@@ -33,6 +33,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -111,18 +112,16 @@ private:
properties::Vec3Property _textColor;
properties::FloatProperty _textOpacity;
properties::FloatProperty _textSize;
- properties::FloatProperty _textMinSize;
- properties::FloatProperty _textMaxSize;
+ properties::IVec2Property _textMinMaxSize;
properties::BoolProperty _drawElements;
properties::BoolProperty _drawLabels;
properties::BoolProperty _pixelSizeControl;
properties::OptionProperty _colorOption;
properties::Vec2Property _optionColorRangeData;
properties::OptionProperty _datavarSizeOption;
- properties::Vec2Property _fadeInDistance;
+ properties::Vec2Property _fadeInDistances;
properties::BoolProperty _disableFadeInDistance;
- properties::FloatProperty _billboardMaxSize;
- properties::FloatProperty _billboardMinSize;
+ properties::Vec2Property _billboardMinMaxSize;
properties::FloatProperty _correctionSizeEndDistance;
properties::FloatProperty _correctionSizeFactor;
properties::BoolProperty _useLinearFiltering;
@@ -135,7 +134,7 @@ private:
ghoul::opengl::ProgramObject* _renderToPolygonProgram = nullptr;
UniformCache(
- cameraViewProjectionMatrix, modelMatrix, cameraPos, cameraLookup, renderOption,
+ cameraViewProjectionMatrix, modelMatrix, cameraPos, cameraLookup, renderOption,
minBillboardSize, maxBillboardSize, correctionSizeEndDistance,
correctionSizeFactor, color, alphaValue, scaleFactor, up, right, fadeInValue,
screenSize, spriteTexture, hasColormap, enabledRectSizeControl, hasDvarScaling
diff --git a/modules/digitaluniverse/rendering/renderabledumeshes.cpp b/modules/digitaluniverse/rendering/renderabledumeshes.cpp
index 14f3742c86..b7e0a708df 100644
--- a/modules/digitaluniverse/rendering/renderabledumeshes.cpp
+++ b/modules/digitaluniverse/rendering/renderabledumeshes.cpp
@@ -87,18 +87,11 @@ namespace {
"objects being rendered."
};
- constexpr openspace::properties::Property::PropertyInfo LabelMinSizeInfo = {
- "TextMinSize",
- "Text Min Size",
- "The minimal size (in pixels) of the text for the labels for the astronomical "
- "objects being rendered."
- };
-
- constexpr openspace::properties::Property::PropertyInfo LabelMaxSizeInfo = {
- "TextMaxSize",
- "Text Max Size",
- "The maximum size (in pixels) of the text for the labels for the astronomical "
- "objects being rendered."
+ constexpr openspace::properties::Property::PropertyInfo LabelMinMaxSizeInfo = {
+ "TextMinMaxSize",
+ "Text Min/Max Size",
+ "The minimum and maximum size (in pixels) of the text for the labels for the "
+ "astronomical objects being rendered."
};
constexpr openspace::properties::Property::PropertyInfo LineWidthInfo = {
@@ -162,11 +155,8 @@ namespace {
// [[codegen::verbatim(LabelFileInfo.description)]]
std::optional labelFile;
- // [[codegen::verbatim(LabelMinSizeInfo.description)]]
- std::optional textMinSize;
-
- // [[codegen::verbatim(LabelMaxSizeInfo.description)]]
- std::optional textMaxSize;
+ // [[codegen::verbatim(LabelMinMaxSizeInfo.description)]]
+ std::optional textMinMaxSize;
// [[codegen::verbatim(LineWidthInfo.description)]]
std::optional lineWidth;
@@ -190,8 +180,12 @@ RenderableDUMeshes::RenderableDUMeshes(const ghoul::Dictionary& dictionary)
, _textSize(TextSizeInfo, 8.f, 0.5f, 24.f)
, _drawElements(DrawElementsInfo, true)
, _drawLabels(DrawLabelInfo, false)
- , _textMinSize(LabelMinSizeInfo, 8.f, 0.5f, 24.f)
- , _textMaxSize(LabelMaxSizeInfo, 500.f, 0.f, 1000.f)
+ , _textMinMaxSize(
+ LabelMinMaxSizeInfo,
+ glm::ivec2(8, 500),
+ glm::ivec2(0),
+ glm::ivec2(1000)
+ )
, _lineWidth(LineWidthInfo, 2.f, 1.f, 16.f)
, _renderOption(RenderOptionInfo, properties::OptionProperty::DisplayType::Dropdown)
{
@@ -250,13 +244,13 @@ RenderableDUMeshes::RenderableDUMeshes(const ghoul::Dictionary& dictionary)
_lineWidth = p.lineWidth.value_or(_lineWidth);
addProperty(_lineWidth);
- _drawLabels = p.drawLabels.value_or(_drawLabels);
- addProperty(_drawLabels);
-
if (p.labelFile.has_value()) {
_labelFile = absPath(*p.labelFile).string();
_hasLabel = true;
+ _drawLabels = p.drawLabels.value_or(_drawLabels);
+ addProperty(_drawLabels);
+
_textColor = p.textColor.value_or(_textColor);
_hasLabel = p.textColor.has_value();
_textColor.setViewOption(properties::Property::ViewOptions::Color);
@@ -269,11 +263,9 @@ RenderableDUMeshes::RenderableDUMeshes(const ghoul::Dictionary& dictionary)
_textSize = p.textSize.value_or(_textSize);
addProperty(_textSize);
- _textMinSize = p.textMinSize.value_or(_textMinSize);
- addProperty(_textMinSize);
-
- _textMaxSize = p.textMaxSize.value_or(_textMaxSize);
- addProperty(_textMaxSize);
+ _textMinMaxSize = p.textMinMaxSize.value_or(_textMinMaxSize);
+ _textMinMaxSize.setViewOption(properties::Property::ViewOptions::MinMaxRange);
+ addProperty(_textMinMaxSize);
}
if (p.meshColor.has_value()) {
@@ -417,8 +409,8 @@ void RenderableDUMeshes::renderLabels(const RenderData& data,
ghoul::fontrendering::FontRenderer::ProjectedLabelsInformation labelInfo;
labelInfo.orthoRight = orthoRight;
labelInfo.orthoUp = orthoUp;
- labelInfo.minSize = static_cast(_textMinSize);
- labelInfo.maxSize = static_cast(_textMaxSize);
+ labelInfo.minSize = _textMinMaxSize.value().x;
+ labelInfo.maxSize = _textMinMaxSize.value().y;
labelInfo.cameraPos = data.camera.positionVec3();
labelInfo.cameraLookUp = data.camera.lookUpVectorWorldSpace();
labelInfo.renderType = _renderOption;
diff --git a/modules/digitaluniverse/rendering/renderabledumeshes.h b/modules/digitaluniverse/rendering/renderabledumeshes.h
index f159488469..b397eb3a14 100644
--- a/modules/digitaluniverse/rendering/renderabledumeshes.h
+++ b/modules/digitaluniverse/rendering/renderabledumeshes.h
@@ -32,6 +32,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -120,8 +121,7 @@ private:
properties::FloatProperty _textSize;
properties::BoolProperty _drawElements;
properties::BoolProperty _drawLabels;
- properties::FloatProperty _textMinSize;
- properties::FloatProperty _textMaxSize;
+ properties::IVec2Property _textMinMaxSize;
properties::FloatProperty _lineWidth;
// DEBUG:
diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp
index f7c44ec3cd..1e54b6a7c7 100644
--- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp
+++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp
@@ -257,7 +257,7 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary
, _textSize(TextSizeInfo, 8.0, 0.5, 24.0)
, _drawElements(DrawElementsInfo, true)
, _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown)
- , _fadeInDistance(
+ , _fadeInDistances(
FadeInDistancesInfo,
glm::vec2(0.f),
glm::vec2(0.f),
@@ -374,9 +374,10 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary
_sluminosity = p.scaleLuminosity.value_or(_sluminosity);
if (p.fadeInDistances.has_value()) {
- _fadeInDistance = *p.fadeInDistances;
+ _fadeInDistances = *p.fadeInDistances;
_disableFadeInDistance = false;
- addProperty(_fadeInDistance);
+ _fadeInDistances.setViewOption(properties::Property::ViewOptions::MinMaxRange);
+ addProperty(_fadeInDistances);
addProperty(_disableFadeInDistance);
}
@@ -556,7 +557,7 @@ void RenderablePlanesCloud::render(const RenderData& data, RendererTasks&) {
if (!_disableFadeInDistance) {
float distCamera = static_cast(glm::length(data.camera.positionVec3()));
distCamera = static_cast(distCamera / scale);
- const glm::vec2 fadeRange = _fadeInDistance;
+ const glm::vec2 fadeRange = _fadeInDistances;
//const float a = 1.f / ((fadeRange.y - fadeRange.x) * scale);
const float a = 1.f / ((fadeRange.y - fadeRange.x));
const float b = -(fadeRange.x / (fadeRange.y - fadeRange.x));
@@ -792,7 +793,7 @@ void RenderablePlanesCloud::createPlanes() {
_dataIsDirty = false;
setBoundingSphere(maxRadius * _scaleFactor);
- _fadeInDistance.setMaxValue(glm::vec2(10.f * maxSize));
+ _fadeInDistances.setMaxValue(glm::vec2(10.f * maxSize));
}
if (_hasLabel && _labelDataIsDirty) {
diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.h b/modules/digitaluniverse/rendering/renderableplanescloud.h
index 32549a36f1..de2d2386cd 100644
--- a/modules/digitaluniverse/rendering/renderableplanescloud.h
+++ b/modules/digitaluniverse/rendering/renderableplanescloud.h
@@ -115,7 +115,7 @@ private:
properties::FloatProperty _textSize;
properties::BoolProperty _drawElements;
properties::OptionProperty _blendMode;
- properties::Vec2Property _fadeInDistance;
+ properties::Vec2Property _fadeInDistances;
properties::BoolProperty _disableFadeInDistance;
properties::FloatProperty _planeMinSize;
properties::OptionProperty _renderOption;
diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl
index 5b0369dad7..6ee47f1d7a 100644
--- a/modules/exoplanets/exoplanetsmodule_lua.inl
+++ b/modules/exoplanets/exoplanetsmodule_lua.inl
@@ -429,7 +429,7 @@ void createExoplanetSystem(const std::string& starName) {
"Renderable = {"
"Type = 'RenderableRadialGrid',"
"Enabled = " + isCircleEnabledString + ","
- "OuterRadius = " + std::to_string(AU) + ","
+ "Radii = { 0.0, 1.0 },"
"CircleSegments = 64,"
"LineWidth = 2.0,"
"},"
@@ -437,6 +437,10 @@ void createExoplanetSystem(const std::string& starName) {
"Rotation = {"
"Type = 'StaticRotation',"
"Rotation = " + ghoul::to_string(meanOrbitPlaneRotationMatrix) + ""
+ "},"
+ "Scale = {"
+ "Type = 'StaticScale',"
+ "Scale = " + std::to_string(AU) + ""
"}"
"},"
"GUI = {"
diff --git a/modules/gaia/rendering/renderablegaiastars.cpp b/modules/gaia/rendering/renderablegaiastars.cpp
index e1a12759f4..2971318b53 100644
--- a/modules/gaia/rendering/renderablegaiastars.cpp
+++ b/modules/gaia/rendering/renderablegaiastars.cpp
@@ -517,7 +517,6 @@ RenderableGaiaStars::RenderableGaiaStars(const ghoul::Dictionary& dictionary)
_renderOption.onChange([&]() { _buffersAreDirty = true; });
addProperty(_renderOption);
-#ifndef __APPLE__
_shaderOption.addOptions({
{ gaia::ShaderOption::Point_SSBO, "Point_SSBO" },
{ gaia::ShaderOption::Point_VBO, "Point_VBO" },
@@ -525,35 +524,35 @@ RenderableGaiaStars::RenderableGaiaStars(const ghoul::Dictionary& dictionary)
{ gaia::ShaderOption::Billboard_VBO, "Billboard_VBO" },
{ gaia::ShaderOption::Billboard_SSBO_noFBO, "Billboard_SSBO_noFBO" }
});
-#else // __APPLE__
- _shaderOption.addOptions({
- { gaia::ShaderOption::Point_VBO, "Point_VBO" },
- { gaia::ShaderOption::Billboard_VBO, "Billboard_VBO" },
- });
-#endif // __APPLE__
if (p.shaderOption.has_value()) {
switch (*p.shaderOption) {
case Parameters::ShaderOption::PointSSBO:
_shaderOption = gaia::ShaderOption::Point_SSBO;
+#ifdef __APPLE__
+ LWARNING("Shader option unsupported, changing to Point VBO");
+ _shaderOption = gaia::ShaderOption::Point_VBO;
+#endif // __APPLE__
break;
case Parameters::ShaderOption::PointVBO:
-#ifdef __APPLE__
- throw ghoul::RuntimeError("Shader option is not supported on MacOS");
-#endif // __APPLE__
_shaderOption = gaia::ShaderOption::Point_VBO;
break;
case Parameters::ShaderOption::BillboardSSBO:
_shaderOption = gaia::ShaderOption::Billboard_SSBO;
+#ifdef __APPLE__
+ LWARNING("Shader option unsupported, changing to Point VBO");
+ _shaderOption = gaia::ShaderOption::Point_VBO;
+#endif // __APPLE__
break;
case Parameters::ShaderOption::BillboardVBO:
-#ifdef __APPLE__
- throw ghoul::RuntimeError("Shader option is not supported on MacOS");
-#endif // __APPLE__
_shaderOption = gaia::ShaderOption::Billboard_VBO;
break;
case Parameters::ShaderOption::BillboardSSBONoFBO:
_shaderOption = gaia::ShaderOption::Billboard_SSBO_noFBO;
+#ifdef __APPLE__
+ LWARNING("Shader option unsupported, changing to Point VBO");
+ _shaderOption = gaia::ShaderOption::Point_VBO;
+#endif // __APPLE__
break;
default:
throw ghoul::MissingCaseException();
diff --git a/modules/galaxy/rendering/galaxyraycaster.cpp b/modules/galaxy/rendering/galaxyraycaster.cpp
index 0f11505f9d..a861503af6 100644
--- a/modules/galaxy/rendering/galaxyraycaster.cpp
+++ b/modules/galaxy/rendering/galaxyraycaster.cpp
@@ -58,7 +58,7 @@ void GalaxyRaycaster::initialize() {
void GalaxyRaycaster::renderEntryPoints(const RenderData& data,
ghoul::opengl::ProgramObject& program)
{
- program.setUniform("modelViewTransform", glm::mat4(modelViewTransform(data)));
+ program.setUniform("modelViewTransform", modelViewTransform(data));
program.setUniform("projectionTransform", data.camera.projectionMatrix());
// Cull back face
@@ -73,7 +73,7 @@ void GalaxyRaycaster::renderExitPoints(const RenderData& data,
ghoul::opengl::ProgramObject& program)
{
// Uniforms
- program.setUniform("modelViewTransform", glm::mat4(modelViewTransform(data)));
+ program.setUniform("modelViewTransform", modelViewTransform(data));
program.setUniform("projectionTransform", data.camera.projectionMatrix());
// Cull front face
diff --git a/modules/galaxy/rendering/renderablegalaxy.cpp b/modules/galaxy/rendering/renderablegalaxy.cpp
index 52d9c010c7..6cb9da54ee 100644
--- a/modules/galaxy/rendering/renderablegalaxy.cpp
+++ b/modules/galaxy/rendering/renderablegalaxy.cpp
@@ -161,10 +161,10 @@ namespace {
std::filesystem::path filename;
glm::ivec3 dimensions;
glm::vec3 size;
-
+
// [[codegen::verbatim(NumberOfRayCastingStepsInfo.description)]]
std::optional steps;
-
+
// [[codegen::verbatim(DownscaleVolumeRenderingInfo.description)]]
std::optional downscale;
};
@@ -227,7 +227,7 @@ RenderableGalaxy::RenderableGalaxy(const ghoul::Dictionary& dictionary)
: Renderable(dictionary)
, _volumeRenderingEnabled(VolumeRenderingEnabledInfo, true)
, _starRenderingEnabled(StarRenderingEnabledInfo, true)
- , _stepSize(StepSizeInfo, 0.01f, 0.0005f, 0.05f, 0.001f)
+ , _stepSize(StepSizeInfo, 0.01f, 0.001f, 0.05f, 0.001f)
, _absorptionMultiply(AbsorptionMultiplyInfo, 40.f, 0.0f, 200.0f)
, _emissionMultiply(EmissionMultiplyInfo, 200.f, 0.0f, 1000.0f)
, _starRenderingMethod(
diff --git a/modules/galaxy/shaders/raycasterbounds_vs.glsl b/modules/galaxy/shaders/raycasterbounds_vs.glsl
index f5ecb07e09..edcf6acea7 100644
--- a/modules/galaxy/shaders/raycasterbounds_vs.glsl
+++ b/modules/galaxy/shaders/raycasterbounds_vs.glsl
@@ -24,19 +24,20 @@
#version __CONTEXT__
+#include "PowerScaling/powerScalingMath.hglsl"
+
layout(location = 0) in vec4 vertPosition;
out vec3 modelPosition;
out vec4 viewPosition;
uniform mat4 projectionTransform;
-uniform mat4 modelViewTransform;
+uniform dmat4 modelViewTransform;
void main() {
modelPosition = vertPosition.xyz;
- viewPosition = modelViewTransform*vertPosition;
+ dvec4 vp = modelViewTransform * vertPosition;
+ viewPosition = vec4(vp);
- // project the position to view space
- gl_Position = projectionTransform * viewPosition;
- gl_Position.z = 0.0;
+ gl_Position = z_normalization(vec4(projectionTransform * viewPosition));
}
diff --git a/modules/globebrowsing/scripts/layer_support.lua b/modules/globebrowsing/scripts/layer_support.lua
index e6153e0d84..82678d901c 100644
--- a/modules/globebrowsing/scripts/layer_support.lua
+++ b/modules/globebrowsing/scripts/layer_support.lua
@@ -63,13 +63,12 @@ openspace.globebrowsing.documentation = {
Name = "parseInfoFile",
Arguments = "string",
Documentation =
- "Parses the passed info file and returns two tables. The first return value " ..
- "contains the table for the color layer of a RenderableGlobe. The second " ..
- "return value contains the table for the height layer of a RenderableGlobe." ..
- "Usage: local color, height = openspace.globebrowsing.parseInfoFile(file)" ..
- "openspace.globebrowsing.addLayer(\"Earth\", \"ColorLayers\", color)" ..
- "openspace.globebrowsing.addLayer(\"Earth\", \"HeightLayers\", height)"
-
+ "Parses the passed info file and return the table with the information " ..
+ "provided in the info file. The return table contains the optional keys: " ..
+ "'Color', 'Height', 'Node', 'Location', 'Identifier'." ..
+ "Usage: local t = openspace.globebrowsing.parseInfoFile(file)" ..
+ "openspace.globebrowsing.addLayer(\"Earth\", \"ColorLayers\", t.color)" ..
+ "openspace.globebrowsing.addLayer(\"Earth\", \"HeightLayers\", t.height)"
},
{
Name = "addBlendingLayersFromDirectory",
@@ -264,7 +263,13 @@ openspace.globebrowsing.parseInfoFile = function (file)
location = Location
end
- return name, color, height, location, identifier
+ return {
+ Color = color,
+ Height = height,
+ Name = name,
+ Location = location,
+ Identifier = identifier
+ }
end
openspace.globebrowsing.addBlendingLayersFromDirectory = function (dir, node_name)
@@ -290,16 +295,14 @@ openspace.globebrowsing.addBlendingLayersFromDirectory = function (dir, node_nam
for _, file in pairs(files) do
if file and file:find('.info') and ends_with(file, '.info') then
- local c, h
- _, c, h, _ = openspace.globebrowsing.parseInfoFile(file)
-
- if c then
- openspace.printInfo("Adding color layer '" .. c["Identifier"] .. "'")
- openspace.globebrowsing.addLayer(node_name, "ColorLayers", c)
+ local t = openspace.globebrowsing.parseInfoFile(file)
+ if t.Color then
+ openspace.printInfo("Adding color layer '" .. t.Color["Identifier"] .. "'")
+ openspace.globebrowsing.addLayer(node_name, "ColorLayers", t.Color)
end
- if h then
- openspace.printInfo("Adding height layer '" .. h["Identifier"] .. "'")
- openspace.globebrowsing.addLayer(node_name, "HeightLayers", h)
+ if t.Height then
+ openspace.printInfo("Adding height layer '" .. t.Height["Identifier"] .. "'")
+ openspace.globebrowsing.addLayer(node_name, "HeightLayers", t.Height)
end
end
end
@@ -310,19 +313,18 @@ openspace.globebrowsing.addFocusNodesFromDirectory = function (dir, node_name)
for _, file in pairs(files) do
if file and file:find('.info') then
- local n, l
- n, _, _, l, i = openspace.globebrowsing.parseInfoFile(file)
+ local t = openspace.globebrowsing.parseInfoFile(file)
- if n and l then
+ if t.Node and t.Location then
openspace.printInfo("Creating focus node for '" .. n .. "'")
- local lat = l.Center[2]
- local long = l.Center[1]
+ local lat = t.Location.Center[2]
+ local long = t.Location.Center[1]
local a, b, c = openspace.globebrowsing.getGeoPosition(node_name, lat, long, 0.0)
local p = { a, b, c }
- local identifier = node_name .. " - " .. i
- local name = node_name .. " - " .. n
+ local identifier = node_name .. " - " .. t.Identifier
+ local name = node_name .. " - " .. t.Node
openspace.addSceneGraphNode({
Identifier = identifier,
diff --git a/modules/globebrowsing/src/globelabelscomponent.cpp b/modules/globebrowsing/src/globelabelscomponent.cpp
index f97a13fe4d..7dbb215593 100644
--- a/modules/globebrowsing/src/globelabelscomponent.cpp
+++ b/modules/globebrowsing/src/globelabelscomponent.cpp
@@ -60,106 +60,86 @@ namespace {
constexpr int8_t CurrentCacheVersion = 1;
- constexpr openspace::properties::Property::PropertyInfo LabelsInfo = {
- "Labels",
- "Labels Enabled",
- "Enables and disables the rendering of labels on the globe surface from "
- "the csv label file"
+ constexpr openspace::properties::Property::PropertyInfo EnabledInfo = {
+ "Enabled",
+ "Enabled",
+ "Enables and disables labels' rendering."
};
- constexpr openspace::properties::Property::PropertyInfo LabelsEnableInfo = {
- "Enable",
- "Enable",
- "Enables and disables labels' rendering from the asset file."
- };
-
- constexpr openspace::properties::Property::PropertyInfo LabelsFontSizeInfo = {
- "LabelsFontSize",
- "Labels Font Size",
+ constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = {
+ "FontSize",
+ "Font Size",
"Font size for the rendering labels. This is different fromt text size."
};
- constexpr openspace::properties::Property::PropertyInfo LabelsMaxSizeInfo = {
- "LabelsMaxSize",
- "Labels Maximum Text Size",
- "Maximum label size"
+ constexpr openspace::properties::Property::PropertyInfo MinMaxSizeInfo = {
+ "MinMaxSize",
+ "Min/Max Text Size",
+ "Minimum and maximum label size, in pixels."
};
- constexpr openspace::properties::Property::PropertyInfo LabelsMinSizeInfo = {
- "LabelsMinSize",
- "Labels Minimum Text Size",
- "Minimum label size"
- };
-
- constexpr openspace::properties::Property::PropertyInfo LabelsSizeInfo = {
+ constexpr openspace::properties::Property::PropertyInfo SizeInfo = {
"LabelsSize",
"Labels Size",
- "Labels Size"
+ "This value affects the size scale of the labels."
};
- constexpr openspace::properties::Property::PropertyInfo LabelsMinHeightInfo = {
- "LabelsMinHeight",
- "Labels Minimum Height",
- "Labels Minimum Height"
+ constexpr openspace::properties::Property::PropertyInfo HeightOffsetInfo = {
+ "HeightOffset",
+ "Height Offset",
+ "This value moves the label away from the globe surface by the specified "
+ "distance (in meters)."
};
- constexpr openspace::properties::Property::PropertyInfo LabelsColorInfo = {
- "LabelsColor",
- "Labels Color",
- "Labels Color"
+ constexpr openspace::properties::Property::PropertyInfo ColorInfo = {
+ "Color",
+ "Color",
+ "The text color of the labels."
};
- constexpr openspace::properties::Property::PropertyInfo LabelsOpacityInfo = {
- "LabelsOpacity",
- "Labels Opacity",
- "Labels Opacity"
+ constexpr openspace::properties::Property::PropertyInfo OpacityInfo = {
+ "Opacity",
+ "Opacity",
+ "The opacity of the labels."
};
- constexpr openspace::properties::Property::PropertyInfo
- LabelsFadeInStartingDistanceInfo =
- {
- "FadeInStartingDistance",
- "Fade In Starting Distance for Labels",
- "Fade In Starting Distance for Labels"
+ constexpr openspace::properties::Property::PropertyInfo FadeDistancesInfo = {
+ "FadeDistances",
+ "Fade-In Distances",
+ "The distances above the globe's surface at which the labels start fading in or "
+ "out, given in meters. The final distances are also adjusted by the specified "
+ "height offset."
};
- constexpr openspace::properties::Property::PropertyInfo
- LabelsFadeOutStartingDistanceInfo =
- {
- "FadeOutStartingDistance",
- "Fade Out Starting Distance for Labels",
- "Fade Out Starting Distance for Labels"
+ constexpr openspace::properties::Property::PropertyInfo FadeInEnabledInfo = {
+ "FadeInEnabled",
+ "Fade In Enabled",
+ "Sets whether the labels fade in when approaching the globe from a distance. If "
+ "false, no fading happens and the labels immediately has full opacity."
};
- constexpr openspace::properties::Property::PropertyInfo LabelsFadeInEnabledInfo = {
- "LabelsFadeInEnabled",
- "Labels fade In enabled",
- "Labels fade In enabled"
+ constexpr openspace::properties::Property::PropertyInfo FadeOutEnabledInfo = {
+ "FadeOutEnabled",
+ "Fade Out Enabled",
+ "Sets whether the labels fade out when approaching the surface of the globe. If "
+ "false, no fading happens and the labels stays in full opacity."
};
- constexpr openspace::properties::Property::PropertyInfo LabelsFadeOutEnabledInfo = {
- "LabelsFadeOutEnabled",
- "Labels fade Out enabled",
- "Labels fade Out enabled"
+ constexpr openspace::properties::Property::PropertyInfo DisableCullingInfo = {
+ "DisableCulling",
+ "Culling Disabled",
+ "Labels culling disabled."
};
- constexpr openspace::properties::Property::PropertyInfo
- LabelsDisableCullingEnabledInfo =
- {
- "LabelsDisableCullingEnabled",
- "Labels culling disabled",
- "Labels culling disabled"
+ constexpr openspace::properties::Property::PropertyInfo DistanceEPSInfo = {
+ "DistanceEPS",
+ "Culling Distance",
+ "Labels culling distance from globe's center."
};
- constexpr openspace::properties::Property::PropertyInfo LabelsDistanceEPSInfo = {
- "LabelsDistanceEPS",
- "Labels culling distance from globe's center",
- "Labels culling distance from globe's center"
- };
-
- constexpr openspace::properties::Property::PropertyInfo LabelAlignmentOptionInfo = {
- "LabelAlignmentOption",
- "Label Alignment Option",
+ constexpr openspace::properties::Property::PropertyInfo AlignmentOptionInfo = {
+ "AlignmentOption",
+ "Alignment Option",
"Labels are aligned horizontally or circularly related to the planet."
};
@@ -167,57 +147,48 @@ namespace {
// The path to the labels file
std::optional fileName;
- // [[codegen::verbatim(LabelsInfo.description)]]
- std::optional labels;
+ // [[codegen::verbatim(EnabledInfo.description)]]
+ std::optional enabled;
- // [[codegen::verbatim(LabelsEnableInfo.description)]]
- std::optional enable;
+ // [[codegen::verbatim(FontSizeInfo.description)]]
+ std::optional fontSize;
- // [[codegen::verbatim(LabelsFontSizeInfo.description)]]
- std::optional labelsFontSize;
+ // [[codegen::verbatim(MinMaxSizeInfo.description)]]
+ std::optional minMaxSize;
- // [[codegen::verbatim(LabelsMinSizeInfo.description)]]
- std::optional labelsMinSize;
+ // [[codegen::verbatim(SizeInfo.description)]]
+ std::optional size;
- // [[codegen::verbatim(LabelsMaxSizeInfo.description)]]
- std::optional labelsMaxSize;
+ // [[codegen::verbatim(HeightOffsetInfo.description)]]
+ std::optional heightOffset;
- // [[codegen::verbatim(LabelsSizeInfo.description)]]
- std::optional labelsSize;
+ // [[codegen::verbatim(ColorInfo.description)]]
+ std::optional color [[codegen::color()]];
- // [[codegen::verbatim(LabelsMinHeightInfo.description)]]
- std::optional labelsMinHeight;
+ // [[codegen::verbatim(OpacityInfo.description)]]
+ std::optional opacity [[codegen::inrange(0.f, 1.f)]];
- // [[codegen::verbatim(LabelsColorInfo.description)]]
- std::optional labelsColor [[codegen::color()]];
+ // [[codegen::verbatim(FadeDistancesInfo.description)]]
+ std::optional fadeDistances;
- // [[codegen::verbatim(LabelsOpacityInfo.description)]]
- std::optional labelsOpacity [[codegen::inrange(0.f, 1.f)]];
+ // [[codegen::verbatim(FadeInEnabledInfo.description)]]
+ std::optional fadeInEnabled;
- // [[codegen::verbatim(LabelsFadeInStartingDistanceInfo.description)]]
- std::optional fadeInStartingDistance;
+ // [[codegen::verbatim(FadeOutEnabledInfo.description)]]
+ std::optional fadeOutEnabled;
- // [[codegen::verbatim(LabelsFadeOutStartingDistanceInfo.description)]]
- std::optional fadeOutStartingDistance;
+ // [[codegen::verbatim(DisableCullingInfo.description)]]
+ std::optional disableCulling;
- // [[codegen::verbatim(LabelsFadeInEnabledInfo.description)]]
- std::optional labelsFadeInEnabled;
-
- // [[codegen::verbatim(LabelsFadeOutEnabledInfo.description)]]
- std::optional labelsFadeOutEnabled;
-
- // [[codegen::verbatim(LabelsDisableCullingEnabledInfo.description)]]
- std::optional labelsDisableCullingEnabled;
-
- // [[codegen::verbatim(LabelsDistanceEPSInfo.description)]]
- std::optional labelsDistanceEPS;
+ // [[codegen::verbatim(DistanceEPSInfo.description)]]
+ std::optional distanceEPS;
enum class Alignment {
Horizontally,
Circularly
};
- // [[codegen::verbatim(LabelAlignmentOptionInfo.description)]]
- std::optional labelAlignmentOption;
+ // [[codegen::verbatim(AlignmentOptionInfo.description)]]
+ std::optional alignmentOption;
};
#include "globelabelscomponent_codegen.cpp"
} // namespace
@@ -230,49 +201,49 @@ documentation::Documentation GlobeLabelsComponent::Documentation() {
GlobeLabelsComponent::GlobeLabelsComponent()
: properties::PropertyOwner({ "Labels" })
- , _labelsEnabled(LabelsInfo, false)
- , _labelsFontSize(LabelsFontSizeInfo, 30, 1, 300)
- , _labelsMaxSize(LabelsMaxSizeInfo, 300, 10, 1000)
- , _labelsMinSize(LabelsMinSizeInfo, 4, 1, 100)
- , _labelsSize(LabelsSizeInfo, 2.5, 0, 30)
- , _labelsMinHeight(LabelsMinHeightInfo, 100.0, 0.0, 10000.0)
- , _labelsColor(
- LabelsColorInfo,
- glm::vec3(1.f, 1.f, 0.f),
- glm::vec3(0.f),
- glm::vec3(1.f)
+ , _enabled(EnabledInfo, false)
+ , _fontSize(FontSizeInfo, 30, 1, 300)
+ , _minMaxSize(MinMaxSizeInfo, glm::ivec2(1, 1000), glm::ivec2(1), glm::ivec2(1000))
+ , _size(SizeInfo, 2.5, 0, 30)
+ , _heightOffset(HeightOffsetInfo, 100.0, 0.0, 10000.0)
+ , _color(ColorInfo, glm::vec3(1.f, 1.f, 0.f), glm::vec3(0.f), glm::vec3(1.f))
+ , _opacity(OpacityInfo, 1.f, 0.f, 1.f)
+ , _fadeDistances(
+ FadeDistancesInfo,
+ glm::vec2(1e4, 1e6),
+ glm::vec2(1.f),
+ glm::vec2(1e8)
)
- , _labelsOpacity(LabelsOpacityInfo, 1.f, 0.f, 1.f)
- , _labelsFadeInDist(LabelsFadeInStartingDistanceInfo, 1e6, 1e3, 1e8)
- , _labelsFadeOutDist(LabelsFadeOutStartingDistanceInfo, 1e4, 1, 1e7)
- , _labelsFadeInEnabled(LabelsFadeInEnabledInfo, false)
- , _labelsFadeOutEnabled(LabelsFadeOutEnabledInfo, false)
- , _labelsDisableCullingEnabled(LabelsDisableCullingEnabledInfo, false)
- , _labelsDistanceEPS(LabelsDistanceEPSInfo, 100000.f, 1000.f, 10000000.f)
- , _labelAlignmentOption(
- LabelAlignmentOptionInfo,
+ , _fadeInEnabled(FadeInEnabledInfo, false)
+ , _fadeOutEnabled(FadeOutEnabledInfo, false)
+ , _disableCulling(DisableCullingInfo, false)
+ , _distanceEPS(DistanceEPSInfo, 100000.f, 1000.f, 10000000.f)
+ , _alignmentOption(
+ AlignmentOptionInfo,
properties::OptionProperty::DisplayType::Dropdown
)
{
- addProperty(_labelsEnabled);
- addProperty(_labelsFontSize);
- addProperty(_labelsSize);
- addProperty(_labelsMinHeight);
- _labelsColor.setViewOption(properties::Property::ViewOptions::Color);
- addProperty(_labelsColor);
- addProperty(_labelsOpacity);
- addProperty(_labelsFadeInDist);
- addProperty(_labelsFadeOutDist);
- addProperty(_labelsMinSize);
- addProperty(_labelsFadeInEnabled);
- addProperty(_labelsFadeOutEnabled);
- addProperty(_labelsDisableCullingEnabled);
- addProperty(_labelsDistanceEPS);
+ addProperty(_enabled);
+ addProperty(_fontSize);
+ addProperty(_size);
+ _minMaxSize.setViewOption(properties::Property::ViewOptions::MinMaxRange);
+ addProperty(_minMaxSize);
+ addProperty(_color);
+ addProperty(_opacity);
+ _fadeDistances.setViewOption(properties::Property::ViewOptions::MinMaxRange);
+ _fadeDistances.setExponent(3.f);
+ addProperty(_fadeDistances);
+ addProperty(_fadeInEnabled);
+ addProperty(_fadeOutEnabled);
+ addProperty(_heightOffset);
+ _color.setViewOption(properties::Property::ViewOptions::Color);
+ addProperty(_disableCulling);
+ addProperty(_distanceEPS);
- _labelAlignmentOption.addOption(Horizontally, "Horizontally");
- _labelAlignmentOption.addOption(Circularly, "Circularly");
- _labelAlignmentOption = Horizontally;
- addProperty(_labelAlignmentOption);
+ _alignmentOption.addOption(Horizontally, "Horizontally");
+ _alignmentOption.addOption(Circularly, "Circularly");
+ _alignmentOption = Horizontally;
+ addProperty(_alignmentOption);
}
void GlobeLabelsComponent::initialize(const ghoul::Dictionary& dictionary,
@@ -291,30 +262,32 @@ void GlobeLabelsComponent::initialize(const ghoul::Dictionary& dictionary,
return;
}
- _labelsEnabled = p.enable.value_or(true);
- _labelsFontSize = p.labelsFontSize.value_or(_labelsFontSize);
- _labelsFontSize.onChange([this]() { initializeFonts(); });
- _labelsSize = p.labelsSize.value_or(_labelsSize);
- _labelsMinHeight = p.labelsMinHeight.value_or(_labelsMinHeight);
- _labelsColor = p.labelsColor.value_or(_labelsColor);
- _labelsOpacity = p.labelsOpacity.value_or(_labelsOpacity);
- _labelsFadeInEnabled = p.labelsFadeInEnabled.value_or(_labelsFadeInEnabled);
- _labelsFadeInDist = p.fadeInStartingDistance.value_or(_labelsFadeInDist);
- _labelsFadeOutEnabled = p.labelsFadeOutEnabled.value_or(_labelsFadeOutEnabled);
- _labelsFadeOutDist = p.fadeOutStartingDistance.value_or(_labelsFadeOutDist);
- _labelsMinSize = p.labelsMinSize.value_or(_labelsMinSize);
- _labelsMaxSize = p.labelsMaxSize.value_or(_labelsMaxSize);
- _labelsDisableCullingEnabled =
- p.labelsDisableCullingEnabled.value_or(_labelsDisableCullingEnabled);
- _labelsDistanceEPS = p.labelsDistanceEPS.value_or(_labelsDistanceEPS);
+ _enabled = p.enabled.value_or(_enabled);
+ _fontSize = p.fontSize.value_or(_fontSize);
+ _fontSize.onChange([this]() { initializeFonts(); });
- if (p.labelAlignmentOption.has_value()) {
- switch (*p.labelAlignmentOption) {
+ // @TODO (emmbr, 2021-05-31): Temporarily set as read only, to avoid errors from font
+ // rendering (avoid filling font atlas)
+ _fontSize.setReadOnly(true);
+
+ _size = p.size.value_or(_size);
+ _heightOffset = p.heightOffset.value_or(_heightOffset);
+ _color = p.color.value_or(_color);
+ _opacity = p.opacity.value_or(_opacity);
+ _fadeInEnabled = p.fadeInEnabled.value_or(_fadeInEnabled);
+ _fadeOutEnabled = p.fadeOutEnabled.value_or(_fadeOutEnabled);
+ _fadeDistances = p.fadeDistances.value_or(_fadeDistances);
+ _minMaxSize = p.minMaxSize.value_or(_minMaxSize);
+ _disableCulling = p.disableCulling.value_or(_disableCulling);
+ _distanceEPS = p.distanceEPS.value_or(_distanceEPS);
+
+ if (p.alignmentOption.has_value()) {
+ switch (*p.alignmentOption) {
case Parameters::Alignment::Horizontally:
- _labelAlignmentOption = Horizontally;
+ _alignmentOption = Horizontally;
break;
case Parameters::Alignment::Circularly:
- _labelAlignmentOption = Circularly;
+ _alignmentOption = Circularly;
break;
default:
throw ghoul::MissingCaseException();
@@ -327,9 +300,9 @@ void GlobeLabelsComponent::initialize(const ghoul::Dictionary& dictionary,
void GlobeLabelsComponent::initializeFonts() {
_font = openspace::global::fontManager->font(
"Mono",
- static_cast(_labelsFontSize),
+ static_cast(_fontSize),
ghoul::fontrendering::FontManager::Outline::Yes,
- ghoul::fontrendering::FontManager::LoadGlyphs::No
+ ghoul::fontrendering::FontManager::LoadGlyphs::Yes
);
}
@@ -512,7 +485,7 @@ bool GlobeLabelsComponent::saveCachedFile(const std::string& file) const {
}
void GlobeLabelsComponent::draw(const RenderData& data) {
- if (!_labelsEnabled) {
+ if (!_enabled) {
return;
}
@@ -524,18 +497,17 @@ void GlobeLabelsComponent::draw(const RenderData& data) {
glm::dvec3 globePosWorld =
glm::dvec3(_globe->modelTransform() * glm::vec4(0.f, 0.f, 0.f, 1.f));
- glm::dvec3 camToGlobeDistanceWorld = globePosWorld - data.camera.positionVec3();
- double distanceCameraGlobeWorld = glm::length(camToGlobeDistanceWorld);
+ glm::dvec3 cameraToGlobeWorld = globePosWorld - data.camera.positionVec3();
+ double distanceCameraGlobeWorld = glm::length(cameraToGlobeWorld);
float varyingOpacity = 1.f;
- double averageRadius = (
- _globe->ellipsoid().radii().x + _globe->ellipsoid().radii().y +
- _globe->ellipsoid().radii().z
- ) / 3.0;
- if (_labelsFadeInEnabled) {
- glm::dvec2 fadeRange = glm::dvec2(averageRadius + _labelsMinHeight);
- fadeRange.x += _labelsFadeInDist;
+ const glm::dvec3 globeRadii = _globe->ellipsoid().radii();
+ double averageRadius = (globeRadii.x + globeRadii.y + globeRadii.z) / 3.0;
+
+ if (_fadeInEnabled) {
+ glm::dvec2 fadeRange = glm::dvec2(averageRadius + _heightOffset);
+ fadeRange.x += _fadeDistances.value().y;
double a = 1.0 / (fadeRange.y - fadeRange.x);
double b = -(fadeRange.x / (fadeRange.y - fadeRange.x));
double funcValue = a * distanceCameraGlobeWorld + b;
@@ -546,11 +518,11 @@ void GlobeLabelsComponent::draw(const RenderData& data) {
}
}
- if (_labelsFadeOutEnabled) {
+ if (_fadeOutEnabled) {
glm::dvec2 fadeRange = glm::dvec2(
- averageRadius + _labelsMinHeight + LabelFadeOutLimitAltitudeMeters
+ averageRadius + _heightOffset + LabelFadeOutLimitAltitudeMeters
);
- fadeRange.x += _labelsFadeOutDist;
+ fadeRange.x += _fadeDistances.value().x;
double a = 1.0 / (fadeRange.x - fadeRange.y);
double b = -(fadeRange.y / (fadeRange.x - fadeRange.y));
double funcValue = a * distanceCameraGlobeWorld + b;
@@ -569,8 +541,8 @@ void GlobeLabelsComponent::renderLabels(const RenderData& data,
float distToCamera, float fadeInVariable
) {
glm::vec4 textColor = glm::vec4(
- glm::vec3(_labelsColor),
- _labelsOpacity * fadeInVariable
+ glm::vec3(_color),
+ _opacity * fadeInVariable
);
glm::dmat4 VP = glm::dmat4(data.camera.sgctInternal.projectionMatrix()) *
@@ -604,11 +576,11 @@ void GlobeLabelsComponent::renderLabels(const RenderData& data,
double distanceCameraToLabelWorld =
glm::length(locationPositionWorld - data.camera.positionVec3());
- if (_labelsDisableCullingEnabled ||
- ((distToCamera > (distanceCameraToLabelWorld + _labelsDistanceEPS)) &&
+ if (_disableCulling ||
+ ((distToCamera > (distanceCameraToLabelWorld + _distanceEPS)) &&
isLabelInFrustum(VP, locationPositionWorld)))
{
- if (_labelAlignmentOption == Circularly) {
+ if (_alignmentOption == Circularly) {
glm::dvec3 labelNormalObj = glm::dvec3(
invModelMatrix * glm::dvec4(data.camera.positionVec3(), 1.0)
) - glm::dvec3(position);
@@ -629,18 +601,19 @@ void GlobeLabelsComponent::renderLabels(const RenderData& data,
orthoUp = glm::normalize(glm::cross(labelNormalObj, orthoRight));
}
- position += _labelsMinHeight;
+ // Move the position along the normal. Note that position is in model space
+ position += _heightOffset.value() * glm::normalize(position);
ghoul::fontrendering::FontRenderer::ProjectedLabelsInformation labelInfo;
labelInfo.orthoRight = orthoRight;
labelInfo.orthoUp = orthoUp;
- labelInfo.minSize = _labelsMinSize;
- labelInfo.maxSize = _labelsMaxSize;
+ labelInfo.minSize = _minMaxSize.value().x;
+ labelInfo.maxSize = _minMaxSize.value().y;
labelInfo.cameraPos = data.camera.positionVec3();
labelInfo.cameraLookUp = data.camera.lookUpVectorWorldSpace();
labelInfo.renderType = 0;
labelInfo.mvpMatrix = modelViewProjectionMatrix;
- labelInfo.scale = powf(2.f, _labelsSize);
+ labelInfo.scale = powf(2.f, _size);
labelInfo.enableDepth = true;
labelInfo.enableFalseDepth = true;
labelInfo.disableTransmittance = true;
@@ -667,7 +640,6 @@ void GlobeLabelsComponent::renderLabels(const RenderData& data,
bool GlobeLabelsComponent::isLabelInFrustum(const glm::dmat4& MVMatrix,
const glm::dvec3& position) const
{
-
// Frustum Planes
glm::dvec3 col1(MVMatrix[0][0], MVMatrix[1][0], MVMatrix[2][0]);
glm::dvec3 col2(MVMatrix[0][1], MVMatrix[1][1], MVMatrix[2][1]);
diff --git a/modules/globebrowsing/src/globelabelscomponent.h b/modules/globebrowsing/src/globelabelscomponent.h
index bf45535604..a14ede7078 100644
--- a/modules/globebrowsing/src/globelabelscomponent.h
+++ b/modules/globebrowsing/src/globelabelscomponent.h
@@ -31,6 +31,8 @@
#include
#include
#include
+#include
+#include
#include
#include
#include
@@ -82,21 +84,21 @@ private:
std::vector labelsArray;
};
- properties::BoolProperty _labelsEnabled;
- properties::FloatProperty _labelsFontSize;
- properties::IntProperty _labelsMaxSize;
- properties::IntProperty _labelsMinSize;
- properties::FloatProperty _labelsSize;
- properties::FloatProperty _labelsMinHeight;
- properties::Vec3Property _labelsColor;
- properties::FloatProperty _labelsOpacity;
- properties::FloatProperty _labelsFadeInDist;
- properties::FloatProperty _labelsFadeOutDist;
- properties::BoolProperty _labelsFadeInEnabled;
- properties::BoolProperty _labelsFadeOutEnabled;
- properties::BoolProperty _labelsDisableCullingEnabled;
- properties::FloatProperty _labelsDistanceEPS;
- properties::OptionProperty _labelAlignmentOption;
+ properties::BoolProperty _enabled;
+ properties::FloatProperty _fontSize;
+ properties::FloatProperty _size;
+ properties::IVec2Property _minMaxSize;
+ properties::FloatProperty _heightOffset;
+
+ properties::Vec3Property _color;
+ properties::FloatProperty _opacity;
+
+ properties::Vec2Property _fadeDistances;
+ properties::BoolProperty _fadeInEnabled;
+ properties::BoolProperty _fadeOutEnabled;
+ properties::BoolProperty _disableCulling;
+ properties::FloatProperty _distanceEPS;
+ properties::OptionProperty _alignmentOption;
Labels _labels;
diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp
index 02ef8d540c..e6176e1ac4 100644
--- a/modules/globebrowsing/src/renderableglobe.cpp
+++ b/modules/globebrowsing/src/renderableglobe.cpp
@@ -567,7 +567,7 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary)
for (const Parameters::ShadowGroup::Caster& caster : p.shadowGroup->casters) {
Ellipsoid::ShadowConfiguration sc;
sc.source = std::pair(source.name, source.radius);
- sc.caster = std::pair(source.name, source.radius);
+ sc.caster = std::pair(caster.name, caster.radius);
shadowConfArray.push_back(sc);
}
}
@@ -1995,7 +1995,7 @@ void RenderableGlobe::calculateEclipseShadows(ghoul::opengl::ProgramObject& prog
// Getting source and caster:
glm::dvec3 sourcePos = SpiceManager::ref().targetPosition(
shadowConf.source.first,
- "SUN",
+ "SSB",
"GALACTIC",
{},
data.time.j2000Seconds(),
@@ -2004,7 +2004,7 @@ void RenderableGlobe::calculateEclipseShadows(ghoul::opengl::ProgramObject& prog
sourcePos *= KM_TO_M; // converting to meters
glm::dvec3 casterPos = SpiceManager::ref().targetPosition(
shadowConf.caster.first,
- "SUN",
+ "SSB",
"GALACTIC",
{},
data.time.j2000Seconds(),
@@ -2056,7 +2056,7 @@ void RenderableGlobe::calculateEclipseShadows(ghoul::opengl::ProgramObject& prog
const glm::dvec3 sunPos = SpiceManager::ref().targetPosition(
"SUN",
- "SUN",
+ "SSB",
"GALACTIC",
{},
data.time.j2000Seconds(),
diff --git a/modules/globebrowsing/src/ringscomponent.cpp b/modules/globebrowsing/src/ringscomponent.cpp
index e4b0a2310b..c54bb66491 100644
--- a/modules/globebrowsing/src/ringscomponent.cpp
+++ b/modules/globebrowsing/src/ringscomponent.cpp
@@ -122,10 +122,10 @@ namespace {
constexpr openspace::properties::Property::PropertyInfo OffsetInfo = {
"Offset",
"Offset",
- "This value is used to limit the width of the rings.Each of the two values is a "
- "value between 0 and 1, where 0 is the center of the ring and 1 is the maximum "
- "extent at the radius. If this value is, for example {0.5, 1.0}, the ring is "
- "only shown between radius/2 and radius. It defaults to {0.0, 1.0}."
+ "This value is used to limit the width of the rings. Each of the two values is "
+ "a value between 0 and 1, where 0 is the center of the ring and 1 is the "
+ "maximum extent at the radius. For example, if the value is {0.5, 1.0}, the "
+ "ring is only shown between radius/2 and radius. It defaults to {0.0, 1.0}."
};
constexpr openspace::properties::Property::PropertyInfo NightFactorInfo = {
@@ -249,7 +249,7 @@ void RingsComponent::initialize() {
addProperty(_enabled);
- _size.setViewOption(properties::Property::ViewOptions::Logarithmic);
+ _size.setExponent(15.f);
_size = p.size.value_or(_size);
_size.onChange([&]() { _planeIsDirty = true; });
addProperty(_size);
@@ -305,6 +305,7 @@ void RingsComponent::initialize() {
}
_offset = p.offset.value_or(_offset);
+ _offset.setViewOption(properties::Property::ViewOptions::MinMaxRange);
addProperty(_offset);
_nightFactor = p.nightFactor.value_or(_nightFactor);
diff --git a/modules/imgui/src/renderproperties.cpp b/modules/imgui/src/renderproperties.cpp
index 6462e330f4..71f566af29 100644
--- a/modules/imgui/src/renderproperties.cpp
+++ b/modules/imgui/src/renderproperties.cpp
@@ -390,7 +390,7 @@ void renderDoubleProperty(properties::Property* prop, const std::string& ownerNa
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
if (showTooltip) {
renderTooltip(prop, tooltipDelay);
@@ -545,7 +545,7 @@ void renderFloatProperty(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
if (showTooltip) {
renderTooltip(prop, tooltipDelay);
@@ -577,7 +577,7 @@ void renderVec2Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
if (showTooltip) {
renderTooltip(prop, tooltipDelay);
@@ -621,7 +621,7 @@ void renderVec3Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
}
if (showTooltip) {
@@ -666,7 +666,7 @@ void renderVec4Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
}
if (showTooltip) {
@@ -702,7 +702,7 @@ void renderDVec2Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
if (showTooltip) {
renderTooltip(prop, tooltipDelay);
@@ -738,7 +738,7 @@ void renderDVec3Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
if (showTooltip) {
renderTooltip(prop, tooltipDelay);
@@ -774,7 +774,7 @@ void renderDVec4Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
if (showTooltip) {
renderTooltip(prop, tooltipDelay);
@@ -822,7 +822,7 @@ void renderDMat2Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
changed |= ImGui::SliderFloat2(
"[1]",
@@ -830,7 +830,7 @@ void renderDMat2Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
if (showTooltip) {
@@ -881,7 +881,7 @@ void renderDMat3Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
changed |= ImGui::SliderFloat3(
"[1]",
@@ -889,7 +889,7 @@ void renderDMat3Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
changed |= ImGui::SliderFloat3(
"[2]",
@@ -897,7 +897,7 @@ void renderDMat3Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
if (showTooltip) {
@@ -950,7 +950,7 @@ void renderDMat4Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
changed |= ImGui::SliderFloat4(
"[1]",
@@ -958,7 +958,7 @@ void renderDMat4Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
changed |= ImGui::SliderFloat4(
"[2]",
@@ -966,7 +966,7 @@ void renderDMat4Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
changed |= ImGui::SliderFloat4(
"[3]",
@@ -974,7 +974,7 @@ void renderDMat4Property(Property* prop, const std::string& ownerName,
min,
max,
"%.5f",
- p->exponent()
+ ImGuiSliderFlags_Logarithmic
);
if (showTooltip) {
diff --git a/modules/space/rendering/renderablehabitablezone.cpp b/modules/space/rendering/renderablehabitablezone.cpp
index 27129f4079..fb5a7ca4fc 100644
--- a/modules/space/rendering/renderablehabitablezone.cpp
+++ b/modules/space/rendering/renderablehabitablezone.cpp
@@ -136,6 +136,7 @@ RenderableHabitableZone::RenderableHabitableZone(const ghoul::Dictionary& dictio
// The user should not be able to change this property. It's just used to communicate
// the different rendering that happens outside of this interval
addProperty(_kopparapuTeffInterval);
+ _kopparapuTeffInterval.setViewOption(properties::Property::ViewOptions::MinMaxRange);
_kopparapuTeffInterval.setReadOnly(true);
// Make parent's size related properties read only. We want to set them based on the
diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp
index 49d4b32450..e013449b9c 100644
--- a/modules/space/rendering/renderablerings.cpp
+++ b/modules/space/rendering/renderablerings.cpp
@@ -60,10 +60,10 @@ namespace {
constexpr openspace::properties::Property::PropertyInfo OffsetInfo = {
"Offset",
"Offset",
- "This value is used to limit the width of the rings.Each of the two values is a "
- "value between 0 and 1, where 0 is the center of the ring and 1 is the maximum "
- "extent at the radius. If this value is, for example {0.5, 1.0}, the ring is "
- "only shown between radius/2 and radius. It defaults to {0.0, 1.0}."
+ "This value is used to limit the width of the rings. Each of the two values is "
+ "a value between 0 and 1, where 0 is the center of the ring and 1 is the "
+ "maximum extent at the radius. For example, if the value is {0.5, 1.0}, the "
+ "ring is only shown between radius/2 and radius. It defaults to {0.0, 1.0}."
};
constexpr openspace::properties::Property::PropertyInfo NightFactorInfo = {
@@ -127,6 +127,7 @@ RenderableRings::RenderableRings(const ghoul::Dictionary& dictionary)
_textureFile = std::make_unique(_texturePath.value());
_offset = p.offset.value_or(_offset);
+ _offset.setViewOption(properties::Property::ViewOptions::MinMaxRange);
addProperty(_offset);
_texturePath.onChange([&]() { loadTexture(); });
diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp
index adbb5a76fb..89b4fdf9a5 100644
--- a/modules/space/rendering/renderablestars.cpp
+++ b/modules/space/rendering/renderablestars.cpp
@@ -511,7 +511,7 @@ RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary)
, _userProvidedTextureOwner(UserProvidedTextureOptionInfo)
, _parametersOwner(ParametersOwnerOptionInfo)
, _moffatMethodOwner(MoffatMethodOptionInfo)
- , _fadeInDistance(
+ , _fadeInDistances(
FadeInDistancesInfo,
glm::vec2(0.f),
glm::vec2(0.f),
@@ -617,6 +617,7 @@ RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary)
_otherDataOption.onChange([&]() { _dataIsDirty = true; });
addProperty(_otherDataOption);
+ _otherDataRange.setViewOption(properties::Property::ViewOptions::MinMaxRange);
addProperty(_otherDataRange);
addProperty(_otherDataColorMapPath);
@@ -727,9 +728,10 @@ RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary)
if (p.fadeInDistances.has_value()) {
glm::vec2 v = *p.fadeInDistances;
- _fadeInDistance = v;
+ _fadeInDistances = v;
_disableFadeInDistance = false;
- addProperty(_fadeInDistance);
+ _fadeInDistances.setViewOption(properties::Property::ViewOptions::MinMaxRange);
+ addProperty(_fadeInDistances);
addProperty(_disableFadeInDistance);
}
}
@@ -1034,7 +1036,7 @@ void RenderableStars::render(const RenderData& data, RendererTasks&) {
float fadeInVariable = 1.f;
if (!_disableFadeInDistance) {
float distCamera = static_cast