Commit Graph

56 Commits

Author SHA1 Message Date
Alexander Bock
6e29d898cf Update copyright header 2024-02-06 15:53:24 +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
80e2aaf564 Remove whitespaces at the end of files, ' and - characters 2023-04-05 16:58:45 +02:00
Emma Broman
d4231384ba Fix precision problem for renderablebillboardscloud when flying close
E.g. when flying close to an exoplanet system
2023-03-28 11:45:32 +02:00
Alexander Bock
4f4764209f Happy new year 2023-01-02 11:19:33 +01:00
Alexander Bock
c1252902c7 More Code Cleanup (#2192)
* Harmonizing ( and ) in function calls
* static const -> constexpr
* Fix compile issue
* Unify shader tab size
* Add _fs and _vs to shaders
* Harmonize spacing
2022-07-26 11:22:41 +02:00
Alexander Bock
cf582054dc Update to the RenderableBIllboardCloud
- Add the color mapping to the DU Quasar dataset  (closes #1584)
 - Add the ability to turn off a colormap
 - Add the ability to change the static color even when a colormap is present
2022-04-30 15:33:43 +02:00
Alexander Bock
d7d279ea16 Happy new year 2022-01-01 12:32:55 +01:00
Alexander Bock
c3ba532bdb Feature/cleanup (#1608)
* Revert screenlog back to showing Info and above messages
 * Various code cleanup
2021-05-25 14:08:33 +02:00
Alexander Bock
29a76c7d33 Coding style pass on shader code 2021-01-02 21:11:13 +01:00
Alexander Bock
7004c02b86 Happy new year 2021-01-02 15:26:51 +01:00
Jonathas Costa
3045bfc78b Issue/1342 (#1354)
* Fixing size flickering when moving towards the screen border.
* First pass at adjusting DU scale/max size values

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2020-12-08 11:15:17 +01:00
Alexander Bock
5e29145395 Coding style cleanup 2020-02-14 19:37:06 +01:00
Alexander Bock
d8e9db76a3 Update the copyright header to 2020 2020-02-10 21:51:01 +01:00
Alexander Bock
a430883c1e Merge pull request #1034 from OpenSpace/issue/990
Issue/990
2019-12-17 11:05:41 +01:00
Alexander Bock
3051d71fea Small code cleanup 2019-12-17 11:05:14 +01:00
Jonathas Costa
5eb9949293 Improved performance of RenderableBillboardsClod. 2019-09-26 11:38:41 -04:00
Jonathas Costa
ab52b812f9 Improved geometry shader performance. 2019-09-25 16:03:34 -04:00
Jonathas Costa
ee800cee89 Fixed star rendering cuts on cubemap borders. 2019-09-23 13:08:23 -04:00
Alexander Bock
c6c2eb85fb Feature/du updates (#972)
* Updating DU for new data.
* Changed how OS handles partiview colormaps.
* Multiple changes to adapt OS' behavior for cmaps.
* Small tweaks. MW sphere is now fading in the correct spacetime.
* Added all the Star Orbits.
* Fixing bug in speck reading procedure.
* Changed code to allow comments into data region of a speck file.
* Added deep sky objects.
* Added Home label
* Fixed bug in drawelements.
* Added Sun as a separated star for better control.
* Update version numbers on DU assets
* Move starorbits into their own asset file
* Making some of the digital universe renderables fully opaque for performance gains
2019-09-09 13:46:57 +02:00
Jonathas Costa
8bb70e328d Issue/425 (#860)
* Working on the fix for the depth sorting problem.
* Changed grids and billboards to additive blending.
2019-05-14 17:05:40 +02:00
Alexander Bock
bb3db7ada7 Feature/jenkins fix (#816)
* Cleanup
* CMake cleanups
* Update current year
* Update copyright header
* Use script to return list of all modules
* Update credits, license and ghoul
2019-03-24 11:19:39 +01:00
Jonathas Costa
b2f680e6da Fixed texture leaking. (#635) 2018-07-02 14:41:02 -04:00
Jonathas Costa
7285a66c89 Changes from comments. 2018-04-22 09:52:21 -04:00
Jonathas Costa
a5108db405 Removed unused transformations. 2018-04-21 16:45:19 -04:00
Jonathas Costa
fca8e7f46b Refined new size control and added possibility to change control size system. 2018-04-21 16:38:24 -04:00
Jonathas Costa
fc71ad1a83 Copied changes from previous branch and added new size control system. 2018-04-21 15:17:41 -04:00
Jonathas Costa
65abb03e06 Removed unused code in RenderablePlanesCloud and changed gPosition for planes. 2018-02-05 15:58:57 -05:00
Jonathas Costa
c320abb1bd Removed unused shaders files. 2018-02-05 15:13:52 -05:00
Jonathas Costa
9667b6eac5 Removed unused uniforms and renamed shader files. 2018-02-05 15:13:34 -05:00
Jonathas Costa
dfdc906c58 Temporarily disabled scaleFactor for meshes. 2018-02-05 14:51:58 -05:00
Emil Axelsson
4c2f72226f Performance Optimizations (#450)
* Make derived transform classes less involved in simulation state
* Add performance measurements in openspaceengine
* Avoid redundant transformation lookups
* Fix bug causing redundant calls to GPULayerManager::bind
* Move water reflectance to alpha component of normal buffer. Remove otherData buffer.
2018-01-08 09:43:41 +01:00
Alexander Bock
47233b8e6f Make use of UniformCache in many Renderables and switch from setUniform(const std::string&, ...) to setUniform(GLint, ...) in those cases 2017-12-31 17:31:10 -05:00
Alexander Bock
dcfef3557f Update copyright header 2017-12-29 20:11:22 +01:00
Jonathas Costa
0d83df09bf Added max text size control for DU objects. 2017-12-11 21:58:33 -05:00
Jonathas Costa
52da2297be Changed names in DU following Carter's asking. Fixed bug in min plane size clipping procedure. 2017-12-08 16:11:58 -05:00
Jonathas Costa
b031245a19 Changed behaviou of max billboard sizes. 2017-12-08 13:03:36 -05:00
Jonathas Costa
c543d0d4bf Added fade-in/out effect for min/max billboard size. 2017-11-30 14:46:04 -05:00
Jonathas Costa
5825a94e56 Improved mesh precision. 2017-11-30 12:38:30 -05:00
Jonathas Costa
27fd0ce09e Added minsize controls for billboards. 2017-11-23 20:40:44 -05:00
Jonathas Costa
67033c4583 Tentative fix for billbords alingment problems. 2017-11-15 17:35:00 -05:00
Jonathas Costa
ee4f65dab7 Added mod file control for billboard max size. 2017-11-10 14:20:32 -05:00
Jonathas Costa
9e7e45c85b Added limit for screen size of renderablebillboards. 2017-11-10 11:48:21 -05:00
Jonathas Costa
69aa660885 Added fade-in/fade-out transitions for Milkyway/Tully galaxies. 2017-11-08 16:55:31 -05:00
Jonathas Costa
845c867380 Initial fade-in methods for DU objects. 2017-11-07 17:58:38 -05:00
Jonathas Costa
089cfe727f Improved ATM perfomance (still working on it). Debugging billboards alingment (in progress). 2017-11-03 17:10:03 -04:00
Jonathas Costa
4194395e7e Fixed DU meshes g-buffer. 2017-10-30 13:24:56 -04:00
Jonathas Costa
d116d1c28e Added g-buffer for DU renderables and for grid renderables. 2017-10-30 11:56:59 -04:00
Jonathas Costa
d67a89a6ed Fixed alignment problem in AMNH dome. Added dedbug code for testing the fix on the dome. 2017-10-10 15:24:50 -04:00
Jonathas Costa
ce0742668a Fixed bug in Tully galaxies rendering. 2017-10-09 13:44:38 -04:00