Commit Graph

706 Commits

Author SHA1 Message Date
Alexander Bock
6dc738e54e Move functions about globe locations from the GlobeBrowsingModule into the core (#3613)
* Make GlobeRotation and GlobeTranslation work for non-globes and move them to the base module
* Move ellipsoid and geodetic classes into the core
* Allow more things to take scene graph nodes instead of RenderableGlobes
* Move goToGeo and related Lua functions into the core
* Move more functions from the pathnavigation namespace into the navigation namespace

---------

Co-authored-by: Emma Broman <emma.broman@liu.se>
2025-04-23 16:15:17 +02:00
Alexander Bock
8a364c16e3 Fix layout issues with Dashboards (#3614)
- Correctly render multiline text passed to a DashboardItemText
  - Invert the property for the Dashboard location to no longer need a negative y-axis
  - Use the current lineheight instead of pointsize for the ScreenLog
  - Remove the unused size function from DashboardItems
2025-04-21 01:10:02 +02:00
Alexander Bock
af20b97dc7 Add ability to configure horizontal field of view per window instead (#3584) 2025-04-14 19:47:54 +02:00
Alexander Bock
fc9b2ab091 Increase the compilation speed (#3545)
- Remove toStringConversion function and move json_helper include out of numericalproperty.inl
  - Optimizing some header files
  - Remove duplicate Lua functions from properties. 
  - Move List,Option,Selection,String, and TriggerProperty into misc folder
  - Move lua_helper include out of inline file
  - Add lua_helper to the precompiled header
  - Declare property functions as final. No longer have OptionProperty derive from IntProperty
  - Remove Dictionary header from properties
2025-03-14 11:22:40 +01:00
Alexander Bock
8cb3ce8b94 Add the ability to limit-rate the dashboard updating (#3527)
Co-authored-by: Emma Broman <emma.broman@liu.se>
2025-02-18 16:49:47 +01:00
Alexander Bock
096363fd06 Make constructors explicit 2025-02-05 23:22:32 +01:00
Alexander Bock
efb7599b3d Reenable checking loading screen entries against the logo without the endless loop 2025-02-04 01:24:09 +01:00
Alexander Bock
820e90eab4 Happy new year 2025-01-14 16:21:08 +01:00
Andreas Engberg
0fc9265837 Feature/assetvalidation (#3396)
# To run the script
Make sure to install the latest Python API version `openspace-api 0.1.2`
The script is located in `OpenSpace/support/assetvalidation`, the main script takes a few command line arguments

`--dir` - specify the OpenSpace directory 
`--filter` - optionally supply a regex string to filter which assets to validate
`--verbose` - flag to print debug info to log and also console (default off), if off only warnings and errors are logged
`--start` - flag to start OpenSpace as a subprocess (default on) if this is off it assumes OpenSpace is already running, useful if you want to run OpenSpace via Visual Studio for example. 
`--at` - specify an index to start at a specific asset

run eg: 
`python main.py --dir="C:/User/Desktop/OpenSpace" --filter="examples" --verbose=True --start=False --at=35`
2024-10-10 15:55:53 +02:00
Ylva Selling
8ad84b6d35 Make useAcceleratedRendering a uniform for screenspace renderables 2024-09-17 17:17:46 +02:00
Ylva Selling
11bb8e7ac5 GPU accelerate CEF (#3386)
* Update CEF version number

* Set OpenSpace_Helper version of C++ to 20

* Update C++ syntax to v 20

* Remove deprecated function (now default)

* Set the cache folder for cef

* Make static function in webbrowsermodule that determines if we can use accelerated rendering

* Add flag for accelerated rendering to webrenderhandler

* Use accelerated rendering

* Implement function to see if gui should absorb click

* Adhere to 80 char linewidth

* Make only the UI GPU accelerated

* Use dirty rects size for the texture to remove crash

* Better comments

* Make has content function work for GPU acceleration

* Make it so all browsers can be accelerated

Tried making it so only the gui was accelerated for simplicity. Performance plummeted, so reverted that

* Tidy up

* Add accelerated rendering flag to the screenspacerenderable shader

* Add temporary fix to make the sky browser work

* Remove flag from gui render handler

* Enable webgl in a nicer way

* Unbind texture in screenspacerenderable

* Add better comments for error handling

* Tidy up

* Address PR comments

* Make the acceleration Windows only

* Remove unnecessary setting of shader dictionary

* Allow web dev tools to connect to CEF

* Update modules/webbrowser/include/browserinstance.h

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

* Update modules/webbrowser/include/webrenderhandler.h

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

* Apply suggestions from code review

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

---------

Co-authored-by: Ylva Selling <ylva.selling@liu.se>
Co-authored-by: Emma Broman <emma.broman@liu.se>
2024-08-23 09:37:01 +02:00
Alexander Bock
43ada7fa1f Add the ability to feather borders of screenspace renderables 2024-08-13 13:37:39 +02:00
Alexander Bock
aec4f473dc No longer specify an inaccurate version number on the master branch. 2024-08-06 10:51:26 +02:00
Alexander Bock
6337b8e5aa Move the statistics and frame info rendering from the RenderEngine into the debugging module (closes #1248) 2024-07-17 13:17:03 +02:00
Alexander Bock
78e7c7e321 Add the ability to scale th statistics graphs 2024-06-26 21:12:09 -04:00
Alexander Bock
866aad2187 Global pass over the coding style 2024-06-12 14:51:25 +02:00
Alexander Bock
6edea5cae7 Apply the hue, value, saturation, and gamma values from the renderengine to screenspace renderables. Change the screenspace's own gamma value into an offset (#3293)
* Apply the hue, value, saturation, and gamma values from the renderengine to screenspace renderables.  Change the screenspace's own gamma value into an offset

* Make it clearer that the gamma correction is now an offset
2024-06-04 16:28:52 +02:00
Emma Broman
075f6c8f65 Properly fix useCaching for point cloud colormaps
Forgot the update function in 1092948518, oops
2024-05-02 13:56:48 +02:00
Emma Broman
1092948518 Make useCaching for point cloud also affect color map
Makes it so that changes can be done to the color map file without having to delete the cache, and decreases confusion about that one file is cached when the other isn't
2024-05-02 11:08:59 +02:00
Alexander Bock
203cff04cc Make use of the new uniform cache method that uses the variable names as uniform names (#3217) 2024-04-30 08:12:33 +02:00
Alexander Bock
4328476d26 Use more filesystem::path where applicable 2024-04-06 23:55:59 +02:00
Emma Broman
3f8bff5a62 General performance improvements (#3142)
* Adding some Tracy zones
* Move point cloud dataset loading to initialize function to speed up startup 
* Switch order of operations in memoryaware tile cache to speed up startup
* Move point cloud dataset loading to initialize function
* Add more Zone Scoped and rearrange SDSS loading
* More speed up

---------

Co-authored-by: Alexander Bock <mail@alexanderbock.eu>
2024-03-28 01:10:07 +01:00
Alexander Bock
e0ab7ae1d6 Coding style fixes 2024-03-19 14:49:44 +01:00
Alexander Bock
534f92c485 Second linting pass and adding .clang_tidy file (#3128) 2024-03-18 22:46:17 +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
fff6f8a627 General pass for code cleanup 2024-03-08 00:36:54 +01:00
Alexander Bock
7a2efc66d6 Simplify profile loading and handling of the loading screen 2024-02-28 00:19:06 +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
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
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
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
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
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
Gene Payne
c6ffddd253 Non-Windows compiler fix for empty initializer list 2023-09-22 11:35:10 -06:00
Malin E
ce789fcd22 Feature/matrix maintenance (#2875)
* Split RenderableSphere class into a local and an online sphere

* Make the video sphere derive from the regular sphere

* Make RenderableTimeVaryingSphere derive from RenderableSphere

* Some clean up

* Add general functions for renderable matrix calculations

* Make RenderableSphere and Plane use them

* Fix an issue with the RenderablePlane shader

* Make one function that returns all three types of render matrices

* Make more Renderables use the general matric calculation function

* Make more Renderable use the general matrix function

* Simplify alternative transforms for matrix calculations

* Small clean-up

* Update RenderableModel (again) to use new transform functions

* Make calc all matrix function to return tuple

* Update some more places
2023-09-21 14:22:36 +02:00
Emma Broman
d77836d910 Feature/arrow renderable (#2219)
* Create a RenderableNodeLine example asset

* First version of node direction hint renderable (arrow)

* Add possibility to set length as a multiplier of the bounding sphere

* Draw arrow cylinder using index array

* Update exponents and min max values for lengths

* Draw arrow head

* Only update arrow geometry when positions change

* Add some properties to control visuals of arrow

* Implement invert option

* Add normals and shading

* Set arrow head size by length percentage instead of angle

* Add bottom circle to cone

* Cleanup and update examples

* Remove non-existing property from example asset

* Fix vertices not updating if anchor node was changed

And some missing updates on property change

* Start cleaning up some shape rendering helper functions

* Cleanup code and move cylinder function to helper class

* Refactor cylinder creation code (fewer loops over same vector)

* Update transformations to correctly scale and place arrow

* Add the cone to make the arrowhead

* Update faulty triangle normals

* Add property visibilities

* Rename NodeDirectionHint to NodeArrow

* Apply suggestions from code review

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


---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2023-09-11 11:04:46 +02:00
Malin E
4447de87f5 Issue/2768 (#2872)
* Rename remote scripting property to reflect better what it does

* Change the remote scripting name in all modules

* Update all scripts and action calls to use the new property for sync

* Simplify code that decides whether to send actions to nodes and peers

* Move Lua console hint text to be right top aligned

* Update Lua script topic

* Added new JSON key whether or not the script should be synced to other
  nodes and peers

* Per default all scripts sync to everyone
  In the next full release, we should have two separate keys that
  decides whether to sync and send to nodes and peers separately

* Add some comments that explain why there is no sync for some scripts

* Make sync argument in trigger action function BooleanType
2023-09-07 13:21:29 +02:00
Alexander Bock
455ee9335a Add a proper blackout to the ScreenSpaceRenderables and a property and codegen option to toggle that behavior (#2868) 2023-08-31 18:19:37 +02:00
Alexander Bock
e7cad060c2 Adapt to coding style 2023-08-11 20:58:41 +02:00
Ylva Selling
0b20affc5d Add border to screenspace renderables 2023-06-15 15:42:32 -04:00
Alexander Bock
bde840ad03 Remove a bunch of compiler warnings
* Remove compile warnings
* Coding style fix
2023-05-16 11:59:28 +02:00
Emma Broman
c714a7f57d Feature/geojson (#2595)
Add the option to add geojson components to globes, from geojson files. One geojson file creates one GeoJsonComponent, which in turn may contain multiple GlobeGeometryFeatures

Geojson is a format that supports points, lines, and polygons. In addition to the basic functionality, extra features have been added that will long-term allow rendering the geometry needed to represent KML files (another format for geospatial geometry data). Here are links to references for both formats:

    Geojson: https://geojson.org/
    KML: https://developers.google.com/kml/documentation/kmlreference

data/assets/examples/geojson includes some example files that I have used for testing. Any geojson file can also be added through drag-n-drop. Note however that you might need to change the AltitudeMode or HeightOffset properties for the feature to be visible.
2023-04-15 11:35:28 +02:00
Alexander Bock
8c7beea8a4 Reprivatize the registerUpdateRenderBinFromOpacity function 2023-04-15 10:20:39 +02:00
Ylva Selling
54cf02055d Move function in renderable.h to protected that was being used in renderablevideosphere 2023-04-14 18:57:21 -04:00
Malin E
d500c93c8e Merge pull request #2550 from OpenSpace/feature/model-opacity
Feature/model opacity
2023-04-13 17:26:22 +02:00
Malin E
6d8f7b2fbd Handle override RenderBins from asset files 2023-04-13 10:59:23 +02:00
Alexander Bock
19642e8120 Jenkins compile fix 2023-04-12 22:26:19 +02:00