isl-org / isl-org/Open3D

Wrong far plane calculation in PyOffscreenRenderer::SetupCamera

Open
#4,035 0 comments 0 reactions 1 assignee Claimed by @errissa View on GitHub
headless visualization
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

**Describe the bug**
In [PyOffscreenRenderer::SetupCamera](https://github.com/isl-org/Open3D/blob/f1254b6bea246cd74d03dac7479b535ea12d6c28/cpp/pybind/visualization/rendering/rendering.cpp#L96) we first calculated the far plane and then set the camera's model matrix. However, far plane calculation depends on camera model matrix. We should update camera model matrix first.

**To Reproduce**
Delete [line 66](https://github.com/isl-org/Open3D/blob/a27456cc9f4cd43744e87c3e65a9bf196c0e5526/examples/python/gui/render-to-image.py#L66) to [line 73](https://github.com/isl-org/Open3D/blob/a27456cc9f4cd43744e87c3e65a9bf196c0e5526/examples/python/gui/render-to-image.py#L73) of `render_to_image.py`. `/tmp/test2.png` will contain only background.

**Expected behavior**
`/tmp/test2.png` should contain a green cylinder.

**Environment:**

- Operating system: Ubuntu 18.04
- Python version: Python 3.8
- Open3D version: 0.13.0
- Is this remote workstation?: no
- How did you install Open3D?: conda

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.