Commit Graph

258 Commits

Author SHA1 Message Date
Joakim Kilby
98c8452f10 fixup after rebase 2024-09-02 12:44:44 +02:00
Joakim Kilby
d7885280f7 support model <-> model shadowing alongside globes 2024-08-30 10:42:47 +02:00
Joakim Kilby
a0c31d1b6a init/de-init depth map resources when castShadow is toggled
fixes an issue where only objects that declared they were casting
shadows in their asset file could cast shadows.
For all other objects they necessary resources were never created.
2024-08-30 10:42:47 +02:00
Joakim Kilby
694138663d check for existance of lightsources before renderings depthmaps 2024-08-30 10:42:47 +02:00
Joakim Kilby
e2d95019ec apply frustum size from dict 2024-08-30 10:42:46 +02:00
Joakim Kilby
0e15b4b6d3 add model self-shadowing via existing depth map 2024-08-30 10:42:46 +02:00
Joakim Kilby
8ab4b4db23 make specular power a property 2024-08-30 10:42:46 +02:00
Joakim Kilby
dbed4f3ddb calculate view frustum for shadow mapping automatically
based on model extents as defined by its bounding-radius
2024-08-30 10:42:46 +02:00
Joakim Kilby
78c4eb19f0 ensure that models that do not cast shadows are still rendered 2024-08-30 10:42:46 +02:00
Joakim Kilby
4b77b8d27d support multiple shadowers & addition/removal of shadowers 2024-08-30 10:42:46 +02:00
Joakim Kilby
2c2653fe33 revert face culling 2024-08-30 10:42:46 +02:00
Joakim Kilby
3b2bebb2ad render shadowmaps from greater distance to mimic sun 2024-08-30 10:42:46 +02:00
Joakim Kilby
fbf2a289d0 add shadow bias, cull away front-faces 2024-08-30 10:42:46 +02:00
Joakim Kilby
58d402fc67 use lightsource from model specification instead of (hardcoded) sun 2024-08-30 10:42:46 +02:00
Joakim Kilby
2402cbbdc1 swap to orthogonal projection
as it should be for directional lighting which is the case for the sun
2024-08-30 10:42:46 +02:00
Joakim Kilby
2fbced5b23 move depthmap rendering into renderablemodel class 2024-08-30 10:42:46 +02:00
Joakim Kilby
0020e12403 possibly correct depthmap from light's point of view 2024-08-30 10:42:46 +02:00
Joakim Kilby
6eade9ba4f allow model caching to be bypassed 2024-08-30 10:42:46 +02:00
Joakim Kilby
3a63055324 enable wireframe rendering of models 2024-08-30 10:42:46 +02:00
Alexander Bock
866aad2187 Global pass over the coding style 2024-06-12 14:51:25 +02:00
Emma Broman
eb1cfec7bd Renderable property info walkthrough/cleanup (#3226)
A passover of all the Parameters descriptions and PropertyInfo descriptions of the renderables in the code base to make then more consistently and concisely formatted. Also fixed some small issues and added or updated descriptions.

* Start rephrasing propertyinfos for more consistency

* Update eclipse cone propertyinfos

* Update `RenderableFov` property infos and group colors in UI

* `RenderableGalaxy` and `RenderableGlobe`

* Update more descriptions

* Moore descriptions

* Update docs for `RenderableShadowCylinder` and add properties

* `RenderableSkyTarget`, and spheres (`ImageOnline` and `ImageLocal`)

* `RnederableSphericalGrid`, and update line width info of other types, for consistency

* `RenderableStars` and `RenderableTimeVaryingSphere`

* Update more propertyinfos

* Fix inconsistent mentioning of true/false

* change some phrasings for increased consistency

* Update Renderbin description to include Sticker bin and remove extra property

* Rename `OutlineWeight` -> `OutlineWidth`

* Extend description about enable depth test for models

* Clarify what relative values mean for `RenderableNodeArrow`

* Elaborate on `RenderableLabel` size property

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
Co-authored-by: Ylva Selling <ylva.selling@gmail.com>
Co-authored-by: Malin E <malin.ejdbo@gmail.com>
2024-05-20 09:24:40 +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
78b3b4fb2e Adding periods to the description texts 2024-04-23 22:33:17 +02:00
Alexander Bock
4328476d26 Use more filesystem::path where applicable 2024-04-06 23:55:59 +02:00
Alexander Bock
3ba346a227 Remove fmt::format and replace with std::format 2024-03-24 20:19:14 +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
9a6fe47d17 Fix up text formatting as path's no longer get quoted 2024-03-08 20:19:06 +01:00
Alexander Bock
6e29d898cf Update copyright header 2024-02-06 15:53:24 +01:00
Alexander Bock
27608634b2 Remove warnings (#2999)
* Remove warnings for MSVC, GCC, and Clang 17
2024-01-18 09:58:20 +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
870850db07 Enable warnings for missing case labels and subsequent cleanup. Updated ghoul, sgct, and codegen repository for same 2023-11-05 22:16:06 +01: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
Malin E
54ad5bfdd5 Add pivot property for Models to move model origin 2023-08-09 16:04:20 +02:00
Alexander Bock
9d5e50d930 Ensure that the geometry has the animation enabled (closes #2731) 2023-06-03 02:50:39 +02:00
Malin E
6054a817d8 Move model loading code to initialiseGL, fixes #1838 2023-05-24 16:40:17 +02:00
Malin E
4d9d4717d3 Set clear color for transparent models, fixes #2683 2023-05-23 11:25:48 +02:00
Malin E
9081a4db66 Make the numeric value of the model scale a property in the gui 2023-05-22 17:46:31 +02:00
Emma Broman
12d37d92a6 Fix faulty type for RenderableModel ModelTransform property input
from asset dictionary
2023-05-22 17:07:28 +02:00
Malin E
0490e94350 Fix modelshader example in Debug mode 2023-05-22 11:37:28 +02:00
Alexander Bock
bde840ad03 Remove a bunch of compiler warnings
* Remove compile warnings
* Coding style fix
2023-05-16 11:59:28 +02:00
Alexander Bock
ca916877b2 Adapt the visibility settings for all properties 2023-04-15 09:33:31 +02: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
c2457e5c41 Address PR comments 2023-04-13 14:54:49 +02:00
Malin E
a017006ec6 Add todo comment from discussion in PR 2023-04-13 12:35:51 +02:00
Malin E
6d8f7b2fbd Handle override RenderBins from asset files 2023-04-13 10:59:23 +02:00
Alexander Bock
7565a91196 Cleanup lambda expressions and directly address Fadeable properties when adding properties 2023-04-12 23:20:53 +02:00
Malin E
dccd439dde Merge branch 'master' into feature/model-opacity
* Solve conflicts in renderablemodel.cpp and renderabletrail.cpp
2023-04-12 17:03:40 +02:00
Malin E
94e8f90d1a Take into account the scale in the gui when calculating distance culling 2023-04-12 16:50:08 +02:00
Alexander Bock
9022aad479 Adding static Settings to Renderable (#2578)
* Add settings to Renderable to control whether the renderbin is updated based on Opacity
* Remove duplicate RenderBin specification for RenderableSphere
* Remove unnecessary RenderBin specifications of Lagrange points
* Don't automatically update the renderbin for RenderableLabel and RenderablePlane
* Remove extra `setRenderBinFromOpacity` from RenderableSpheres
* Move information about whether a renderable should be updated when disabled
* Some cleanup of Renderable class
* Don't update the renderbin automatically if the user specified the renderbin manually
2023-04-10 20:49:01 +02:00
Malin E
1d92383317 Make sure RenderBin is set before render function is called 2023-04-06 14:53:05 +02:00