Commit Graph

100 Commits

Author SHA1 Message Date
Ylva Selling
9db86c79d4 Make abstract classes RenderablePlane and RenderableSphere, as well as VideoPlayer, not appear in the documentation. Add them to the derived classes instead 2024-04-19 11:13:19 +02: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
6e29d898cf Update copyright header 2024-02-06 15:53:24 +01:00
Emma Broman
2406a886ec Interpolating points (#3002)
* Add a class for rendering an interpolated point cloud (WIP)

* Make sure that we render the correct number of points

* Group interpolation properties into a property owner

* Update interpolation stuff (which was broken :) )

* Prevent interpolation from breaking with only one step or invalid interpolation values

* Add trigger properties for controlling interpolation

* Allow setting start interpolation value from asset

* Implement spline-based interpolation

* Cleanup, and interpolate to start and end

* And asset type documentation

* Add example asset

* Handle missing data values in interpolation

* Always show values at the knots, if there is one

* Experiment with more dynamic rendering (batching)

* Speed up interpolation by doing it on GPU instead of CPU

* Bring back spline interpolation (this time on GPU)

* Refactor initial data buffering

* Add a helper function to compute transformed positions

* Use vec3 positions instead of vec4 (less data to transfer)

* Update interpolation value documentation

* Apply suggestions from code review

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

* Increase interpolation speed max value

* Fix faulty indentation

* I banish thee, redundant empty line

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2024-01-30 09:43:11 +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
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
Alexander Bock
e7cad060c2 Adapt to coding style 2023-08-11 20:58:41 +02:00
Malin E
786c2887da Sphere maintenance (#2800)
* Split RenderableSphere class into a local and online sphere

* Make the video sphere derive from the regular sphere

* Make RenderableTimeVaryingSphere derive from RenderableSphere

* Some clean up

* Address PR comments
2023-08-07 11:47:32 +02:00
Alexander Bock
ac228c9c87 Add a new dashboard item that shows the state of input devices (closes #2415) 2023-01-21 18:29:17 +01:00
Alexander Bock
4f4764209f Happy new year 2023-01-02 11:19:33 +01:00
Alexander Bock
aeb366ae61 Add new dashboard item to show elapsed times (closes #2234). Cleanup handling of TimeConversion and add unit testing 2022-10-15 00:08:22 +02:00
Malin E
14347cfaba Rename RenderableLabels to RenderableLabel
* Since it only creates one label and not several
2022-08-31 17:02:35 +02:00
Alexander Bock
40ed640bc8 Simplify the function signature of the FactoryManager function 2022-02-12 00:55:15 +01:00
Alexander Bock
30212b6768 Adapt to new auto coding style 2022-02-10 15:20:21 +01:00
Alexander Bock
162141f2db Correctly expose missing documentation from a bunch of classes (closes #1856) 2022-01-26 23:41:48 +01:00
Alexander Bock
d7d279ea16 Happy new year 2022-01-01 12:32:55 +01:00
Alexander Bock
d32af9117a Code style cleanup 2021-12-10 17:31:01 +01:00
ElonOlsson
743e2452f8 merge master to thesis branch 2021-08-16 15:23:49 -04:00
Alexander Bock
87da9a27ab Feature/path normalization (#1674)
* Path normalization (making sure there are fewer cases of '"..."'
* Using more std::filesystem::path instead of std::string
* Update Ghoul
2021-07-01 23:46:22 +02:00
ElonOlsson
7689cf1f65 master merge 2021-06-16 18:22:57 -04:00
ElonOlsson
1bbe681621 removed module Fluxnodes, added renderables to base and space. 2021-05-24 18:53:26 -04:00
Malin Ejdbo
19c845b422 Add initial version of RenderablePrism 2021-05-07 16:53:13 +02:00
Malin Ejdbo
4fb8a36952 Merge branch 'master' into feature/multitexturing
* Resolve conflicts
2021-03-02 15:49:39 +01:00
Emma Broman
a901594907 Generate docs for RenderablePlaneImages 2021-02-25 13:47:49 +01:00
Emma Broman
b07320d1da Add missing documentation for NonUniformStaticScale 2021-02-23 10:12:26 +01:00
Malin Ejdbo
73fd118ee2 Merge branch 'master' into feature/multitexturing
* Resolve conflicts
2021-02-01 11:57:31 +01:00
Emma Broman
76d599d284 Add a basic disc renderable 2021-01-26 15:08:37 +01:00
Alexander Bock
7004c02b86 Happy new year 2021-01-02 15:26:51 +01:00
Alexander Bock
eb69d2219a Restructure DashboardItems
- Add a new class DashboardTextItem that is a DashboardItem that can render text with font
2020-12-09 00:44:25 +01:00
Alexander Bock
8d3bf03db0 Some work on DashboardItems
- Add new DashboardItemText that displays a static text on screen (closes #1423)
 - Add the ability to change the format string to the DashboardItemDate, DashboardItemDistance, and DashboardItemSimulationIncrement
2020-12-08 23:44:24 +01:00
Malin Ejdbo
6df1667583 Add multi model format support with Assimp
* Update submodule Ghoul to point to branch feature/multitexturing

* Remove old datastructure for ModelGeometry (moved to ghoul)

* Change RenderableModel to work with new ModelGeomtry structure in
  ghoul

* Work in progress: Textures
2020-10-20 10:32:12 +02:00
Emma Broman
f247b714bd Add a radial grid 2020-06-30 13:48:50 +02:00
Emma Broman
68b3d5a26e Add forgotten documentation 2020-06-29 12:52:47 +02:00
Emma Broman
7ba5c05388 Move grid renderables to their own folder 2020-06-29 12:52:47 +02:00
Emma Broman
8122d767b5 Create a new grid renderable 2020-06-29 12:52:34 +02:00
Alexander Bock
f7170a9506 Turn the scaling transformation into providing three scaling factors (x, y, z)
Add NonUniformStaticScale class to provide independent scaling factors (closes #1151)
2020-05-12 15:27:24 +02:00
Alexander Bock
d8e9db76a3 Update the copyright header to 2020 2020-02-10 21:51:01 +01:00
Jonathas Costa
63470f03ec Merge branch 'master' into feature/planetlabels 2019-12-08 14:51:39 -05:00
liuloppan
386ce8bec6 Feature/nodelines (#1013)
* Setup line render between Mars and Earth

* Updating property handling

* Precision fix

* Cleanup and making functions and variables private

* Adding linewidth property

* Using opacity property for line color

* Cleanup from review
2019-12-02 15:10:11 +01:00
Jonathas Costa
c6b460ab74 Added planet label rendering. Added Earth's label. 2019-11-22 18:11:49 -05:00
Emil Axelsson
c97d5126ec Feature/timeline translation (#931)
* Work on timeline translations
* Add Apollo 11 Descent data
* Ability to display negative altitudes
* Expose globe translation properties
* Added timeline rotation, and some scene updates. 
* Cleaning up apollo_sites scene; fixing boulder 1 in place to adress heightmap issue
* Use quaternion slerp instaet of linear interpolation + Cleanup
* Change to old lem model while waiting for new version to be pushed to data repo
* Small fixes
2019-07-17 15:21:13 +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
Emil Axelsson
0d2935c43b Feature/gaia mission merge (#766)
* Add Adam Aslegård's module that renders Gaia mission stars
 * Add module for Gaia mission
 * Add CCfits and cfitsio submodules and the implemented fitsfilereader module from the OpenSpace-sun-earth-event branch
 * Add a TaskRunner to read from a fits file
2018-11-20 18:19:08 -05:00
Emil Axelsson
1632c09af3 Coordinate Axes
* Add coordinate axes renderable
 * Add debug helper
 * Add example asset
 * Fix bug with dynamic loading of assets. (#763)
2018-11-13 08:09:14 -05:00
Alexander Bock
8ddc794cda Feature/alex is flying (#729)
* Correctly specify maximum text sizes for grids
 * Use StaticScale transformations in grids and remove fixed radius
 * Fix Verifier to let grids accept non-integer min and max sizes
 * Add a new scale that changes it's value based on the current time and a reference time
 * Add a proper radiosphere that grows in real time (closes #728)
 * Add default globe customization folders to the assets (closes #724)
 * Add new dashboarditem that shows the current camera velocity (closes #702)
 * Add ability to add interesting times to a scene (closes #715)
 * Reenable keybindings gui element
 * Add ShortcutManager
 * Add ability to bind keyless keybinds to use as arbitrary shortcuts (closes #710)
2018-10-08 03:00:35 -04:00
Alexander Bock
0774348fc2 General cleanup
Adapt to changes in Ghoul
Make use of TextureManager
Jenkins compile fix
2018-07-19 14:43:53 -04:00
Alexander Bock
54d1a506c3 Add rotation class that provides a constant rotation based on in-game time (closes #662)
Refactor functions for rotation, scaling, and translation to take UpdateData rather than current time
2018-07-18 15:28:24 -04:00
Emil Axelsson
6007f1d70d Feature/model lighting (#670)
* Fix NH texture and add lighting options
* Add missing comma
* Light sources: work in progress.
* Add light sources
* Remove unused values
* Add types to documentation
* Add light sources to various missions
* Code cleanup based on review
2018-07-13 09:01:43 +02:00
Emil Axelsson
1b3df16c28 Feature/time frame (#642)
* First implementation of time frames
* Add TimeFrameUnion. Only show solar system 1850-2150.
* Consider dependencies when determining whether time frame is active
* Code review fixes.
2018-07-11 10:42:06 +02:00
Alexander Bock
d0f97901d4 Add DashboardItem that can display a property value
Fix documentation of most other dashboard items
2018-06-18 12:49:03 +02:00