diff --git a/.gitattributes b/.gitattributes index 6f15cde045..1be02425ca 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,18 @@ * text=auto +# Correct GitHub's language detection shenanigans + +# Asset files are not Unity, but Lua instead +*.asset linguist-language=Lua +# We have some SPICE frame kernels that get misclassified as code +*.tf -linguist-detectable +# We don't want to index the GDAL csv and xml files +modules/globebrowsing/gdal_data/* linguist-vendored +# No need to index any external files +*/ext/* linguist-vendored +# No C allowed +*.h linguist-language=C++ + # GitHub files ATTRIBUTION text AUTHORS text diff --git a/CMakeLists.txt b/CMakeLists.txt index 81d0833e7c..b4b73947d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,8 +28,8 @@ project(OpenSpace) set(OPENSPACE_VERSION_MAJOR 0) set(OPENSPACE_VERSION_MINOR 17) -set(OPENSPACE_VERSION_PATCH -1) -set(OPENSPACE_VERSION_STRING "Beta-10 [RC1]") +set(OPENSPACE_VERSION_PATCH 0) +set(OPENSPACE_VERSION_STRING "Beta-10") set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}") set(OPENSPACE_CMAKE_EXT_DIR "${OPENSPACE_BASE_DIR}/support/cmake") diff --git a/README.md b/README.md index 19d721dd2a..1e17b0e290 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,47 @@ -[OpenSpace](http://openspaceproject.com) is an open source, non-commercial, and freely available interactive data visualization software designed to visualize the entire known universe and portray our ongoing efforts to investigate the cosmos. Bringing the latest techniques from data visualization research to the general public, OpenSpace supports interactive presentation of dynamic data from observations, simulations, and space mission planning and operations. The software works on multiple operating systems (Windows, Linux, MacOS) with an extensible architecture powering high resolution tiled displays and planetarium domes, making use of the latest graphic card technologies for rapid data throughput. In addition, OpenSpace enables simultaneous connections across the globe creating opportunity for shared experiences among audiences worldwide. +![OpenSpace Logo](/data/openspace-horiz-logo-crop.png) +[OpenSpace](http://openspaceproject.com) is an open source, non-commercial, and freely available interactive data visualization software designed to visualize the entire known universe and portray our ongoing efforts to investigate the cosmos. Bringing the latest techniques from data visualization research to the general public, OpenSpace supports interactive presentation of dynamic data from observations, simulations, and space mission planning and operations. The software works on multiple operating systems (Windows, Linux, MacOS) with an extensible architecture capable of powering both personal computers and also high resolution tiled displays and planetarium domes. In addition, OpenSpace enables simultaneous connections across the globe creating opportunity for shared experiences among audiences worldwide. The target audience of the software reaches from the general public who wishes to explore our universe, enthusiasts interested in hacking the underlying components in OpenSpace to create unique experiences, informal science institutions wishing to create a low-cost, yet powerful exhibition piece, but also scientists desiring to visualize their datasets in a contextualized, powerful software. -The project stems from the same academic collaboration between Sweden’s [Linköping University](https://www.liu.se) (LiU) and the [American Museum of Natural History](https://www.amnh.org) (AMNH) that led to the creation of Uniview and its parent company [SCISS](http://sciss.se). Development of the software began several years ago through a close collaboration with NASA Goddard’s [Community Coordinated Modeling Center](https://ccmc.gsfc.nasa.gov) (CCMC) to model space weather forecasting and continued with visualizations of NASA’s New Horizons mission to Pluto and ESA’s Rosetta mission. This promising set of preliminary work provided a foundation for recent NASA funding, which has extended the collaboration to include the University of Utah’s [Scientific Computing and Imaging](https://www.sci.utah.edu) (SCI) Institute, [New York University](https://www.nyu.edu)’s Tandon School of Engineering, multiple informal science institutions across the United States, and multiple, international vendors. Current areas of focus within OpenSpace include: +[![License](https://img.shields.io/badge/License-MIT-purple.svg?style=flat-square)](LICENSE) +[![Download](https://img.shields.io/github/v/tag/OpenSpace/OpenSpace?label=Version&color=maroon&style=flat-square)](https://www.openspaceproject.com/installation) +![Size](https://img.shields.io/github/repo-size/OpenSpace/OpenSpace?style=flat-square&color=red) -- Visualization of dynamic simulations via interactive volumetric rendering, as a priority for communicating research in astrophysics. -- Utilization of NASA’s SPICE observational geometry system with its Planetary Data Service (PDS) to enable space mission visualizations that reveal how missions are designed to gather science. -- Globe browsing techniques across spatial and temporal scales to examine scientific campaigns on multiple planets, including close up surface exploration. +[![System Paper](https://img.shields.io/badge/System%20Paper-10.1109%2FTVCG.2019.2934259-blue?style=flat-square)](https://doi.org/10.1109/TVCG.2019.2934259) +[![GlobeBrowsing Paper](https://img.shields.io/badge/GlobeBrowsing%20Paper-https%3A%2F%2Fdoi.org%2F10.1109%2FTVCG.2017.2743958-blue?style=flat-square)](https://doi.org/10.1109/TVCG.2017.2743958) -OpenSpace requires graphics support for [OpenGL](https://www.opengl.org/) version 3.3. +![Contributors](https://img.shields.io/github/contributors/OpenSpace/OpenSpace?style=flat-square) +![Commits](https://img.shields.io/github/commit-activity/m/OpenSpace/OpenSpace?color=green&style=flat-square) -This repository contains the source code and example scenes for OpenSpace, but does not contain any data. To build and install the client, we refer to the [OpenSpace Wiki](http://wiki.openspaceproject.com/), specifically [building](http://wiki.openspaceproject.com/docs/developers/compiling/general) for [Windows](http://wiki.openspaceproject.com/docs/developers/compiling/windows), [Linux (Ubuntu)](http://wiki.openspaceproject.com/docs/developers/compiling/ubuntu), and [MacOS](http://wiki.openspaceproject.com/docs/developers/compiling/macos). Required preexisting dependencies are: [Boost](http://www.boost.org/) and [Qt](http://www.qt.io/download). Feel free to create issues for missing features, bug reports, or compile problems or contact us via [email](mailto:alexander.bock@me.com?subject=OpenSpace:). +![Image](https://github.com/OpenSpace/openspace.github.io/raw/master/assets/images/collection.jpg) -Regarding any issues, you are very welcome on our [Slack support channel](https://openspacesupport.slack.com) to which you can freely [sign-up](https://join.slack.com/t/openspacesupport/shared_invite/zt-37niq6y9-T0JaCIk4UoFLI4VF5U9Vsw). +# Background +OpenSpace started as a collaboration between Sweden's [Linköping University](https://scivis.github.io) (LiU) and the [American Museum of Natural History](https://www.amnh.org) (AMNH). Development of the software began several years ago through a close collaboration with NASA Goddard's [Community Coordinated Modeling Center](https://ccmc.gsfc.nasa.gov) (CCMC) to model space weather forecasting and continued with visualizations of NASA's New Horizons mission to Pluto and ESA's Rosetta mission to 67P/Churyumov–Gerasimenko. This promising set of preliminary work provided a foundation for continued funding from NASA, the Swedish eScience Research Centre, and the Knut and Alice Wallenberg foundation, which has extended the collaboration to include the University of Utah's [Scientific Computing and Imaging](https://www.sci.utah.edu) (SCI) Institute, [New York University](https://www.nyu.edu)'s Tandon School of Engineering, multiple informal science institutions across the world, and multiple, international vendors. + +![Image](https://github.com/OpenSpace/openspace.github.io/raw/master/assets/images/presentation.jpg) + +# Features +Some of the high-level features supported in OpenSpace are: + - AMNH's Digital Universe catalog of extrasolar datasets (stars, galaxies, quasars, ...) + - High-resolution planetary images for major objects in the solar system (Earth, Moon, Mars, Venus, ...) + - Animated 3D models representing space missions (ISS, New Horizons, JWST, ...) + - Support for custom profiles with arbitrary user-defined content + - Ability to drive any type of display environment (flat screen, multi-projector, planetariums, ...) + - Lua and JavaScript interface into the engine allowing highly customized controls + - Native support to export an interactive sessions as individual frames for video export + - much much more (see our [Changelog](http://wiki.openspaceproject.com/docs/general/releases)) + +OpenSpace requires at least support for [OpenGL](https://www.opengl.org/) version 3.3, some custom components require at least version 4.2. + +![Image](https://github.com/OpenSpace/openspace.github.io/raw/master/assets/images/display-systems.jpg) + +# Getting Started +This repository contains the source code and example profiles for OpenSpace, but does not contain any data. To build and install the application, please check out the [OpenSpace Wiki](http://wiki.openspaceproject.com/). Here, you will find two pages, a [build instruction](http://wiki.openspaceproject.com/docs/developers/compiling/general) for all operating systems and then additional instructions for [Windows](http://wiki.openspaceproject.com/docs/developers/compiling/windows), [Linux (Ubuntu)](http://wiki.openspaceproject.com/docs/developers/compiling/ubuntu), and [MacOS](http://wiki.openspaceproject.com/docs/developers/compiling/macos). + +Requirements for compiling are: + - CMake version 3.10 or above + - C++ compiler supporting C++17 (MSVC 16.10, GCC9, Clang10) + - [Boost](http://www.boost.org/) + - [Qt](http://www.qt.io/download) + +Feel free to create issues for missing features, bug reports, or compile problems or contact us via [email](mailto:openspace@amnh.org?subject=OpenSpace:). Regarding any issues, you are very welcome on our [Slack support channel](https://openspacesupport.slack.com) to which you can freely [sign-up](https://join.slack.com/t/openspacesupport/shared_invite/zt-37niq6y9-T0JaCIk4UoFLI4VF5U9Vsw). + +![Image](https://github.com/OpenSpace/openspace.github.io/raw/master/assets/images/himalaya-nkpg-dome.jpg) diff --git a/config/single_sbs_stereo.xml b/config/single_sbs_stereo.xml index 595d92cafb..e0707559c1 100644 --- a/config/single_sbs_stereo.xml +++ b/config/single_sbs_stereo.xml @@ -1,22 +1,16 @@ - + + + + - - - - - - + + + + + - - - - - - - - - + @@ -24,7 +18,7 @@ - + diff --git a/data/assets/examples/slidedeck.asset b/data/assets/examples/slidedeck.asset index fdd3756450..7d054dd2c1 100644 --- a/data/assets/examples/slidedeck.asset +++ b/data/assets/examples/slidedeck.asset @@ -15,17 +15,18 @@ asset.onInitialize(function () local interpolationDuration = 0.5 - function nextSlide() - helper.goToNextSlide(deck, interpolationDuration) - end + -- Add global functions for controlling slide deck and bind to keys + rawset(_G, "nextSlide", function() + helper.goToNextSlide(deck, interpolationDuration) + end) - function previousSlide() + rawset(_G, "previousSlide", function() helper.goToPreviousSlide(deck, interpolationDuration) - end + end) - function toggleSlides() + rawset(_G, "toggleSlides", function() helper.toggleSlides(deck, interpolationDuration) - end + end) helper.setCurrentSlide(deck, 1) openspace.bindKey("KP_6", "nextSlide()", "Next slide", "Next slide", "/Slides") diff --git a/data/assets/scene/solarsystem/missions/osirisrex/bennu_projection.asset b/data/assets/scene/solarsystem/missions/osirisrex/bennu_projection.asset index afcfb529a7..c78fbef4b2 100644 --- a/data/assets/scene/solarsystem/missions/osirisrex/bennu_projection.asset +++ b/data/assets/scene/solarsystem/missions/osirisrex/bennu_projection.asset @@ -34,7 +34,7 @@ local BennuProjection = { Enabled = true, Type = "RenderableModelProjection", Body = BENNU_BODY, - GeometryFile = models .. "/BennuTextured.obj", + GeometryFile = models .. "/Bennu_v20_200k_an.obj", Projection = { Sequence = { images, imagesA }, SequenceType = "image-sequence", diff --git a/data/assets/util/launcher_images.asset b/data/assets/util/launcher_images.asset index 32098b0c64..d2fd2efe90 100644 --- a/data/assets/util/launcher_images.asset +++ b/data/assets/util/launcher_images.asset @@ -2,6 +2,6 @@ local DataPath = asset.syncedResource({ Name = "Launcher Images", Type = "HttpSynchronization", Identifier = "launcher_images", - Version = 1 + Version = 2 }) asset.export("DataPath", DataPath) diff --git a/data/openspace-horiz-logo-crop.png b/data/openspace-horiz-logo-crop.png new file mode 100644 index 0000000000..05ae6643e0 Binary files /dev/null and b/data/openspace-horiz-logo-crop.png differ diff --git a/ext/ghoul b/ext/ghoul index c5add410f3..2ffa7b7f7a 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit c5add410f3367890e2a2f91f6087001baf8f2152 +Subproject commit 2ffa7b7f7a9582f191e51d4f7b030ea764f86a4c diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h index 28cee7e43a..d32734712c 100644 --- a/include/openspace/rendering/renderengine.h +++ b/include/openspace/rendering/renderengine.h @@ -194,7 +194,7 @@ private: ghoul::Dictionary _resolveData; ScreenLog* _log = nullptr; - ghoul::opengl::OpenGLStateCache* _openglStateCache; + ghoul::opengl::OpenGLStateCache* _openglStateCache = nullptr; properties::BoolProperty _showOverlayOnSlaves; properties::BoolProperty _showLog; diff --git a/modules/base/rendering/renderabletrailorbit.cpp b/modules/base/rendering/renderabletrailorbit.cpp index a80152e3eb..fffd3effd8 100644 --- a/modules/base/rendering/renderabletrailorbit.cpp +++ b/modules/base/rendering/renderabletrailorbit.cpp @@ -158,10 +158,12 @@ RenderableTrailOrbit::RenderableTrailOrbit(const ghoul::Dictionary& dictionary) using namespace std::chrono; _period = p.period * duration_cast(hours(24)).count(); _period.onChange([&] { _needsFullSweep = true; _indexBufferDirty = true; }); + _period.setExponent(5.f); addProperty(_period); _resolution = p.resolution; _resolution.onChange([&] { _needsFullSweep = true; _indexBufferDirty = true; }); + _resolution.setExponent(3.5f); addProperty(_resolution); // We store the vertices with (excluding the wrapping) decending temporal order diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index 89b7fe275b..b9253986b4 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -398,20 +398,22 @@ scripting::LuaLibrary GlobeBrowsingModule::luaLibrary() const { "the surface of the specified globe." }, { - "getGeoPosition", - &globebrowsing::luascriptfunctions::getGeoPosition, + "getLocalPositionFromGeo", + &globebrowsing::luascriptfunctions::getLocalPositionFromGeo, {}, "string, number, number, number", - "Returns the specified surface position on the globe identified by the first " - "argument, as three floating point values - latitude, longitude and altitude " - "(degrees and meters)." + "Returns a position in the local Cartesian coordinate system of the globe " + "identified by the first argument, that corresponds to the given geographic " + "coordinates: latitude, longitude and altitude (in degrees and meters). In " + "the local coordinate system, the position (0,0,0) corresponds to the " + "globe's center." }, { "getGeoPositionForCamera", &globebrowsing::luascriptfunctions::getGeoPositionForCamera, {}, "void", - "Get geographic coordinates of the camera poosition in latitude, " + "Get geographic coordinates of the camera position in latitude, " "longitude, and altitude (degrees and meters)." }, { diff --git a/modules/globebrowsing/globebrowsingmodule_lua.inl b/modules/globebrowsing/globebrowsingmodule_lua.inl index 4ed196188c..ec5d2d9374 100644 --- a/modules/globebrowsing/globebrowsingmodule_lua.inl +++ b/modules/globebrowsing/globebrowsingmodule_lua.inl @@ -287,8 +287,8 @@ int goToGeo(lua_State* L) { return 0; } -int getGeoPosition(lua_State* L) { - ghoul::lua::checkArgumentsAndThrow(L, 4, "lua::getGeoPosition"); +int getLocalPositionFromGeo(lua_State* L) { + ghoul::lua::checkArgumentsAndThrow(L, 4, "lua::getLocalPositionFromGeo"); const std::string& globeIdentifier = ghoul::lua::value(L, 1); const double latitude = ghoul::lua::value(L, 2); diff --git a/modules/globebrowsing/scripts/layer_support.lua b/modules/globebrowsing/scripts/layer_support.lua index 82678d901c..0d3b94cc85 100644 --- a/modules/globebrowsing/scripts/layer_support.lua +++ b/modules/globebrowsing/scripts/layer_support.lua @@ -315,24 +315,25 @@ openspace.globebrowsing.addFocusNodesFromDirectory = function (dir, node_name) if file and file:find('.info') then local t = openspace.globebrowsing.parseInfoFile(file) - if t.Node and t.Location then - openspace.printInfo("Creating focus node for '" .. n .. "'") + if node_name and t.Location then + openspace.printInfo("Creating focus node for '" .. node_name .. "'") - 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 lat = t.Location.Center[1] + local long = t.Location.Center[2] local identifier = node_name .. " - " .. t.Identifier - local name = node_name .. " - " .. t.Node + local name = node_name .. " - " .. t.Name openspace.addSceneGraphNode({ Identifier = identifier, Parent = node_name, Transform = { Translation = { - Type = "StaticTranslation", - Position = { p[1], p[2], p[3] } + Type = "GlobeTranslation", + Globe = node_name, + Latitude = lat, + Longitude = long, + UseHeightmap = true } }, GUI = { @@ -348,8 +349,6 @@ end openspace.globebrowsing.addFocusNodeFromLatLong = function (name, globe_identifier, lat, long, altitude) altitude = altitude or 0; - local a, b, c = openspace.globebrowsing.getGeoPosition(globe_identifier, lat, long, altitude) - local p = { a, b, c } local identifier = globe_identifier .. "-" .. name openspace.addSceneGraphNode({ diff --git a/scripts/drag_drop_handler.lua b/scripts/drag_drop_handler.lua index 7042333633..fc51b0935c 100644 --- a/scripts/drag_drop_handler.lua +++ b/scripts/drag_drop_handler.lua @@ -37,7 +37,8 @@ if is_image_file(extension) then TexturePath = "]] .. filename .. [[" });]] elseif extension == ".asset" then - return [[openspace.asset.add("]] .. filename .. [[")]] + return [[openspace.printInfo("Adding asset: ']] .. filename .. [[' (drag-and-drop)"); + openspace.asset.add("]] .. filename .. [[");]] elseif extension == ".osrec" or extension == ".osrectxt" then return [[openspace.sessionRecording.startPlayback("]] .. basename .. [[")]] end diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index 2e54fce454..cbb2908a6d 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -256,7 +256,7 @@ OrbitalNavigator::OrbitalNavigator() , _useAdaptiveStereoscopicDepth(UseAdaptiveStereoscopicDepthInfo, true) , _stereoscopicDepthOfFocusSurface( StereoscopicDepthOfFocusSurfaceInfo, - 200000, + 21500, 0.25, 500000 ) @@ -391,7 +391,7 @@ OrbitalNavigator::OrbitalNavigator() addProperty(_useAdaptiveStereoscopicDepth); addProperty(_staticViewScaleExponent); - _stereoscopicDepthOfFocusSurface.setExponent(10.f); + _stereoscopicDepthOfFocusSurface.setExponent(3.f); addProperty(_stereoscopicDepthOfFocusSurface); addProperty(_retargetInterpolationTime); diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index c9704ec821..53cb1b2f45 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -92,9 +92,6 @@ ghoul::mm_unique_ptr Renderable::createFromDictionary( documentation::testSpecificationAndThrow(Documentation(), dictionary, "Renderable"); std::string renderableType = dictionary.value(KeyType); - // Now we no longer need the type variable - dictionary.removeValue(KeyType); - auto factory = FactoryManager::ref().factory(); ghoul_assert(factory, "Renderable factory did not exist"); Renderable* result = factory->create( diff --git a/src/util/coordinateconversion.cpp b/src/util/coordinateconversion.cpp index 041a126271..cc5e28aae4 100644 --- a/src/util/coordinateconversion.cpp +++ b/src/util/coordinateconversion.cpp @@ -222,7 +222,7 @@ glm::dvec2 icrsToDecimalDegrees(const std::string& ra, const std::string& dec) { } // Convert from hours/degrees, minutes, seconds to decimal degrees - double sign = signbit(static_cast(decDegrees)) ? -1.0 : 1.0; + double sign = std::signbit(static_cast(decDegrees)) ? -1.0 : 1.0; double raDeg = (raHours * 15.0) + (raMinutes * 15.0 / 60.0) + (raSeconds * 15.0 / 3600.0);