-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add LOD mesh support for frontend #6909
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff 👍 Only have some smaller remarks mostly. One cool thing would be progressive rendering per segment (or per segment chunk), but I'm not sure whether the current scene graph hierarchy is suitable for that. Let me know what you think!
frontend/javascripts/oxalis/model/accessors/view_mode_accessor.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I covered all open comments, right? (besides the testing of the constants that determine the current LOD).
But a review of the backend part is still missing, right?
frontend/javascripts/oxalis/model/accessors/view_mode_accessor.ts
Outdated
Show resolved
Hide resolved
The backend changes look more complex than they are. I only renamed a few things (with the help of the IDE), added the one factor to fix the mag scaling (which we tested) and changed the signatures of some things from Int to Long (which we tested). Since backend reviewers are a scarce resource currently, I’d say it’s fine to just ship it. |
Awesome! Thanks for implementing the custom raycaster. This should be a good boost for performance :) Some comments:
const LOD_THRESHOLDS = [0.7, 3];
...
let currentIndex = 0;
while (scale > LOD_THRESHOLDS[currentIndex] && currentIndex < availableLodCount) {
currentIndex++;
if (currentIndex === LOD_THRESHOLDS.length) {
// generate next thresholds as necessary
LOD_THRESHOLDS.push(2 * LOD_THRESHOLDS[currentIndex - 1])
}
}
return currentIndex; (not tested, but I hope the gist is comprehensible) |
But mesh files that do not have version 3 still work and do not disappear, right? Were you able to trigger some kind of bug like this? I assume you mean mesh version 3 files that only have one or two LODs, right?
Thanks for coming up with this heuristic suggestion 🎉 I changed your suggested code a little. Now the custom LOD class maintains a list of thresholds and automatically adds new thresholds if a mesh with a LOD is added that is not supported by the current threshold list. I also tested the mechanism of adding thresholds depending on the LOD count of the meshes. I simply changed One bug I can imagine is that if a mesh is loaded that supports 3 LODs and then a mesh with 5 LODs is loaded, the first mesh will be invisible on very small scales / far zoomed out. But this is a pretty hypothetical scenario right now in my opinion. So I wouldn't tackle this right now. |
I could reproduce the error here with
Awesome!
Yes, sounds okay to me 👍
I think it's a fair assumption for now that all meshes share the same LOD count. Maybe we need to rework the LOD hierarchy in the future, anyway (e.g., to allow that one mesh is rendered in LOD 0 and another one in LOD 3), then this might be solved in the same breath, but let's take it step by step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Let's ship it, I'd say :)
…come-toast * 'master' of github.com:scalableminds/webknossos: Log all details on deleting annotation layer (#6950) fix typo Rename demo instance to wkorg instance (#6941) Add LOD mesh support for frontend (#6909) Fix layout of view mode switcher and move it (#6949) VaultPath no longer extends nio.Path (#6942) Release 23.04.0 (#6945) Use new zip.js version to allow zip64 uploads (#6939) Implement viewing sharded neuroglancer precomputed datasets (#6920) Reject dataset uploads if organization storage quota is exceeded (#6893) Refactor deprecated antd Dropdown menus (#6898)
…wings * 'master' of github.com:scalableminds/webknossos: updates docs for docker installation (#6963) Fix misc stuff when viewing tasks/annotations of another user (#6957) Remove segment from list and add undo/redo for segments (#6944) Log all details on deleting annotation layer (#6950) fix typo Rename demo instance to wkorg instance (#6941) Add LOD mesh support for frontend (#6909) Fix layout of view mode switcher and move it (#6949) VaultPath no longer extends nio.Path (#6942) Release 23.04.0 (#6945) Use new zip.js version to allow zip64 uploads (#6939) Implement viewing sharded neuroglancer precomputed datasets (#6920) Reject dataset uploads if organization storage quota is exceeded (#6893) Refactor deprecated antd Dropdown menus (#6898)
URL of deployed dev instance (used for testing):
Steps to test:
l4_sample/segmentation/meshes/...
. The meshfiles are available in the following slack thread: https://scm.slack.com/archives/C5AKLAV0B/p1674140733622169?thread_ts=1674138004.502719&cid=C5AKLAV0BIssues:
(Please delete unneeded items, merge only when none are left open)