isl-org / isl-org/Open3D

how can I attach MaterialRecord to LineSet with non-blocking draw?

Open
#6,123 1 comment 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

I’m drawing an animated simulation. I added a LineSet for “annotation” lines. The colors I specify for line segments don’t appear in the rendered images. The lines look gray, maybe shaded white?

I ran the [line_width.py](http://www.open3d.org/docs/release/python_example/visualization/index.html#line-width-py) sample code. That works fine. (Changed it to make each segment a random color to be more like my usage.)

But I need to interleave simulation steps with rendering. I **would** use `o3d.visualization.draw()` as in that sample code, but I was unable to get its `on_animation_frame` callback to work, see: https://github.com/isl-org/Open3D/issues/6094

So instead I am using what I guess is called [Non-blocking visualization](http://www.open3d.org/docs/release/tutorial/visualization/non_blocking_visualization.html), running a loop with Visualizer methods like `add_geometry`, `update_geometry`, and `update_renderer`. In those, I cannot see how to pass in a MaterialRecord (as in the line_width sample code).

I do see that the tensor version of LineSet `open3d.t.geometry.LineSet` **does** have a material property, but does not seem to be a drop-in replacement for open3d.geometry.LineSet.

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.