isl-org / isl-org/Open3D

How to remove the default room background from the visualizer?

Open
#4,836 12 comments 0 reactions 0 assignees View on GitHub
question visualization
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

Hi, how do I remove the default room background from the visualizer in python and C++? The room becomes visible on the surface of a reflective object.

Please refer to the example code and output below. Thanks!

```
import open3d as o3d
import open3d.visualization as vis
import numpy as np

sphere = o3d.geometry.TriangleMesh.create_sphere(1.0)
sphere.compute_vertex_normals()
sphere.translate(np.array([0, 0, 0]))
box = o3d.geometry.TriangleMesh.create_box(2, 4, 4)
box.translate(np.array([-1, -2, -2]))
box.compute_triangle_normals()

mat_sphere = vis.rendering.MaterialRecord()
mat_sphere.shader = 'defaultLit'
mat_sphere.base_color = [0.8, 0, 0, 1.0]

mat_box = vis.rendering.MaterialRecord()
mat_box.shader = 'defaultLitSSR'
mat_box.base_color = [0, 0, 0, 1.0]
mat_box.base_roughness = 0.0
mat_box.base_reflectance = 1.0
mat_box.base_clearcoat = 0.0
mat_box.thickness = 4
mat_box.transmission = 0.0
mat_box.absorption_distance = 1
mat_box.absorption_color = [0, 1.0, 0]
geoms = [{'name': 'sphere', 'geometry': sphere, 'material': mat_sphere},
{'name': 'box', 'geometry': box, 'material': mat_box}]
vis.draw(geoms)
```

![image](https://user-images.githubusercontent.com/38013936/156482587-1e82e9b8-56b8-4b17-8c20-7dcfa56e8230.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.