Commit Graph

671 Commits

Author SHA1 Message Date
Alexandru Popovici b337ae348f Measurements Units Fixes (#3741)
* Handles new measurements reverting to meters even if a different unit was previously set. Handles units not changing properly when changing the unit value

* Remove transition to fix select

* Remove unsused import

* Added back snow

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-12-20 22:33:42 +00:00
Alexandru Popovici 6fc7c06e9c Offline Object Loader (#3717)
* Quick hack to demo how an offline loader would work with as little complication as possible

* Further simplified yielding objects in offline mode

* Commented out the URL thing

* Implemented SpeckleOfflineLoader. JSON parsing is implemented at object-loader level, completely isolated from the rest of the implementation in order to avoid regression

* Isolated ObjectLoader creation in base SpeckleLoader class so any extended classes can overwrite the way the object loader is created and used

* Removed the big json sample file

* Updated version

* Removed unused functions from objectloader

* Restored viewer package version

* Fixed typo

* Renamed and moved the sample offline Speckle JSON

* Replaced the default JSON object sample with a much smaller one since we don't want to increase the sandbox's build size by 10 megs

* Fixed a linting error
2024-12-18 17:21:13 +02:00
andrewwallacespeckle 87221cac88 feature(fe2): View mode FE integration (#3651)
* Improve shortcuts

* WIP

* View Mode menu

* Styling updates

* split activeControls

* Reusable Menu component

* Menu updates

* Sun menu updates

* Tidyups

* CommonAlert

* Updates

* WIP change to currentViewMode

* Serialization

* defineModel

* Tidy up emits

* Remove v-model

* Force close other panels

* Remove transition

* More robust isTypingComment

* activeControl > activePanel

* View menu shortcuts

* Explode menu definemodel

* Small changes from Benjamin

* Add colors view mode

* Fix server problem in data.ts

* Fix build
2024-12-12 17:19:57 +00:00
Alexandru Popovici 60ff23d73d Toggle-able Basit Mode (#3672)
* Some updates to Basit Mode. Added it to the 6 key

* Renamed BasitMode to ColorsMode
2024-12-12 15:42:10 +02:00
Alexandru Popovici 9e0e6a9c0d SpeckleInstancedMeshes now recrete their shadow depth material whenever the instance configuration changes (#3681) 2024-12-12 14:37:39 +02:00
Alexandru Popovici e7613a60d7 Fixed TAS Shapecast (#3661)
* Fixed the issue where TAS only shapecasts were not running properly on all batch objects, missing some of them. Some small updates to BoxSelection

* Improved shapecast travesal time 4X. Only passing batch objects only once to intersectTASRange and also added the builtin CONTAINED acceleration to bounds testing.

* Some critical typescript errors

* Added missing types from export
2024-12-10 11:29:05 +02:00
Alexandru Popovici 0fd5e2b9ef WEB-1611: Zoom to Cursor Fix (#3562)
* Added FilterMaterial and related types to export list

* Handled WEB-1389

* Camera orbit controls now takes the offset position and size when computing zoom to cursor coordinates. Fixes WEB-1611
2024-11-26 20:56:49 +02:00
Alexandru Popovici 003ac46e58 WEB-1683: Selection Extension Fixes (#3559)
* Added FilterMaterial and related types to export list

* Handled WEB-1389

* Handled the issue
2024-11-26 20:56:36 +02:00
Alexandru Popovici e739ee1b27 WEB-2171: Non-Speckle Materials Fix (#3558)
* Added FilterMaterial and related types to export list

* Handled WEB-1389

* Non speckle materials no longer throw an error
2024-11-26 20:56:19 +02:00
Alexandru Popovici 68bbedcd92 WEB-1389 (#3555)
* Added FilterMaterial and related types to export list

* Handled WEB-1389
2024-11-26 20:55:53 +02:00
Dimitrie Stefanescu eab2391353 feat: adds compat for upcoming dui3 changes 2024-11-22 17:36:33 +00: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 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