Skip to content

Conversation

GouMinghao
Copy link

add create_from_sparse_indices for VoxelGrid

Type

  • Bug fix (non-breaking change which fixes an issue): Fixes #
  • New feature (non-breaking change which adds functionality). Resolves #
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

Motivation: I need to create voxel grid given sparse 3d indices but found it is not implemented.
It is implmented in this PR

Checklist:

  • [ x] I have run python util/check_style.py --apply to apply Open3D code style
    to my code.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is
      updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test
      results
      (e.g. screenshots or numbers) here.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

add create_from_sparse_indices for VoxelGrid
the result of my added python test is given in the image below
2025-08-15 23-39-13屏幕截图

Copy link

update-docs bot commented Aug 15, 2025

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@GouMinghao
Copy link
Author

@syncle @griegler Could you please help review this pr

Copy link
Member

@ssheorey ssheorey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @GouMinghao thanks for submitting this PR! Does this function meet your needs?

CreateFromPointCloud()

https://github.com/isl-org/Open3D/pull/7327/files#diff-b9c67bc5c7b93513cdea4082d98482283a4ea17ad487a5cc60e0298d9994c15cL197-L209

You can first create a point cloud from the indices (these will be the coordinates of the point cloud) and the colors, and then use this function.

@ssheorey ssheorey added the status / needs info Waiting for information from reporter / author label Sep 2, 2025
@GouMinghao
Copy link
Author

Hi @GouMinghao thanks for submitting this PR! Does this function meet your needs?

CreateFromPointCloud()

https://github.com/isl-org/Open3D/pull/7327/files#diff-b9c67bc5c7b93513cdea4082d98482283a4ea17ad487a5cc60e0298d9994c15cL197-L209

You can first create a point cloud from the indices (these will be the coordinates of the point cloud) and the colors, and then use this function.

Thank you for your reply, but I believe you suggestion does the job in some indirect way and sacrifices performance

So it would be better to do it in the direct way as it is very important and common in OCC visualization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status / needs info Waiting for information from reporter / author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants