Commit Graph

2380 Commits

Author SHA1 Message Date
Alexander Bock
3ba346a227 Remove fmt::format and replace with std::format 2024-03-24 20:19:14 +01:00
Emma Broman
d2f5dd43a5 Include timestamp in navigation state (#3078)
* Add optional timestamp to navigation state

* add option to include timetamp when setting/loading navigation state

* Don't require file extension when loading navstate

for symmetry with save function

* Update Navstate docs

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2024-03-21 20:48:57 +01:00
Alexander Bock
e0ab7ae1d6 Coding style fixes 2024-03-19 14:49:44 +01:00
Emma Broman
f36868d1c4 Feature/textured points (#3068)
* WIP: Start usign texture arrays instead of just a single texture

Now the texture array is sucessfully created, sent over and sampled on the GPU

* Include information about the texture format alpha channel and do a conversion

* Make one draw wcall per texture array

* Add scale to size mapping and move to a separate component

* WIP: Make single textures work again, with texture array

Although this breaks the polygon cloud..

* Also make the polygon cloud work again

* Refactor rendering code

* handle array layer seprately from texture coordinates

* Make sure use size mapping uniform is always set

Fixes point cloud disappearing when multi-textures points are enabled

* Add has value check to size mapping

* Fix indentation

* Make sure points are rendered even when no texture is used

* Clean up texture handling a bit and add comment about storage creation

* Add comment and temporary asset changes

* Clean up handling of color mode (number of colro channels)

* Make interpolated points work with new rendering code

* Refactor

* Bring back check for valid index for color and size data

* Make sure to check if the provided data file exists

* Fix full path ont showing in error message

* Refactor rendering code a bit

* Change how the multitexture setup is configured in the asset and add documentation

Separating made documentation a lot easier..

* Add a todo comment for future discussion

* Add settings for texture compression

* Preserve aspects ratio of rendered textures

* Restructure input parameters for texture details

* Simplify color mode - we decided to not support grayscale

* Add option to set "useAlpha" from asset

* Enable texture per default and fix aspect ratio problem when no texture is used

* tiny refactor

* Fix polygon rendering that broke when adding texture compression

* Remove color in polygon shader

The color would be applied twice in rendering

* Restructure textures code and prevent loading the same texture twice

* Better handling of extra texture parameter in speck files

That does not lead to limitations in using dashes in texture names

* Add some docs and communicate texture mode to the user

* Fix so that single texture can be changed during runtime

* Allow changing compression and usealpha during runtime

* Update texture storage allocation to something that works in older OpenGL versions

* Add a check that checks if we use more texture layers than allowed

* Even more robust check of texture line in speck file (allow extra whitespaces)

* Update data mapping to include texture information and clean up code a bit

* Error handling and prevent loading non-used textures in texture map

* Update some docs

* Small cleanup

* Add one more error message for fault texture map file format

* Remove test version of tully images dataset

* Small refactor

* Add example asset

* Update Ghoul - for larger uniform cache

* Purge texture from ram when we're done with it

* Cleanup (comments, ugly png check, etc)

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* Apply suggestions from code review

* Adress some more review comments and fix broken asset

* More code review fixes

* Read provided sizemapping parameter from asset

* Fix warnings from trying to shift 16 bit int 32 bits :)

* simplify datamapping hash string

* Update comment that was not 100% correct. The file names may be specified as relative paths to a folder

* Small update based on previous code review comments

* Fix multi textured points gui path not same as other points

* Update Folder description to reduce some confusion

* Apply suggestions from code review

Co-authored-by: Ylva Selling <ylva.selling@gmail.com>

* Prevent updates to polygon cloud texture during runtime

This lead to rendering problems.

* Add describing comments to data files

* Clarify why speck version is disabled per default

* Update and clarify confusing size mapping parameters

* Apply suggestions from code review

Co-authored-by: Ylva Selling <ylva.selling@gmail.com>

* Apply suggestions from code review

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
Co-authored-by: Ylva Selling <ylva.selling@gmail.com>
2024-03-19 13:17:25 +01:00
Alexander Bock
534f92c485 Second linting pass and adding .clang_tidy file (#3128) 2024-03-18 22:46:17 +01:00
Alexander Bock
6c89de373a Add the ability to convert TLE files to SPICE kernels and apply change to ISS (#3073)
* Fix orientation of ISS with dynamic frame kernel
2024-03-17 00:59:36 +01:00
Alexander Bock
2759c00e4b Pass through the code to address clang-tidy linting (#3083) 2024-03-17 00:58:50 +01:00
Alexander Bock
8cdea01b22 Remove support for XML configuration files in SGCT 2024-03-11 15:16:42 +01:00
Alexander Bock
9a6fe47d17 Fix up text formatting as path's no longer get quoted 2024-03-08 20:19:06 +01:00
Alexander Bock
fff6f8a627 General pass for code cleanup 2024-03-08 00:36:54 +01:00
Alexander Bock
b77e03dce2 Some general cleanup 2024-03-04 13:03:40 +01:00
Alexander Bock
7a2efc66d6 Simplify profile loading and handling of the loading screen 2024-02-28 00:19:06 +01:00
Alexander Bock
2fbcb0544e NavigationState handling (#3023)
* Change the navigation state format from Lua to JSON.  Add the ability to set the navigation state in the profile editor based on a file
2024-02-25 01:09:32 +01:00
Emma Broman
8fddd55851 Fix a couple of point cloud related problems
* crash that occurs when loading an empty dataset
* trying to access outside of range when sampling color or size values
2024-02-20 08:40:00 +01:00
Alexander Bock
815dfe11f1 Add the ability to specify properties and requiring confirmation (#3006) 2024-02-15 15:56:19 +09:00
Alexander Bock
adad4ab0ff Make the DestinationFrame in the SpiceRotation option and use GALACTIC if it is not specified 2024-02-12 11:39:08 +09:00
Alexander Bock
1691b92575 Fix compile issue with the previous commit 2024-02-12 09:11:03 +09:00
Alexander Bock
15e3cbbb68 Add documentation to JSON loading functions 2024-02-10 10:23:20 +01:00
Alexander Bock
fa1847d235 Add Lua function to load a JSON file 2024-02-10 10:18:57 +01:00
Alexander Bock
d67cabf578 Coding style update 2024-02-06 16:34:12 +01:00
Alexander Bock
6e29d898cf Update copyright header 2024-02-06 15:53:24 +01:00
Emma Broman
2323a8ce50 Issue/2985 - Add asset with default cmaps (#3004)
* Allow changing color map during runtime

* Stary building asset with colormaps (currently using local files)

* Add option to invert the color maps

* Remove final use of local viridis file in example and fix broken cmap update

* Use synced resource for colormap files

* Update advanced colormapping example

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* Update data/assets/util/default_colormaps.asset

* Capitalize first letter of exported keys, to be more consistent with rest of code base

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2024-02-05 15:47:25 +01:00
Andreas Engberg
04ff09814d Add event topic (#3010)
* Add event topic

Add ability to subscribe to events via js-api

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* Output an error if no status or event object is passed to payload

* fixed typo

* Report a warning if user tries to unsubscribe to a non registered event/type combination

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2024-01-24 13:51:55 +01:00
Alexander Bock
27608634b2 Remove warnings (#2999)
* Remove warnings for MSVC, GCC, and Clang 17
2024-01-18 09:58:20 +01:00
Emma Broman
640ca3ed49 Feature/point cloud labels from csv (#2989)
* Add ability to load labels directly from CSV/SPECK for PointClouds

* Provide some more docs

* Update the example asset for point clouds

* Make both examples visible

* Some cleanup

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2024-01-17 13:46:49 +01:00
Alexander Bock
cae9834ec7 Add log rotation function to the Script log as well (closes #2995) 2024-01-09 15:44:22 +01:00
Alexander Bock
902da116e7 Remove interesting times (closes #2991) 2024-01-09 15:34:54 +01:00
Alexander Bock
952b263a8e Add Lua function to return a list of all loaded kernels 2023-12-22 14:40:58 +01:00
Alexander Bock
e64d4d66f4 Add the optional ability to export the model matrix into an ASCII recording 2023-12-22 14:19:18 +01:00
Emma Broman
af5ebd7731 Issue/2949 - Fix for camera transition events (#2982)
* Fix variable name typo

* Update transitions to not care about which sphere we were previously in

* Also handle when anchor node changes

* Remove log messages used for testing, and unused variable

* Update src/navigation/navigationhandler.cpp

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2023-12-20 08:28:34 +01:00
Emma Broman
8a1b6aceb2 Keep track of aim from navigations state when creating a camera path (#2981) 2023-12-20 08:28:21 +01:00
Emma Broman
9c77a12269 Issue/2665 - Show timer for how long time left in camera path (#2980)
* Add a camera path topic and compute remaining time in path

* Remove unused parameter in function

* Include speed scale in estimation of time the path will take

* Includes cleanup and address review comments

* Round instead of ceil, to make countdown reach 0 in most cases

* Update GUI hash
2023-12-20 08:28:07 +01:00
Emma Broman
c165098cdc Point cloud rewrite (RIP RenderableBillboardsCloud) (#2932)
* Start refactoring billboardscloud renderable

* Remove extra unit computation in geometry shader

* More refactor and fix size parameter not working without colormap (it never did)

* Remove redundant bool in shader

* Divide settings into property owners

* Refactor colormap

* More refactoring (utilize properties for visiblity)

* Remove redundant extra data structures for options

* Move data logic to the colormap settings structure

* Remove confusing correction size properties

* Separate polygon cloud into its own renderable

* Clean up some unused code

* Update some property descriptions

* Split some more code out into functions

* Remove odd and unused "linear filtering"

Should be reimplemented ina better way in a general color map overhaul

* Start refactoring some more properties

* Make color optional and remove redundant color assignments in assets

* Refactor color-parameter input and make range mapping work correctly

* Code cleanup (unused code and fix data types)

* Rename ScaleFactor to ScaleExponent

* Add a scale factor as well, as they're easier to use, and clarify documentation

* Fix faultily renamed scale factors

* Remove confusing multiplication for scale exponent

* Fix problem with points not appearing when _drawElements was set to true

* Move all colormapsettings into its own table in the asset files

* Move scaling/sizing into its own table as well

* Group sizing properties and remove min pixel size limit (was always zero)

* Add some docs and rename a parameter to avoid repetition

* Remove IsExact colormap and add an option to hide outliers

OBS! Still need to update the actual cmap files

* Add property to disable size mapping

* Increase pixel size of polyon texture - reduces jagged edges

* Remove unused points class

* Rename files and billboard class, to make it clearer that it is a point cloud

* Move size mapping into size settings

* Move color map properties out into its own component

* Move color map related computations into the new component

* Add outlier colors, to cover some specific color mapping issues

* Automatically fill parameter options if no colormap parameters were defined

* Move all color-related parameters to under one property owner

* Inlcude changes from matrix maintenance

* Add a checkbox to disable additive blending

* Remove a unused variable in shader

* DO color maping on the graphics card instead of CPU, using a texture

* WIP remove old "Outliers" and start introducing concept of no data colors instead

* Move speck loader to core and divide into a general data loader and a speck specific loader (In preparation for adding CSV support)

* More labelscomponent to core

* Fix a faulty header

* Handle NaN values

* Rename color map component property owner

It's not just the color map, but the settings for the entire mapping

* Hide point with nan value is show missing data is not selected

* Fix labels component documentation after move

* Add option to not provide any texture, and use a sphere generated form the shader

* Don't crash when loading unsupported data formats :)

* Add some TODO comments that should be addressed before merge

* Move renderables from DU module to base, and do some header cleanup

* Move colormapping component to core ad rename it to make it clear that it is not the color map itself

* Add above, below and nan color values to cmap loading

* Remove missing Data value specs in asset (and use belowRange in cmap instead)

* Make warning about wrong color number more verbose

* Add TODO comment about colormap, and actually used color in prev version, to localdwarfs

* WIP: Load CSV files

* Update some property visbility

* Check if chosen parameter options actually exist

* Fix fault column check

* Update example asset to cover more different cases

* Use new asset.resource loading

* Update asset versions (major update)

* Add parent documentation for RenderablePolygonCloud

* Add point cloud example with size scaling and add TODO comment

* Add example with textured points

* Don't blend textured points

* Fix problem with shaders being confused about texture units

* Bring back deepsky points color

* Start implementing more sophisticated datamapping for point data files

* Allow reading datamapping from input dictionary

* Load dataset in constructor instead

Solves problem with color map columns not loading for big datasets when loaded the first time

* Fix crash from reading column value that is interpreted as inf

* Inlcude information about data mapping when caching dataset

Updating the parameters now leads to an updated caching of the data file

* Adapt to tolower update

* Add option to specify columns to exclude in load (for CSV files)

* Start updating some docs

* Add a readonly property that shows the number of data points

* Rename example asset to shorter name

* Add option for not using cache when loading dataset

* Fix some errors in example asset

* Set scaleExponent from max position if not specified

That way the points are always visible, even when no exponent is given

* Restructure and add explanations in example asset

* Add option to not cache labels component data file

* Add example file with labels and units

* Compute fade distances in model coordinates instead of world space (issue #1746)

* Add possiblity to invert fading and add exmaple asset

* Make a separate propertyowner for fading settings

* Update docs

* Add example asset with custom data mapping

* Address some of my own review comments

* Read provided Parameter from asset

* Read ValueRange from asset

* Add example asset for more advanced color mapping settings

* Allow using the same column for two position coordinate axes

* Update src/rendering/colormappingcomponent.cpp

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* Update src/data/datamapping.cpp

* Use helper function for tolowercase

* Simplify some std::optional handling, and fix broken assignment from code review fix

* Update data file versions to get updated cmap files

* Include a progress bar to show progress of CSV data loading

* Update csv data-to-float parsing for clang

* Add a description about why `openspace.absPath` is used in the file instead of `asset.resource`

* Apply suggestions from code review

* Apply suggestions from code review

* Add some missing info in documentation

* Place size-related property descriptions next to each other

* Remove the explicitly set renderbin

* Fix overly complicated description

* Fix polygon texture not being used

* Add polygon cloud example

* only bind texture and activate texture unit when required

* Rename alpha to opacity in shader

* Fix value range not loading, and make first parameter in list the default

* Rename Pixel Size property

* Use base 10 for scale exponent instead of base e

* Update src/data/datamapping.cpp

* Update modules/base/shaders/billboardpoint_gs.glsl

* Remove some redundant asset settings (Home label)

* Review comments

* Add TODO comment for localdwarfs asset (Speck file reading problems)

* Oops, forgot part of the comment

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* More code review fixes

* Fix faulty isReady check when labels are included

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* More code review updates

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2023-12-19 13:20:07 +01:00
Alexander Bock
0cf0fe492b Doxygen fixes 2023-12-09 00:16:25 +01:00
Malin E
690878bc87 Layers maintenance (#2917)
* Separate layers for the Moon and Earth

* One asset each for each server, New York, Utah, and Sweden

* Add the layers asset files for Earth and Moon

* Add new layers structure for Mars and Europa

* Add layers assets for Mercury and Enceladus

* Add more layer assets for all servers

* Add layer assets for each server on the top asset level

* Rename Venus Utah cloud combo layer asset (breaking change)

* Clean up layer asset descriptions

* Update layer asset version name

* Fix base layers error

* Add configuration option to choose layers server

* Add Lua functions to access configuration settings

* Extend configuration Lua function

* Add layer server setting in setting gui + add 'None' as a server option

* Add base layers when server 'None' is used

* Add tests for the new Layer Server setting
2023-12-06 16:17:23 +01:00
Emma Broman
b41c48861b Add property for actual bounding and interaction sphere value (#2967)
* Add property for actual bounding and interaction sphere value

* Apply suggestions from code review (no "Read Only" in name)

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2023-12-01 10:00:42 +01:00
Alexander Bock
3a9716a535 No need to use the .set method of properties directly 2023-11-28 21:37:52 +01:00
Alexander Bock
7b081bd8cf Prevent crash when using old joystick asset (closes #2927) 2023-11-28 16:33:45 +01:00
Alexander Bock
131b8f4886 Doxygen update 2023-11-21 10:49:39 +01:00
Alexander Bock
7db7c40841 Doxygen style overhaul (#2954)
Reformatting the existing Doxygen comments to be unified
2023-11-20 23:39:17 +01:00
Alexander Bock
4ee078502b Doxygen (#2953)
* Update Doxygen and add new CSS file
* Remove Doxygen warnings
2023-11-19 16:35:14 +01:00
Alexander Bock
3c35d23062 Verifier cleanup (#2952)
* Add a description to structs
* Cleanup
2023-11-19 11:51:19 +01:00
Emma Broman
aae4d04c43 Add documentation for camera path instruction dictionary
used as input for `openspace.pathnavigation.createPath`
2023-11-15 16:00:36 +01:00
Andreas Engberg
f3c4fc54db Update UrlSynchronization to limit amount of downloads (#2586) (#2933)
Limits the number of URL synchronization downloads by time stamping files for X seconds fixes (#2586). 
Also, show the amount of downloaded data as soon as the download is started fix (#2460)

* Adds time validity to UrlSynchronized files (#2586)

Updated affected asset files. Satellite asset files lasts for 24h by default now. Other assets are updated to work as before. Obs timestamp is computed using UTC time.

* Code cleanup

* Update httpsynchronization.cpp

* Applied suggestions from code review

* Update multi-line comment to `//`

* Remove accidental commas in .asset files

Co-authored-by: Emma Broman <emma.broman@liu.se>

* Fixed PR comments + bug in .asset file

* Refactor code

* Reports downloaded data as early as possible, fixes (#2460)

* More files

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
Co-authored-by: Emma Broman <emma.broman@liu.se>
2023-11-14 17:08:38 +01:00
Andreas Engberg
9343c6315d Adds warning and error messages on loading screen (#2941)
Fixes task 1 of (#494)

* Removed loading screen progress bar

It was removed because it does not show an accurate estimation of load times and is rarely used (off by default)

* Add status info to the loading screen on warnings and errors 

Add: Warning logs and above to loading screen, fixes task 1 of (#494)
Removed code duplication in openspanceengine.cpp
Fixed some bugs where completed assets would not disappear from the screen

* Update the design & address PR comments

* Address PR comments & add bool to show/hide log msg

* Delete test_configuration.cpp

* Update Ghoul submodule

* Renders number of warnings and errors to screen

* Update renderengine.cpp

* Adapt new function to the coding style

---------

Co-authored-by: Alexander Bock <mail@alexanderbock.eu>
2023-11-14 15:40:30 +01:00
Alexander Bock
b62e604b2e Adds a persistent file used to store user settings (#2931)
* Enable the loading of settings
* Add a user interface for changing the settings in the launcher


Co-authored-by: Emma Broman <emma.broman@liu.se>
2023-11-13 08:52:51 +01:00
Alexander Bock
eeb536c9e1 Add the ability to set individual commandline options at the expense of a generic Lua script
Note breaking change: Previously `--config` specified one or more Lua scripts that were executed to update the configuration state, now the `--config` sets the path to the window configuration instead
2023-11-07 16:19:59 +01:00
Andreas Engberg
e5672e2652 Update HttpSynchronization to keep track of files downloaded (#2587) (#2930)
* Update HttpSynchronization to keep track of files downloaded (#2587)

Reads ossync file on synchronization and download files that are missing

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* Apply suggestions from code review

* Fixed merge conflict errors

* Fixed asset being rejected on successful sync

* Add enum for download fail/success, sleep between download retries.

Removed comments and todos

* Fixed PR comments

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2023-11-06 11:06:35 +01:00
Alexander Bock
06a7c692c5 Add special handling for a number of properties in the DashboardItemPropertyValue (closes #2899) 2023-10-19 11:21:28 +02:00
Alexander Bock
1dbe58a8ac Add a new property to control whether the blackout factor should apply to the master (closes #2923) 2023-10-18 22:29:51 +02:00