Files
speckle-server/packages
Alexandru Popovici 0891f41848 Alex/shadowcatcher (#1316)
* Some messing around with a virtual plane

* WIP on virtual plane vertex baking

* Added a pass for generating the shadowcatcher texture. Implementation WIP

* PoC for the baked ray traced AO for the shadowcatcher

* WIP on shadowcatcher proper implementation. Removed the shadocatcher pass from the pipeline, and added it as standalone. Implemented the Shadowcatcher class which handles the entire generation process in a centralized way. Added real time parameters in the sandbox so we can see how different configurations work

* Added some more debug funationality. Working on improving vertex level ao calculation

* Dynamic max hit distance calculation for the shadowcatcher

* Added proper AO contribution value calculation and in the process removed the need for specifying a max hit distance

* Implemented explicit materials and shaders for shadowcatcher generation and display

* Proper materials, shaders and blending so that any backround will work correctly

* Added auto corection for texture size for situations where the AO was overly/under saturated.

* Fixed an issue where batches were incorrectly tested. Fixed an issue where blending for existing overlapping transparent surfaces was incorrect

* WIP for render based ao generation

* First draft of detail preserving shadowcatcher

* Improvement that removes over dakened areas

* Weigthed color0 and color1 evenly when extracting color3 from their sum

* Formalized the shadowcatcher and integrated it better with the speckle renderer or anything else it might use it

* Pipeline needs reset after shadowcatcher update

* Added RTE to the virtual plane and shadowcatcher AO generation material. Removed unused library

* Shadowcather now updated with the clipping planes as well as any filters apply, such that only opaque and non clipped scene objects contribute to the shadowcatcher's AO

* Fixed an old issue which makes extended three materials not get their custom uniforms properly updated when they are being used as scene material overrides. Tested shadowcatcher with multiple streams and it works as expected

* Improved plane fringing on streams that manifest it

* Added enabling/disabling shadowcatcher via the light configuration

* Removed unused material and shader. Fixed an issue where pow of negative value would return undefined on some platforms, messing up the final shadowcatcher result

* WIP on better blending for other scene transparent materials

* Changed the way shadowcatcher levels are blended together. Now they are initially added on top of another, then a sigmoid function is used to tone map the final value. This comes as a solution to reducing the very low darks signaled in some streams. On top of data, it also improves general contrast to streams with little surface contact.

* Removed the third shadowcatcher level from blending. It doesn't bring much value and it over-darkens most of the time

* Shadowcatcher is updated when streams are unloaded

* Enabled on-demand rendering of shadowcatcher levels

Co-authored-by: Alex <alex@192-168-0-157.rdsnet.ro>
2023-01-16 21:04:41 +02:00
..
2023-01-16 21:04:41 +02:00
2023-01-16 21:04:41 +02:00