Skip to content
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

Update 3D meshes when painting #1

Closed
3 of 5 tasks
hanslovsky opened this issue Apr 26, 2018 · 3 comments · Fixed by #46
Closed
3 of 5 tasks

Update 3D meshes when painting #1

hanslovsky opened this issue Apr 26, 2018 · 3 comments · Fixed by #46
Assignees
Labels
critical enhancement New feature or request
Milestone

Comments

@hanslovsky
Copy link
Collaborator

hanslovsky commented Apr 26, 2018

Currently, painting does not update 3D meshes. This is a continuation of and the last remaining open task in saalfeldlab/bigcat#22

Update:
Finally, I was able to address this issue starting with 413638e on update-meshes-on-paint. Remaining tasks:

  • add button to UI to trigger mesh refresh
  • automatically clear mesh caches for modified blocks
  • automatically clear background block caches on merge into background
  • (de-)serialize modified blocks
  • automatically trigger re-rendering of all affected meshes when solution is propagated to level of mesh
@hanslovsky hanslovsky added the enhancement New feature or request label Apr 26, 2018
@hanslovsky hanslovsky self-assigned this Apr 26, 2018
hanslovsky pushed a commit that referenced this issue May 17, 2018
hanslovsky added a commit that referenced this issue May 30, 2018
Addresses #1

TODO:
 - clear mesh caches for modified blocks
 - (de-)serialize modified blocks
 - trigger re-rendering of all affected meshes when solution is propagated to level
hanslovsky added a commit that referenced this issue May 30, 2018
addresses first bullet point in #1
@hanslovsky hanslovsky added this to the 0.1.0 milestone May 31, 2018
hanslovsky added a commit that referenced this issue May 31, 2018
Addresses serialization bullet point of #1
@hanslovsky
Copy link
Collaborator Author

The remaining points (automatically clear and trigger) are not crucial and might not even be desired. We should at least think about considering this complete.

@hanslovsky
Copy link
Collaborator Author

For now, do not automatically refresh (affected) meshes. I will make a PR once all other itmes are addressed. If it becomes desirable at some point to have this behavior (maybe have a switch to enable/disable), re-open this issue. This should probably not happen before we have imglib2-caches with invalidateMatching( Predicate< K > ).

@hanslovsky
Copy link
Collaborator Author

The same holds true for the second bullet point

automatically clear mesh caches for modified blocks

This is too drastic and only the affected blocks (and potentially their neighbors) should be cleared. Again, this is only possible once invalidateMatching( Predicate< K > ) is available.

All other bullet points are checked and I will create a PR (but not merge immediately).

@hanslovsky hanslovsky mentioned this issue Jun 1, 2018
3 tasks
igorpisarev pushed a commit that referenced this issue Oct 31, 2019
…lution

An assumption was made that there is always at least one VISIBLE block in a subtree of the REMOVED node. However, this assumption was too strong and it's not always true: for example, consider the following block tree: REMOVED #1 -> REMOVED #2 -> VISIBLE #3. For example, in the next scene update the VISIBLE block #3 goes outside the screen so it's excluded from the requested tree, while it's neighboring block #4 with the same parent node #2 that was outside the screen is now inside, so it's added as a new leaf node in the PENDING state. The updated block tree becomes: REMOVED #1 -> REMOVED #2 -> PENDING #4. Then in the next scene update the resolution needs to decrease, so that the root block #1 now becomes the leaf of the requested tree, and its state is set to PENDING. The algorithm needs to keep all VISIBLE leaf nodes and its ancestors in the subtree of this block #1, and it mistakenly keeps the block #2 under the incorrect assumption mentioned above (assuming that there is a VISIBLE block somewhere below in the subtree), while there is only the PENDING block #4. Then the PENDING block #4 is excluded from the new configuration because it's not needed anymore, and the REMOVED block #2 ends up being the leaf node which is an inconsistent state.

With this fix, the block #2 will be excluded from the updated block tree configuration as well because there are no VISIBLE blocks in its subtree, and all the resulting states will be valid.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant