isl-org / isl-org/Open3D

Modifying geometry in event callback before rendering to depth buffer (thread issue?)

Open
#6,290 0 comments 0 reactions 0 assignees View on GitHub
rendering ui
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### My Question

I am trying to implement location selection similar as in the `mouse_and_point_coord.py` example. I.e., to get the world coordinates of a point clicked, I render the geometry into a depth buffer (`render_to_depth_image`) and then use `widget3d.scene.camera.unproject` to convert pixel coordinates and depth into world coordinates. However, I need to hide some objects of the geometry to exclude them from selection. I am trying to implement a "draggable" point by rendering a sphere at the point location and need to hide the sphere geometry during dragging so that it "sticks" to the "real" scene geometry. However, when I hide the sphere before calling `render_to_depth_image` it still appears in the depth image (as well as in a color image rendered via `render_to_image` for debugging purposes). I assume this is because the mouse event handler is used in a different thread. I have tried many approaches bus can't seem to figure out how to change geometry in the main thread and then resume the mouse event handler. Any advice on how to work around that issue?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.