Commit Graph

678 Commits

Author SHA1 Message Date
Alexandru Popovici 0a6e184024 The viewer now exports pass and pipeline related types. Also added a debug normal pipeline in the sandbox (#3451) 2024-11-07 13:21:43 +02:00
Alexandru Popovici a48ec073a1 The bounds to check against when intersecting the scene is now being properly expanded and 0 sized component bounds are being taken care of (#3450) 2024-11-07 09:55:27 +02:00
Dimitrie Stefanescu 60e6354524 Merge pull request #3445 from specklesystems/WEB-2136
fix: adds brepx, extrusionx, subdx support in viewer for real this time
2024-11-06 13:49:06 +00:00
Dimitrie Stefanescu 96d497232d fix: adds brepx, extrusionx, subdx support in viewer for real this time 2024-11-06 13:46:16 +00:00
Alexandru Popovici 11a3a68d86 Added missing exported types (#3418) 2024-11-01 15:06:06 +02:00
Alexandru Popovici 26a103b5c5 Made sure an actual Box3 instances is passed ot the viewwer from hte legacy viewer implementation] (#3428) 2024-11-01 05:29:46 +01:00
Alexandru Popovici 5be9a27945 Fixed an issue with computing a relative offset box where the origin of the input box was not taken into account and the resulting offset box would be whack (#3419) 2024-10-31 09:36:11 +01:00
Alexandru Popovici 31a21f3a9a GeometryPass now updates the section planes automatically for any overriden materials (#3409) 2024-10-30 14:31:30 +02:00
Alexandru Popovici a5cc51040c Added batch material override support for instanced speckle meshes, aka all instances (#3411) 2024-10-29 19:14:23 +02:00
Alexandru Popovici 613614d5d0 View Modes (#3259)
* Edge drawing render pass using both depth and normal data

* Edges are now mixed with the rest of the passes in the final pass

* Set MSAA for SS edges framebuffers to maximum number of samples

* New depth gradient extraction approach. Several improvements over the old one

* Some changes to the normal gradient extraction. Using Robert's Cross works roughly the same as the older approach with 1 less texture fetch. Also implemented Canny

* Combined static AO with edges

* Implemented SMAA and static TAA. Both toggeable in realtime for better comparisons

* Added the normal pass and fixed some issues

* The pipeline is now capable of jitter individual passes if requested

* Added TAA pass. Technically it can be used to antialias anything. Right now we've disabled MSAA and using TAA for stationary as an example

* Added a TAA pipeline on the final image. Added DPR into pipeline resize calls. Struggled a *lot* with different blending results between drawing to the backbuffer and to a framebuffer then copying to the backbuffer. There are still some differences visible

* Edges pipeline

* Edges + TAA + AO + COLOR pipeline

* ShadedView mode

* Visibility is now properly reset when coming from a visibility conditioned pass to an unconditioned one

* Added another version for 'shaded' view, inspired by blender's viewport shading

* Added pen view together with a sample paper like texture for vissual background

* A form of techincal view

* Arctic view. Separate viewport pass from matcap pass

* Cleaned up the ao shader a bit. Formalized progressive ao pass options

* WIP on BasitMode

* Added pipeline switching to the sandbox. Edge pass now has an optional texture background

* Implemented BasicMode using material overrides

* Merged with latest main

* Fix merge issues

* More merge misses

* Stating stream

* Fixed an issue that took hours to debug and it turned out to be a literal typo

* Formalized the progressive pipeline concept which removed a lot of duplicated code

* Added pipeline reseting. Added pipeline passthrough to allow features like measurements to run correctly. Added jitter to depth buffer for progressive AO for much better results!

* Implemented the required stencil passes used for stencil selection as new pass formats. Added them as well as the overlay pass to all pipelines. Will need to automate their addition though

* Fixed stencil selection in pen view. Decided to only show outlines because it makes more sense

* Implemented proper pass clearing values and flags. Also made sure the minimum amount of clears are made inside the frame. Fixed an issue with progressive pass frame counts and indices.

* Formalized options for all passes that had any. Tidied up some shaders and simplified where possible

* Centralized render target creation and removed a lot of render target creation in the passes that had no need for it. Fixed an issue where the matcap material would not not update it's matcap texture properly when rendering in override mode

* Matcap and Viewport passes where merged into a single Viewport pass that can take a matcap texture in it's options. Also, changed the way the viewport shader displays colors, based on three's textureless matcap shader block.

* Updated PassReader extension to work with the latest pipeline. NNowthe pass reader accepts the pass name when reading, so it can used to read any passes

* WIP on MRT

* Implemented DepthNormal MRT pass and used in a pipeline. Working fine on WebGL2.0

* Full Support for WebGL1.0

* Fix for viewport material not updating it's texture properly

* Added an extension that enables hotkeys for view modes

* Fixed jittering for orthographic projections

* Fixed the section tool integration issues with the new pipelines

* Added MRT versions of the pipelines that need it]

* Added a wrapper ViewModes extensions that defines the existing view modes and handles the required check for MRT capabilities and selects the nonMRT/MRT pipelines accordingly

* Error fixes

* Another error

* Added shadowcatcher to arctic and shaded view since it was missing by mistake. Increased the KERNEL_SIZE for arctic mode so that the AO is more smooth

* Disabled pen view background texture

* When reseting the pipeline the jitter index is also reset in order to avoid visible jittering when switching fast between dynamic and progressive mode repeteadly (like when moving the clipping box)

* Quick solution for integrating view modes with per-object operatins like selection and filtering

* View modes now have the ability of overriding the batch's default material instead of all it;s materials. This means that per object material changes like selection and filtering will work together with view modes. Handles WEB-2080, WEB-2083, WEB-2084, WEB-2081 and WEB-2082

* Fiter applies now trigger a hard reset, which is required and fixes a preexisting bug in production. Fixed an issue where the shadowcatcher would incorrectly blend in shaded view mode

* Viewport pass can now render transparency. Arctic mode now renders transparent objects as well (was originally required)

* Forcing the multipel render targets we use for MRT to use a 32 bit depth buffer for proper precision on MacOs Chromium

* Fixed an issue where incorrect visible ranges were being perpetuated when selecting hidden objects (outlines only mode)

* PROPS are not rendered twice anymore and they've been moved to the overlay pass in all pipelines

* Reorganized passes and pipelines. Deleted old passes

* Renamed all new passes. Only the interface and base pass types have a G prepended to make it 100% clear it's different than three's Pass type

* Fixed some compiling errors

* Dont change viewmodes when inputs are being used

* Pipeline gets resized whenever it's set in the renderer. Some other smaller changes

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-10-29 13:30:26 +02:00
andrewwallacespeckle 678c75350c feat(fe2): Update Section Box controls to include visibility (#3333)
* Update Section Box controls to include visibility

* Update reset v-if

* Update shortcut

* Added render requests so that section box updates are made visible

* Remove comments

* Exposed SectionToolEvent in the viewer

* Only show reset when change has been made to sectionbox

* gql

* Make state reactive

* Revert "Make state reactive"

This reverts commit 1697b12cd67d1da6f79658996c8822d1eb962d3b.

* Handles WEB-2039

* Handles WEB-2035

* Changes from call with Fabs

---------

Co-authored-by: AlexandruPopovici <alexandrupopoviciioan@gmail.com>
2024-10-25 10:46:48 +01:00
Alexandru Popovici 4bce48a6d8 Handled WEB-2025 (#3329) 2024-10-17 17:02:08 +03:00
Alexandru Popovici 4b82fb24a4 Viewer now exposes the converter and the render tree. Some members of classes from the loader system are now protected instead of private in order to properly extend them (#3302) 2024-10-16 14:25:40 +03:00
Dimitrie Stefanescu 3ce8dff6da feat(fe2): re-adds syntatic sugar for new properties coming out of revit & sorts selection props alphabetically 2024-10-15 10:36:04 +01:00
Alexandru Popovici 1a2a3d27df Box Rotation (#3205)
* Added rotation to speckle box type objects

* Addded orthogonal check
2024-10-09 12:05:28 +03:00
Alexandru Popovici 4bcf3cc1d9 Highlight no longer breaks existing filtering operations (#3187)
Co-authored-by: andrewwallacespeckle <andrew@speckle.systems>
2024-10-07 16:16:30 +01:00
Alexandru Popovici 5cd9dbd0f0 Fixed le bug (#3127) 2024-09-26 10:58:30 +03:00
Alexandru Popovici 8352aaea15 Fixed an issue where the converter would fail if display valyues were not directly displayable objects (#3075) 2024-09-24 13:56:19 +03:00
Alexandru Popovici e430e55214 Viewer Exports Update (#2903)
* Updated viewer type exports. Added missing types and removed tVector3 and Box3 from three

* Updated import source for Vector3

* Updated viewer-sandbox imports
2024-09-23 15:03:30 +03:00
Alexandru Popovici 2f8efeabc5 WEB-1799: Camera Staying in the same location across models (#2862)
* Fixed the issue with camera controller incorrect zoomToBox when switching between loaded objects. If zoomToBox is requested as non animated, now it actually is non animated. Added a default function to the camera controller extensions which moves the camera to the predefined location/orientation

* No radius is specified as default
2024-09-23 15:03:00 +03:00
Alexandru Popovici f8878b4459 Fixes diffing errors with DUI3 instances (#2869) 2024-09-04 12:00:43 +03:00
Alexandru Popovici 3d96b77340 Fixed WEB-1793 (#2854) 2024-09-03 12:01:14 +03:00
Alexandru Popovici 46bc09eac9 Color Proxy source (#2799)
* Color source implementation for a single level of instancing. I don't like it. I don't believe it's the right way to go

* Forgot this

* Rewritten the way prxy color sources are handled. Nesting instances now works for the most part

* Handled block-block situation from instance nesting

* Added sum comments for color proxy source implementation

* Disabled tonemaping for line materials
2024-08-29 14:42:27 +03:00
Alexandru Popovici 419dbab36d Fixed conflicts (#2764) 2024-08-29 12:34:49 +03:00
Alexandru Popovici 997e80168c Was checking only for undefined, but color materials can also be null (#2718) 2024-08-20 22:32:27 +03:00
Alexandru Popovici ba5e7cb790 Fixed an issue with coloring and filtering with instances which caused improper gradient index buffer accesses (#2681) 2024-08-19 21:21:45 +03:00
Alexandru Popovici cd727e1582 Viewer Color Proxies (#2672)
* Color proxies are now parsed and colors are being assigned. Added the TechnicalMaterial to node render view, which will wrap the colors

* Dropped TechnicalMaterial in favor of MinimalMaterial which is also the superclass(interface) for RenderMaterial and DisplayStyle and only stores a color.

* Fixed a few issues with hashing color materials that made lines and points not get properly colored

* Fixed sandbox error
2024-08-19 21:21:29 +03:00
Alexandru Popovici 76b5964d9d Implemented a separate for object-loader which can be used autonomously (#2647) 2024-08-14 14:01:04 +03:00
Dimitrie Stefanescu 79fc523d9c chore(viewer): adds logger for the case, as per king alex's request 2024-08-06 10:26:53 +01:00
Dimitrie Stefanescu ded5e12279 feat(viewer): handles missing instance components gracefully 2024-08-05 13:48:13 +01:00
AlexandruPopovici 6f0313649f Fixed linting 2024-07-26 15:02:36 +03:00
AlexandruPopovici f1f62ebc09 Addd early return if no material proxies exist 2024-07-26 13:14:53 +03:00
AlexandruPopovici 71746747fc DUI3 render materials implementation 2024-07-26 13:07:26 +03:00
AlexandruPopovici 3e93b1ddc0 Merged 2024-07-22 10:38:02 +03:00
AlexandruPopovici b89ad00a5f URLHelper now uses the auth token for old URLs, if present 2024-07-18 11:42:57 +03:00
AlexandruPopovici c2e8fb2082 Merged 2024-07-18 11:14:31 +03:00
Alexandru Popovici 7c5130d617 Dynamic AO Disabled (#2482)
* Quick hack to disable the visibility of dynamic AO

* Dynamic AO can now be gracefully turned off via options, and any other passes that it required are also turned off so we don't waste GPU time

* ApplySAOPass now has a PASSTHROUGH render mode, where it just outputs the static ao texture sample.

* Added a debug mode to the pipeline when toggling debug passes
2024-07-18 11:02:42 +03:00
AlexandruPopovici 17795259ef Support for lower case 'objects' 2024-07-18 10:39:44 +03:00
AlexandruPopovici 393d08d7af FIxed linting error 2024-07-17 19:31:13 +03:00
AlexandruPopovici 2bd3d5843e More efficient and straightforward DUI3 instancing 2024-07-17 19:19:18 +03:00
AlexandruPopovici 18ab05b140 First draft of DUI3 instancing 2024-07-17 17:13:55 +03:00
AlexandruPopovici 6d4f5abc57 Merge branch 'main' into alex/sRGB-vertex-colors 2024-07-16 16:47:01 +03:00
Kristaps Fabians Geikins 3313787f16 fix(viewer): viewer node16 support + fixing up package.jsons (#2442)
* fix: viewer node16 support + fixing up package.jsons

* lockfile fix

* Removed unnecessary type augmentations. Deleted unused SpeckleCameraControls

---------

Co-authored-by: AlexandruPopovici <alexandrupopoviciioan@gmail.com>
2024-07-15 15:16:13 +03:00
AlexandruPopovici e23d8cdfa0 Fixed the underlying issue. When the camera moves inside the bounds of a TAS batch object and we can no longer get a min dist from that batch object, we just use the fallback emipiric value. Also added an option to display TAS BVH for debuging purposes 2024-07-08 13:44:59 +03:00
AlexandruPopovici f37dce3539 Trying to debug the TAS bvh 2024-07-05 23:09:45 +03:00
AlexandruPopovici a5e77d8d36 Added sRGB->linear vertex color conversion in the geometry converter. Not all connectors may send their vertex colors in sRGB but this is what we agreed we're going to treat vertex color space for now 2024-07-05 13:18:25 +03:00
Alexandru Popovici ccd1c14e09 Threads Undead Patch (#2475)
* Fixed sandbox lint error

* Gave up with trying to enforce a standard basis across camera controller and applications. Now getPosition and getTarget will always be in whatever basis the camera controller is set to be

* No more pre-transformation to (0, 1, 0) for canonical and speckle views and when computin nearest point on geometry

* Reverted transformations from onboarding

* Updated comments

* Fixed the issue where if thread was active at stream load time, the camera position and orientation would be off. This specific issue occured only at startup and it was because the min.max radius for the orbit controls were not yet computed, the frontend calling setView before the orbit controls had a chance to update and compute it's min/max. Also fixed an issue where min distance computation was not using the correct camera positon, but rather the goal position
2024-07-05 10:28:56 +03:00
Alexandru Popovici 36f8e3b651 Increased the scale of the expanded bounds when testing for intersection to better account for BVH intersection point fp precision errors on very small numbers (#2448) 2024-07-02 16:14:26 +03:00
Alexandru Popovici 3c2b0165e5 Soft Pipeline Reset (#2452)
* Simplified a lot from the Pipeline's render loop. UpdateFlags.Render now does not reset the pipeline. Added UpdateFlags.RESET_RENDER which resets the pipeline. Measurements now do not reset the pipeline needlessly

* Fixed sandbox lint error

* Accumulation now starts automatically based on the current accumulation frames count. SectionTool no longer resets the pipeline without a reason. Changing light paramters no longer reset s the pipeline without a reason. Clipping plane updating no longer resets the pipeline, except when the planes are actually set. Highlight and selection now no longer reset the pipeline. Explosion does reset the pipeline

* Fixed sandbox linting error
2024-07-02 16:12:49 +03:00
Alexandru Popovici 15e9ad9462 Oboarding undead-patch (#2456)
* Fixed sandbox lint error

* Added back the polar view and setting it. Changed the onboarding hardoced vectors from Z up to Y up, since that's what the camera controller now requires when setting inline views
2024-06-28 21:05:08 +02:00