Cannot change color when visualizing octree
- 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).
### Describe the issue
I am trying to visualize an octree based on height of each leaf node. I can toggle the colour map of a regular point cloud in the open3d viewer by pressing the 4 key.
### Steps to reproduce the bug
```python
`
#Save as csv
new_file = r"C:\Users\hseely\Downloads\temp_points.ply"
# Pass xyz to Open3D.o3d.geometry.PointCloud and visualize
pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(xyz)
o3d.io.write_point_cloud(new_file, pcd)
# Load saved point cloud and visualize it
pcd = o3d.io.read_point_cloud(new_file)
#Set height as colours
z = xyz[:,2]
#Scale height between 0 amd 1
z = (z - np.min(z)) / (np.max(z) - np.min(z))
z = np.reshape(z, (z.shape[0], 1))
col_arr = np.concatenate((z, z, z), axis =1)
#Try plotting octree
# fit to unit cube
pcd.scale(1 / np.max(pcd.get_max_bound() - pcd.get_min_bound()), center=pcd.get_center())
pcd.colors = o3d.utility.Vector3dVector(col_arr)
o3d.visualization.draw_geometries([pcd])
print('octree division')
octree = o3d.geometry.Octree(max_depth=5)
octree.convert_from_point_cloud(pcd, size_expand=0.01)
o3d.visualization.draw_geometries([octree])`
```
### Error message
No error provided
### Expected behavior
Would expect the octree to be coloured based on height just like the point cloud.
### Open3D, Python and System information
```markdown
- Operating system: Windows 10 64-bit
- Python version: Python 3.8
- Open3D version: 0.16.0
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip
```
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.