Commit Graph

20 Commits

Author SHA1 Message Date
Alexandru Popovici a52bb75414 Fixed the issues in #1611. There is still an issue left, where zooming in in orthographic mode, then switching to perspective does not yield the correct camera distance, especially when the controls target is off model (#1616) 2023-06-16 15:55:27 +03:00
AlexandruPopovici ef7f4b550a Fixed the commnet bubbles issues with orthographic projection, so we can bring it back in the frontend. Also fixed some issues with camera zooming in orthographic mode and the rendering pipeline, and the zoom in animation 2022-11-30 17:03:29 +02:00
Alexandru Popovici 9abeb2645b New progressive rending pipeline. Progressive ambient occlusion (#1156)
* Started working on progressive sao

* Started working on the ao generation stage shader and pass

* Continued with progressive SAO. Added the accumulation pass

* Implemented progressive AO using the same estimator as for the dynamic one.

* First draft of progressive AO with multiple selectable estimators. WIP on final implementation

* Restructuring how the pipeline and it's passes work so we can extend/configure them more easily. Added the concept of SpecklePass

* A lot of changes. Pipeline rework is more or less complete. Added individual output for some pipeline passes that we might want to inspect inside the sandbox.

* Finished with displaying individual pipeline stages

* Intruduced accumulation frames properly at pipeline level. Cleaned up progressive AO shader and pass. Exposed the number of accumulation frames as well as the kernel size in the sandbox.

* Accumulation frame count is now reset after a resize

* In the end I just implemented my own stationary/dynamic detection routine since the events sent from the 'camera controller' are dogshit

* Implemented interpolating during frame accumulation between the dynamic SAO and the static AO. This makes the transition much more smooth and seamless than simply jumping straight to the static AO which begins accumulating from 0

* Added configurable intensity to static AO. Fixed an issue with static scenario detection where the accumulation frames were ran twice in succession, because the 'camera controller' is probably clamping the angles to X decimal points at the end of a camera motion cycle, which in turn triggers a camera move larger than our defined epsilon

* Dynamic AO at half res

* Some improvements to how we update the rendering pipeline and it's dynamic and progressive states

* Trying to fix the issue with artifacts on progressive AO on mac. seems to be depth encoding related. Changed the depth pass to render to 32 float texture to check if the artifacts are gone

* Trying out a new float->RGBA encoding and decoding

* Added ner and far camera planes controls to see how they're values change depth encoding precision

* Finally managed to get AO properly working with encoded linear depth

* Trying 24 bit encoding

* Fix for the macOS artifacts using linear depth buffer and a bias value

* Extended the camera controller class and added/changed a few things so that the controller doesn't mess up our camera movement and also we now rely on the events sent by it to determine stationary vs dynamic camera scenarios. This way we spare the rendered from having to determine camera movement deltas by itslef(only to have it ruined by the camera controller anyway)

* Added switching between perspective and linear depth when going from dynamic AO to progressive AO, so we don't have to integrate linear depth buffer sampling in the already existing features

* Disabled normal texture rendering for dynamic AO

* Some fixes and added dynamic AO back in at half res

* Fixed an issue with converging progressive pipeline when using a trackpad

* Implemented relative dynamic progressive AO kernel size

* Fixed compile error

* Fixed an issue with macOS and depth texture filtering

* Added half res depth buffer switching for dynamic AO

* Changed some params now that dynamic AO is at half res

* Made section boxes work properly with our new progressive pipeline

* Added correct kernel size computation for orthographic projection

* Patched the camera controls to send events when zooming in orthographic mode

* Some more integrations with camera views and fixed a bug with bad pipeline resets

* Small fix for zoom and startup reset

* Various fixes of issues I could find

* Removed longs

* preview-service now waits for the pipeline to convgerge before taking the screenshot

* Handled #1110. Added the concept of 'ObjectLayers' which uses three's existing implementation for selective layer rendering/lighting/picking. Also added the BaseSpecklePass abstract class which provides a default implementation for any subclassing pass that needs to use specific layers when rendering.

* Added more time between frames for the preview service. It seems to be generating the previews properly now

Co-authored-by: Alex <alex@192-168-0-159.rdsnet.ro>
Co-authored-by: Alex <alexandru.popovici@busymachines.com>
2022-11-01 16:30:36 +02:00
AlexandruPopovici c7c98a2e24 #1014 Started working on SAO 2022-09-21 18:50:20 +03:00
AlexandruPopovici 42844960aa #811 Integrated section box functionality, camera projection switching and fixed a few issues with the new viewer 2022-06-21 17:11:58 +03:00
AlexandruPopovici 499653d983 #811 Started taking the axe on a lot of legacy code which became obsolete after redux Stage 2. Turned ViewerObjectLoader to typescript and started moving a lot of stuff from viewer to a new class, SpeckleRenderer, which will centralize and handle a lot of stuff 2022-06-21 00:58:20 +03:00
Fabians 4699e6794c reformatting again for 88 width 2022-04-04 19:21:28 +03:00
Fabians 1c7436e7ff extra prefer-const & object-shorthand 2022-04-04 19:00:24 +03:00
Gergő Jedlicska 569b4688fa style(all): reformat with print width 88 2022-03-29 19:46:49 +02:00
Fabians aa5e94d640 chore: reformatting everything with prettier 2022-03-29 17:12:31 +03:00
Dimitrie Stefanescu 8792319545 feat(frontend): more bubbles legwork 2022-02-05 10:49:11 +00:00
Cristian Balas 1f378b9823 Viewer fixes (#495) 2021-12-13 18:06:09 +02:00
Dimitrie Stefanescu f5e6e14dd4 feat(viewer): better ortho clipping handling 2021-11-15 09:09:45 +00:00
Dimitrie Stefanescu 77038046db feat(viewer): adds special handling of front/top/etc views in ortho mode 2021-11-14 21:15:17 +00:00
Dimitrie Stefanescu b589508fdb feat(viewer): fixes ortho camera zooms/bounding/etc 2021-11-14 20:09:58 +00:00
Dimitrie Stefanescu a5e626b17b feat(viewer): tyding up a bit 2021-11-14 11:14:02 +00:00
Dimitrie Stefanescu 2562094d58 feat(viewer): various fixes, fiddles 2021-11-14 11:13:23 +00:00
Dimitrie Stefanescu fb546f5a39 feat(viewer): fixes some weird edge cases on ortho camera
(a few more remain)
2021-11-13 17:56:50 +00:00
Dimitrie Stefanescu c6e2a26c39 feat(viewer): better selection handling post rotations 2021-11-13 16:59:38 +00:00
Dimitrie Stefanescu 235faf8c09 feat(viewer): adds ortho camera 🧊 2021-11-13 14:28:55 +00:00