isl-org / isl-org/Open3D

Scene widget sometimes disappears.

Open
#5,768 0 comments 0 reactions 0 assignees View on GitHub
question
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

Hello,
Situation summary:
I add five SceneWidgets into gui instance window.
Those scenes are empty only coordinates axes are shown.
Sometimes some widgets when I left click on them or try to zoom in/out with mouse scroll wheel axes disappears or skybox changes into white background. Geometries won't show too if I'd added them.
I noticed that first scene widget never behaves like this and works fine, but this occurs only to other scene widgets.
What causes this behavior and how can I solve this?

Adding images that represents situation where no interaction with mouse were made, and situation where rotating scene with left mouse click was made.

```

from screeninfo import get_monitors
import open3d.visualization.gui as gui
import open3d.visualization.rendering as rendering

def main():
res_width = 800
res_height = 600
mon_pos_x = 0

# Set resolution
for monitor in get_monitors():
if monitor.is_primary:
res_width = monitor.width
res_height = monitor.height
mon_pos_x = monitor.x

# Initialize app and create window.
inst = gui.Application.instance
inst.initialize()
win = inst.create_window('test', res_width, res_height, mon_pos_x)

# Add five scenes.
for i in range(5):
widget_height = 300
widget = gui.SceneWidget()

widget.scene = rendering.Open3DScene(win.renderer)
widget.scene.show_axes(True)
widget.scene.show_skybox(True)
widget.scene.camera.look_at([0, 0, 0], [0, 0, -1], [0, 1, 1])

# Set widget position values.
width = win.content_rect.width * 0.5 - 20
pos_mod = i % 2
pos_x = int(width * pos_mod) + 10 * pos_mod
pos_y = widget_height * int(i / 2) + 10 * int(i / 2)

# Set widget position and dimensions.
widget.frame = gui.Rect(pos_x, pos_y, width, widget_height)

# Put widget on screen.
win.add_child(widget)

inst.run()

if __name__ == '__main__':
main()

```

![pre_interaction](https://user-images.githubusercontent.com/45768114/206161370-6028a1e5-916c-4dc9-a6b5-844807ff37a4.png)
![post_interaction](https://user-images.githubusercontent.com/45768114/206161576-12367c41-d365-4134-a5e2-92e4abd446b5.png)

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.