* Handled WBX-55
* Fix for WBX-53
* Fixed WBX-160
* Fixed an issue with section box comments where an unwated margin was applied. Fixed an issue where objects were not sliced when opening a URL that had a comment + section box. Fixed an issue where the object with a comment attached would not select when opening it directly from a comment URL in FE2
* Fixed WBX-132
* Implemented shuffling for point batches
* Points are now drawn indexed. This is needed in order to implement shuffling for point batches, to allow for best runtime performance in scenarios where the baches are split into multiple non-flat-able draw groups
* Implemented draw range flattening before sending over to be set in batches. This reduces execution time significantly especially in scenarios where a lot of objects need to change material at once. Implemented batching of draw ranges in SelectionExtension when reseting a selection. This makes un-selecting significatly faster when a lot of objects are involved
* Added a note
* Implemented selection by using the new extentions paradigm. Seems to be working fine, and it's more straightforward
* Implemented the camera controller core extension. Still WIP but it's working
* Fixed some issues in the progressive pipeline triggering caused by removing all camera controls from the renderer
* Renamed ICameraController to ICameraProvider. Simplified a bit the camera controller extension
* Implemented the concept of Providers and simple dependancy injection for extensions which need functionality defined inside other extensions.
* Added events to the ICameraProvider which replace the old camera events delegate. SectionTool is now an extension which replaces the old section box. Still WIP
* Input now emits input related events which can be used by extensions, core or clients directly. SectionTool extension is mostly working,including all it's gizmos and default behaviours. What's left is the interaction with core regarding clipping planes updates
* Removed legacy sources and code
* Finished with the section tool extension. Finished with the section tool outlines built as another extension which requires the section tool extension as a provider
* Added optional forge style mouse hover effect on objects. Included it in the selection extension
* Ignore null draw range id when removing
* WIP on allowing more flexibility for material configuration in the core
* Added rendering stats collection for better profiling of the current draw group managements
* Shuffling IBOs for maximum draw call efficency now works correctly for our new draw group management approach. Also this process is now automatic and it happens when the draw group getsfragmented above a configurable point
* Fix some monstrous bugs with index buffer shuffling now that we've changed our approach a bit.~
* Finished with the new material management approach for mesh batches. SelectionExtension now uses this approach and also considers existing material opacities when setting select and hover materials
* Updated LineBatch to work with the new material management approach
* Implemented the required draw range related changes to the point batch
* Text batche now work with the new material management
* SpeckleLineMaterial and SpecklePointsMaterial are now SpeckleMaterial as well. Had to rename two properties of SpeckleMaterial due to some typescript named property clash thing, but nothing really changed
* Removed eslint-disable clauses in materials where they were no longer needed. Removed unused imports and overrides
* Added the RTE define for some materials by default. It can still be overriden if users want to
* Stencil outlines is now an toggle-able option for any SpeckleMaterial. Restricted to meshes
* Implemented setting desired material for all geometry types via RenderMaterial and DisplayStyle data. SpeckleRenderer now has three overloaded setMaterial function. One for a material instance, one for a filer material and one for RenderData&DisplayStyle. Moved material hash related functionality from NodeRendeView into Materials
* Added MaterialOptions which can be used when setting materials based on RenderMaterial/DisplayStyle to toggle various material features like stencilOutlines, pointSize. SelectionExtension now uses data material to set materials, and things are so much more simpler and nicer
* Added public method for setting seletion extension options
* After some profiling, realized three.js was doing a lot of pointless work each frame so now we're caching materials created from RenderMaterial/DisplayStyle to avoid this. Perf is nice and sharp now
* addRenderTreeAsync is now a generator. Handled automatic zooming on viewer loading. Disabled section tool by default
* Centralized RTE and shadow RTE buffer in an extended webglrenderer. This avoids re-computing rte data for each material over and over. Also, rte data is now centralized and available to materials
* SpeckleMeshes now use a cached material clone as their batch material like any other material they use
* Cleaned up Materils. Updated the debug show batches function use the new material manipulation system. So much easier now
* Real time measurement exist now as a separate extension. Existing functionality preserved, besides one or two small additions. Renamed the MEASUREMENTS object layer to OVERLAY for a more generic usage. SelectionExtension can now be enabled/disabled. Added an additional overload to the setCameraView method in ICameraController which takes a box3 as target to focus the camera on
* Removed viewer related events from input and replaced them everywhere with the proper input event types where required
* Fixed two issues with the shadowcatcher. One was a regression introduced after we centralized the RTE data. The other was a super old one one and was essentially causing the shadowcatcher to generate the contact shadows incorrectly because the correct transform textures were not bound (this is three.js being a pain)
* WIP on the filtering extension
* FilteringExtension is done. Kept the same implementation
* Added filter reset function
* Removed uniform texture and batch count binding from each material's OnBeforeRender function. Additionallit our material override function from SpeckleMesh now uses our fast copy instead of three's copy function for materials. This decreased CPU overhead each frame by 20+% and also eliminated the ugly call to SpeckleMesh's function for updating the material with the transform texture and batch object count from each material's render callback which was not supposed to be there
* Update RenderingStats to measure CPU render time per frame.
* Added early and late update functions for extensions. First gets called before the core's update, and the latter afterwards
* All speckle materials now use the centralized RTE data. Updated the fasts copy method to copy userdata defined uniforms where needed
* Added explosion extension. Additional cleanup
* Dirty transforms are marked on a per batch object basis, whenever their transforms gets changed. This automates the transform texture update execution, so we no longer need to manually mark entire batches as dirty
* Added getObjects which returns all batch objects in the scene and getObjects which takes an rv an returns only the batch object associated with that rv. Both of these methods are availale on the renderer
* Added setters for position, rotiation and scale in batch object
* Diff extension is complete. We stuck with creating material instances and using those for coloring since it ensures maximum draw call efficiency. Fixed an issue in MeshBatch where transparent draw groups were not always sorted at the end of the group list leading to incorect opauque object selection during the depth pass
* RV batch materials are obtained via the viewer-core API based on the RV itslef. This removed the need to get all batch materials for the differ
* Small cleanup
* Removed all circular dependencies besides one, like I predicted. The final one will dissapaear on it's own in the near future when we'll gracefull make DataTree obsolete. As a note, the circular dependencies were very shallow, reffering to enums/interfaces/statics declared in specific files. There was no real circular dependency on a class level
* Removed last circular dependency just for the sake of completion
* SpeckleRendere now has a clipping volume which is used internally to reject picks outside of it, and it's also exposed to the outside world to be used however
* Implemented the SpeckleLoader along with it's abstract supertype. Data loading is now done through this loader which handles tree population with raw data as well as render view data.
* Working minimal obj loader
* Added total node counting and displaying
* Viewer's load object now takes a loader of any speckle loader base class and uses that to load, instead of taking urls and tokens. This allows for any kind of loader to work with the vieweer's load function. Moved indexing of obj geometry to the obj geometry convertor. Loaders now take the target world tree instance instead of a viewer instance
* Loaders can now load from string and array buffer data where implemented. ObjLoader can now load from a string payload. Sandbox can now load obj files from the UI using a file picker
* alex/API2.0-core
* Started on #1673. Fixed an issue with walkAsync where the recursive generator would waste too much time idle.
* Solution for #1673. Replaced the old async pausing approach with a better version that has true variable wait time, and does not add additional dead wait time. Render tree building is now several times faster
* Cut down some more on load time by using a lookup table for determined speckle types. For a very large number of objects, getting the actual speckle type was quite slow. For our reference stream with 1kk objects we cut down around 2 seconds of load time
* BoxFromObjects now returns the correctly transformed aabb
* Implemented optimisations for batch building step from the loading process. Reduced the step's time by around 50%
* Implemented a NodeMap which allows us to search for nodes very very fast.
* Added a dynamic pause in the loader which stops the converter from blocking. Paramater object types are not added as nodes anymore. Callback from converter is not without arguments
* Replaced some internal walks with the newer and much faster id finding approach
* Disable object shallow cloning acrss the speckle converter
* Fixed the issues with block instances and revit instances caused by not duplicating speckle objects in the converter
* getObjectPropertis is now async and slightly improved the execution time of the flatten function which it uses
* Set caching to true by default
* Fix for display style hashing
* Implemented legacy viewer as a wrapper around the old viewer API
* Started testing FE1 with API 2.0. Fixed some legacy issues. Also the camera controller extension now exposes it's underlying controls object for the sake of not messing around with unwatend changes in FE1
* Updated FE1 with API2.0 selection changes
* Fixing selection bugs
* The viewer now ignores duplicate id nodes
* Fixes to object properties population, camera zooming and adding subtrees in core
* Fixed some filtering issues. Added UpdateFlags to the viewer's requestRender function
* Fixed an issue where section boxes were incorrectly added to the URL
* Objects with no id are not given nodes into the tree
* Updates to FE2 for API2.0. Also fixed a really really obscure bug in viewer-core where a material an incorrect material was set when reseting the batch to the default material
* We now store separate node maps for each model loaded. Each node now holds it's subtree id (as a small number for memory considerations)
* Render request after updating the visual diff
* Fixed some missing update calls on shadows
* Reverted FE1 changes and pinned the viewer library to a specific (latest) version pre-API2.0
* We're adding a viewer node for loaded models as subtree parent. This is because we're no longer spoofing ids and the model parent id needs to be preserved
* Fixed an issue where clicking on a comment bubble made the pipeline use accumulation improperly, leading to dark blight
* Null check for setMaterial. Fixed another case of dark blight. Hack required by frontend
* Fixed the issue with filtering state not propagating in the FE
* Updated selection event changes
* Fixed an issue where an undefined subtree id would yield an incorrect render tree upon requesting it
* Fixed an issue where undefined nodes were returned as valid when searching of ids
* NodeRenderView now holds it's subtree id along the speckle id. This allows for precise node matching when looking for specific nodes
* Fixed an issue with BlockInstances not instancing underlying meshes from breps
* Some fixes to diffing. Some older than API2.0, some new. Render views now have guid composed of their id and subtreeid.
* Update node render view id with guid where needed
* Unload function now checks for requested resource to unload before trying to unload it
* Check for the existence of a batch before applying draw ranges. Inthe FE, extension can temporarily keep dead rvs in their state when switching between streams leading to errors
* Fixed an issue for filtering where subtree roots would cause incorrect rv additions to the ghosted rv lists
* Unified block instance and revit instance conversion implementation
* Separted instanced from non-instanced rvs. Working on InstancedMeshBatch
* WIP on instanced types
* Implemented visual for box draging
* BoxSelection extension beautified and documented along with some small but welcomed changes to the viewer-core
* Viewer's getExtension now looks in the prototype chain before returning an undefined extension
* Added the extended Selection extension here for possible later use
* First iteration on instancing. General idea works. Still WIP on several fronts
* Fixed issues related to incorrect transform being calculated for instanced geometry. Fixed an issue with incorrect bounds being calculated
* Fixed a few issues with instanced vs non instanced render view gathering
* Disabled box selection extension
* Fixed some linter errors
* Disabled a lint 'error'
* Fixed issues with depth rendering and instanced objects and fixed draw range visibility for instanced batches in a minimalistic way
* Updated the measurements extension with the visiblity option
* Restructed a bit our implementation for the acceleration structure because now the BLAS needs to aggregate an instance of three-mesh-bvh not extend it. So that instanced batch objects can share a single bvh instance -> no redundancy
* WIP
* Revert "WIP"
This reverts commit 20d4bbf6210b0d37b956cc5b41fdb06f29845b4f.
* More WIP on trying to make instanced geometry TAS and BAS work properly
* Both Tas and Bas intersection testing seem to working fine. Now we need to implemented draw grouping for instanced mesh batches
* Added draw group management to InstancedMeshBatch. It works in the same manner as for non instanced batches, but the offset value refers to instances not triangles. I believe it could be simplified, but I'd like to get it up and working first
* Draw groups need to hold the index and count from the instanced buffer attribute
* Added array shuffling to the instanced mesh batch using the same approach we used for the non instanced one.
* Instanced batches now dynamically add InstancedMesh objects based on draw groups and a computed transform buffer
* Applying draw range updates for instanced batches now works. Still some issues to handle. It aint much, but it's honest work
* Disabled some more RTE until setting visibility for draw ranges is finished
* Moved getting opaque, transparent and stencil draw ranges out from Batcher and on to a per-batch basis. Now instanced batches correctly apply draw ranges and get their opaque, transparent and stecil ranges
* Fixed an issue with setting the visibility ranges for instanced mesh batches
* Instanced attributes for instanced meshes now no longer allocate
* Shadow depth material for instances is now set in the speckle renderer
* R-enabled RTE globally. Made instancing work with RTE. Made instancing work with both RTE and shadowmapping.
* Fixed an issue with materials building up in the mesh batch's cache incorrectly
* Implemented gradient indexs attributes for instanced batches. Thismeans, any color ramp based material like the ones we use for filtering now works
* Changed the way compound ids are created for instances, so that less memory is required. i.e chrome is not crashing anymore on particular streams
* Implemented reseting the draw ranges for instanced mesh batches. We no longer double buffer the gradient index buffer. We just create a new one when shuffling, populate it, then copy it over at the end. We're still double buffering the transforms buffer since that one is larger and we might not want to allocate it each time we shuffle
* Removed references of draw groups with ids since we're not doing that anymore. Fixed an issue with mesh batches where the material cache would keep piling materials incorrectly
* Several issues with selective transformations on instanced batches fixed.
* Added default null materials for instanced meshes both with and without vertex colors
* Got rid of the patched InstancedMesh because it was ridiculously slow. Instead we're now computing the scene box using our acceleration structures where available and three.s boundingbox where not available
* Minor, yet big regression fix
* Fixed regression
* Exported some extra types
* WIP on instanced balancing
* Instanced objects under a certain threshold now get batched together as regular mesh batches
* Forgot to update the rvs aabb
* Unified instanced and non instanced batch creation. Instances which do not qualify for instanced batching anre now mixed together with the rest of the non instanced batched objects
* Added some timing information to instanced batches
* Fixed an issue with zooming in on objects not working in the selection extension. Fixed an issue with object picking failing due to fp precision for objects right at the edge of the clipping volume.
* Removed logs
* Update stream moving via UI
* Removed the priority argument from loadObject since it's not needed anymore
* Updated LegacyViewer
* Fixed an issue with API 2.0 where the legacy form of transforms with only an array of values as the matrix would not work
* Updated FE1 viewer package to latest before API 2.0
* Disabled selection when measurement mode is on
* Updated ibl params updating
* Fixed an issue with measurement text not showing up
* Logs
* lockfile
* Sped up diffing by several orders of magnitude. Also started on a different more fancy approach to diffing involving boolean operations on object maps
* Finished with boolean version of diffing. Improved the speed of both by 50% on top of the previous speed improvements
* #1690 Completely transparent objects are ignored during picking via a toggle-able flag in renderer
* After removing inserted draw ranges, materials associated with it are removed as well from the material array
* Solid color diff materials are transparent only when their opacity is lower than 1. This fixes the issue of not seeing the selected material on filly opaque diffed materials. However, for dif times <1 and > 0 the selected material will blend with the diff material. If this proves to be an issue we can look further into it
* Update clipping planes after selection
* WIP on measurements. Got some basic functionalities going
* New update for measurements. We're no showing multiple lines towards the measurement endpoint for better reference. Added dotted lines. Added text. Added measurement end and start points. Added the possibility to add multiple measurements.
* When double clicking, Input will not ignore the second click and will not send a click event. It will send the first click event, then a double click event. Implemented auto perpendicular measurement by using double click
* Added the option to have fixed sized measurement gizmos. As in, the are the same size regardless of the camera zoom. Implemented gizmo styles which lets us control and change at runtime the way the gizmos look. Currently they're only programatic, but I'll add controls for them in the sandbox next
* Implemented measurement management. Added picking, cancelling, removing and highlighting of measurements. Measurements are all now on their special ObjectLayer
* Added frame lock, so mouse events do not trigger intersection tests more than once per frame for the measurements. Added opacity options in the measurement gizmos. Made the end gizmo line transparent by default. Added preprocessor macro in the line shader which enables opacity as a uniform as opposed to attribute only like we had it before
* Point is now fixed size when style imposes it
* WIP on text aligning with the line. Still needs some things to be clarified since it can get complicated. Fixed some color issues. Added a maximum constraint to the screen space gizmo sizes. It's empirical, but seems to be workign decently for the all the various stream sizes I've trid
* Measurement gizmo now flashes red a few times if requrested to auto-lazer and no intersection was found
* Added unit conversion to measurment text, unit display and precision
* Implemented proper billboarding (fixed size and non fixed size) in the text and basic vertex programs as well as support for them in the text and basic speckle materials. Overhauled how the measurements look based on the forge reference
* Split measurements by type and added an abstract superclass. Point to point measurement has it's own implementation now
* Implemented screen space snapping for point to point measurements. Text background now gets dyanamically resized when needed
* End point gizmo is now only shown when required
* Added clamp guard to acos since dot can return outside of [-1,1] due to fp precision issues. Fixed an issue where existing measurements could be selected in the process of creating another measurement
* Added function for adding measurements programatically. Currently only start and end point make sense as measuremetn data
* Added an 100nm offset from the original point along the surface normal for auto-lazer function because sometimes it would intersect itself and report incorrect length
* Separated all measurement related rendering into a separate 'Overlay' pass. We now have better control over the rendering order of the individal elements of the measurement gizmos. This fixed the issue of having the measurement line overlap the end points
* Billboarded shaders now also work correctly with section planes
* Measurement tool no longer considers surfaces clipped by the section box
* Implemented correct raycasting for billboarded and fixed sized bibboarded objects, like the measurement's text
* Implemented zooming in to measurements when double clicking
* Big update to measurements which addresses most if not all requirements regarding UX/UI, API, and generaly functionalities. Additionally, a fix or an ancient issue in Units where kilometers were incorrectly calculated, and added automatically resolution updates to the SpeckleLineMaterial
* Added dpr factor into billboard size calculations. Fixed an issue with the round rect geometry generation function which would fail on macos. Added the billboard text background size into the text's style so it's configurable
* Text can now be updated for perpendicular measurements also when in it's complete state
* Fixed an exception which was thorwn when double clicking on another measurement while measuring
* When changing the measurement type while the measurement is still in it's dangling start state, the measurement gets cancelled and a new one with the new type gets started. If the measurement is in it's dangling end state, then it does not. This is now forge viewer does it
* Implemented screen space surface normal indicator line
* Measurements now work on visible and non-ghosted objects. Removed the surface normal indicator from the point to point measurement
* Fixed an issue with orthogrtaphic camera and NDC normal computation. Implemented fixed sized gizmo disc for orthographic camera
* Fixed an issue where the pipeline would not get properly reset after zooming in orthographic mode
* Fixed some regressions with the pre-existing application measurements functionalit and text. Fixed an issue where auto-lazer measurements were not vertically centered.
* Replaced the full blown copy method from SpeckleMesh's cached material with a faster version which *should* work just the sam
* Added optional copying of cached materials defaulting to false
* Implemented the option to insert draw ranges in batches. This is how selecting objects now works in order to avoid re-applying existing filters pointlessly. The onyl downside is that this introduces extra draw calls and overdraw, but it does not interfere with the existing draw range setting systems. We do make an attempy to minimize extra draw call count which works for most scenarios. With this change, we've removed selecting/unselecting objects from the generic setFilters approach in FilteringManager
* Apply any pre-existing selection filter after applying the rest of the filters
* Improved 'setNumericColorFilter' and 'setStringColorFilter' function performance by 10x. The culprit was calling 'indexOf' in the tree walk callback which apparently is very slow even for arrays with only a few thousand elements. By using direct indexing we eliminated the ridiculous overhead
* Performance increase of about 20x to isolating, hiding, unisolating and unhiding. Still WIP, the UI got messed up a bit
* Correct length of visibility ids
* Fixed an issue with un-isolating and un-hiding
* Did the same thing for highlight as I did for selection, where we take it out of the setFilters flow and apply direct filters on the rvs
* Removed timings
* Small fix for color filters
* Implemented inserting and removing draw ranges from the line batch
* Implemented draw range insertion and removel for the point batch
* Implemented draw range insertion and removel for TextBatch. Fixed an issue with inserting draw ranges in the batcher
* Fixed diffing colours which got screwed during this PR. Additionally made an even faster version for copying materials which has virtually no overhead
* WIP on measurements. Got some basic functionalities going
* New update for measurements. We're no showing multiple lines towards the measurement endpoint for better reference. Added dotted lines. Added text. Added measurement end and start points. Added the possibility to add multiple measurements.
* When double clicking, Input will not ignore the second click and will not send a click event. It will send the first click event, then a double click event. Implemented auto perpendicular measurement by using double click
* Added the option to have fixed sized measurement gizmos. As in, the are the same size regardless of the camera zoom. Implemented gizmo styles which lets us control and change at runtime the way the gizmos look. Currently they're only programatic, but I'll add controls for them in the sandbox next
* Implemented measurement management. Added picking, cancelling, removing and highlighting of measurements. Measurements are all now on their special ObjectLayer
* Added frame lock, so mouse events do not trigger intersection tests more than once per frame for the measurements. Added opacity options in the measurement gizmos. Made the end gizmo line transparent by default. Added preprocessor macro in the line shader which enables opacity as a uniform as opposed to attribute only like we had it before
* Point is now fixed size when style imposes it
* WIP on text aligning with the line. Still needs some things to be clarified since it can get complicated. Fixed some color issues. Added a maximum constraint to the screen space gizmo sizes. It's empirical, but seems to be workign decently for the all the various stream sizes I've trid
* Measurement gizmo now flashes red a few times if requrested to auto-lazer and no intersection was found
* Added unit conversion to measurment text, unit display and precision
* Implemented proper billboarding (fixed size and non fixed size) in the text and basic vertex programs as well as support for them in the text and basic speckle materials. Overhauled how the measurements look based on the forge reference
* Split measurements by type and added an abstract superclass. Point to point measurement has it's own implementation now
* Implemented screen space snapping for point to point measurements. Text background now gets dyanamically resized when needed
* End point gizmo is now only shown when required
* Added clamp guard to acos since dot can return outside of [-1,1] due to fp precision issues. Fixed an issue where existing measurements could be selected in the process of creating another measurement
* Added function for adding measurements programatically. Currently only start and end point make sense as measuremetn data
* Added an 100nm offset from the original point along the surface normal for auto-lazer function because sometimes it would intersect itself and report incorrect length
* Separated all measurement related rendering into a separate 'Overlay' pass. We now have better control over the rendering order of the individal elements of the measurement gizmos. This fixed the issue of having the measurement line overlap the end points
* Billboarded shaders now also work correctly with section planes
* Measurement tool no longer considers surfaces clipped by the section box
* Implemented correct raycasting for billboarded and fixed sized bibboarded objects, like the measurement's text
* Implemented zooming in to measurements when double clicking
* Big update to measurements which addresses most if not all requirements regarding UX/UI, API, and generaly functionalities. Additionally, a fix or an ancient issue in Units where kilometers were incorrectly calculated, and added automatically resolution updates to the SpeckleLineMaterial
* Added dpr factor into billboard size calculations. Fixed an issue with the round rect geometry generation function which would fail on macos. Added the billboard text background size into the text's style so it's configurable
* Text can now be updated for perpendicular measurements also when in it's complete state
* Fixed an exception which was thorwn when double clicking on another measurement while measuring
* When changing the measurement type while the measurement is still in it's dangling start state, the measurement gets cancelled and a new one with the new type gets started. If the measurement is in it's dangling end state, then it does not. This is now forge viewer does it
* Implemented screen space surface normal indicator line
* Measurements now work on visible and non-ghosted objects. Removed the surface normal indicator from the point to point measurement
* Fixed an issue with orthogrtaphic camera and NDC normal computation. Implemented fixed sized gizmo disc for orthographic camera
* Fixed an issue where the pipeline would not get properly reset after zooming in orthographic mode
* Fixed some regressions with the pre-existing application measurements functionalit and text. Fixed an issue where auto-lazer measurements were not vertically centered.
* Font loading (hidden under a .png for now). Simple experiments with rendering text
* Added some text rendering tests. WIP on billboarding
* Added tests using troika-text-three library which uses sdf font textures instead of generating text geometry
* WIP on supporting speckle text objects
* Some more work on speckle text object integration. Worked on text materials, text batch and text object. We're now rendering basic text
* We're now rendering the text for various dimension types. Changed text to use display style first, since that's the one that contains it's color.
* Implemented text selection. Text can now be selected and works the same way every other speckle objects works when selecting
* Implemented the rest of the filtering features for text.
* Batch building can now be async. Building text batches needs to be async because that's how the troika libary works. Fixed an issue with the section box not clippin text properly
* Removed dummy text geometry data from it's RenderData. Enabled render views with metadata to count as valid. getRenderableRenderViews now returns nodes with metadata as well. Text now supports proper unit conversion. Text now is being displayed correctly(-ish) when inside blocks. Autocad text is now being displayed
* Fixed an issue with curves doubling up on geometry and also not being selectable after the last filtering changes. Added the options to make lines transparent. Added lines to diffing
* Points now are diff-able and support proper visual diff-ing. Visual diff filters are now chosen internally by the Differ. Fixed an issue with LineBatch and transparency
* Implemented PLAIN visual diff mode, where all objects keep their original materil, but opacity is manipulated via the diff time. Added API member function to switch between the PLAIN and COLORED visual diff modes
* Diffing fixes for instances and blocks. Things seem to be working fine, but there are some caveats. Additionally, some older issues were fixed and diffing now works better on all the rest of the streams
* Fixed the diffing issues with revit instances and hosted elements and nesting, etc. SetUserMaterial now accepts an optional list of rvs to apply the filter to, instead of figuring out the rvs itself.
* Started implementing the TAS by using the same BVH library and solid bounding boxes as dummy geometry. It works great so far, we're almost at 10X faster than without it. Still needs a bit more work put int the details
* Implemented shapecasting with the TAS in a fairly efficient way. This means that our current application for shapecasting, the section outlines, are much faster to generate now.
* Implemented TAS refiting whenever batch objects change their position/rotation/scale. It's sufficiently fast. The refiting process itself is very very fast on the TAS, the thing that slows it down a bit is all the matrix multiplications. We can speed those up via micro optimisations
* Replaced default three.js box geometry construction with a bare bones one since that's all required for our TAS
* Used buffers in the occlusion query solve to avoid pointless vector creation
* Some small changes and renames
* Changed the section box helper to use Box3Helper instead of BoxHelper beacuse Box3Helper always uses vertex positions relative to world origin and stores the transformation in it's world matrix which it never uses inside the vertex program, hence no floating point imprecision. The worldView matrix which it does use, has as a result small values essentially working like RTE. It will only work for relatively small objects, though and if we have large box helpers far away from origin it, we will begin to see jitter. However, this is just a visual helper, so I'm fine with that caveat
* Reported bounding box the the TAS is it's own BVH bounds now, not te cummulated BAS bounds like before. It's much faster this way
* Limited object explode transform calculation to exclusevely 1 per frame, since UI events coming from sliders and such tend to create multiple events per frame, leading to us computing millions of transformations pointlessly.
* The TAS leafs now only have the minimum possible of 8 vertices and 12 triangles. This sped up BVH operations a bit
* Considerable speedup for ray-TAS intersection by eliminating the need to iterate over all contained batch objects to determine the intersected one by comparing the intersection result vertex index. We can simply compute the intersected one since they are built in order with a constant stride between them inside the vertex array
* WIP on naive diffing
* WIP on animating modified objects after diff
* Some more work on this
* Default building
* Removed and added now get opacity transitions as well
* Updated starting model
* Implemented two 'subpasses' in side the color pass, where opaque and transparent draw groups are rendered individually. Disabled double side depth rendering when visual diffing, to avoid AO generated by backfaces, visible through transparent diffed objects. Removed previous hacks
* Finished with cleaning up diff-ing related viewer functionality.
* Implemented UserMaterialState into filtering manager, as a 'sticky' filter which always gets applied before any other filters, until removed. Visual diff-ing and undiff-ing now go through the filtering manager so other filters can be stacked on top of it
* diff API function now checks to see if the diffing streams exist, if not, it loads them, computes the diff and applies the visual diff all in one call. Added undiff in the API which removes all the diff related sticky filters. Added setDiffTime in the API. DiffResult now holds modifiedOld and modifiedNew speckle objects in the same member as 2 item sequential arrays
* There was an unreported git conflict in one of the shaders. Fixed that
* Fixed an issue with HDRIs not generating proper PMREMs over multiple viewer instances
* WIP on makign the world tree multiple instanced
* The WorldTree is no longer static. Each viewer has it's own instance and it hands it over to whoever needs it.
* Fixed an issue with filtering and the new non-static tree. Also removed the 'root' key from the NodeData structure since it's not needed
* Added an guard when building batches for situations where all render views have invalid geometries. This generally means there is somethign wrong with the stream itself
* multi-viewer css fixes
---------
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
* #1051 Implemented batch splitting based on a configurable mximum batch vertex count and configurable maximum batch object count. We're not splitting single objects though since that's not required right now and will do it when the need arrives
* Implemented dynamic batch object transformation using all available vertex uniforms.
* Fixed batch object index buffer size
* Added debug per object movement for debugging
* WIP on texture based object transform
* Finally fixed a bug which was making three.js use the same shader for multiple batches, and thus messing up individual obects transforms
* Integrated shadows, AO, depth, and selection material with the recent batching changes.
* Implemented per object BVH building and correct intersection testing when each object has its own transformation
* Implemented BatchObject which holds the single source of truth for individual transformations, it's BVH and some other WIP things
* Restructed how object level and batch level BVHs are constructed and used. Also added a bounds check for intersecting the batch level BVH (which is not really a bvh, just a flat list of small bvhs)
* Shapecasting now provides the intersected BatchObject inside the callbacks, so required data could be fetched from it. SectionOutlines now work correctly
* Fixed some issues regarding the shadowcatcher and the colored and ghost material uniform updates
* Fixed an issue with colored material and shadows. Restructed how speckle materials are defined and extended. This removes duplicate code as well as duplicate functionality. Implemented fro the standard material, still need to do it for the basic material
* Removed unused material and shaders
* Custom material defintion and extension MK2
* Improved the RTE and TRANSFORM_STORAGE shader blocks for minimal redundancy. Updated all shaders. Updated all materials to MK2. Still need to find a way to avoid some boilerplate code in the base materials
* Fixed an issue where three was incorrectly frustum culling objects
* Fixed the issue where depth material programs were getting ignored for batches with same object count, leading to incorrect depth
* Removed the need to have a preprocessor define for 0BJ_COUNT inside the batched shaders. This eliminates the extra startup time taken by all the program compiles. In order to do it, I had to drop using the scene override material in the depth pass. Instead we're applying the override material before the pass render on each objecti individually
* Added a generic method for overriding the batch's material, which can be used by any pass. Added a material cache for each batch so that we don't need to clone materials more than we need to. Fixed an issue in the depth mateial clone function which made three not update our uniforms (this happens so often I'm getting sick of it). Filters now use cached material so they work correctly
* Fixed a dreaded three.js bug where it would sporadically not update our custom uniforms for reasons unknown
* Finally managed to get mixins working for out material system. With this, we avoid needing to write duplicate boilerplate code for all speckle base material types. Only applied it to SpeckleStandardMaterial because I want to test more before I adopt it globally. Implemented our custom material overriding approach to the stencil and stencil mask passes.
* A lot of dead brain cells. Transforms and RTE and BVH and all them things work correctly, with the exception of transforming around a point very far from origin. That will cause jitter because we end up multiplying large floats
* Managed to get RTE working properly with individual object transforms, transforms around random pivot. Fixed an issue caused by the fact that three-mesh-bvh messes up the bounding box of objects very far away from origin. Worked around it. WIP on cleaning things up
* Solution for object transforms in a real RTE context (far from origin). First pass on cleanup. Solution will be applied to the rest of the shaders in the next commit
* Updated WebGL 1.0 transform texture sampling and matrix array transform fallback
* Updated all shaders with object transforms RTE solution
* Updated remaining materials to the new mixin'ed approach implemented a little while ago. This removes a ton of boilerplate repeated code
* Update the normals pass. Simplified and removed reduandant batch update ranges from the before/after pass callbacks
* Reorganized BatchObject so we're not wastefull with matrix and vector instantiations
* Added explode function in the viewer API
* Enabled cleaning of redundant geometry
* Some html crap
* Fixed an issue with filtering out invalid render views. Removed the red sphere of doom (forgot it in). Fixed an older issue (not related to this branch) where instance points were deleted while still being shared by other lines, yielding invalid lines
* Fixed ShowBatches
* Fixed some sandbox related issues and improved qol
* The ObjectLoader and ViewerObjectsLoaders are disposed upon loading complete.
* Added viewer parameter for keeping or discarding original geometry data. Defaults to discarding it. WIP on mesh and point cloud implementation for actual discarding it
* Geometry data from raw nodes is now disposed after building their reder views
* Removed raw geometry data from points and lines
* Removed the float64 array which was persisted pointlessly by the section plane outlines feature. Also fixed a bug for this feature regarding resizing the point buffer and RTE
* Implemented BVHs in local space, relative to world origin. This cuts down on it's redundant memory footprint by half
* Implemented SpeckleMeshBVH which completely hides the RTE-related transformations that we're making to reduce memory footprint.
* Added some clarifications to the SpeckleMeshBVH class
* Extended the ObjectLayers on a per geometry type basis. We can now restrict intersections and rendering based on geometry type (mesh, line, point)
* Disabled geometry type based filtering of opaque/transparent/stencil objects in the batcher, since we're using separate object layers for the geometry types now
* Fixed and issue with OR-ing layers
* Implemented async walk for the world tree. Implemented asyn render tree building and async batch building. Implemented progressive loading
* WIP tree walk async that actually works using a generator
* Async walking now properly works and can be interrupted
* Properly working async walk
* Added loadObjectAsync function in the API which should be used if stream loading needs to be cancelled and for 'progressive' loading. Added a priority argument to the loadObjectAsync and to walkAsync functions which makes the async-iness so to speak configurable.
* Refactored the sync and async subtree batch building to remove duplicate code. Changed some logs for better clarity
* Fixed an issue with point clouds and material creation
* 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
Co-authored-by: Alex <alex@192-168-0-157.rdsnet.ro>
* Added a verbose flag in the viewer params. Default is false and it's equivalent to the ERROR level
* Piggybacked the original pointer event into the SelectionEvent